qf_lib.common.utils.returns.max_drawdown.max_drawdown(input_data: Union[qf_lib.containers.series.qf_series.QFSeries, qf_lib.containers.dataframe.qf_dataframe.QFDataFrame], frequency: qf_lib.common.enums.frequency.Frequency = None) → Union[float, qf_lib.containers.series.qf_series.QFSeries][source]

Finds maximal drawdown for the given timeseries of prices.

  • input_data (QFSeries, QFDataFrame) – timeseries of prices/returns

  • frequency (Frequency) – optional parameter that improves teh performance of the function it is not need to infer the frequency


  • maximal drawdown for the given timeseries of prices expressed as the percentage value (e.g. 0.5 corresponds

  • to the 50% drawdown)