R and Machine Learning

Posted By: Sphin

R and Machine Learning - 03/31/16 15:44

Reading the new post on Financial Hacker "Build Better Strategies! Part 4: Machine Learning" I was remembered to a book I just read that explains in details the machine learning algorithms discussed in the post with source examples in R:

Brett Lantz, Machine Learning with R – Deliver Data Insights with R and Predictive Analytics

Unfortunately the examples there doesn't deal with financial matters but one gets really a comprehensive overview.
Posted By: webradio

a compact intro to R; a higher-lever machine learning overview - 09/06/16 13:46

A small comment on Lantz's book. The author does explain some R basics, just enough to get you through excersises in the book. However, you'll feel MUCH more comfortable after this compact intro:
Impatient R

Sphin is right, no examples in the book are about trading. So keep in mind while reading about out-of-sample testing, ten-fold CV, and so on - with trading as purpose of machine learning (or any time series prediction), never peek into the future (a BAD example: train a learner on 2015 data and test on 2014. This is surely out-of-sample but worthless)

After seeing all the details in Lantz's book, you might want to get a higher level overview (only 9 pages):
Pedro Domingos - A Few Useful Things to Know about Machine Learning
Posted By: boatman

Re: a compact intro to R; a higher-lever machine learning overview - 09/08/16 01:19

+1 for both Lantz's introductory text and the paper by Domingos. Both really useful.

You'll see k-fold CV used in many machine learning applications, but it really isn't suitable for data with autocorrelations, like asset prices. Rob Hyndman discusses a much better approach - 'time-series cross validation' - on his blog, Hyndsight.

'Time-series cross validation' is essentially the same as Zorro's walk-forward optimization, which is very convenient!
Posted By: madpower2000

Re: a compact intro to R; a higher-lever machine learning overview - 09/11/16 15:19

+1 for Rob Hyndman, "Forecasting: principles and practice" are great and free: https://www.otexts.org/fpp

I personally like Andrews Ng «Machine Learning» course at coursera
https://www.coursera.org/learn/machine-learning
(It's also available as video playlist on YouTube.)

Andrew uses Octave for assignments instead R, but in video discuss in detail bolts and nuts of machine learning and give some useful practical advices, how to apply this technology.
Posted By: madpower2000

Re: R and Machine Learning - 09/15/16 19:38

Another introduction book without have math: "DEEP LEARNING MADE EASY WITH R" - http://www.auscov.com
Posted By: madpower2000

Re: R and Machine Learning - 09/24/16 16:40

Catch the live-stream Bay Area Deep Learning school @youtube here: http://www.bayareadlschool.org
Posted By: gtell

Re: R and Machine Learning - 09/26/16 13:11

What about the boot proposed in Robot Wealth:

Statistically Sound Machine Learning for Algorithmic Trading of Financial Instruments

Did anyone get it?
I have tried to find out an ebook version, but unfortunately it looks only available on paper. Which is not very comfortable, but it is still acceptable :-)
Posted By: pcz

Re: R and Machine Learning - 09/26/16 16:02

Originally Posted By: gtell
What about the boot proposed in Robot Wealth:

Statistically Sound Machine Learning for Algorithmic Trading of Financial Instruments

Did anyone get it?
I have tried to find out an ebook version, but unfortunately it looks only available on paper. Which is not very comfortable, but it is still acceptable :-)


I've read it and really liked it. Even though I studied the topic at college the book taught me a lot. I think I've seen some OCRed version online. However it's more like a user manual for TSSB than a regular ML book.
Posted By: gtell

Re: R and Machine Learning - 09/27/16 14:21

How do you rate TSSB? Is it a complete tool or it has some gaps?
How is it with comparison of other ML tools?
Posted By: pcz

Re: R and Machine Learning - 09/27/16 16:59

Originally Posted By: gtell
How do you rate TSSB? Is it a complete tool or it has some gaps?
How is it with comparison of other ML tools?


