# SCENARIOPR

## Description

Calculate the relative probabilities of prospective economic scenarios. Employ this powerful statistical framework in your scenario analysis excercise. The function follows the research published in the Journal of Portfolio Management, March 2020.

{% embed url="<https://doi.org/10.3905/jpm.2020.1.125>" %}
Journal of Portfolio Management research paper: Enhanced Scenario Analysis
{% endembed %}

## Syntax

The following describes the function signature for use in Microsoft Excel's formula bar.

```excel-formula
=SCENARIOPR(estimates, anchor, covariance, j, isReturnDistance)
```

### Input(s)

<table><thead><tr><th width="247.80525499768095">Argument</th><th>Description</th></tr></thead><tbody><tr><td><strong>estimates</strong></td><td>Required. Matrix of scenario estimates where each column corresponds to a scenario and each row corresponds to an economic variable.</td></tr><tr><td><strong>anchor</strong></td><td>Required. Column vector of anchor estimates across economic variables.</td></tr><tr><td><strong>covariance</strong></td><td>Required. Covariance matrix of economic variables. We recommend that the covariance specification be aligned with deviations from the anchor selection.</td></tr><tr><td><strong>j</strong></td><td>Optional. Scalar value to model fatter tails. <span class="math">j \leq 1</span>. If not specified, the function assumes that j is one and that multivariate normality across economic variables hold. </td></tr><tr><td><strong>isReturnDistance</strong></td><td>Optional. Logical (TRUE or FALSE). If TRUE, then the function will return Mahalanobis distance values across all scenarios, otherwise the function returns a vector of relative probabilities that sum to one. If not specified, the function defaults to FALSE.</td></tr></tbody></table>

### Output(s)

The function returns a vector of scenario probabilities. When `isReturnDistance` is set to TRUE, the function returns the Mahalanobis distance of the scenario estimates relative to the specified anchor.

## Example

![](/files/-MMuaEBhDAFkVUj6P6A-)

{% file src="/files/-MMuaLq4Bw5sa8K4zR-t" %}
Example Workbook: SCENARIOPR
{% endfile %}


---

# 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://excelhelp.windhamlabs.com/functions/scenario-analysis/scenariopr.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.
