Back

Possible to run Backtest multiple times automatically?

I want to run a backtest with multiple symbols, but I don't want to treat them as being part of the same universe or portfolio.  That is, I want to run a complete Backtest with SymbolA only, then another with SymbolB, SymbolC, and so.  Optimally, I wouldn't have to manually kick off a new backtest for each symbol; and super-optimally, I'd somehow be able to compare the results of the backtests.

Any suggestions, or ideas?

I've tried putting a loop in the Initialize to set and reset the start/end dates, cash amount, etc.  But, it doesn't seem to work right.  Maybe I'm coding something wrong, but from what i can tell, I can't loop in initialize(), so I'm wondering if there's another better way.

Update Backtest








At this moment, we cannot make any optimization with Lean with one single instance. In other words, we have to rerun the algorithm for every backtest. When we loop in Initialize(), we just override the previous set up and subscribe more symbols.
We have been working to support Optimization in the QC.com. We will be able to run backtests in parallel and automatically compare the results.
 

0

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 QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect 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.


Update Backtest





0

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 QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect 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.


Loading...

This discussion is closed