---
title: "Margin Interest Rate"
canonical: https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/margin-interest-rate
markdown: https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/margin-interest-rate.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/03%20Writing%20Algorithms/24%20Reality%20Modeling/12%20Margin%20Interest%20Rate
modified: 2026-11-23
index: https://www.quantconnect.com/llms.txt
---

# Margin Interest Rate

[Documentation](https://www.quantconnect.com/docs/v2.md) > [Writing Algorithms](https://www.quantconnect.com/docs/v2/writing-algorithms.md) > Reality Modeling > Margin Interest Rate

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

## Pages in This Section

- [Key Concepts](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/margin-interest-rate/key-concepts.md): Margin interest rate models model margin interest payments by directly adding or removing cash from your portfolio.
- [Supported Models](https://www.quantconnect.com/docs/v2/writing-algorithms/reality-modeling/margin-interest-rate/supported-models.md): This page describes the pre-built margin interest rate models in LEAN. If none of these models perform exactly how you want, create a custom model.
