> ## Documentation Index
> Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Corporate actions

> The corporate actions that occur on the underlying risk factors are taken into account by Atoti Market Risk. There are two main types of actions that can als...

The corporate actions that occur on the underlying risk factors are taken into account by Atoti Market Risk.
There are two main types of actions that can also be extended:

* Cash type: drop of a dividend or detachment of a coupon.
* Quantity type: split or merge of the instrument.

## Input files

Corporate actions are stored in specific files. See [`Dividend.csv`](../input-files/dividend) and [`SplitRatio.csv`](../input-files/split-ratio).

## Datastore

The corporate actions are also stored in specific tables. See [SplitRatioMarketData](../datastore/sensitivities/split-ratio-market-data) and [DividendMarketData](../datastore/sensitivities/dividend-market-data).

## Retrieval

Retrieving corporate action dividend values and split ratio is done using the Atoti Market Data retrieval API. See the dedicated [Atoti Market Data Documentation](https://docs.activeviam.com/products/modules/market-data/latest/online-help/retrieval.) for details.

As both stores have a single value per instrument ID, the `SingleMarketDataPostProcessor` is used with store-specific retrievers:

<table><thead><tr><th>Constant</th><th>Name</th><th>Details</th></tr></thead><tbody><tr><td><code>DIVIDEND\_RETRIEVER\_NAME</code></td><td><code>DIVIDEND\_MARKET\_DATA\_RETRIEVER</code></td><td>A retriever on the <code>DividendMarketData</code> store, allowing the retrieval of a dividend value using an as-of date, a market data set, and an instrument ID.</td></tr><tr><td><code>SPLIT\_RATIO\_RETRIEVER\_NAME</code></td><td><code>SPLIT\_RATIO\_MARKET\_DATA\_RETRIEVER</code></td><td>A retriever on the <code>SplitRatioMarketData</code> store, allowing the retrieval of a split ratio using an as-of date and an instrument ID.</td></tr></tbody></table>

## PnL for Cash / Dividends

The dividends must be taken as cash contributing to the PnL for the current day.

### Configuration

<table><thead><tr><th>Element</th><th>Details</th></tr></thead><tbody><tr><td><strong>Input file column</strong></td><td>‘CashDividend’</td></tr><tr><td><strong>Datastore column</strong></td><td>‘CashDividend’</td></tr><tr><td><strong>Applied formula</strong></td><td>Described under the properties of type <code>mr.sensi.rules.dividend.pnl-explain.</code><br />The formula is applied with the following parameters for the current day: <code>cash=f(sensi, dividend, 0.0)</code></td></tr><tr><td><strong>Dividend</strong></td><td>Described as a measure, similarly to the other greeks. Its configuration can be found on the class <code>DividendGreekSensiCubeMeasureConfig</code>.</td></tr></tbody></table>

## PnL for Split

The split of a stock will divide its price by the split ratio. This split ratio is applied to the spot price of an instrument when used in a PnL Explain computation.

To change this behavior, you can replace the following measures:

<table><thead><tr><th>Measure</th><th>Qualifier</th><th>Details</th></tr></thead><tbody><tr><td><code>Spot MD Next w/ Split</code></td><td><code>SPOT\_MARKET\_DATA\_NEXT\_WITH\_SPLIT</code></td><td>Multiplies the <code>Spot MD Next</code> measure by the <code>Split Ratio Next</code> measure.</td></tr><tr><td><code>Spot MD Next w/ Split On RiskFactor2</code></td><td><code>SPOT\_MARKET\_DATA\_NEXT\_WITH\_SPLIT\_TWO</code></td><td>Multiplies the <code>Spot MD Next On RiskFactor2</code> measure by the <code>Split Ratio 2 Next</code> measure. Uses the <code>RiskFactor2</code> level as the instrument ID, to account for sensitivities to multiple risk factors.</td></tr></tbody></table>
