Any idea why the results of backtesting this come out different every time? I have another algo that varies even more and I would very like much like to be able to report the statistics of it in a definitive manner.
QUANTCONNECT COMMUNITY
Any idea why the results of backtesting this come out different every time? I have another algo that varies even more and I would very like much like to be able to report the statistics of it in a definitive manner.
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.
Jared Broad
Statistics are the same each time unless you're using a random number generator like is found in some AI libraries or you're using DateTime.Now which moves the date range you backtest. Statistics are found at the bottom of your backtest.
The top runtime statistics used to vary as they're the last packet sent from the backtest. We've fixed them now so they are updated to the same as the final result at the end of the backtest.
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.
Warren Harding
Hi Jared! Merry Christmas! The statistics at the bottom are varying as well. So is the graph. I'm using a date of 1/1/2017 but I've ruled that out as I performed multiple backtests just a few minutes from each other, also that wouldn't change the shape of the graph. I'm not using any random number generators or parallelization so I don't think it's on my end. Maybe you're processing limit orders in parallel or something? I'ld prefer to be able to shut off any parallelization on your end if that's what it takes to get a stable report.
Petter Hansson
I did check three runs of this, but I couldn't immediately see what was wrong. I've had this issue as well (rarely) but I basically ignored it previously.
Most interesting is that it's definitely producing a signficant number of different trades, so that's a good entry point for debugging.
Warren Harding
Thanks Petter. I found this in a forum posting.....
Jared Broad
Staff Pro , June 2013
Hey Eyal! Glad you're digging into the platform :)
The orders are processed after leaving the Event functions -- for example:: you can queue 1000 orders, and they will be sent to the order filling systems and processed in parallel. This is closer to a real execution system.
For example: sometimes you may sent Limit Orders -- which may take a long time to fill and won't get the average price instantly.
.....Which would almost explain it. Some orders might not get filled due to lack of funds, leading to different orders getting filled from the parallelization. That would lead to the type of results I've seen except that I didn't see any lack of funds flags while debugging. I suspect parallelization though.
Jared Broad
deterministic order.
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.
Warren Harding
Thanks Jared, guess I'm barking up the wrong tree. The problem seems to have gone away.
Warren Harding
Sorry for my last post, the problem has reappeared. It just seems to happen with some files.
Warren Harding
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!