---
title: "Supported Models"
description: "This page describes all of the pre-built settlement models in LEAN. If none of these models perform how you want, create a custom settlement model."
canonical: https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/settlement/supported-models
markdown: https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/settlement/supported-models.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/03%20Writing%20Algorithms/24%20Reality%20Modeling/08%20Settlement/02%20Supported%20Models
modified: 2026-10-29
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 > Settlement > 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 settlement models in LEAN. For more brokerage-specific settlement models, see the [brokerage model documentation](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/brokerages/supported-models.md). If none of these models perform exactly how you want, create a [custom settlement model](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/settlement/key-concepts.md#04-Model-Structure).

## Immediate Model

The `ImmediateSettlementModel` immediately adds or removes the cash from your portfolio when your transactions fill.

```python
security.set_settlement_model(ImmediateSettlementModel())
```

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

## Delayed Model

The `DelayedSettlementModel` immediately removes the cash from your portfolio when your buy orders fill. When your sell orders fill, it adds the cash to your [unsettled cash book](https://www.quantconnect.com/docs/v2/writing-algorithms/portfolio/cashbook.md#03-Settled-vs-Unsettled-Cash). When the settlement period ends, the unsettled cash is added to your portfolio.

```python
security.set_settlement_model(DelayedSettlementModel(7, timedelta(hours=8)))
```

The following table describes the arguments the model accepts:

| Argument | Data Type | Description | Default Value |
| --- | --- | --- | --- |
| `number_of_days` | `int` | The number of days required for settlement |  |
| `time_of_day` | `timedelta` | The time of day used for settlement |  |

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

## Account Currency Immediate Model

The `AccountCurrencyImmediateSettlementModel` applies cash settlement immediately and automatically converts the settlement cash into the account currency.

```python
security.set_settlement_model(AccountCurrencyImmediateSettlementModel())
```

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

## Future Model

The `FutureSettlementModel` settles the daily profit and loss at the start of each day.

```python
security.set_settlement_model(FutureSettlementModel())
```

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