Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Contest 8 Winner: Robert Shanks

The first 6-month contest has officially come to a close, and congratulations are in order for Robert Shanks, winner of Contest 8!

Originally from Ottawa, Canada, Robert studied Systems Design Engineering at The University of Waterloo. He is currently residing in sunny California, working as an engineer. Robert's interest in finance began with conversations he held with one of his surfing friends and snowballed into a more serious interest. He came across Quantopian when searching the web for financial datasets and took to writing trading algorithms as an outlet for fusing his programming skills and his passion for capital markets and mathematical modeling.

"The only things that will get me up by sunrise are good surfing waves or the opening bell of the stock market."

Between the research environment and the IDE, Robert has found Quantopian to be a great way to interact with a rich set of financial data, that allowed him to focus all of his efforts on developing his strategy. Prior to working on Quantopian, Robert didn't have any Python programming experience, but easily made the transition from his fluency in C, Javascript, and Ruby. He also enjoys the Quantopian community, which he notes is pleasantly encouraging and helpful, despite the competitive nature of the field.

Robert credits his success to his alma mater for giving him a great foundation in broad quantitative problem solving as well as his wife Alice for putting up with his late nights of coding.

We've already paid out over $10,000 in contest earnings. Are you the next contest winner? Submit your algorithm by the next deadline on Mar. 1 at 9:30AM ET!

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. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. 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.

17 responses

Thanks Jamie.
A big thumbs up to all the folks at quantopian for their hard work on the platform, lecture series and forum!

Congrats Robert! So did you get $5,000 cash, or is your algo gonna go live with $100,000 real money and trade for 6 months?

Also, any chance you'd publish the code?

Congratulations Robert!

Thanks!

@Grant: I'd like to go live for 6 months. Given that, I don't think I'll publish this code in particular. I can describe it though: it tries to maintains its market neutrality from an exposure/sector perspective over time. It tends to make money on volatility, so recent turbulence has been... beneficial.

congrats Robert! Wish I can be surfing. Took the lessons a while back in Fiji but didnt got any chance to practice. It is snowing here.

Congrats Robert.

@ Robert,

If you run your algo against $1M, does it hold up? Just curious if there is an indication it might be scalable to the present contest rules (and by implication, potentially useful for the Q hedge fund)?

@Robert: One suggestion which you are of course free to ignore, is to share just the tear-sheet of your winning algorithm, setting live_start_date and hide_positions=True. That way no code or positions are revealed but you could show the properties of the algorithm. Would certainly be of interest to many here! I'd be happy to help in creating that. Essentially you'd just rerun a new backtest until yesterday and put the day you entered it into the contest as live_start_date.

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. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. 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.

good work, Robert!

Nice job Rob!

Well done Robert!

Thanks everyone!

@Grant: it doesn't trade in particularly illiquid stocks, so it does fine. If I had a larger allocation, when entering larger positions I might consider using a vwap style order rather than the order_target_percent. I'm also not certain on how difficult it is to short certain positions - I know in my own personal account I had trouble shorting certain names due lack of availability from my broker, but my algo traded those names.

@Thomas: Happy to get feedback from folks in the community. I've attached the tearsheet.

Thank you for that Robert. Now that's some really impressive out-of-sample performance... Very low volatility given the current market and near (very!) 3x leverage :)

It would be nice to get some updates in a few months. Congrats again!

Maybe the kind folks at Q will let you reduce the leverage a bit before you go live? Part of their algo consultation service? It'd be a shame to bounce over the 3X level and have the algo stopped with real money on the line.

Also, regarding the "impressive out-of-sample performance" I'm not sure what to make of it, vis-a-vis the blued-shaded cone thingy. Doesn't it say that the strategy has come unhinged from its historical trend? Wouldn't that be a bad thing? If it'd gone the other direction, and ended up under the blue cone instead of over it, there would be cries of over-fitting. How is the blue thingy calculated? How is it to be interpreted?

Thanks for sharing Robert, that looks great! Any reason the trading volume spiked in late 2015?

Grant: The cone is just 1 SD, so quite low. We usually look at three cones, 1, 1.5 and 2 SD. I don't think there's reason for concern until you breach the 2nd cone. You're asking more generally though. so what do you do if it would breach the upper side of the 2 or 3 SD cone? Probably not switch it off as it's making money. But it does imply it's not working as advertised in the backtest so there's definitely some tension there. Market regimes change, however, so having something that works OOS is the best test there is. I wouldn't make any decisions based on it alone but rather start looking at things more closely when a strategy starts to leave the cone. The cone is also useful to visually scale the cumulative returns when you compare them.

@ Thomas,

Thanks. A few questions/comments:

  1. Does the cone calculation include OOS data (i.e. is it computed on a rolling basis beyond the backtest end date)? Or is it simply an extrapolation of statistics derived from the backtest?
  2. Does the cone somehow incorporate benchmark information?
  3. Is the backtest included at all in the contest ranking and winner determination?
  4. It appears that the tearsheet was generated with a backtest only, but ideally it would be a melding of backtest data and live contest trade results. Is this feasible?
  5. I'd be careful with the philosophy of "Probably not switch it off as it's making money" (not referring to this algo, but in general), and hopeful attribution to market regimes and such. If the Q fund concept of cobbling together black boxes is still alive, then you'll need a way to discourage over-fitting (or wait for years of OOS data). So, if you kill strategies that aren't rigorously consistent on a statistical basis with their backtests, regardless of whether performance is good or bad, it'd be one way to mitigate the black box risk. Aspiring managers will be less likely to bias their backtests if they know that their real-money gains would be cut off for inconsistency with their simulated historical results. Or maybe backtest results become irrelevant after 6 months of OOS trading anyway? It seems that compared to a normal fund development process, you are stuck with either some level of black box risk or mitigating that risk by dragging out your development process, compared to that of a traditional fund (unless the benefit of crowd-sourcing of black-box algos far outweighs the risk).

@ Robert,

I'm curious if the high leverage helped you in the contest? Or would you have done just as well with a gross leverage of 1.0? It seems that for the Q fund, there would be something like a normalization of gross leverage for each algo, and then an overall optimization, with leverage doled out according to the goals of the fund. So, I'm wondering if the contest rules capture this.

Also, will you share your winning code with Quantopian (but not publicly, as you state above)?

@Thomas: profit taking. I'm not sure if the tearsheet mentions but I ran this backtest with 1M backing, not 100K, so the portfolio turnover rate is a better indicator than pure volume or dollar volume.

@Grant: leverage is a double edged sword that cuts both ways. You'd have to look at the distribution of contestant's volatility, returns, and drawdowns to determine if it helped or hurt in terms of contest ranking.