Difference between revisions of "Machine Learning Algorithms for Trading"

From Quantitative Analysis Software Courses
Jump to navigation Jump to search
Line 32: Line 32:
 
==Lesson 3: K Nearest Neighbor (KNN)==
 
==Lesson 3: K Nearest Neighbor (KNN)==
  
==Lesson 2: Q-Learning and Dyna==
+
==Lesson 4: Assessing a learning algorithm==
*Long/short
 
*Overview of use and backtesting
 
**Out of sample
 
**Roll forward cross validation
 
*Supervised ML (intent is that the treatment here is light)
 
**Use: Regression
 
**Use: Classification
 
**Model type: Parametric
 
**Model type: Instance-based
 
*Reinforcement Learning (light)
 
**Use: Find a policy
 
*Introduce the problem we will focus on in the rest of the class, namely:
 
**Example data, will learn on over a particular year (2012)
 
**Will test on over the next two years (2013 2014)
 
**It will be "easy" data that has obvious patterns
 
**You will create trades.txt and run them through your backtester
 
*Overview: LinReg, KNN, Decision Trees, Q-Learning
 
 
 
==Lesson 3: Time series prediction as an ML problem==
 
[note: need to create fake stock data that has embedded patterns]
 
 
 
==Lesson 4: Learner APIs==
 
 
 
==Lesson 5: Linear regression==
 
 
 
==Lesson 6: KNN==
 
 
 
==Lesson 7: Assessing a learning algorithm==
 
 
*Now that we have two, (linreg & KNN), let's compare them
 
*Now that we have two, (linreg & KNN), let's compare them
 
*RMS error
 
*RMS error
 
*Scatterplot predict vs actual
 
*Scatterplot predict vs actual
 
*Corrcoef
 
*Corrcoef
 +
*Overfitting
  
==Lesson 8: Overfitting==
+
==Lesson 5: Ensemble learners, bagging and boosting==
  
==Lesson 9: Decision trees==
+
==Lesson 6: Reinforcement Learning==
 +
*Classic view of the problem (from Kaelbling, Littman, Moore)
 +
*Model-based
 +
*Model-free
  
==Lesson 10: Ensemble learners & bagging==
+
==Lesson 7: Q-Learning==
  
==Lesson 11: Random trees & forests==
+
==Lesson 8: Dyna==

Revision as of 14:00, 14 July 2015

Lesson 1: How Machine Learning is used at a hedge fund

  • Overview of use and backtesting
    • Out of sample
    • Roll forward cross validation
  • ML methods we will use in this class
    • Linear regression
    • KNN regression
    • Random Forest regression (considering to drop)
    • Q-Learning
  • Supervised ML (intent is that the treatment here is light)
    • Use: Regression
    • Use: Classification
    • Model type: Parametric
    • Model type: Instance-based
  • Introduce the problem we will focus on in the rest of the class, namely:
    • Example data, will learn on over a particular year (2012)
    • Will test on over the next two years (2013 2014)
    • It will be "easy" data that has obvious patterns
    • You will create trades.txt and run them through your backtester

Lesson 2: Regression

[note: need to create fake stock data that has embedded patterns]

  • Definition of the problem 1
    • training: Xtrain, Ytrain
    • using: Query with X
  • Definition of the problem 2: APIs
    • constructor
    • addEvidence(X,Y)
    • query(X)
  • How to implement linear regression

Lesson 3: K Nearest Neighbor (KNN)

Lesson 4: Assessing a learning algorithm

  • Now that we have two, (linreg & KNN), let's compare them
  • RMS error
  • Scatterplot predict vs actual
  • Corrcoef
  • Overfitting

Lesson 5: Ensemble learners, bagging and boosting

Lesson 6: Reinforcement Learning

  • Classic view of the problem (from Kaelbling, Littman, Moore)
  • Model-based
  • Model-free

Lesson 7: Q-Learning

Lesson 8: Dyna