Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Forward-walk testing

Pardon my ignorance, but I have not found mention of whether Quantopian offers forward-walk testing/optimization. We haven't used backtesting for several years as forward-walk achieves far greater robustness. Much appreciated.

6 responses

Hi James,

It sorta depends on what you mean by "forward-walk testing/optimization." You can run algos in simulated live trading mode (see https://www.quantopian.com/help#overview-papertrading). Within the algo, you could do periodic optimization. So, the basic machinery is there, but without more information on specifically what you need to do, it is hard to say if the platform will work for you.

Grant

Hi James,

You might be interested in Alphalens, a tool for running forward testing on alpha factors.

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.

Thanks, I was looking for something like the Grail walk-forward optimizer.

What does the Grail walk-forward optimizer do? I'm not aware of a Quantopian built-in API, but you might be able to "roll your own."

Grail allows testing on unseen or OOS (out-of-sample) data, you can optimize your system on a section of historical known data, run your optimization then “unmask” forward data and see how your system performs. So, as a simple example, you optimize the algo on the 12 month period between 10 years ago and 11 years ago, then walk-forward and test it on the out of sample data in the forward year(s) and keep stepping forward and repeating the process one year at a time, so that you can see how the algo performs on the 'unknown' OOS data. Generally backtested algos peter out pretty quickly or become over optimized or add two many parameters so that you wind up with an overly fitted polynomial. Sorry, if I'm just telling you what you already know.

I'd say 'yes' something like that could be done (depending on the details), except that you'd need to sort out how to set up the optimizer yourself.