ML4T Final Prep ACTUAL UPDATED QUESTIONS AND CORRECT ANSWERS
ML Optimizer and Parameterized model -Find minimum values of functions - build parameterized models based on data.
Optimizer marches down (gradient descent) graph to find a minimum
Import scipy.optimize as spo
spo.minimize(f, xguess, method='SLSQP, options={'disp':True
Minimizer finds coefficients C0, C1, ...etc...
f(x) = mx + b
f(x) = C0*X + C1
-
Steps to Optimize a Portfolio 1) provide a function f(x) to minimize ( ie... f(x) is negative SR)
2) Provide an initial guess for x ( where x is allocations)
3) Call the optimizer
Supervised vs Unsupervised we show the machine many examples of X and Y - which is how it learns to predict
Unsupervised - only inputs
Regression vs Classification Regression - try to make numerical prediction
Classification - classifying into one or several types
, Linear regression (parametric learning) finds parameters for a model. Take data to get parameters and then throw away
data
Problems:
-noisy and uncertain - value to be found - but it has to be accumulated over many
trading opportunities
-challenging to estimate confidence
-holding time/allocation is uncertain
-RL policy learning is better
LinReg Overfitting where d (degree) varies -as we increase d we are more likely to overfit (x^3 we get that extra curl vs just
x^2)
K Nearest Neighbor (KNN / instance based) keep historical X,Y pair data - when we want to make prediction we use the data
-use mean of y values from k nearest neighbors
KNN where K varies - when does it overfit? - k=n : we get a flatline
- k=1 - tag each individual point and more likely to overfit
as k increases we are less likely to overfit
Kernel Regression weight contributions of each of the nearest neighbors depending on how distant
they are . This is instance based and just an alternate to KNN
Decision trees Query comes in and bounces down tree - each node of the tree represents a
yes/no question. We finally reach a leaf which is the regression value returned
Decision forests - lots of decision trees together - query each one to get an
overall results
ML Optimizer and Parameterized model -Find minimum values of functions - build parameterized models based on data.
Optimizer marches down (gradient descent) graph to find a minimum
Import scipy.optimize as spo
spo.minimize(f, xguess, method='SLSQP, options={'disp':True
Minimizer finds coefficients C0, C1, ...etc...
f(x) = mx + b
f(x) = C0*X + C1
-
Steps to Optimize a Portfolio 1) provide a function f(x) to minimize ( ie... f(x) is negative SR)
2) Provide an initial guess for x ( where x is allocations)
3) Call the optimizer
Supervised vs Unsupervised we show the machine many examples of X and Y - which is how it learns to predict
Unsupervised - only inputs
Regression vs Classification Regression - try to make numerical prediction
Classification - classifying into one or several types
, Linear regression (parametric learning) finds parameters for a model. Take data to get parameters and then throw away
data
Problems:
-noisy and uncertain - value to be found - but it has to be accumulated over many
trading opportunities
-challenging to estimate confidence
-holding time/allocation is uncertain
-RL policy learning is better
LinReg Overfitting where d (degree) varies -as we increase d we are more likely to overfit (x^3 we get that extra curl vs just
x^2)
K Nearest Neighbor (KNN / instance based) keep historical X,Y pair data - when we want to make prediction we use the data
-use mean of y values from k nearest neighbors
KNN where K varies - when does it overfit? - k=n : we get a flatline
- k=1 - tag each individual point and more likely to overfit
as k increases we are less likely to overfit
Kernel Regression weight contributions of each of the nearest neighbors depending on how distant
they are . This is instance based and just an alternate to KNN
Decision trees Query comes in and bounces down tree - each node of the tree represents a
yes/no question. We finally reach a leaf which is the regression value returned
Decision forests - lots of decision trees together - query each one to get an
overall results