Live data from Hacker News

Machine learning for financial prediction

robotwealth.com

81–84 of 84 posts

Re: Machine learning for financial prediction

#82
post #27

Anyone know where he got all the raw data to feed his algo? Clearly he used a lot of data and the two main sources of free info i know of are google finance and yahoo finance. At least with google finance i run into issues with their api if you execute too many calls simultaneously, a bunch end up not returning any data

Not sure where he got his data, but you might want to try https://www.quandl.com/ They have a free, community, curated data set of ~3200 stocks.

Wow i have not heard of that site before - thanks!

Re: Machine learning for financial prediction

#83
post #80

Earlier quoted context omitted.

They're developing sophisticated strategies. Duh.

ok, what's the difference between sophisticated and unsophisticated algorithmic trading?

Poster below is kind of right that you're never going to get an in depth answer for free...

But a few key points that separate the two: 1. It's very easy to make 50% percent a year on a few hundred thousand. If you can't even do that, it's not worth even bothering to compete. It's VERY hard to do the same with a few hundred million or worse, a billion.

2. With regards to #1, the key difference is market impact. When you start trading a non-trivial percentage of a symbol's average daily volume (eg; 10%+) you start having effects on the price. A dumb strategy would be to just place market orders for the full amount. Someone will just place a cascading set of limit orders that you'll hit as soon as you wipe out existing liquidity on the book. A slightly better strategy might hide the total order. A much better strategy will place thousands of small orders of random sizes at different times across different exchanges to simulate organic market activity and attract liquidity. This order sizing is probably based on both predictive models and analysis of the full exchange feeds (that are both very monetarily and computationally expensive to use)

3. Sophisticated algorithmic trading will either try and get the market to do something (eg; place orders in such a way as to elicit a reaction from the market) or use non-market data in combination with market data to make decisions. These approaches add external entropy and allow for more theoretical alpha than reacting to lagged market signals.

Re: Machine learning for financial prediction

#84
Hello

I'm Kris, the guy who wrote the article that started this thread. Thanks to all who have read my article and taken the time to comment. In the context of my motivation for starting my blog, it means a lot. I'm an engineer who became interested in quantitative finance and machine learning a few years ago. I learned how to code and apply my maths and stats knowledge to finance independently - no formal training whatsoever. This meant that for a long time I was conducting research and developing trading systems in a vacuum; I had no one to bounce ideas off or learn from. So I started writing about what I was doing in the hopes of getting some feedback. So thank you all for providing some. The insights were immensely valuable and I learned a lot.

I thought it would be useful to respond to some of the comments.

mathgenius brought up the extremely valid point that regular k-fold cross validation in a time series context doesn't make sense since the data is autocorrelated, not iid. I no longer use this approach for time series data, instead favoring Rob Hyndman's time series cross validation approach, also known as forward chaining. I believe this approach is the best representation of a real trading environment. The issue becomes deciding how large the rolling window of training data should be - older data may be obsolete, but excluding too much history can lead to not enough training instances.

dpweb raises a good point too, namely that just because your model performed well on past data, even if that data was out of sample, there is no guarantee that the future will be sufficiently like the past, meaning that your model may well become useless at some point in time (possibly very quickly). This is a valid point, but no reason to abandon the markets. It does however require that any algorithm's live performance be objectively monitored such that the level of deviation from expected performance can be statistically quantified. Once a pre-determined confidence level in the model's obsolescence is reached, it should be removed from the portfolio.

mcbrown's comment about publication bias is a good one too. Even worse, I've personally developed hundreds of trading systems that I haven't published. Other bloggers and publishers have most likely also done the same. This form of selection bias is very likely rampant, and is especially applicable to models 'discovered' using machine learning techniques that may not be rooted in traditional economic or financial principles. The moral: absent some form of robust accounting for selection bias, view all of these types of systems with a healthy dose of skepticism, and the published performance as a theoretical upper limit to what could be achieved in practice.

hendzen's point about partnering with a fund or proprietary trading company rather than running your reliable, alpha generating strategy yourself is also a valid one. I have happily found this out for myself recently.

Also, lordnacho is spot on regarding his take on the utility of data mining in finance.

Thanks again for all the comments!

Post reply on HN