# Quality Factor Strategy AI Agent Connect

> A quantitative tool to identify high-quality stocks using fundamental metrics.

## Overview
- **Category:** finance
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_neZ1N2LO9idd4KgxcFAhE71JzM8vzMRoqm9bpjyY/ai-agent-connect
- **Tags:** finance, quantitative, stocks, fundamental-analysis, trading-signals

## Description

This MCP server provides deterministic quantitative tools to capture the quality premium. It allows AI agents to compute composite quality scores using pillars like ROE, Debt-to-Equity, earnings stability, and dividend yield. Users can execute `calculate_quality_scores` to rank a universe of stocks, `generate_trading_signals` to determine long and short positions, and `analyze_strategy_performance` to evaluate risk metrics like quality beta and maximum drawdown.

## Tools

### analyze_strategy_performance
Evaluates the historical effectiveness of the quality factor and its risk characteristics

### calculate_quality_scores
Computes the composite quality score for a set of stocks based on provided fundamental data

### generate_trading_signals
Determines the buy, sell, and hold actions for the portfolio based on quality rankings

## Prompt Examples

**Prompt:** 
```
Calculate the quality scores for these stocks: [{'ticker': 'AAPL', 'roe': 0.25, 'debtToEquity': 1.5, 'earningsStability': 0.9, 'dividendYield': 0.01}, {'ticker': 'TSLA', 'roe': 0.15, 'debtToEquity': 0.5, 'earningsStability': 0.6, 'dividendYield': 0.0}] with equal weights.
```

**Response:** 
```
{"scores": [{"ticker": "AAPL", "score": 0.75}, {"ticker": "TSLA", "score": 0.45}], "filteredStocks": ["AAPL", "TSLA"]}
```

**Prompt:** 
```
Generate trading signals for these quality scores with a portfolio size of 1: [{'ticker': 'A', 'score': 0.9}, {'ticker': 'B', 'score': 0.5}, {'ticker': 'C', 'score': 0.1}]
```

**Response:** 
```
{"longList": [{"ticker": "A", "weight": 1.0}], "shortList": [{"ticker": "C", "weight": 1.0}], "holdList": ["B"], "canTrade": true}
```

**Prompt:** 
```
Analyze the performance of the strategy using these returns and spread history: [{'returns': 0.05}, {'returns': -0.02}] and [{'spread': 0.03}, {'spread': 0.01}]
```

**Response:** 
```
{"qualitySpread": 0.02, "qualityBeta": 0.85, "maxDrawdown": 0.02, "benchmarkComparison": 0.015}
```

## Frequently Asked Questions

**How are quality scores calculated?**
Scores are a weighted sum of ranks for ROE, inverse Debt-to-Equity, earnings stability, and dividend yield.

**What are the filtering rules for stocks?**
The strategy excludes any stocks with negative earnings or an ROE below 5%.

**Can I analyze the risk of my strategy?**
Yes, by using `analyze_strategy_performance`, you can calculate quality beta and maximum drawdown.
