> ## 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.

# pulse.charts

> API reference for pulse.charts.

## `plot_cumulative_returns`

```python theme={null}
plot_cumulative_returns(strategy: Strategy) -> go.Figure
```

Creates a cumulative returns chart using Plotly.

## `plot_distribution_of_daily_pnl`

```python theme={null}
plot_distribution_of_daily_pnl(strategy: Strategy) -> go.Figure
```

Histogram of the strategy's daily PnL.

## `plot_distribution_of_daily_returns`

```python theme={null}
plot_distribution_of_daily_returns(strategy: Strategy) -> go.Figure
```

Histogram of the strategy's daily returns.

## `plot_distribution_of_monthly_pnl`

```python theme={null}
plot_distribution_of_monthly_pnl(strategy: Strategy) -> go.Figure
```

Histogram of the strategy's monthly PnL.

## `plot_distribution_of_monthly_returns`

```python theme={null}
plot_distribution_of_monthly_returns(strategy: Strategy) -> go.Figure
```

Histogram of the strategy's monthly returns.

## `plot_distribution_of_weekly_pnl`

```python theme={null}
plot_distribution_of_weekly_pnl(strategy: Strategy) -> go.Figure
```

Histogram of the strategy's weekly PnL.

## `plot_distribution_of_weekly_returns`

```python theme={null}
plot_distribution_of_weekly_returns(strategy: Strategy) -> go.Figure
```

Histogram of the strategy's weekly returns.

## `plot_eoy_returns`

```python theme={null}
plot_eoy_returns(strategy: Strategy) -> go.Figure
```

Plots cumulative returns for each year starting from 0.

**Parameters**

