# Cross-Asset Momentum Strategy AI Agent Connect

> A deterministic engine for time-series momentum analysis and capital allocation across asset classes.

## Overview
- **Category:** finance
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_gAIHyjtuedXzuD8XkcPsB9xzQZrysYaQvQMHf6KI/ai-agent-connect
- **Tags:** momentum, quantitative, finance, portfolio-management, trading-strategy

## Description

This MCP server provides a deterministic time-series momentum (TSMOM) engine designed to analyze returns across diverse asset classes. It identifies trends by evaluating historical price data over a specified lookback period. The engine uses `calculate_momentum_signals` to determine directionality, `generate_portfolio_allocation` to distribute capital based on momentum strength, and `analyze_market_risk_metrics` to monitor systemic risks like momentum crash risk and market spread. It is built for quantitative traders looking to automate trend-following strategies with strict risk constraints like position caps.

## Tools

### generate_portfolio_allocation
Calculates position sizes and long/short lists based on momentum signals

### analyze_market_risk_metrics
Computes aggregate market statistics including spread, crash risk, and correlation

### calculate_momentum_signals
Evaluates momentum direction and return metrics for asset price histories

## Prompt Examples

**Prompt:** 
```
Calculate momentum signals for these assets with a 252-day lookback: [{'assetId': 'AAPL', 'prices': [150, 155, 160, 158, 165]}, {'assetId': 'GLD', 'prices': [180, 182, 185, 184, 190]}]
```

**Response:** 
```
The signals for the provided assets are: AAPL has a BUY signal with a momentum score of 0.10, and GLD has a BUY signal with a momentum score of 0.05.
```

**Prompt:** 
```
Generate a portfolio allocation for these signals with a 25% maximum position cap: [{'assetId': 'TSLA', 'momentumScore': 0.5, 'signalType': 'BUY'}, {'assetId': 'BTC', 'momentumScore': 0.3, 'signalType': 'BUY'}]
```

**Response:** 
```
The allocation is: Long TSLA with 25% position and Long BTC with 25% position. Total exposure is 50%.
```

**Prompt:** 
```
What is the current market risk based on these signals: [{'assetId': 'SPY', 'momentumScore': -0.1, 'signalType': 'SELL'}, {'assetId': 'TLT', 'momentumScore': -0.05, 'signalType': 'SELL'}]?
```

**Response:** 
```
The momentum crash risk is true because all active assets exhibit negative momentum.
```

## Frequently Asked Questions

**How does the momentum signal work?**
The engine uses `calculate_momentum_signals` to evaluate returns. Assets with returns > 2% receive a BUY signal, returns < -2% receive a SELL signal, and those in between are marked as HOLD.

**How is capital allocated between assets?**
Capital is distributed proportionally to the momentum score using `generate_portfolio_allocation`. You can also set a `maxPositionCap` to prevent over-concentration in a single asset.

**What risk metrics are provided?**
The `analyze_market_risk_metrics` tool provides the momentum spread, momentum crash risk (triggered when all assets show negative momentum), and a correlation matrix for the assets.
