# Risk

## Set your risk parameters

Risk management in a backtest is based on two aspects: the **position type** and the **risk per trade**.

The position type influences how the amount placed on each trade (i.e. position size) is calculated in the backtest.

{% hint style="info" %}
These settings apply only to **trading strategies**, where capital evolves dynamically according to the gains and losses generated by each trade.
{% endhint %}

{% hint style="success" %}
**In summary:**

* **With a fixed position type**, you always place **the same fraction of your capital** on each trade, regardless of your strategy's exit rules.
* **With a dynamic position type**, the amount placed on each trade is **calculated automatically**, so as to always **risk the same fraction of your capital** if your stop-loss is hit.
* **With a custom position type**, you define yourself **capital and risk management** directly in your rules, based on specific conditions (e.g. adjusting risk after a series of wins or losses, dynamic allocation based on an indicator).
  {% endhint %}

## Fixed position

A fixed fraction of capital is **placed** on each trade, independently of the strategy rules or the distance to the exit price.

{% hint style="info" %}
E**xample:**

With a fixed risk of 10%, the amount placed on each trade will be 10% of your capital, regardless of the distance to the stop-loss.
{% endhint %}

## Dynamic position

A fixed fraction of capital is **at risk**, which means that **if the stop-loss is reached, the loss will always remain the same proportion of capital**. This position type requires using a stop-loss in your strategy's exit rules.&#x20;

{% hint style="info" %}
**Example:**

With a dynamic risk of 1%, regardless of the distance between the entry price and the stop-loss, you will never lose more than 1% of capital per trade if your stop-loss is reached.
{% endhint %}

If your trading strategy does not use a stop-loss and you choose a dynamic position type, the backtest will then apply the logic of a fixed position type.

## Custom position

You can define your **own risk management rules** and **position sizing** to adapt risk-taking according to specific conditions. With this approach, **risk management becomes totally flexible**, and adapts to the specific rules of your strategy.

{% hint style="info" %}
**Examples** :

* "Start with a risk of 0.5%, then decrease it by 10% when a trade is losing and increase it by 5% when a trade is winning."
* "I want to risk 1% of my capital on Tesla stock if the price is below the 200 EMA or 0.5% if the price is above that moving average."
  {% endhint %}