| Name | Type | Description | Default |
| - | - | - | - |
| `strategy` | [`Strategy`](https://docs.allasso.ch/dev/pulse/api/core/strategy#strategy) | The trading strategy object containing portfolio data. | *required* |
| `additional_traces` | `list[float]` | Not used in this version, but preserved for future use. | *required* |

**Returns**

| Type | Description |
| - | - |
| `Figure` | go.Figure: A Plotly figure with one line per year of cumulative returns. |

## `plot_equity`

```python theme={null}
plot_equity(strategy: Strategy) -> go.Figure
```

Create an equity chart with equity and drawdown on the same x-axis.

**Parameters**

| Name | Type | Description | Default |
| - | - | - | - |
| `strategy` | [`Strategy`](https://docs.allasso.ch/dev/pulse/api/core/strategy#strategy) | The trading strategy object containing portfolio data. | *required* |

Returns:
go.Figure: A Plotly figure with equity and drawdown.

## `plot_cumulative_fees`

```python theme={null}
plot_cumulative_fees(strategy: Strategy) -> go.Figure
```

Line chart of cumulative fees over the life of the simulation.

**Parameters**

| Name | Type | Description | Default |
| - | - | - | - |
| `strategy` | [`Strategy`](https://docs.allasso.ch/dev/pulse/api/core/strategy#strategy) | The trading strategy whose portfolio carries the per-pulse fee history. | *required* |

**Returns**

| Type | Description |
| - | - |
| `Figure` | go.Figure: A Plotly figure tracing `cumsum(pulse_fees_history)`. |

## `plot_fee_impact_on_equity`

```python theme={null}
plot_fee_impact_on_equity(strategy: Strategy) -> go.Figure
```

Overlay post-fee equity with its no-fee counterfactual.

The no-fee curve is synthesised from a single strategy run as
`initial_equity + cumsum(pulse_total_pnl_history)`, since
`pulse_total_pnl_history` is the gross (pre-fee) per-pulse PnL.
The gap between the two curves at any point equals the cumulative fees
charged up to that pulse.

**Parameters**

| Name | Type | Description | Default |
| - | - | - | - |
| `strategy` | [`Strategy`](https://docs.allasso.ch/dev/pulse/api/core/strategy#strategy) | The trading strategy whose portfolio carries the post-fee equity history and gross per-pulse PnL history. | *required* |

**Returns**

| Type | Description |
| - | - |
| `Figure` | go.Figure: A Plotly figure with two equity curves on a shared y-axis. |

## `plot_pulse_fees_history`

```python theme={null}
plot_pulse_fees_history(strategy: Strategy) -> go.Figure
```

Bar chart of per-pulse fees charged across the simulation.

**Parameters**

| Name | Type | Description | Default |
| - | - | - | - |
| `strategy` | [`Strategy`](https://docs.allasso.ch/dev/pulse/api/core/strategy#strategy) | The trading strategy whose portfolio carries the per-pulse fee history. | *required* |

**Returns**

| Type | Description |
| - | - |
| `Figure` | go.Figure: A Plotly figure with one bar per pulse. |

## `plot_monthly_returns_heatmap`

```python theme={null}
plot_monthly_returns_heatmap(strategy: Strategy) -> go.Figure
```

Generates a heatmap of monthly returns per year.

**Parameters**

| Name | Type | Description | Default |
| - | - | - | - |
| `strategy` | [`Strategy`](https://docs.allasso.ch/dev/pulse/api/core/strategy#strategy) | Strategy with portfolio data. | *required* |

**Returns**

| Type | Description |
| - | - |
| `Figure` | go.Figure: Plotly heatmap of monthly and yearly returns. |

## `plot_pnl_decomposition`

```python theme={null}
plot_pnl_decomposition(strategy: Strategy) -> go.Figure
```

Cumulative PnL by greek, with the actual cumulative PnL drawn over it.

Each line is the running sum of one `pnl_decomposition` driver, so where it ends is what that
greek (or the unexplained residual) contributed over the run. The legend carries those totals,
largest first, and the drivers add up to the actual line.

**Parameters**

| Name | Type | Description | Default |
| - | - | - | - |
| `strategy` | [`Strategy`](https://docs.allasso.ch/dev/pulse/api/core/strategy#strategy) | A finished run. | *required* |

**Returns**

| Type | Description |
| - | - |
| `Figure` | go.Figure: One line per driver plus the actual cumulative PnL. |

## `plot_trade_duration_histogram`

```python theme={null}
plot_trade_duration_histogram(strategy: Strategy) -> go.Figure
```

Plot a histogram of trade durations for a strategy.

**Parameters**

| Name | Type | Description | Default |
| - | - | - | - |
| `strategy` | [`Strategy`](https://docs.allasso.ch/dev/pulse/api/core/strategy#strategy) | The trading strategy to plot. | *required* |

Returns:
go.Figure: The Plotly figure object.

## `plot_trades_history`

```python theme={null}
plot_trades_history(strategy: Strategy) -> go.Figure
```

Plot the history of trades for a strategy.

**Parameters**

| Name | Type | Description | Default |
| - | - | - | - |
| `strategy` | [`Strategy`](https://docs.allasso.ch/dev/pulse/api/core/strategy#strategy) | The trading strategy to plot. | *required* |

**Returns**

| Type | Description |
| - | - |
| `Figure` | go.Figure: The Plotly figure object. |

## `plot_trades_on_front_future`

```python theme={null}
plot_trades_on_front_future(
    strategy: Strategy,
    front_future: pd.DataFrame,
    title: str = 'Trades on Front Future',
) -> go.Figure
```

Plot trades on the front future of a strategy.

**Parameters**

| Name | Type | Description | Default |
| - | - | - | - |
| `strategy` | [`Strategy`](https://docs.allasso.ch/dev/pulse/api/core/strategy#strategy) | The trading strategy to plot. | *required* |
| `front_future` | `DataFrame` | The front future data. | *required* |
| `title` | `str` | The title of the plot. Defaults to "Trades on Front Future". | `'Trades on Front Future'` |

**Returns**

| Type | Description |
| - | - |
| `Figure` | go.Figure: The Plotly figure object. |

## `plot_rolling_sharpe_ratio`

```python theme={null}
plot_rolling_sharpe_ratio(
    strategy: Strategy,
    window: int = 252,
    risk_free_rate: float = 0.0,
) -> go.Figure
```

Create a rolling Sharpe ratio chart using Plotly.

**Parameters**

| Name | Type | Description | Default |
| - | - | - | - |
| `strategy` | [`Strategy`](https://docs.allasso.ch/dev/pulse/api/core/strategy#strategy) | The trading strategy object containing portfolio data. | *required* |

Returns:
go.Figure: A Plotly figure with rolling Sharpe ratio.

## `plot_rolling_sortino_ratio`

```python theme={null}
plot_rolling_sortino_ratio(
    strategy: Strategy,
    window: int = 252,
    risk_free_rate: float = 0.0,
) -> go.Figure
```

Create a rolling Sortino ratio chart using Plotly.

**Parameters**

| Name | Type | Description | Default |
| - | - | - | - |
| `strategy` | [`Strategy`](https://docs.allasso.ch/dev/pulse/api/core/strategy#strategy) | The trading strategy object containing portfolio data. | *required* |

Returns:
go.Figure: A Plotly figure with rolling Sortino ratio.

## `plot_rolling_volatility`

```python theme={null}
plot_rolling_volatility(
    strategy: Strategy,
    window: int = 252,
) -> go.Figure
```

Create a rolling volatility chart using Plotly.

**Parameters**

| Name | Type | Description | Default |
| - | - | - | - |
| `strategy` | [`Strategy`](https://docs.allasso.ch/dev/pulse/api/core/strategy#strategy) | The trading strategy object containing portfolio data. | *required* |

Returns:
go.Figure: A Plotly figure with rolling volatility.


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