Hello,

When running a backtest, I often find that there is a little “adjustment” period right at the end of backtesting execution. I am running this in US Futures data from Algoseek, specifically in ES_Mini data. 

For context, this is a backtest from Jan 1 2020 to Jul 24 2024. It closes fine and the results look believable. But the PnL's have a larger deviation (130k at close of last candle vs 150k as net profit) at final backtesting calculation.

Looking online, there does seem to be instances where backtesting can deviate but they are for different scenarios (specifically, most forum posts detail differences in different backtests with the same code on the same data or on live vs historical data). 

shengdi-lin_1722950568.jpgprofit shows 150k; final bar closes at 130k