# Futures Relative Value Strategy AI Agent Connect

> Identify mispricings between related futures contracts using statistical z-scores and fundamental fair value models.

## Overview
- **Category:** finance
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_KfwEE8VhbmVm5Yiq5gql4fpIgvWaz7MhDRoGHrPt/ai-agent-connect
- **Tags:** futures, arbitrage, quantitative, trading-signals, statistical-arbitrage

## Description

This MCP server provides a deterministic framework for executing relative value trades in futures markets. By connecting AI agents to real-time price series and fundamental data, it identifies arbitrage opportunities where the price ratio between two assets deviates from its statistical mean or its theoretical fair value. The server uses `analyze_futures_relationship` to ensure liquidity and correlation, `calculate_theoretical_fair_value` to establish a fundamental baseline, and `generate_trading_signal` to produce actionable BUY or SELL directions based on z-scores and quality/logistics adjustments.

### Available Tools

`analyze_relationship_tool`, `calculate_fair_value_tool`, `generate_signal_tool`, `analyze_relationship`, `calculate_fair_value`, `generate_signal`

## Tools

### generate_signal
Computes the daily trading signal by comparing the current price ratio against statistical bounds and fundamental fair values

### analyze_relationship
Evaluates the statistical and liquidity-based relationship between two futures contracts

### calculate_fair_value
Determines the expected ratio between two contracts based on historical averages and physical market drivers

## Prompt Examples

**Prompt:** 
```
Analyze the relationship between WTI and Brent crude and check if there is a trading signal.
```

**Response:** 
```
The correlation between WTI and Brent is 0.92 and both are highly liquid. The current z-score is -2.4 and the ratio is higher than the theoretical fair value, resulting in a BUY_A_SELL_B signal.
```

**Prompt:** 
```
Calculate the theoretical fair value for a spread between two energy contracts.
```

**Response:** 
```
The calculated theoretical fair value ratio is 1.05 based on the provided historical average, quality adjustment, and logistics costs.
```

**Prompt:** 
```
Is there a signal for the current price ratio of these two futures?
```

**Response:** 
```
The current signal is NEUTRAL because the ratio change over the last 30 days was only 2%, which falls below the 5% noise filter threshold.
```

## Frequently Asked Questions

**What kind of futures contracts can I trade with this strategy?**
The strategy is designed for highly liquid, related commodities. It uses `analyze_futures_relationship` to verify that both contracts have an Open Interest greater than 10,000 and a correlation higher than 0.8 before generating a signal. Tools available: `analyze_relationship_tool`, `calculate_fair_value_tool`, `generate_signal_tool`.

**How is the theoretical fair value calculated?**
The fair value is determined by the `calculate_theoretical_fair_value` tool, which sums the historical average ratio, the quality adjustment (intrinsic value difference), and the logistics cost (transportation expense).

**What triggers a trading signal?**
A signal is generated via `generate_trading_signal` when the z-score indicates a significant deviation. A BUY signal occurs if the z-score is below -2.0 and the ratio is above the theoretical value. A SELL signal occurs if the z-score is above 2.0 or the ratio is below the theoretical value.
