ConeChartOOS(oos_series: qf_lib.containers.series.qf_series.QFSeries, is_mean_return: float, is_sigma: float, cone_opacity: float = 0.3, cone_stds: Sequence[float] = 1.0, 2.0, title: str = 'Performance vs. Expectation')[source]¶
While using a simple cone (e.g. LineChart with Cone decorator) the results of the evaluation may be very different depending on the live_start_date. To be immune to this, ConeChart plots only the ends of simple cones which start at 1 periods, 2 periods, …, n periods before the end of the backtested series. The period length depends on the frequency of the data provided for the chart. If it has daily frequency, then the length of one period will be 1 day.
oos_series (QFSeries) – data to be plotted using ConeChartOOS - only the Out of sample data
is_mean_return (float) – mean daily log return of the strategy In Sample
is_sigma (float) – std of daily log returns of the strategy In Sample
cone_opacity (float) – opacity of the cone
cone_stds (Sequence[float]) – list/tuple of different standard deviations for which cones should be drawn
title (Optional[str]) – title of the plot, by default it is ‘Performance vs. Expectation’
Plots all DataElementDecorators added to a chart.
plot(figsize, float] = None)
Plots the chart.
Plots all DataElementDecorators added to a chart. This function should set legend_artist field in each plotted DataElementDecorator (if applicable).
data_element_decorators (List[DataElementDecorator]) – non-empty list of DataElementDecorators that should be plotted on the chart
plot(figsize: Tuple[float, float] = None)[source]¶
Plots the chart. The underlying figure stays hidden until the show() method is called.
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
plotfunction. The values are expressed in inches.