It is an interesting tool worth trying (ideally while reading the book). The scripting language is nice. Unfortunately back then it didn't have an integration for any trading platform (it's probably still the case). I didn't want to spend time creating models in TSSB only to be forced to reimplement everything later.

However there's a tool called tssbutil which is able to run TSSB through Python function invocation and which can parse TSSB outputs. Using that it could be possible to build an automated trading system using TSSB. But it's definitely not an elegant solution. I think tssbutil is no longer maintained and it required a small fix in order to run. The fixed version can be found here.

Compared with some other tools TSSB maybe allows for more rapid prototyping (if you learn how to use it effectively) but the number of model types (e.g. regression, neural networks etc..) is somewhat limited. There's lot of indicators but if I remember correctly it's not possible to extend the scripts with completely new ones. You can use indicators which are not included by generating the indicator data in another application and loading it into TSSB though.
Posted By: boatman

Re: R and Machine Learning - 10/03/16 03:37

With existing Zorro functionality, particularly the normalization functions, you can implement a lot of what's in TSSB directly in Zorro. Using the R bridge, you can actually extend it even further. You could build yourself a complete TSSB toolkit using off-the-shelf Zorro and R tools.

TSSB (the book) is quite useful as it is one of the few publications that focuses on the practical aspects of machine learning in algo trading. I would suggest that it is fast becoming dated however due to the lack of coverage of deep learning.
Posted By: pcz

Re: R and Machine Learning - 12/12/16 21:00

An interesting read, unrelated to R though. I wonder where this leads:

7,500 Faceless Coders Paid in Bitcoin Built a Hedge Fund’s Brain
https://www.wired.com/2016/12/7500-facel...?mbid=social_fb
Posted By: nanotir

Re: R and Machine Learning - 12/16/16 22:45

Probably the future way to avoid overfitting using neural networks for time series:
https://arxiv.org/pdf/1511.06434v2.pdf

https://arxiv.org/pdf/1406.2661v1.pdf

Someone knows about a library for R?
Posted By: pcz

Re: R and Machine Learning - 12/19/16 16:41

Originally Posted By: Nanitek
Probably the future way to avoid overfitting using neural networks for time series:
https://arxiv.org/pdf/1511.06434v2.pdf

https://arxiv.org/pdf/1406.2661v1.pdf

Someone knows about a library for R?


Maybe MXNet package (haven't tried it but the key words are present in its tutorial:))
Posted By: pcz

Re: R and Machine Learning - 12/21/16 13:16

Stumbled upon this free course today:

Machine Learning for Trading
https://www.udacity.com/course/machine-learning-for-trading--ud501
Posted By: nanotir

Re: R and Machine Learning - 12/22/16 22:37

Originally Posted By: pcz
Originally Posted By: Nanitek
Probably the future way to avoid overfitting using neural networks for time series:
https://arxiv.org/pdf/1511.06434v2.pdf

https://arxiv.org/pdf/1406.2661v1.pdf

Someone knows about a library for R?


Maybe MXNet package (haven't tried it but the key words are present in its tutorial:))


It currently works only for phyton tho and currently used for image clasification.
Posted By: pcz

Re: R and Machine Learning - 12/23/16 11:33

Nanitek: And do you happen to have any papers on the use of aforementioned technique in trading? I haven't found much on the topic.
Posted By: nanotir

Re: R and Machine Learning - 12/25/16 14:09

No I do not, I posted in case someone finds out. There is something to transform time series to pass them into a convolutional network and then that net structure could work, since mxnet exist for R as well, maybe that net struct work as well over there
Posted By: madpower2000

Re: R and Machine Learning - 02/07/17 14:57

Mike Halls-Moore finally finished his last book, and it IMHO worth your attention. One of the most clear, clever and useful books I ever read about quantitive trading:
https://www.quantstart.com/advanced-algorithmic-trading-ebook
Posted By: firecrest

Re: R and Machine Learning - 02/16/17 02:44

The book looks good. Any review? Is the book mainly on Python and little on R. It will be good if the book has more examples of R so that users of Zorro can benefit.
© 2024 lite-C Forums