@ebowwa/mcp-quant
v1.1.3
Published
Quantitative trading MCP server - Kelly criterion, AMM math, technical indicators, risk management for AI trading systems. Powered by Rust FFI for 2-20x faster array operations.
Maintainers
Readme
@ebowwa/quant-mcp
Quantitative trading MCP server for AI trading systems. Provides Kelly criterion, AMM math, technical indicators, and risk management tools.
Installation
npm install @ebowwa/quant-mcpUsage with Claude Desktop
Add to your Claude Desktop config:
{
"mcpServers": {
"quant": {
"command": "npx",
"args": ["-y", "@ebowwa/quant-mcp"]
}
}
}Tools
Prediction Markets
| Tool | Description |
|------|-------------|
| kelly_criterion | Calculate optimal bet size for binary bets |
| convert_odds | Convert between probability, decimal, and American odds |
| amm_calculate_cost | Cost to buy shares from constant-product AMM |
| amm_price_impact | Price impact and slippage for AMM trades |
| lmsr_calculate | LMSR price and cost calculations |
| detect_arbitrage | Find arbitrage opportunities in prediction markets |
| calculate_edge | Calculate your edge vs market |
| brier_score | Measure forecast accuracy |
Technical Indicators
| Tool | Description |
|------|-------------|
| calculate_sma | Simple Moving Average |
| calculate_ema | Exponential Moving Average |
| calculate_rsi | Relative Strength Index |
| calculate_macd | MACD indicator |
| calculate_bollinger_bands | Bollinger Bands |
| calculate_atr | Average True Range |
| calculate_stochastic | Stochastic Oscillator |
| calculate_pivot_points | Classic pivot points |
| calculate_fibonacci_retracement | Fibonacci levels |
Risk Management
| Tool | Description |
|------|-------------|
| position_size_fixed_fractional | Position sizing based on risk % |
| calculate_var | Value at Risk (VaR) and Expected Shortfall |
| calculate_drawdown | Maximum drawdown analysis |
| calculate_sharpe_ratio | Sharpe ratio |
| calculate_sortino_ratio | Sortino ratio |
| calculate_beta_alpha | Beta and alpha vs benchmark |
Statistics
| Tool | Description |
|------|-------------|
| distribution_statistics | Mean, median, stdDev, skewness, kurtosis |
| correlation | Pearson correlation |
| linear_regression | Linear regression analysis |
| autocorrelation | ACF for time series |
Example Usage
Kelly Criterion for Prediction Markets
{
"tool": "kelly_criterion",
"arguments": {
"yourProbability": 0.65,
"marketPrice": 0.55,
"bankroll": 1000
}
}Returns:
{
"kellyFraction": 0.222,
"halfKelly": 0.111,
"quarterKelly": 0.055,
"fullBetSize": 222,
"edge": 0.10
}Technical Analysis
{
"tool": "calculate_rsi",
"arguments": {
"prices": [44, 45, 46, 47, 48, 47, 46, 45, 46, 47, 48, 49, 50, 51, 52],
"period": 14
}
}Risk Metrics
{
"tool": "calculate_sharpe_ratio",
"arguments": {
"returns": [0.02, -0.01, 0.03, 0.01, -0.02, 0.04],
"riskFreeRate": 0.04,
"periodsPerYear": 252
}
}License
MIT
