Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Tearsheet - Low Volatility But Suboptimal For Contest Due To 2% Volatility Floor

What to do? Here's my low volatility algo that trades ~800 stocks on a daily rebalance with a 10+ years backtest. I'm hestitant to enter it in the contest because it will churn out a suboptimal contest score due to the 2% Floor on Volatility. But I think this fits right in with 3-8 times leverage scheme. Comments please.

15 responses

Hi James,

Very impressive strategy!

It appears the tearsheet didn’t complete running however. I’m suspecting you’re running into memory issues since it’s such a long backrest and it’s trading a healthy amount of stocks.

Does killing all open NBs and running with the options (round_trips=True, hide_positions=True) not work?

For the contest, I would make it a bit more concentrated, so volatility moves around just above the 2% mark.

Hi Joakim,

Thanks. Yeah I'm having memory issues when running options (round_trips=True, hide_positions=True) even when killing all open notebooks. Yes, I did a more concentrated version , trading ~400 stocks giving an above 2% volatility but lower Sharpe which I just entered in the contest. Just wondering if 2% volatility floor is highly justified given it's main reason is to guard against gaming volatility but maybe at the expense of legitimate below 2% volatility which seem to fit their final execution strategy of leveraging the portfolio 3-8 times.

I tend to agree on the 2% volatility floor limit. Would be interesting to hear from Q about this. Perhaps there are other reasons for imposing this floor that we’re not aware of?

Maybe run a shorter backtest (say half of that time) and try to get a tearsheet completing with the round_trips=True on?

Also, a higher sharpe for your less concentrated strategy I believe indicates they your final (combined) factor has solid predictive power.

If you’re willing to share, I’d be interested to know if your strategy uses ML at all, and any premium (or self serve) datasets?

Yes, Joakim, I think Jess said that in one of her webinar. If the strategy's Sharpe increases as you lessen the position concentration then pure true alpha shows signs of solid predictive power. This algo displays those features.

No ML , no premium datasets, just pure magic, hehehe!

PS - Oops, I forgot to elaborate on the MAGIC acronym: Managable, Aggressive, Growth, Investment returns, Concentration less :-))

@James, those are impressive numbers. I like the smoothness of the equity curve and the low-volatility number. Great job.

@Guy,

Thanks. Nice to hear from you!

@James, low volatility and low drawdowns. Impressive. Q automated tools are supposed to cover all algorithms in the platform.

Thanks Leo! This after 10,000 plus backtests, lol! But I'm having fun.

@ James, great work! You can tell a lot went into getting those numbers and charts look the way they do. If you don't mind me asking, did you combined Fundamental Factors and Technical Indicators?

Hi Daniel,

Thanks. Yes, combo of both.

Love the acronym!! 8^)

To test the limits of this algo vis a vis the contest thresholds, I've increased the number of stocks held on daily rebalance from ~800 to ~900 and it failed the Turnover constraint just by a tad bit. But on the positive note, Sharpe increased to 1.91 from 1.82 in 10+ years backtest, which to me is more important and confirms Dr. Jess statement that this phenomenon exhibits signs of solid predictive power!

Here's the notebook:

I made some improvements on the above low volatility algo. I am still having problems running the full tearsheet. I tried running sub modules of the full tearsheet as suggested by Q but some works and others don't. I might be doing something wrong. HELP please!

Anyway, here's the simple tearsheet along with the returns tearsheet.

Bump! I need help with running some of the sub modules of the full tearsheet but get an error like this:

bt.create_round_trip_tear_sheet()

AttributeErrorTraceback (most recent call last)  
<ipython-input-3-69ba54211d3c> in <module>()  
----> 1 bt.create_round_trip_tear_sheet()

AttributeError: 'BacktestResult' object has no attribute 'create_round_trip_tear_sheet'