# Index Arbitrage Strategy AI Agent Connect

> Detect and quantify cash-and-carry and reverse cash-and-carry arbitrage opportunities.

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

## Description

This MCP server provides deterministic modeling for identifying arbitrage between cash indices and futures contracts. It calculates fair value using the cost of carry and identifies actionable signals when the basis exceeds specific thresholds. Use `calculate_arbitrage_signals` to determine specific trade actions like CASH_AND_CARRY or REVERSE_CASH_AND_CARRY, and `get_historical_basis_analysis` to evaluate market opportunities over time. The engine includes liquidity filters and cost-of-carry adjustments to ensure realistic profit modeling.

## Tools

### calculate_arbitrage_signals
Determines the specific arbitrage action and profit potential for a given set of market conditions

### get_historical_basis_analysis
Evaluates the historical consistency and frequency of arbitrage opportunities over a time series

### validate_market_conditions
A diagnostic tool to check if the current environment allows for any deterministic arbitrage

## Prompt Examples

**Prompt:** 
```
Calculate arbitrage signals for an index at 4500 with a futures price of 4550, 30 days to expiry, 3% risk-free rate, and 1% dividend yield.
```

**Response:** 
```
The basis is positive, indicating a CASH_AND_CARRY opportunity. The fair value is 4503.29, and the basis is 46.71.
```

**Prompt:** 
```
Check if the current market conditions are viable for arbitrage with 15,000 open interest and a 0.1% basis.
```

**Response:** 
```
The market is not viable because the basis does not provide a sufficient buffer over transaction costs.
```

**Prompt:** 
```
Analyze the historical basis for these prices: [{'indexPrice': 100, 'futuresPrice': 102, 'daysToExpiration': 10}, {'indexPrice': 101, 'futuresPrice': 100, 'daysToExpiration': 5}] with 2% risk-free rate and 1% dividend yield.
```

**Response:** 
```
The analysis shows 1 opportunity found with an average basis of 1.2%.
```

## Frequently Asked Questions

**What is a cash-and-carry arbitrage?**
It is an operation performed when futures are overpriced. The trader sells the futures and buys the underlying index to lock in profit.

**How does the tool ensure liquidity?**
The `validate_market_conditions` tool checks if open interest exceeds 10,000 contracts and verifies index liquidity before confirming viability.

**What determines the fair value?**
Fair value is calculated by adjusting the spot index price for the net cost of carry, which includes the risk-free rate and the dividend yield.
