Is there a way to override the name of the File for SaveResults (https://www.quantconnect.com/lean/documentation/topic31381.html) or invoke in the EndOfAlgorithm()?
I'm trying do a few backtests and have the outputs be like ParameterizedAlgorithm_customName.json instead of ParameterizedAlgorithm.json and then compare the results in a python jypter notebook and help would be much appreaciated. thanks
Alexandre Catarino
Hi Andrew Chan ,
The filename the BacktestId set by JobQueue.NextJob#L160 with AlgorithmTypeName value, so you could hack Lean at this point to add a custom name.
However, why not just running Lean with a batch script that renames the result json file after a backtest is completed?
Andrew Chan
Thanks, may need to do that but thought there may be an more elegant solution, also if I want to run a bunch in parraell I don't want to mis-name one because may introduce a race condition
Andrew Chan
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!