Calculate DD from CSV
- This topic has 4 replies, 2 voices, and was last updated 2 days ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
Similar topics:
Forums › ProRealTime English forum › General trading discussions › Calculate DD from CSV
Hello,
Simple question:
I want to calculate Maximum Drawdown (MDD) using data exported from the ProRealTime ProBacktest report (CSV file).
Is it possible for my external calculation to match the exact MDD value shown in the ProRealTime platform’s statistical report?
If so, what specific data field(s) do I need to ensure are included in the CSV export to achieve this match?
Thank you.
This is the calculation:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
// DrawDown // ONCE Capital = 10000 ONCE MaxPoint = 0 ONCE MaxDD = 0 //------------------------------------------ // EQUITY Equity = Capital + StrategyProfit TempProfit = PositionPerf * PositionPrice / PipSize * PipValue // / abs(CountOfPosition) TempEquity = Equity + TempProfit //------------------------------------------ // DrawDown MaxPoint = max(MaxPoint,TempEquity) DD = MaxPoint - TempEquity MaxDD = max(MaxDD,DD) DDperc = MaxDD * 100 / Capital |
You need to provide yourself the Capital, then you will have to provide what is needed to compute the following data:
Another qurstion in same subject
I’m backtesting a trading system designed to operate on a Daily (1 Day) timeframe (e.g., entry/exit signals are only generated at the close of the daily candle).
I want to calculate the most realistic Maximum Drawdown (MDD) for this strategy.
My question pertains to the resolution of the data required for this crucial metric:
Close-to-Close MDD: If I calculate MDD based only on the daily Close of the strategy’s equity curve, it will miss any deep pullbacks that occur intraday (floating P&L).
Intraday MDD: To capture the true worst-case scenario (Peak Equity to Trough Equity), is it best practice to analyze the strategy’s P&L using 1-minute (1m) historical data?
Specifically, for a strategy that only trades once a day, should the MDD reporting rely on high-resolution 1-minute data to accurately reflect the maximum potential adverse excursion (MAE) experienced by the open position?
Any insights into how professional backtesters or ProRealTime handles this distinction would be greatly appreciated.
Thank you!
As to the above list:
Find exclusive trading pro-tools on