pulse.charts ships ready-made Plotly figures for a finished run. Every plot_* function takes the
finished strategy and returns a plotly.graph_objects.Figure, so you can display it, tweak its
layout, or write it out:
The catalogue
Performanceplot_equityplot_cumulative_returnsplot_eoy_returnsplot_monthly_returns_heatmap
plot_trades_historyplot_trades_on_front_futureplot_trade_duration_histogram
plot_distribution_of_daily_pnlplot_distribution_of_daily_returnsplot_distribution_of_weekly_pnlplot_distribution_of_weekly_returnsplot_distribution_of_monthly_pnlplot_distribution_of_monthly_returns
plot_rolling_sharpe_ratioplot_rolling_sortino_ratioplot_rolling_volatility
plot_cumulative_feesplot_fee_impact_on_equityplot_pulse_fees_history
plot_pnl_decomposition
ImportingAll of the above are exported from the
pulse.charts package, so
from pulse.charts import plot_equity, plot_rolling_sharpe_ratio works directly.Overlay several strategies on one figure
The built-inplot_* helpers draw a single strategy. To compare runs (for example a parameter
sweep), build your own Figure and add one trace per result from its
portfolio.datetimes and portfolio.equity_history. Set template="allasso" to keep the house
styling:
portfolio.datetimes and portfolio.equity_history are aligned one value per pulse, so they plot
directly against each other. equity_history is post-fee (the money in the account); see
Portfolio, equity and PnL if you need the gross series instead.
Related: Reading results ·
Run a parameter sweep · Portfolio, equity and PnL
