Backtrader vs TradingView Final Portfolio Result
-
Hello,
usually, i'm using tradingview to backtesting my data, now i trying backtrader to replace tradingView.after some attempt, i tried to replicate the same Strategy ,the MAcrossover.
I'm using TSLA Data CSV for the testing.
The result is for the number of trades , entry & exit price is the same. ( In my case, it's 58 trades ).
I'm testing futures , Long & Short
But the Final Portfolio Result is Different.
My Backtester config is
-not using commision fee
-bt.sizers.FixedReverser,stake=1My TradingView Config is
-Order Size: 1 contractsFinal Result:
Backtester -> -194.60
TradingView -> 226.92My question is: It's possible to get the same final result between this two platform ? or there is some difference in TradingView Calculation, floating point, or other aspect ?
thanks.
-
some edit:
Final Result:
Backtester -> -194.60
TradingView -> -226.92both is negative.
-
@Ignasius-Wahyudi there is something(maybe wrong) when you calculate the net value when it is a future when you have a position,but after you close the position,the results is same. so , it is not a big question.
-
@Ignasius-Wahyudi results should be the same if the same data and same algo used. 15% difference is quite a lot if duration of the backtest is a year or 2-3 years.
-
@tianjixuetu ahh, i see. gonna check the positions. thanks.
@ab_trader i think so, since the number of trades is the same. gonna check it again.
-
okay, now i know whythe result is different.
Net Profit is calculated based on last closed position only
backtrader current portfolio include the PNL on open positions too.