Back to Community
update, OLMAR implementation

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
1160
Loading...
Backtest from to with initial capital
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
# Backtest ID: 50bb6276f6dc900faf7ab093
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.
4 responses

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

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.

@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.

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.

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.