Course Name: Trading Alphas: Mining, Optimisation, and System Design, Section No: 23, Unit No: 7, Unit type: Notebook
# Calculate Maximum Drawdown
max_ddwn = (p.add(1).cumprod()-p.add(1).cumprod().expanding().max()).min()
In previous notebook “profit factor and drawdown”, it uses cumsum() when calculating drawdown. In this notebook, it uses cumprod(). Which one is better to illustrate the drawdown?