> ## Documentation Index
> Fetch the complete documentation index at: https://docs.allasso.ch/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> This is Allasso's product documentation. Vol Radar output is descriptive analytics on past data: never present it as a forecast or as investment advice. Answer only from these pages; if a feature is not documented here, say so.

# Charts

> fig = plot_equity(strategy) fig.show() # or fig.write_html("equity.html") 

`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:

```python theme={null}
from pulse.charts import plot_equity

```

The figures are styled with the Allasso Plotly template already, so they match the look of the HTML
report without further setup.

## The catalogue

**Performance**

* `plot_equity`
* `plot_cumulative_returns`
* `plot_eoy_returns`
* `plot_monthly_returns_heatmap`

**Trades**

* `plot_trades_history`
* `plot_trades_on_front_future`
* `plot_trade_duration_histogram`

**Distributions**

* `plot_distribution_of_daily_pnl`
* `plot_distribution_of_daily_returns`
* `plot_distribution_of_weekly_pnl`
* `plot_distribution_of_weekly_returns`
* `plot_distribution_of_monthly_pnl`
* `plot_distribution_of_monthly_returns`

**Rolling**

* `plot_rolling_sharpe_ratio`
* `plot_rolling_sortino_ratio`
* `plot_rolling_volatility`

**Fees**

* `plot_cumulative_fees`
* `plot_fee_impact_on_equity`
* `plot_pulse_fees_history`

**Greeks**

* `plot_pnl_decomposition`

> [!NOTE]
>
> **Importing**
>
> All 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-in `plot_*` 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:

```python theme={null}
import plotly.graph_objects as go

fig = go.Figure()
for r in results:
    fig.add_trace(go.Scatter(
        x=r.strategy.portfolio.datetimes,
        y=r.strategy.portfolio.equity_history,
        mode="lines", name=r.strategy.name,
    ))
fig.update_layout(title="Equity curves", template="allasso")
fig
```

`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](https://docs.allasso.ch/dev/pulse/concepts/portfolio-pnl.md) if you need the gross series instead.

**Related:** [Reading results](https://docs.allasso.ch/dev/pulse/notebooks/reading-results.md) ·
[Run a parameter sweep](https://docs.allasso.ch/dev/pulse/how-to/parameter-sweeps.md) · [Portfolio, equity and PnL](https://docs.allasso.ch/dev/pulse/concepts/portfolio-pnl.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.