Back to Posts
Listen to Thread

Not quite ready for prime time, but here's an update. I'll post some comments later, but I figured folks might want to have a look. See the links below for background:

https://www.quantopian.com/posts/on-line-portfolio-selection-from-grant-k

https://www.quantopian.com/posts/share-algorithms-to-be-re-written-for-quantopian

https://github.com/quantopian/quantopian-algos/blob/master/OLMAR.py

Clone Algorithm
729
Loading...
Backtest from to with initial capital ( data)
Cumulative performance:
Algorithm Benchmark
Custom data:
Week
Month
All
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Information Ratio
--
Benchmark Returns
--
Volatility
--
Max Drawdown
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Information Ratio 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
This backtest was created using an older version of the backtester. Please re-run this backtest to see results using the latest backtester. Learn more about the recent changes.
There was a runtime error.

That's pretty neat Grant. You guys are doing some fascinating work.

@Grant: I noticed the algorithm is very volatile. I suppose that's due to us being 100% invested in the market at all times but I'm not sure if there is a good alternative to that as the algorithm is sorta designed to do that. I suppose using daily data instead of minute might help.

Hello Thomas,

I need to take some more time to tinker with the algorithm to sort out what the next steps are. There are three parameters to consider:

  1. Portfolio definition (currently limited to 10 securities max.).
  2. The parameter context.eps.
  3. Number of days, n, in the moving average, mavg(n).

A larger number of securities might reduce the volatility, along with using a portfolio weighting over the moving average window length that the author describes (which effectively eliminates the window length as a tunable parameter). Note also that the author ran his testing on daily data, which I plan to sort out how to do in the full backtester (e.g. only submit orders to update the portfolio at 10:00 am every day).

Once I have time to do more testing, I'll provide an update in a new post.

Hello Thomas & Dan,

I'm getting a feel for how to "tune" the OLMAR algorithm under the daily backtest. I'd like to see if I can constrain the full backtest so that the results match the daily backtest. Also, potentially the OLMAR algorithm could be applied on a full minutely basis (rather than daily, as it was first proposed by its originator). I need to understand better how mavg(days) works, so I posted https://www.quantopian.com/posts/mavg-days-transform-details.

Log in to reply to this thread.
Not a member? Sign up!