---
title: "Supported Models"
description: "This page describes all of the pre-built volatility models in LEAN. If none of these models perform how you want, create a custom volatility model."
canonical: https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/options-models/volatility/supported-models
markdown: https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/options-models/volatility/supported-models.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/03%20Writing%20Algorithms/24%20Reality%20Modeling/09%20Options%20Models/02%20Volatility/02%20Supported%20Models
modified: 2026-10-28
index: https://www.quantconnect.com/llms.txt
---

# Supported Models

[Documentation](https://www.quantconnect.com/docs/v2.md) > [Writing Algorithms](https://www.quantconnect.com/docs/v2/writing-algorithms.md) > Reality Modeling > Options Models > Volatility > Supported Models

> Code examples are shown in Python. Append `?lang=csharp` to this URL for the C# version of this page.

## Introduction

This page describes all of the pre-built volatility models in LEAN. If none of these models perform exactly how you want, create a [custom volatility model](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/options-models/volatility/key-concepts.md#06-Model-Structure).

## Null Model

The `NullVolatilityModel` sets the volatility of the security to zero. It's the default volatility model for the underlying asset of Future Options.

```python
underlying_security.volatility_model = VolatilityModel.NULL
```

For more information about this model, see the [class reference](https://www.lean.io/docs/v2/lean-engine/class-reference/py/QuantConnect/Securities/Volatility/IVolatilityModel/) and [implementation](https://github.com/QuantConnect/Lean/blob/master/Common/Securities/Volatility/IVolatilityModel.cs).

## Standard Deviation of Returns Model

The `StandardDeviationOfReturnsVolatilityModel` sets the volatility of the security to the annualized sample standard deviation of trailing returns. It's the default volatility model for the underlying asset of Equity Options and Index Options.

```python
underlying_security.volatility_model = StandardDeviationOfReturnsVolatilityModel(30)
```

The following table describes the arguments the model accepts:

| Argument | Data Type | Description | Default Value |
| --- | --- | --- | --- |
| `periods` | `int` | The max number of samples to use when calculating the standard deviation of returns. This value must be greater than two. |  |
| `resolution` | `Resolution`/`NoneType` | The resolution of the price data used to calculate the standard deviation. This only has a material effect in live mode. For backtesting, this value does not cause any behavioral changes. | `None` |
| `update_frequency` | `timedelta`/`NoneType` | The frequency at which new values are inserted into the rolling window for the standard deviation calculation. If the value is `None`, it defaults to the `timedelta` representation of `resolution`. If the value and `resolution` are `None`, it defaults to a `timedelta` of one day. | `None` |

For more information about this model, see the [class reference](https://www.lean.io/docs/v2/lean-engine/class-reference/py/QuantConnect/Securities/Volatility/StandardDeviationOfReturnsVolatilityModel/) and [implementation](https://github.com/QuantConnect/Lean/blob/master/Common/Securities/Volatility/StandardDeviationOfReturnsVolatilityModel.cs).

## Relative Standard Deviation Model

The `RelativeStandardDeviationVolatilityModel` sets the volatility of the security to the relative standard deviation of its price. In symbols, the value is

$$ \frac{|\mu|}{\sigma} $$

where $\mu$ is the average of the samples and $\sigma$ is the standard deviation of the samples.

```python
underlying_security.volatility_model = RelativeStandardDeviationVolatilityModel(timedelta(days=1), 10)
```

The following table describes the arguments the model accepts:

| Argument | Data Type | Description | Default Value |
| --- | --- | --- | --- |
| `period_span` | `timedelta` | The period of time to wait between each sample of the security price |  |
| `periods` | `int` | The number of samples to use to calculate the volatility value |  |

For more information about this model, see the [class reference](https://www.lean.io/docs/v2/lean-engine/class-reference/py/QuantConnect/Securities/Volatility/RelativeStandardDeviationVolatilityModel/) and [implementation](https://github.com/QuantConnect/Lean/blob/master/Common/Securities/Volatility/RelativeStandardDeviationVolatilityModel.cs).
