RegressionChart

class qf_lib.plotting.charts.regression_chart.RegressionChart(benchmark_tms: qf_lib.containers.series.qf_series.QFSeries, strategy_tms: qf_lib.containers.series.qf_series.QFSeries, tail_plot=False, custom_title=False)[source]

Bases: qf_lib.plotting.charts.chart.Chart

Creates a regression chart.

Parameters
  • benchmark_tms (QFSeries) – timeseries of the benchmark

  • strategy_tms (QFSeries) – timeseries of the strategy

  • tail_plot (bool) – plot tail data

  • custom_title (bool) – add custom title to the plot

Methods

plot(figsize, float] = None)

Plots the chart.

plot(figsize: Tuple[float, float] = None)[source]

Plots the chart. The underlying figure stays hidden until the show() method is called.

Parameters

figsize (Tuple[float, float]) – The figure size to draw the chart at in inches. This is a tuple of (width, height) passed directly to matplotlib’s plot function. The values are expressed in inches.