Skip to main content
Glama
sathanandhh

QuantAnalyticsMCP

by sathanandhh
README.md
# QuantAnalyticsMCP: Quant Engine & Statistical Inference

![Version](https://img.shields.io/badge/version-3.0.0-blue)
![Python](https://img.shields.io/badge/python-3.11+-brightgreen)
![License](https://img.shields.io/badge/license-MIT-green)

## Overview

QuantAnalyticsMCP v3.0 bridges the gap between historical data and probabilistic valuation. By adding a Statistical Inference & Diagnostics layer, the engine determines whether historical trends are statistically significant noise or actionable signals, directly recommending how to feed those signals into Monte Carlo valuations. It is designed to run flawlessly via standard input/output (`stdio`) with Claude Desktop.

## Architecture

- **Tier 1 & 2 (Risk):** Volatility, VaR, CVaR, Max Drawdown.
- **Tier 3 (Corp Fin):** Operating Leverage magnification effects.
- **Tier 4 (Valuation):** Monte Carlo DCF (with ASCII visualizations), DCF Sensitivity Matrices, Scenario Analysis.
- **Tier 5 (Inference):** OLS Trend Regression with p-values, and a `diagnose_financial_series` orchestrator that interprets statistics and recommends next steps.

## Installation

### Using Python

```bash
# Clone the repository
git clone https://github.com/yourusername/QuantAnalyticsMCP.git
cd QuantAnalyticsMCP

# Create a virtual environment
python -m venv venv
# On Windows: venv\Scripts\activate
# On Mac/Linux: source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Run the server
python mcpserver.py
```

### Claude Desktop Integration

Add the following to your `claude_desktop_config.json` (adjust paths as necessary):

```json
{
  "mcpServers": {
    "quant-analytics": {
      "command": "C:\\path\\to\\venv\\Scripts\\python.exe",
      "args": [
        "C:\\path\\to\\mcpserver.py"
      ]
    }
  }
}
```

## Usage Examples

Once connected to Claude Desktop, you can ask:
- *"Use the simulate_monte_carlo_dcf tool with current_fcf 100, growth_mean 0.10, growth_std 0.03, wacc 0.12, terminal_growth 0.03 for 10000 simulations."*
- *"Use diagnose_financial_series to analyze this Revenue data: [100, 105, 110, 108, 120, 135]"*
- *"Use value_dcf_sensitivity with next_year_fcf 50, waccs [0.09, 0.10, 0.11], terminal_growth_rates [0.02, 0.03, 0.04]"*