For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

Queries on Drawdown Calculation



  • Hello community! I have trouble understanding the drawdown calculation. Appreciate if someone can enlighten me. Below is the result of a strategy for BTC, from Jan 01 to Jan 31 2018. I did my own calculations and the max DD 1.19%, occurs on the closure of 2nd trade, dated Jan 11.

    1cb1a853-f08f-45c0-bd48-c25313f5835d-image.png

    Then, I also check the log from the drawdown observer. The max DD after 2nd trade is 3.83%. How is this figure being calculated? Also, from the log, I notice that the drawdown amount changes sometimes when there is no trade being opened or closed. Hope you are able to shed some light on this please. thank you.

    a14ec8a0-dbd9-440b-b5c6-4ba9a123ace9-image.png



  • The calculation method is here.



  • @run-out Tks for your response. I did read the documentation and work out the calculations myself as shown in the first screenshot. But the results from drawdown observer seem to be different from my calculations. My MDD is 1.19% vs the observer's MDD of 3.83%. Hence wanna know if I miss out anything or something is wrong with my calculations.



  • @run-out oh ya, I'm testing data of 30min timeframe. Does it affect the drawdown calculations? I saw another observer named TimeDrawdown, but not quite sure how it's being used.



  • Hello @ab_trader , I'm trying to understand drawdown calculations and saw your response on similar query here - https://community.backtrader.com/topic/1270/drawdown-analysis-appears-to-be-incorrect .

    So based on what you comment, our drawdown calculations are based on closed trade, without considering in-trade drawdown. In-trade drawdown refers to unrealized loss/drawdown, when the trade is still open. Is my understanding correct?



  • bt calculates draw down based on the equity (broker value) peaks and troughs. If you use different method, than don't be surprised that your results are different. If you use the same method, but your results are still different, than post the script, bt results, your results and data.



  • @ab_trader Both screenshots are results from bt. The only thing is that i manually calculate the peak, trough and drawdown after trade closure (1st screenshot), and use them to compare against the log in the 2nd screenshot (drawdown log from drawdown analyzer, only show till 2nd trade). So I wanna know if the equity (broker value) peaks and troughs in bt consider unrealized loss/drawdown in the calculation? tks.

    ee07ce23-b9ff-4e82-80d0-153d4ff07256-image.png

    7f4ffb0a-7c16-420a-bb8c-b683bb20a8fb-image.png



  • @kian-hong-Tan said in Queries on Drawdown Calculation:

    So I wanna know if the equity (broker value) peaks and troughs in bt consider unrealized loss/drawdown in the calculation?

    This should be evident from the bt outputs.



  • @ab_trader tks for the confirmation.


Log in to reply
 

});