Hi,
Using some code I've written, I've been able to successfully launch several backtests in parallel. Unfortunately, they tend to try to write to the same file in various instances, say when storing results in BacktestingResultHandler for example.
Most file output functions I have seen make use of `BacktestId` to name the file they are writing to. In my case, all threads seem to have the same `BacktestId`, hence why they're all trying to write to the same file.
Is there any way I can edit this `BacktestId` or randomly generate it? Alternatively, is there a global setting to turn off all writing to files entirely?
Thanks in advance!
Jared Broad
Hi - the results locally are written with this method:
Or you can hack the backtest id to be random here:
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.
Douglas Stridsberg
Thank you!
For those curious, I edited this line:
BacktestId = AlgorithmTypeName,
And edited to become the following. Let me know if you have any questions.
BacktestId = AlgorithmTypeName + "-" + Guid.NewGuid(),
Douglas Stridsberg
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!