Wrote a python algo with manual subscription to one equity as I learned from the bootcamps. Would like to test it on the top 50 stocks by dollar volume to get a better idea of how it performs in general.
It appears a course universe filter could populate the symbol space with these, however, want to allocate the full account balance to each one, and not trying to choose from amongst several issues to trade.
Been reading documentation but have no clue how to backtest on a list of symbols except by changing the symbol before running a backtest, which is tedious.
Of future interest as well is optimizing parameters on in-sample data then testing on out of sample.
Assuming I'm missing a LOT when it comes to backtesting; trying to get up to speed with what is possible so I don't waste time manually plugging things in. Any resources, sample code, advice etc appreciated!
(May be worth noting the expanded capabilities of backtesting locally? Assuming a local installation is far more powerful but as yet unsure how much so!)
Douglas Stridsberg
Hi Ian,
Right now there isn't anything natively in QC that supports optimisation or running backtests in parallel or in batches. There's a GitHub project tracking the progress.
In the meantime, I would recommend using GetParameter( "parameter-name-here" ) in your code and then setting the symbol as a parameter in the backtesting engine.
If you're able to run LEAN locally (which for equities isn't a good idea since you can't download the data to use locally), you can also use my LEAN batch launcher which enables parallel running of backtests and optimisation.
Ian Larson
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.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!