import FinanceDataReader as fdr
df = fdr.DataReader('AAPL', '2000')
df
start_date = '2024-01-22'
end_date = '2025-01-21'
tmp_df = df.loc[start_date:end_date]
tmp_df
![]() |
historial_max = tmp_df['Close'].cummax()
historial_max
daily_mdd = tmp_df['Close'] / historial_max - 1.0
daily_mdd
![]() |
![]() |
mdd = daily_mdd.cummin()
mdd
![]() |
mdd.plot()
![]() |
daily_mdd.plot()
![]() |





