# Margin calculations

#### Margin definitions <a href="#margin-definitions" id="margin-definitions"></a>

* **Initial Margin (IM):** collateral required to open a position.
* **Maintenance Margin (MM):** minimum collateral to keep a position open; falling below triggers liquidation.

<figure><img src="/files/v6PJCffxn8xnDLl2r5qZ" alt="" width="318"><figcaption></figcaption></figure>

Let **IMR = 1 / MaxLeverage** and **MMR** be the maintenance margin ratio (displayed in the UI; subject to change per market).

***

### Approximate liquidation prices (isolated-formula intuition) <a href="#approximate-liquidation-prices-isolated-formula-intuition" id="approximate-liquidation-prices-isolated-formula-intuition"></a>

Ignoring fees/funding for intuition, for a position opened at price P*e*:

**Long liquidation (approx.):**

$$
P\_{\text{liq,long}} \approx \frac{P\_e - \frac{M}{q}}{1 - m}
$$

**Short liquidation (approx.):**

$$
P\_{\text{liq,short}} \approx \frac{P\_e + \frac{M}{q}}{1 + m}
$$

Where 𝑞 > 0 is quantity, 𝑀 is isolated margin, and m = 10% is the maintenance ratio

{% hint style="info" %}
These are simplified for intuition. Actual liquidation considers live mark, fees, funding accrual, and execution slippage.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.trovemarkets.com/risk/margin-calculations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
