> For the complete documentation index, see [llms.txt](https://guide.laevitas.ch/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.laevitas.ch/guides/tool-guides/spread-analysis/guide.md).

# Guide

## Inputs Configuration

In this section, we will guide you through the process of setting up the inputs for the spread tool. This includes specifying the contracts, metrics, and attributes you would like to analyze.

<figure><img src="/files/b4UjiDQFgaKcQsTLOBKe" alt=""><figcaption><p>Figure 1 :  Analysis Inputs</p></figcaption></figure>

***Assets and Attributes*** (Red zone): Select the following to compare between 2 assets,

* **Metric**
* **Exchange**
* **Asset**
* **Attribute**

**Style and Time Horizon** (Yellow zone): This panel shows the selection of the following inputs.

* **Period** - The time period beginning since the Start Date.
* **Start Date** - Start date of the analysis.
* **Function** - Product, Sum, Spread or Ratio between the two assets' metric.

**Summary** (Green zone):  This panel displays a summary of all inputs.

## Spread Results

This section contains the results from the spread calculation. These include charts detailing time series data on the inputs as well as the spread simulation. In addition, statistical data from distribution to correlation and regression are available.

<figure><img src="/files/XsrThgLaAgRJCBt15a2o" alt=""><figcaption><p>Figure 2 : Inputs Simulation</p></figcaption></figure>

This first chart shows the evolution of the selected assets over the selected period with the y-axis values for the first asset represented on the left and the y-axis values for the second asset represented on the right.

<figure><img src="/files/t46HBu689V0iYYumOILl" alt=""><figcaption><p>Figure 2 : Spread simulation and distribution</p></figcaption></figure>

* **Left panel** (Red zone): Primary statistics such as mean, std and more are displayed here
* **Middle panel** (Yellow zone): This chart displays the spread output. In addition to the absolute value of the spread, users can overlay the Simple Moving Average (SMA) and Exponential Moving Average (EMA).These indicators located below the graph indicate the name and color of each curve, allowing the user to hide or display a curve by clicking on the name of the corresponding indicator
* **Right panel** (Green zone): This simulation shows the distribution of the spread values which is found in the first graph with the green indicator.

<figure><img src="/files/OFQq1Jfsiurqnc6kOyZU" alt=""><figcaption><p>Figure 4: Regression Simulation and Statistics</p></figcaption></figure>

* **Left panel** (Red zone): This figure represents the regression simulation. The x-axis contains the values of asset number 1 and the y-axis represents the second asset. The regression curve is displayed with a green line that represents the trend of the evolution of the two selected assets over the period. The red dots indicate the actual values observed for each asset.
* **Right panel** (Green zone): The regression statistics can be found here.

<figure><img src="/files/k4pjpE7IqLQ4R5XzouHG" alt=""><figcaption><p>Figure 5: Simulation and Correlation Distribution</p></figcaption></figure>

* **Left panel** (Red zone): This simulation shows the correlation over the duration of the spread. The curve changes from red to green, with red indicating a value close to zero and green indicating a value close to one.
* **Right panel** (Green zone): This histogram displays the distribution of the correlation.
