# Actuarial Scenario Risk Engine AI Agent Connect

> Actuarial Scenario Risk Engine MCP provides a specialized engine for actuarial risk modeling. Your AI client can calculate expected loss, variance, quantile, and expected shortfall by weighting discrete scenario outcomes. It handles the heavy math of risk-adjusted capital metrics and tail risk statistics, allowing you to focus on interpreting the results.

## Overview
- **Category:** finance
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_m26eSmCfc8FF2S79TJqgDga7deSBUwGLUnSB2ffF/ai-agent-connect
- **Tags:** actuarial, risk-metrics, capital-calculation, scenario-analysis, tail-risk

## Description

You can use this MCP to turn raw scenario data into actionable risk intelligence. Instead of manually calculating tail risk or capital requirements, you hand your scenario sets to your AI client and let it handle the heavy lifting. It works by weighting discrete outcomes to produce critical metrics like expected loss and variance. If you need to understand why your capital requirements are spiking, you can pinpoint specific drivers within your data. You can also quantify the capital benefits of non-linear aggregation to see how diversification actually impacts your numbers. Before you run any intensive calculations, the engine checks your probability distributions to ensure the math holds up. This makes it a reliable tool for modeling complex risk profiles without worrying about manual calculation errors.

## Tools

### analyze_scenario_contributions
This tool identifies which specific scenarios are driving your total risk and capital requirements.

### calculate_risk_metrics
This tool computes primary risk statistics for any provided set of scenarios.

### compute_diversification_benefit
This tool quantifies how much capital you save by using non-linear aggregation instead of simple linear summation.

### validate_scenario_integrity
This tool checks the mathematical validity of your scenario set before you start heavy computations.

## Prompt Examples

**Prompt:** 
```
Calculate the risk metrics for these scenarios: [{ "lossAmount": 1000, "probability": 0.1 }, { "lossAmount": 5000, "probability": 0.05 }] with a 95% confidence level and linear aggregation.
```

**Response:** 
```
The expected loss is 350.0, the variance is 183750.0, the 95th percentile quantile is 5000.0, and the expected shortfall is 5000.0.
```

**Prompt:** 
```
Which scenarios are contributing most to the expected loss for: [{ "lossAmount": 100, "probability": 0.5 }, { "lossAmount": 1000, "probability": 0.2 }, { "lossAmount": 500, "probability": 0.3 }]?
```

**Response:** 
```
The scenario with a loss of 1000 contributes 200.0 to the expected loss, while the scenario with a loss of 500 contributes 150.0, and the scenario with a loss of 100 contributes 50.0.
```

**Prompt:** 
```
Check if these scenarios are valid: [{ "lossAmount": 100, "probability": 0.6 }, { "lossAmount": 200, "probability": 0.5 }]
```

**Response:** 
```
The scenario set is invalid because the total probability sum of 1.1 exceeds the maximum allowed value of 1.0.
```

## Capabilities

### Risk Metric Calculation
Your agent calculates expected loss, variance, and quantiles from scenario data.

### Risk Driver Identification
Your agent identifies which individual scenarios are responsible for the highest risk levels.

### Diversification Analysis
Your agent quantifies capital reductions through non-linear aggregation rules.

### Data Integrity Checks
The engine validates probability distributions to prevent mathematical errors during computation.

## Use Cases

### Tail Risk Assessment
Calculate expected shortfall and quantiles to understand extreme loss potential.

### Capital Optimization
Determine the diversification benefit to see how non-linear aggregation reduces capital needs.

### Risk Attribution
Pinpoint which specific scenarios are pushing your total risk metrics higher.

### Scenario Validation
Ensure your probability distributions are mathematically sound before running heavy models.

## Benefits

- Automates the calculation of expected loss and expected shortfall.
- Identifies specific risk drivers within large scenario sets.
- Quantifies capital savings from non-linear aggregation.
- Prevents computation errors by validating probability distributions first.

## How It Works

Connect your client to Vinkius and start running risk models immediately.

1. Connect your preferred MCP-compatible client to Vinkius.
2. Provide your scenario data to your AI agent.
3. Your agent uses the MCP to validate the mathematical integrity of the data.
4. The engine computes the requested risk metrics or diversification benefits.
5. Your agent delivers the final statistics and risk driver analysis.

## Frequently Asked Questions

**What kind of risk metrics can this MCP calculate?**
The MCP calculates expected loss, variance, quantile, and expected shortfall based on your provided scenarios.

**Can I use this with Claude or Cursor?**
Yes, you can connect this MCP to any MCP-compatible client like Claude, Cursor, or Windsurf.

**How does it handle diversification?**
It uses a tool to quantify the reduction in capital achieved through non-linear aggregation compared to linear summation.

**Does it check for errors in my data?**
Yes, the validate_scenario_integrity tool checks the mathematical validity of your probability distributions.

**Do I need to host the MCP myself?**
No, Vinkius hosts and manages the MCP for you, so it is ready to use as soon as you connect.

**How do I ensure my scenarios are mathematically valid?**
You can use the `validate_scenario_integrity` tool to verify that all probabilities are non-negative and that their total sum does not exceed 1.

**Can I calculate the impact of specific events on my total capital?**
Yes, the `analyze_scenario_contributions` tool identifies which individual scenarios are driving the expected loss or the quantile requirements.

**What is the difference between linear and diversified aggregation?**
Linear aggregation sums losses directly, while diversified aggregation accounts for non-linear interactions. You can use `compute_diversification_benefit` to see the capital reduction achieved by using a diversified rule.
