Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
update, OLMAR algorithm - daily data & full backtester

An update with the new feature of running full backtests on daily data.

See http://icml.cc/2012/papers/168.pdf for a complete description of the algorithm.

Comments and suggestions welcome.

--Grant

4 responses

Wowza

Thanks Joshua,

The algorithm should be long-only, but when I re-ran the backtest you provide above (on minute data), I see that cash goes significantly negative with short positions. When I get the chance, I'll take a look to figure out what needs to be modified to generate sensible returns and volatility with a strict long-only constraint. Or if you sort it out first, please post the solution here.

Also, there is a suggestion in the paper for smoothing out the returns, which should reduce volatility (the authors refer to the technique as "BAH(OLMAR)").

Grant

Thanks @Grant! Super work. I was thinking about just adding some simple checking to ensure that shorts are never made as well.

Hello Joshua,

See https://www.quantopian.com/posts/olmar-implementation-fixed-bug. It should be fixed. However, it should be run on daily data only, since in my experience, the batch transform is too slow for a minutely backtest.

Give it a try and let me know what you think. You can change the list of securities, vary context.eps, and change the window length of the batch transform that computes the price average.

Grant