This is a post that has been a long time in the making. Following on from the excellent Stanford Machine Learning Course I have made examples of the main algorithms covered in R.
We have Linear Regression
Followed by Neural Networks
One remaining item is Logistic Regression, I am yet to find a library in R that behaves as I want, so that will come at some future date. I’ve been sitting on this post for ages and got sick of waiting. As an aside I find the documentation in R to be variable at best, which can make it somewhat of a pain to work with. When it is good, yes it can be very good but often it is quite poor …
R is great for data analysis and exploration, but I have found myself moving back to python for many more mundane tasks.
Anyway for those interested in the code, I have put it on Github. The data is from an exercise in the Stanford course, and by tweaking the parameters I really got a good feel for how the various algorithms work in practise.
Once I finish my backtesting engine I will probably put it up on Github as well, and then I can start digging into the applications of ML techniques for trading systems.