Live data from Hacker News

Show HN: How I Used Machine Learning to Optimize My Trading Algorithm

quantopian.com

41–47 of 47 posts

Re: Show HN: How I Used Machine Learning to Optimize My Trading Algorithm

#41
post #10
post #6

Earlier quoted context omitted.

One point in the graph shows a -144% return. How do you even get a -144% return? Debt?

Yeah. This algo is highly leveraged - like 15X. It's possible to really lose your shirt if you trade this algo exactly. Taibo's algo is interesting as a starting point. It's not one that that you just take off the shelf and start trading with. But, you can take it and learn from it and develop an alternative strategy. Presumably one with less risk!

Dunster, any clue if Quantopian supports option trading?

Re: Show HN: How I Used Machine Learning to Optimize My Trading Algorithm

#42

If someone really came up with some fool proof method of beating the market, wouldn't they keep it secret? Meanwhile, most folks should stick to asset class allocation and indexed funds and ETFs.

Judging by the success of a select few firms, like Renaissance Technologies (known for snatching up Putnam Fellows and top university faculty with outrageous compensation packages), it seems possible that this has already happened.

(I highly doubt they have a "fool proof" method, but clearly their method is better than others, or at least has been so far.)

Re: Show HN: How I Used Machine Learning to Optimize My Trading Algorithm

#43
Is it possible to bring in your own data sets? It seems the more interesting algorithms would be those that merge the pure financial volume data with outside sources like news, social data, weather patterns, or other predictors relevant to individual stock prices.

I do data mining work (not in finance) and often the best signal is the one missing. Often more prediction value is gained from additional feature construction and the layering of more interesting data sources onto the problem than simply a better algorithm on the data at hand.

Re: Show HN: How I Used Machine Learning to Optimize My Trading Algorithm

#44

Great job. From 2007-12-01 to 2008-12-31 you only managed to lose 215.81%. The benchmark only lost 37.04%.

Where are you seeing that earlier data? I can only get the graphs to cover 2012 and 2013.

This is a good example of how deceptive a percentage-change-only chart can be, without the absolute value of the portfolio also figuring in. If the system has a max drawdown of 98%, then getting 200% returns after hitting that low isn't going to do much good.

Re: Show HN: How I Used Machine Learning to Optimize My Trading Algorithm

#45
post #12
post #4

sticking around for 97% drawdown? Sorry.. doing this in real life would be more stupid than anything

yeah the algo looked like it was just highly leveraged version of the benchmark. The benchmark, which you can get a better look at if you remove the algos chart looks a lot like SPX or some other US index (at least when you eyeball it). I would like to see this run against 2008s market and see what would happen.

> I would like to see this run against 2008s market and see what would happen.

Disaster. I'm only in Nov and at -200% return, 88% drawdown. Ouch.

Edit: spoke too soon: -453% vs -45.3% bench in nov.

Re: Show HN: How I Used Machine Learning to Optimize My Trading Algorithm

#46

Great job. From 2007-12-01 to 2008-12-31 you only managed to lose 215.81%. The benchmark only lost 37.04%.

Where are you seeing that earlier data? I can only get the graphs to cover 2012 and 2013. This is a good example of how deceptive a percentage-change-only chart can be, without the absolute value of the portfolio also figuring in. If the system has a max drawdown of 98%, then getting 200% returns after hitting that low isn't going to do much good.

You can clone and run the algo yourself over any time period since 2002.

Re: Show HN: How I Used Machine Learning to Optimize My Trading Algorithm

#47
That code is a recipe for getting hurt. Here are a few points:

- Return is not everything. More informative performance metrics are Sharpe ratio (a sort of reward/risk measure) and information ratio. Both of the above have ridiculously low values in this case.

- Another thing that matters is the distribution of returns. If you have plotted this and still see nothing wrong, you are really better off doing something else. With numbers like these, chances are will be out of cash much sooner than you will hit a good month. And even after you have hit a good month, what happens when you hit a bad one?

- Beta: essentially, when the algo does well, it is mostly because of significant overexposure to the market. At this point, I would much rather lever up and buy SPY than trade using this thing.

- Predictability and risk management: ok, so you have tested this on historical data. What are the cases in which this would misbehave? After all, it is optimization, so there may be inputs for which this gives very undesirable results. How would you notice? (hint: you have no risk management in your code!)

The bottom line is that, if you ever want to put some money where your mouth is, you would have way better chances at doing well if you learned some basic finance rather than treating the markets as a black box (no matter how creative you can be). At least, you will be able to evaluate appropriately whether you are doing well or not.

Post reply on HN