5. Markets
ï§ Futures market
â CME 50 liquid futures
â Other exchanges
ï§ Equity markets
â World stock indices
ï§ FX markets
â 10 major currency pairs
â 30 alternative currency pairs
ï§ Options markets
â Options on futures
â Options on indices
8. Random Forests
Fi < ti
Fj < tj Buy
Buy
Fi < ti
Sell Fk < tk
Sell
Fi < ti
Fi < ti
Buy Fk < tk
Fi < ti
Fj < tj Sell
Fi < ti
Sell
Buy
Sell Buy
Sell Buy
Sell Buy
Sell Buy
10. Training Random Forests
Bootstrapping to create training sets
C 4.5 algorithm for individual tree construction
ï§ Selecting subset of features for tree construction
ï§ Each node is associated with a subset of training samples
ï§ Recursive, starting at the root node
ï§ At each node execute divide and conquer algorithm to find locally
optimal choice
â If samples are in same class (or few class) node is a leaf associated
with that class
â If samples are in two or more classes
ï§ Calculate information gain for each feature
ï§ Select feature if largest information gain for splitting
11. Entropy
đ = set of samples associated with node
đ¶1, ⊠, đ¶ đ= classes of samples
Entropy
đžđđĄ đ = â đ=1
đ đđđđ(đ¶ đ,đ)
đ
đđđ2
đđđđ(đ¶ đ,đ)
đ
ï§ Characterizes impurity of samples
ï§ Measure of uncertainty
ï§ Additive: impurity of several subsets is
sum of impurities
12. Information Gain
đ1, ⊠, đđ = subsets of đ generated by splitting on selected attribute
Information gain discrete feature
đđđđ đ1, ⊠, đđ = đžđđĄ đ â đ=1
đ đ đ
đ
đžđđĄ đđ
Information gain continuous feature with optimal splitting threshold
đđđđ đĄ = đđđđ đâ€đĄ, đ>đĄ
đĄâ = đđđđđđ„ đđđđ đĄ
Actual implementation uses ratio information gain over split ratio
13. Training Individual Trees
Labels from positive or negative market returns
Selected
features
Permuted
labels
Label
Permutations
to
sort features
All features
Samples / observations
15. Training Individual Trees
Entropy criterion for
best feature and split
Entropy for
every split
Permuted
labels
Permuted
weights 2. Optimal
feature Fi
1. Optimal split ti
Fi < ti
16. Training Individual Trees
Recursively refine classification: mask data according to classification
Selected
features
Permuted
labels
Label
Permutations
to
sort features
Weight
Permuted
weights
Permutations
to
sort features
18. GPU Implementation
ï§ Parallelism at multiple levels
â Multiple trees, one for each set of weights
â Independent features
â Independent split points
â Multiple nodes further down the tree
ï§ GPU kernels can be implemented with standard primitives
â Random number generation for weights
â Parallel scan (cumulative sum)
â Parallel map
â Parallel reduction to find optimal feature and split
27. White Reality Check
ï§ Scale exposure according to distance from 0
ï§ Do not trade if negative returns
c* for w = 1
0
p-value
c* for w = 1
0
p-value
Market 1 Market nâŠâŠ
28. GPU Implementation
ï§ Parallelism at multiple levels
â Multiple markets
â Independent in-sample / out-of-sample windows
â Independent strategy configurations
â Independent time steps for utility functions such as mean return
ï§ GPU kernels can be implemented with standard primitives
â Random number generation
â Matrix multiplication (almost, up to return vector scaling the weights)
â Parallel reduction
29. GPU Implementation
ï§ GPU grid
â Multiple markets
â Independent in-sample / out-of-sample windows
ï§ Per GPU
â Independent strategy configurations
â Independent time steps for utility functions such as mean return