class qf_lib.plotting.decorators.top_drawdown_decorator.TopDrawdownDecorator(prices: qf_lib.containers.series.qf_series.QFSeries, count: int, colors: List[str] = None, key: str = None)[source]

Bases: qf_lib.plotting.decorators.chart_decorator.ChartDecorator

Highlights the top drawdowns in a specified series.

The top count amount of drawdowns will be highlighted. If colors is None then a default list of colours will be used, you can override it by specifying a list of strings containing color names or hex codes.

  • prices (QFSeries) – A series from which drawdowns will be calculated.

  • count (int) – The amount of longest drawdowns to highlight.

  • colors (List[str]) – A list of colours to use to highlight the drawdowns.



Modifies the axes object taken from the chart (e.g.

decorate(chart: qf_lib.plotting.charts.chart.Chart)[source]

Modifies the axes object taken from the chart (e.g. adds legend, draws cone, etc.).