Hi - I am trying to figure out why the returns that are shown are 1 day ahead of when the returns occurred. This backtest covers Oct 1, 2021 to Oct 19, 2021. It makes 2 trades that entire time. It enters a position on 10/12 in the morning and closes it for a profit in the afternoon. On the resulting graph, it shows Equity increasing on 10/12, but return = 0. Then, on 10/13, it shows a Daily Performance of 7.29%, but not trades were made on 10/13 and no positions were open.
Gain occurs entirely on 10/12, shown on 10/13.
Mak K
Hi Sean,
this is just how QC displays the equity changes on the chart, there is nothing wrong with your codes or projects, this is just the way it's displayed on the backtest Strategy Equity chart. So your algo knows that these returns occured on the right day but to see it on the chart you have to hover over the next day. I am not sure why this is the case but it shouldn't affect anything or cause any issues.
Let me know if you have any follow up questions!
Sean Volk
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!