# Futures Ratio Spread Strategy AI Agent Connect

> Identify 1:2 ratio spread entry signals using statistical Z-scores and market regime filters.

## Overview
- **Category:** finance
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_YWlkRW8FyWRtXeSZxChnJ7XRaYizBtEFyVIUIzNr/ai-agent-connect
- **Tags:** futures, ratio-spread, quantitative, trading-signals, contango

## Description

This MCP server provides deterministic quantitative tools for analyzing futures ratio spreads. It identifies high-probability entry signals for a 1:2 ratio spread (long 1 near-term, short 2 far-term) by monitoring spread Z-scores and market structure. Use `calculate_ratio_spread_signals` to evaluate historical price arrays and open interest for convergence opportunities. You can also use `get_market_regime_summary` to determine if the market is in contango or backwardation, and `validate_trade_feasibility` to ensure trades meet strict liquidity and margin requirements.

## Tools

### calculate_ratio_spread_signals
Evaluates daily historical price data to identify specific entry signals for a 1:2 ratio spread

### get_market_regime_summary
Analyzes the current relationship between near and far contracts to determine market regime

### validate_trade_feasibility
Checks if a specific trade configuration meets the required safety and liquidity buffers

## Prompt Examples

**Prompt:** 
```
Analyze these historical prices for a 1:2 ratio spread: near prices [100, 101, 102, 101, 100], far prices [110, 112, 115, 113, 111], near OI [6000, 6100, 6200, 6150, 6050], far OI [7000, 7100, 7200, 7150, 7050], and risk capital 50000.
```

**Response:** 
```
The analysis shows a LONG_SPREAD signal with a Z-score of 2.4, a spread value of 15, and a breakeven price of 115.
```

**Prompt:** 
```
Is the market currently in contango if the near price is 105 and the far price is 102?
```

**Response:** 
```
No, the market is in backwardation because the near-term price is higher than the far-term price.
```

**Prompt:** 
```
Check if a trade is feasible with a margin requirement of 1000, risk capital of 2000, near OI of 6000, and far OI of 6000.
```

**Response:** 
```
The trade is not feasible because the risk capital is not at least three times the margin requirement.
```

## Frequently Asked Questions

**What kind of ratio spread does this tool support?**
The tool is specifically designed for a 1:2 ratio spread, where you go long one near-term contract and short two far-term contracts.

**How are entry signals generated?**
Signals are triggered when the spread Z-score exceeds 2.0 and the market is in a contango state, indicating a potential convergence opportunity.

**Does the tool check for liquidity?**
Yes, the `validate_trade_feasibility` tool ensures that both contracts have an Open Interest greater than 5,000 before a trade is considered feasible.
