# Derivatives unrealized PnL adjustment

{% hint style="info" %}
This page illustrates using the unrealized PnL module for derivatives, managing unrealized PnL for crypto derivatives like contracts and options, supporting calculating of unrealized PnL adjustments for the entity's holdings on exchanges, as well as adjusting unrealized PnL for users' holdings if the entity operates as a platform.
{% endhint %}

## **1. Configuring frequency of adjustment**

1. **Adjustment frequency**: In the adjustment frequency configuration window, select the appropriate adjustment frequency (daily, weekly, monthly)

   <figure><img src="broken-reference" alt=""><figcaption></figcaption></figure>

## **2. Executing and viewing the adjustment**

1. **Manual execution**: You can trigger the adjustment manually by clicking on the **"Recalculate"** button.
2. **Viewing records:** The records can be viewed in the **Adjustment record table**, showing detailed adjustment records and corresponding changes in unrealized PnL for derivatives. the unrealized PnL are calculated using the formula: **Beginning-Realized Pnl +Change = Ending**

   <figure><img src="broken-reference" alt=""><figcaption></figcaption></figure>
3. **Data traceability**: Click on the "Ending" or "Realized Pnl" buttons to view the data source.

   <figure><img src="broken-reference" alt=""><figcaption></figcaption></figure>

## **3. Data sources for Adjustments**

The data sources are divided into Profit and loss (PnL) data from exchanges and PnL data from business data.

1. **PnL data from exchanges**: This data is sync-ed with the PnL data from the transaction records.
2. PnL data from business data: This is achieved using automation rules that translates business data into PnL adjustment data.
   1. In the **Automation** tab, click "+ Add New" to set up new automation rules.&#x20;

      <figure><img src="broken-reference" alt=""><figcaption></figcaption></figure>
   2. Specify the conditions for the source data and target data, such as data types and trigger events to define the automation conditions.&#x20;

      <figure><img src="broken-reference" alt=""><figcaption></figcaption></figure>
   3. Manually trigger the configured rule, or "Manually execute all rules" to update generate and the raw data.


---

# 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://docs.elven.com/v3/assets-and-valuations/derivatives-unrealized-pnl-adjustment.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.
