sf_quant.performance.plot_turnover#
- sf_quant.performance.plot_turnover(weights: DataFrame, title: str, subtitle: str | None = None, file_name: str | None = None) None#
Plot rolling two-sided turnover over time.
Parameters#
- weightspl.DataFrame
Portfolio weights containing:
date(date): The observation date.barrid(str): Security identifier.weight(float): Portfolio weight.
- titlestr
The chart’s main title.
- subtitlestr or None, optional
The chart’s subtitle. Defaults to
None.- file_namestr or None, optional
If not
None, saves the chart to the given file path. Defaults to displaying the chart interactively.
Returns#
None
Notes#
Two-sided turnover is the sum of absolute weight changes per date.
Rolling window is 252 trading days.