CAT
/MCP
SkillsMCPMarketplacesDigestToolsAdvertise

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by Category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP Servers by Category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by Category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control

Cross AI Tools

Discover Claude Code plugins, extensions, and tools. Automatically updated directory of Anthropic Claude AI marketplaces with development tools, productivity plugins, and integrations.

Resources

  • Browse Skills
  • Browse MCP Servers
  • Browse Marketplaces
  • Plugins Reference

Community

  • About
  • Tools
  • Feedback
  • Privacy Policy
  • Advertise

Built for the Claude Code community with Claude Code by @mertduzgun

Independent project, not affiliated with Anthropic

Quantoracle

quantoracledev/quantoracle
674 toolsSTDIOregistry active
Summary

Connects Claude to 73 deterministic financial calculators spanning options pricing, risk metrics, portfolio math, and technical indicators. Instead of asking an LLM to compute Black-Scholes or Kelly Criterion in-context (slow, error-prone, non-reproducible), you POST JSON to endpoints like `/v1/options/price` or `/v1/risk/portfolio` and get exact analytical results in under 70ms. The free tier gives you 1,000 calls per day with no API key. Ten composite workflows bundle multiple calculations for common agent tasks like backtesting strategies, generating rebalancing trades, or recommending hedges. All formulas are citation-verified against Hull and Wilmott. Reach for this when your agent needs to size a position, price a derivative, or run a Monte Carlo sim without hallucinating the Greeks.

CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →

Tools

Public tool metadata for what this MCP can expose to an agent.

74 tools
options_priceBlack-Scholes pricing with 10 Greeks (delta through color). Use when you need to price a European option or compute Greeks (delta, gamma, theta, vega, rho, etc.) using the Black-Scholes model. Provide spot price, strike, time to expiry, risk-free rate, and volatility. Returns:...7 params

Black-Scholes pricing with 10 Greeks (delta through color). Use when you need to price a European option or compute Greeks (delta, gamma, theta, vega, rho, etc.) using the Black-Scholes model. Provide spot price, strike, time to expiry, risk-free rate, and volatility. Returns:...

Parameters* required
Knumber
Strike price
Snumber
Spot price of the underlying asset
Tnumber
Time to expiration in years
qnumber
Continuous dividend yielddefault: 0
rnumber
Risk-free interest rate (annualized)default: 0.05
typestring
Option typeone of call · putdefault: call
sigmanumber
Volatility (annualized, e.g. 0.2 = 20%)
options_implied-volNewton-Raphson implied volatility solver. Converges in 5-8 iterations. Use when you know the market price of an option and need to back out the implied volatility. Uses Newton-Raphson iteration. Provide spot, strike, time to expiry, risk-free rate, market price, and option typ...7 params

Newton-Raphson implied volatility solver. Converges in 5-8 iterations. Use when you know the market price of an option and need to back out the implied volatility. Uses Newton-Raphson iteration. Provide spot, strike, time to expiry, risk-free rate, market price, and option typ...

Parameters* required
Knumber
Strike price
Snumber
Spot price of the underlying asset
Tnumber
Time to expiration in years
qnumber
Continuous dividend yielddefault: 0
rnumber
Risk-free interest rate (annualized)default: 0.05
typestring
Option typeone of call · putdefault: call
market_pricenumber
Observed market price of the option
options_strategyMulti-leg options strategy P&L, breakevens, max profit/loss, risk/reward. Use when analyzing a multi-leg options strategy (spreads, straddles, iron condors, etc.). Provide an array of legs with strike, premium, quantity, and type. Returns: net premium, max profit/loss, breakev...3 params

Multi-leg options strategy P&L, breakevens, max profit/loss, risk/reward. Use when analyzing a multi-leg options strategy (spreads, straddles, iron condors, etc.). Provide an array of legs with strike, premium, quantity, and type. Returns: net premium, max profit/loss, breakev...

Parameters* required
legsarray
List of option legs in the strategy
pointsinteger
Number of points to evaluate in P&L curvedefault: 50
S_rangearray
Custom price range [min, max] for P&L analysis
risk_portfolio22 risk metrics: Sharpe, Sortino, Calmar, Omega, VaR, CVaR, drawdown, skew, kurtosis. Use when you have a series of portfolio returns and need comprehensive risk analytics. Provide an array of periodic returns (e.g. daily). Returns: 22 metrics including Sharpe, Sortino, Calmar...3 params

22 risk metrics: Sharpe, Sortino, Calmar, Omega, VaR, CVaR, drawdown, skew, kurtosis. Use when you have a series of portfolio returns and need comprehensive risk analytics. Provide an array of periodic returns (e.g. daily). Returns: 22 metrics including Sharpe, Sortino, Calmar...

Parameters* required
returnsarray
Array of periodic portfolio returns (e.g. daily)
risk_free_ratenumber
Annual risk-free rate for Sharpe/Sortino calculationdefault: 0.05
benchmark_returnsarray
Optional benchmark return series for relative metrics
risk_kellyKelly Criterion: discrete (win/loss) or continuous (returns series) mode. Use when determining optimal bet/position sizing using the Kelly Criterion. Provide win probability and win/loss ratio. Returns: full Kelly fraction, half-Kelly, quarter-Kelly, and expected growth rate.5 params

Kelly Criterion: discrete (win/loss) or continuous (returns series) mode. Use when determining optimal bet/position sizing using the Kelly Criterion. Provide win probability and win/loss ratio. Returns: full Kelly fraction, half-Kelly, quarter-Kelly, and expected growth rate.

Parameters* required
modestring
Calculation mode: discrete (win/loss) or continuous (return series)one of discrete · continuousdefault: discrete
avg_winnumber
Average win amount, required for discrete mode
returnsarray
Array of historical returns, required for continuous mode
avg_lossnumber
Average loss amount (positive number), required for discrete mode
win_ratenumber
Probability of winning (0-1), required for discrete mode
simulate_montecarloGBM Monte Carlo with contributions/withdrawals. Up to 5000 paths. Use when running a Monte Carlo simulation for asset price paths. Provide starting price, drift, volatility, time horizon, and number of simulations. Returns: simulated terminal prices, percentile distribution (5...7 params

GBM Monte Carlo with contributions/withdrawals. Up to 5000 paths. Use when running a Monte Carlo simulation for asset price paths. Provide starting price, drift, volatility, time horizon, and number of simulations. Returns: simulated terminal prices, percentile distribution (5...

Parameters* required
yearsnumber
Simulation horizon in yearsdefault: 5
annual_volnumber
Annual volatility (e.g. 0.20 = 20%)default: 0.2
simulationsinteger
Number of Monte Carlo pathsdefault: 1000
annual_returnnumber
Expected annual return (e.g. 0.10 = 10%)default: 0.1
contributionsnumber
Periodic contribution amount (per year)default: 0
initial_valuenumber
Starting portfolio valuedefault: 100000
withdrawal_ratenumber
Annual withdrawal rate as fraction of portfoliodefault: 0
indicators_technical13 technical indicators + composite signals. Use when you need multiple technical indicators computed from a price series. Provide an array of prices and optional volumes. Returns: SMA, EMA, RSI, MACD, Bollinger Bands, Stochastic %K, ATR, ROC, composite signals (overbought/ove...3 params

13 technical indicators + composite signals. Use when you need multiple technical indicators computed from a price series. Provide an array of prices and optional volumes. Returns: SMA, EMA, RSI, MACD, Bollinger Bands, Stochastic %K, ATR, ROC, composite signals (overbought/ove...

Parameters* required
periodinteger
Lookback period for indicator calculationsdefault: 14
pricesarray
Array of price data (e.g. closing prices)
volumesarray
Optional array of volume data (same length as prices)
risk_correlationN x N correlation and covariance matrices from return series. Use when computing an N×N correlation matrix for multiple assets. Provide a 2D array of return series. Returns: Pearson correlation matrix, covariance matrix, and eigenvalues for PCA analysis.1 params

N x N correlation and covariance matrices from return series. Use when computing an N×N correlation matrix for multiple assets. Provide a 2D array of return series. Returns: Pearson correlation matrix, covariance matrix, and eigenvalues for PCA analysis.

Parameters* required
seriesobject
Named return series, e.g. {"AAPL": [0.01, -0.02, ...], "MSFT": [...]}
risk_position-sizeFixed fractional position sizing with risk/reward targets. Use when calculating how many shares/contracts to buy given account size and risk tolerance. Provide account value, risk percentage, entry price, and stop-loss price. Returns: position size, dollar risk, and shares to...4 params

Fixed fractional position sizing with risk/reward targets. Use when calculating how many shares/contracts to buy given account size and risk tolerance. Provide account value, risk percentage, entry price, and stop-loss price. Returns: position size, dollar risk, and shares to...

Parameters* required
stop_lossnumber
Stop loss price
entry_pricenumber
Planned entry price
account_sizenumber
Total account value
risk_per_tradenumber
Maximum risk per trade as fraction (e.g. 0.02 = 2%)default: 0.02
risk_drawdownDrawdown decomposition with underwater curve. Use when analyzing drawdown characteristics of a return series. Provide an array of returns. Returns: max drawdown, drawdown duration, recovery time, current drawdown, and all drawdown periods with start/end indices.1 params

Drawdown decomposition with underwater curve. Use when analyzing drawdown characteristics of a return series. Provide an array of returns. Returns: max drawdown, drawdown duration, recovery time, current drawdown, and all drawdown periods with start/end indices.

Parameters* required
equity_curvearray
Array of portfolio equity values over time
indicators_regimeTrend + volatility regime + composite risk classification. Use when classifying market regime (trending vs ranging, high vs low volatility). Provide a price series. Returns: trend regime (bullish/bearish/neutral), volatility regime (high/low/normal), and regime change signals.3 params

Trend + volatility regime + composite risk classification. Use when classifying market regime (trending vs ranging, high vs low volatility). Provide a price series. Returns: trend regime (bullish/bearish/neutral), volatility regime (high/low/normal), and regime change signals.

Parameters* required
pricesarray
Array of price data
sma_periodinteger
SMA period for trend detectiondefault: 50
vol_windowinteger
Window for rolling volatility calculationdefault: 21
indicators_crossoverGolden/death cross detection with signal history. Use when detecting moving average crossovers (golden cross, death cross). Provide prices and two MA periods. Returns: current MA values, crossover signals, crossover history, and signal strength.3 params

Golden/death cross detection with signal history. Use when detecting moving average crossovers (golden cross, death cross). Provide prices and two MA periods. Returns: current MA values, crossover signals, crossover history, and signal strength.

Parameters* required
pricesarray
Array of price data
fast_periodinteger
Fast moving average perioddefault: 10
slow_periodinteger
Slow moving average perioddefault: 50
fixed-income_bondBond price, Macaulay/modified duration, convexity, DV01. Use when pricing a bond or computing yield, duration, and convexity. Provide face value, coupon rate, maturity, and yield or price. Returns: bond price (or yield), Macaulay duration, modified duration, convexity, and acc...5 params

Bond price, Macaulay/modified duration, convexity, DV01. Use when pricing a bond or computing yield, duration, and convexity. Provide face value, coupon rate, maturity, and yield or price. Returns: bond price (or yield), Macaulay duration, modified duration, convexity, and acc...

Parameters* required
ytmnumber
Yield to maturity (annualized)
facenumber
Face/par value of the bonddefault: 1000
yearsinteger
Years to maturity
frequencyinteger
Coupon payments per yeardefault: 2
coupon_ratenumber
Annual coupon rate (e.g. 0.05 = 5%)
fixed-income_amortizationFull amortization schedule with extra payment savings analysis. Use when generating a loan amortization schedule. Provide principal, annual rate, and term in months. Returns: monthly payment, total interest, and a period-by-period schedule of principal, interest, and remaining...4 params

Full amortization schedule with extra payment savings analysis. Use when generating a loan amortization schedule. Provide principal, annual rate, and term in months. Returns: monthly payment, total interest, and a period-by-period schedule of principal, interest, and remaining...

Parameters* required
yearsinteger
Loan term in years
principalnumber
Loan principal amount
annual_ratenumber
Annual interest rate
extra_paymentnumber
Extra payment per perioddefault: 0
portfolio_optimizePortfolio optimization: max Sharpe, min vol, or risk parity weights. Use when optimizing portfolio weights for max Sharpe, min volatility, or risk parity. Provide expected returns and a covariance matrix. Returns: optimal weights, expected return, volatility, Sharpe ratio, and...3 params

Portfolio optimization: max Sharpe, min vol, or risk parity weights. Use when optimizing portfolio weights for max Sharpe, min volatility, or risk parity. Provide expected returns and a covariance matrix. Returns: optimal weights, expected return, volatility, Sharpe ratio, and...

Parameters* required
modestring
Optimization objectiveone of max_sharpe · min_vol · risk_paritydefault: max_sharpe
returnsobject
Named return series per asset, e.g. {"AAPL": [...], "MSFT": [...]}
risk_free_ratenumber
Annual risk-free ratedefault: 0.05
derivatives_binomial-treeCRR binomial tree pricing for American and European options. Use when pricing American or European options via the CRR binomial lattice. Provide spot, strike, time, rate, volatility, steps, and exercise style. Returns: option price, early exercise boundary, and tree node values.9 params

CRR binomial tree pricing for American and European options. Use when pricing American or European options via the CRR binomial lattice. Provide spot, strike, time, rate, volatility, steps, and exercise style. Returns: option price, early exercise boundary, and tree node values.

Parameters* required
Knumber
Strike price
Snumber
Spot price of the underlying asset
Tnumber
Time to expiration in years
qnumber
Continuous dividend yielddefault: 0
rnumber
Risk-free interest rate (annualized)default: 0.05
typestring
Option typeone of call · putdefault: call
sigmanumber
Volatility (annualized)
stepsinteger
Number of tree steps (higher = more accurate)default: 100
exercisestring
Exercise styleone of american · europeandefault: european
derivatives_barrier-optionBarrier option pricing using analytical formulas. Use when pricing knock-in or knock-out barrier options. Provide spot, strike, barrier level, barrier type, and standard option parameters. Returns: barrier option price, vanilla equivalent, and barrier adjustment factors.10 params

Barrier option pricing using analytical formulas. Use when pricing knock-in or knock-out barrier options. Provide spot, strike, barrier level, barrier type, and standard option parameters. Returns: barrier option price, vanilla equivalent, and barrier adjustment factors.

Parameters* required
Hnumber
Barrier level
Knumber
Strike price
Snumber
Spot price of the underlying asset
Tnumber
Time to expiration in years
qnumber
Continuous dividend yielddefault: 0
rnumber
Risk-free interest rate (annualized)default: 0.05
typestring
Option typeone of call · putdefault: call
sigmanumber
Volatility (annualized)
rebatenumber
Rebate paid if barrier is hit (for out) or not hit (for in)default: 0
barrier_typestring
Barrier type: up/down + in/outone of up-in · up-out · down-in · down-outdefault: down-out
derivatives_asian-optionAsian option pricing: geometric closed-form or arithmetic approximation. Use when pricing Asian (average-price) options. Provide spot, strike, time, rate, volatility, and averaging type. Returns: option price via geometric closed-form or Turnbull-Wakeman approximation.9 params

Asian option pricing: geometric closed-form or arithmetic approximation. Use when pricing Asian (average-price) options. Provide spot, strike, time, rate, volatility, and averaging type. Returns: option price via geometric closed-form or Turnbull-Wakeman approximation.

Parameters* required
Knumber
Strike price
Snumber
Spot price of the underlying asset
Tnumber
Time to expiration in years
qnumber
Continuous dividend yielddefault: 0
rnumber
Risk-free interest rate (annualized)default: 0.05
typestring
Option typeone of call · putdefault: call
sigmanumber
Volatility (annualized)
averagingstring
Averaging method for the Asian optionone of geometric · arithmeticdefault: geometric
observationsinteger
Number of averaging observationsdefault: 12
derivatives_lookback-optionLookback option pricing (floating/fixed strike). Use when pricing lookback options (floating or fixed strike). Provide spot, strike, min/max price, time, rate, and volatility. Returns: lookback option price via Goldman-Sosin-Gatto formulas.10 params

Lookback option pricing (floating/fixed strike). Use when pricing lookback options (floating or fixed strike). Provide spot, strike, min/max price, time, rate, and volatility. Returns: lookback option price via Goldman-Sosin-Gatto formulas.

Parameters* required
Knumber
Fixed strike price (required for fixed lookback)
Snumber
Current spot price
Tnumber
Time to expiration in years
qnumber
Continuous dividend yielddefault: 0
rnumber
Risk-free interest rate (annualized)default: 0.05
typestring
Option typeone of call · putdefault: call
S_maxnumber
Maximum price observed so far (for floating put)
S_minnumber
Minimum price observed so far (for floating call)
sigmanumber
Volatility (annualized)
lookback_typestring
Floating strike or fixed strike lookbackone of floating · fixeddefault: floating
derivatives_option-chain-analysisOption chain analytics: skew, max pain, put-call ratios. Use when analyzing an options chain for skew, max pain, and put-call ratios. Provide arrays of strikes, calls, puts, and open interest. Returns: max pain strike, put-call ratio, skew metrics, and implied volatility smile...4 params

Option chain analytics: skew, max pain, put-call ratios. Use when analyzing an options chain for skew, max pain, and put-call ratios. Provide arrays of strikes, calls, puts, and open interest. Returns: max pain strike, put-call ratio, skew metrics, and implied volatility smile...

Parameters* required
Tnumber
Time to expiration in yearsdefault: 0.0833
rnumber
Risk-free interest ratedefault: 0.05
spotnumber
Current spot price of the underlying
chainarray
Array of option chain entries
derivatives_put-call-parityPut-call parity check and arbitrage detection. Use when checking put-call parity or detecting arbitrage opportunities. Provide call price, put price, spot, strike, rate, and time. Returns: parity check, theoretical values, and any arbitrage amount.7 params

Put-call parity check and arbitrage detection. Use when checking put-call parity or detecting arbitrage opportunities. Provide call price, put price, spot, strike, rate, and time. Returns: parity check, theoretical values, and any arbitrage amount.

Parameters* required
Knumber
Strike price
Snumber
Spot price of the underlying
Tnumber
Time to expiration in years
qnumber
Continuous dividend yielddefault: 0
rnumber
Risk-free interest rate (annualized)default: 0.05
put_pricenumber
Observed put option price
call_pricenumber
Observed call option price
derivatives_volatility-surfaceBuild implied volatility surface from market data. Use when constructing an implied volatility surface from market data. Provide arrays of strikes, expiries, and IV values. Returns: interpolated IV surface, skew metrics, term structure, and smile parameters.3 params

Build implied volatility surface from market data. Use when constructing an implied volatility surface from market data. Provide arrays of strikes, expiries, and IV values. Returns: interpolated IV surface, skew metrics, term structure, and smile parameters.

Parameters* required
spotnumber
Current spot price
market_dataarray
Array of implied vol data points
interpolationstring
Surface interpolation methodone of linear · cubicdefault: linear
stats_linear-regressionOLS linear regression with R-squared, t-stats, and standard errors. Use when fitting a linear regression (OLS). Provide x and y arrays. Returns: slope, intercept, R², adjusted R², t-statistics, p-values, standard errors, confidence intervals, and residuals.3 params

OLS linear regression with R-squared, t-stats, and standard errors. Use when fitting a linear regression (OLS). Provide x and y arrays. Returns: slope, intercept, R², adjusted R², t-statistics, p-values, standard errors, confidence intervals, and residuals.

Parameters* required
xvalue
Independent variable(s): 1D array for simple, 2D for multiple regression
yarray
Dependent variable array
confidence_levelnumber
Confidence level for intervals (e.g. 0.95 = 95%)default: 0.95
stats_polynomial-regressionPolynomial regression of degree n with goodness-of-fit metrics. Use when fitting a polynomial of degree n to data. Provide x, y arrays, and degree. Returns: coefficients, R², fitted values, and residuals.3 params

Polynomial regression of degree n with goodness-of-fit metrics. Use when fitting a polynomial of degree n to data. Provide x, y arrays, and degree. Returns: coefficients, R², fitted values, and residuals.

Parameters* required
xarray
Independent variable array
yarray
Dependent variable array
degreeinteger
Polynomial degree (1=linear, 2=quadratic, etc.)default: 2
stats_cointegrationEngle-Granger cointegration test with hedge ratio and half-life. Use when testing if two time series are cointegrated (mean-reverting pair). Provide two price series. Returns: Engle-Granger test statistic, p-value, critical values, hedge ratio, and spread series.3 params

Engle-Granger cointegration test with hedge ratio and half-life. Use when testing if two time series are cointegrated (mean-reverting pair). Provide two price series. Returns: Engle-Granger test statistic, p-value, critical values, hedge ratio, and spread series.

Parameters* required
series_xarray
First time series
series_yarray
Second time series
significancestring
Significance level for the testone of 0.01 · 0.05 · 0.10default: 0.05
stats_hurst-exponentHurst exponent via rescaled range (R/S) analysis. Use when determining if a time series is mean-reverting (H<0.5), random walk (H=0.5), or trending (H>0.5). Provide a price or return series. Returns: Hurst exponent via R/S analysis, classification, and confidence.3 params

Hurst exponent via rescaled range (R/S) analysis. Use when determining if a time series is mean-reverting (H<0.5), random walk (H=0.5), or trending (H>0.5). Provide a price or return series. Returns: Hurst exponent via R/S analysis, classification, and confidence.

Parameters* required
seriesarray
Time series data
max_windowinteger
Maximum R/S window size (defaults to len/2)
min_windowinteger
Minimum R/S window sizedefault: 10
stats_garch-forecastGARCH(1,1) volatility forecast using maximum likelihood estimation. Use when forecasting future volatility using a GARCH(1,1) model. Provide a return series. Returns: GARCH parameters (omega, alpha, beta), current conditional volatility, and multi-step ahead volatility forecasts.3 params

GARCH(1,1) volatility forecast using maximum likelihood estimation. Use when forecasting future volatility using a GARCH(1,1) model. Provide a return series. Returns: GARCH parameters (omega, alpha, beta), current conditional volatility, and multi-step ahead volatility forecasts.

Parameters* required
returnsarray
Array of return data
mean_modelstring
Mean model specificationone of zero · constantdefault: zero
forecast_periodsinteger
Number of periods to forecast aheaddefault: 5
stats_zscoreRolling and static z-scores with extreme value detection. Use when computing z-scores for statistical analysis or detecting extremes. Provide a value or array and reference statistics. Returns: z-scores, mean, standard deviation, and flags for values beyond 2σ or 3σ.3 params

Rolling and static z-scores with extreme value detection. Use when computing z-scores for statistical analysis or detecting extremes. Provide a value or array and reference statistics. Returns: z-scores, mean, standard deviation, and flags for values beyond 2σ or 3σ.

Parameters* required
seriesarray
Numeric data series
windowinteger
Rolling window size (null for static z-scores)
thresholdnumber
Z-score threshold for extreme value detectiondefault: 2
stats_distribution-fitFit data to common distributions and rank by goodness of fit. Use when fitting data to standard distributions (normal, lognormal, uniform). Provide a data array. Returns: best-fit distribution, parameters (mean, std, etc.), goodness-of-fit statistics (KS test, chi-squared), an...1 params

Fit data to common distributions and rank by goodness of fit. Use when fitting data to standard distributions (normal, lognormal, uniform). Provide a data array. Returns: best-fit distribution, parameters (mean, std, etc.), goodness-of-fit statistics (KS test, chi-squared), an...

Parameters* required
dataarray
Array of data to fit distributions to
stats_correlation-matrixCorrelation and covariance matrices with optional eigenvalue decomposition. Use when computing a correlation matrix with eigenvalue decomposition for multiple assets. Provide a 2D array of return series. Returns: Pearson and Spearman correlation matrices, eigenvalues, eigenvec...3 params

Correlation and covariance matrices with optional eigenvalue decomposition. Use when computing a correlation matrix with eigenvalue decomposition for multiple assets. Provide a 2D array of return series. Returns: Pearson and Spearman correlation matrices, eigenvalues, eigenvec...

Parameters* required
methodstring
Correlation methodone of pearson · spearmandefault: pearson
seriesobject
Named data series, e.g. {"A": [...], "B": [...]}
include_eigenvaluesboolean
Whether to compute eigenvalue decompositiondefault: false
crypto_impermanent-lossImpermanent loss calculator for Uniswap v2/v3 AMM positions. Use when calculating impermanent loss for a liquidity provider position. Provide initial prices and current prices for two tokens. Returns: impermanent loss percentage, hold value vs LP value, and breakeven price rat...6 params

Impermanent loss calculator for Uniswap v2/v3 AMM positions. Use when calculating impermanent loss for a liquidity provider position. Provide initial prices and current prices for two tokens. Returns: impermanent loss percentage, hold value vs LP value, and breakeven price rat...

Parameters* required
amm_typestring
AMM type: v2 (full range) or v3 (concentrated)one of v2 · v3default: v2
lower_ticknumber
Lower price bound (v3 only)
upper_ticknumber
Upper price bound (v3 only)
initial_investmentnumber
Initial investment value in USDdefault: 1000
current_price_rationumber
Current price ratio of token A to token B
initial_price_rationumber
Initial price ratio of token A to token Bdefault: 1
crypto_apy-apr-convertConvert between APY and APR with configurable compounding frequency. Use when converting between APY and APR with different compounding frequencies. Provide rate and compounding periods. Returns: equivalent APY, APR, daily/weekly/monthly rates, and effective annual rate.3 params

Convert between APY and APR with configurable compounding frequency. Use when converting between APY and APR with different compounding frequencies. Provide rate and compounding periods. Returns: equivalent APY, APR, daily/weekly/monthly rates, and effective annual rate.

Parameters* required
ratenumber
The rate to convert (as decimal, e.g. 0.12 = 12%)
from_typestring
Input rate type to convert fromone of apy · aprdefault: apr
compoundingstring
Compounding frequencyone of daily · weekly · monthly · quarterly · continuousdefault: daily
crypto_liquidation-priceLiquidation price calculator for leveraged positions. Use when computing the liquidation price for a leveraged position. Provide entry price, leverage, position side, and maintenance margin. Returns: liquidation price, distance to liquidation, and margin call price.7 params

Liquidation price calculator for leveraged positions. Use when computing the liquidation price for a leveraged position. Provide entry price, leverage, position side, and maintenance margin. Returns: liquidation price, distance to liquidation, and margin call price.

Parameters* required
leveragenumber
Leverage multiplier
directionstring
Position directionone of long · short
collateralnumber
Collateral amount in USD
entry_pricenumber
Position entry price
position_sizenumber
Total position size in USD
funding_accumulatednumber
Accumulated funding payments (negative = paid)default: 0
maintenance_margin_ratenumber
Maintenance margin rate (e.g. 0.005 = 0.5%)default: 0.005
crypto_funding-rateFunding rate analysis with annualization and regime detection. Use when analyzing perpetual futures funding rates. Provide funding rate, position size, and holding period. Returns: annualized funding cost, projected payments, and carry trade opportunity estimate.3 params

Funding rate analysis with annualization and regime detection. Use when analyzing perpetual futures funding rates. Provide funding rate, position size, and holding period. Returns: annualized funding cost, projected payments, and carry trade opportunity estimate.

Parameters* required
funding_ratesarray
Array of funding rate entries
position_sizenumber
Optional position size for P&L calculation
payment_interval_hoursinteger
Hours between funding paymentsdefault: 8
crypto_dex-slippageDEX slippage estimator for constant-product AMM (x*y=k). Use when estimating slippage on a DEX trade using constant-product AMM math. Provide trade size and pool reserves. Returns: effective price, price impact percentage, and output amount after slippage.5 params

DEX slippage estimator for constant-product AMM (x*y=k). Use when estimating slippage on a DEX trade using constant-product AMM math. Provide trade size and pool reserves. Returns: effective price, price impact percentage, and output amount after slippage.

Parameters* required
fee_bpsinteger
DEX fee in basis points (e.g. 30 = 0.3%)default: 30
reserve_anumber
Pool reserve of token A
reserve_bnumber
Pool reserve of token B
trade_amountnumber
Amount of input token to swap
trade_directionstring
Swap directionone of a_to_b · b_to_adefault: a_to_b
crypto_vesting-scheduleToken vesting schedule with cliff, linear/graded unlock, and TGE. Use when computing a token vesting schedule with cliff and linear vesting. Provide total tokens, cliff period, vesting duration, and TGE unlock percentage. Returns: period-by-period unlock schedule with cumulati...6 params

Token vesting schedule with cliff, linear/graded unlock, and TGE. Use when computing a token vesting schedule with cliff and linear vesting. Provide total tokens, cliff period, vesting duration, and TGE unlock percentage. Returns: period-by-period unlock schedule with cumulati...

Parameters* required
tge_pctnumber
Percentage unlocked at Token Generation Event (0-100)default: 0
start_datestring
Vesting start date (YYYY-MM-DD)default: 2025-01-01
cliff_monthsinteger
Cliff period in monthsdefault: 0
total_tokensnumber
Total tokens in the vesting grant
vesting_typestring
Vesting schedule typeone of linear · monthly_cliff · quarterlydefault: linear
vesting_monthsinteger
Total vesting duration in monthsdefault: 24
crypto_rebalance-thresholdPortfolio rebalance analyzer: drift detection and trade computation. Use when checking if a crypto portfolio needs rebalancing. Provide target weights and current weights. Returns: whether rebalancing is needed, drift per asset, and trade list to restore targets.3 params

Portfolio rebalance analyzer: drift detection and trade computation. Use when checking if a crypto portfolio needs rebalancing. Provide target weights and current weights. Returns: whether rebalancing is needed, drift per asset, and trade list to restore targets.

Parameters* required
holdingsarray
Array of current portfolio holdings
min_trade_usdnumber
Minimum trade size in USDdefault: 10
threshold_pctnumber
Rebalance trigger threshold as percentagedefault: 5
fx_interest-rate-parityInterest rate parity calculator with arbitrage detection. Use when computing covered/uncovered interest rate parity for FX pairs. Provide domestic rate, foreign rate, and spot rate. Returns: theoretical forward rate, parity-implied rate, and arbitrage opportunity if any.6 params

Interest rate parity calculator with arbitrage detection. Use when computing covered/uncovered interest rate parity for FX pairs. Provide domestic rate, foreign rate, and spot rate. Returns: theoretical forward rate, parity-implied rate, and arbitrage opportunity if any.

Parameters* required
spot_ratenumber
Current spot exchange rate
time_yearsnumber
Time horizon in yearsdefault: 1
parity_typestring
Parity type: covered or uncoveredone of covered · uncovereddefault: covered
foreign_ratenumber
Foreign interest rate (annualized)
domestic_ratenumber
Domestic interest rate (annualized)
actual_forwardnumber
Actual forward rate for arbitrage detection
fx_purchasing-power-parityPurchasing power parity fair value estimation. Use when estimating fair value of an FX rate using PPP. Provide domestic and foreign price indices and base-period exchange rate. Returns: PPP-implied fair value rate and over/undervaluation percentage.4 params

Purchasing power parity fair value estimation. Use when estimating fair value of an FX rate using PPP. Provide domestic and foreign price indices and base-period exchange rate. Returns: PPP-implied fair value rate and over/undervaluation percentage.

Parameters* required
time_yearsnumber
Time horizon in yearsdefault: 1
base_spot_ratenumber
Current spot exchange rate
foreign_inflationnumber
Foreign inflation rate
domestic_inflationnumber
Domestic inflation rate
fx_forward-rateBootstrap forward rates from a spot yield curve. Use when bootstrapping forward rates from a yield curve. Provide spot rates at various tenors. Returns: implied forward rates between each tenor pair.4 params

Bootstrap forward rates from a spot yield curve. Use when bootstrapping forward rates from a yield curve. Provide spot rates at various tenors. Returns: implied forward rates between each tenor pair.

Parameters* required
compoundingstring
Compounding conventionone of continuous · annual · semidefault: continuous
forward_endnumber
Forward period end (years)
yield_curvearray
Array of yield curve points
forward_startnumber
Forward period start (years)
fx_carry-tradeCurrency carry trade P&L decomposition. Use when analyzing carry trade P&L decomposition. Provide high-yield and low-yield rates, entry spot rate, and exit spot rate. Returns: carry return, spot return, total return, and annualized P&L breakdown.7 params

Currency carry trade P&L decomposition. Use when analyzing carry trade P&L decomposition. Provide high-yield and low-yield rates, entry spot rate, and exit spot rate. Returns: carry return, spot return, total return, and annualized P&L breakdown.

Parameters* required
leveragenumber
Leverage multiplierdefault: 1
notionalnumber
Notional trade amountdefault: 100000
spot_exitnumber
Spot rate at exit
spot_entrynumber
Spot rate at entry
holding_period_daysinteger
Holding period in days
borrow_currency_ratenumber
Interest rate of the funding (borrow) currency
invest_currency_ratenumber
Interest rate of the investment currency
macro_inflation-adjustedConvert nominal returns to real returns using Fisher equation. Use when converting nominal returns to real returns using the Fisher equation. Provide nominal rate and inflation rate. Returns: real return, purchasing power change, and cumulative real growth over a period.4 params

Convert nominal returns to real returns using Fisher equation. Use when converting nominal returns to real returns using the Fisher equation. Provide nominal rate and inflation rate. Returns: real return, purchasing power change, and cumulative real growth over a period.

Parameters* required
periodsinteger
Optional number of periods for cumulative calculation
initial_valuenumber
Optional initial value for cumulative calculation
inflation_rate_pctnumber
Inflation rate as percentage
nominal_return_pctnumber
Nominal return as percentage
macro_taylor-ruleTaylor Rule interest rate prescription. Use when estimating the appropriate policy interest rate via the Taylor Rule. Provide inflation, target inflation, output gap, and neutral rate. Returns: Taylor Rule implied rate and deviation from current policy rate.7 params

Taylor Rule interest rate prescription. Use when estimating the appropriate policy interest rate via the Taylor Rule. Provide inflation, target inflation, output gap, and neutral rate. Returns: Taylor Rule implied rate and deviation from current policy rate.

Parameters* required
output_weightnumber
Weight on output gapdefault: 0.5
output_gap_pctnumber
Output gap as percentage of potential GDPdefault: 0
inflation_weightnumber
Weight on inflation gapdefault: 0.5
target_inflationnumber
Target inflation rate (percentage)default: 2
current_inflationnumber
Current inflation rate (percentage)
neutral_real_ratenumber
Neutral real interest rate (percentage)default: 2
current_policy_ratenumber
Current policy rate for gap analysis
macro_real-yieldReal yield and breakeven inflation from nominal yields. Use when computing real yield and breakeven inflation. Provide nominal yield and inflation expectation (or TIPS yield). Returns: real yield, breakeven inflation rate, and inflation risk premium estimate.4 params

Real yield and breakeven inflation from nominal yields. Use when computing real yield and breakeven inflation. Provide nominal yield and inflation expectation (or TIPS yield). Returns: real yield, breakeven inflation rate, and inflation risk premium estimate.

Parameters* required
tips_yieldnumber
TIPS real yield (percentage, alternative to inflation_expectation)
tenor_yearsnumber
Bond tenor in yearsdefault: 10
nominal_yieldnumber
Nominal bond yield (percentage)
inflation_expectationnumber
Expected inflation rate (percentage)
risk_var-parametricParametric Value-at-Risk and Conditional VaR. Use when computing Value-at-Risk and Conditional VaR using parametric methods. Provide returns and confidence level. Returns: VaR, CVaR, and distribution parameters under normal or Student-t assumptions.4 params

Parametric Value-at-Risk and Conditional VaR. Use when computing Value-at-Risk and Conditional VaR using parametric methods. Provide returns and confidence level. Returns: VaR, CVaR, and distribution parameters under normal or Student-t assumptions.

Parameters* required
returnsarray
Array of historical returns
portfolio_valuenumber
Optional portfolio value for dollar VaR
confidence_levelsarray
Confidence levels for VaR calculation
holding_period_daysinteger
VaR holding period in daysdefault: 1
risk_stress-testPortfolio stress test across multiple scenarios. Use when stress-testing a portfolio against multiple scenarios. Provide portfolio weights, asset returns, and scenario definitions (e.g. market crash, rate hike). Returns: portfolio P&L under each scenario with component-level b...2 params

Portfolio stress test across multiple scenarios. Use when stress-testing a portfolio against multiple scenarios. Provide portfolio weights, asset returns, and scenario definitions (e.g. market crash, rate hike). Returns: portfolio P&L under each scenario with component-level b...

Parameters* required
positionsarray
Array of portfolio positions
scenariosarray
Array of stress scenarios to evaluate
options_payoff-diagramMulti-leg options payoff diagram data generation. Use when you need payoff/P&L data points for plotting an options strategy. Provide legs with strike, premium, quantity, and type. Returns: array of price/payoff pairs for charting, plus key metrics (breakevens, max profit/loss).4 params

Multi-leg options payoff diagram data generation. Use when you need payoff/P&L data points for plotting an options strategy. Provide legs with strike, premium, quantity, and type. Returns: array of price/payoff pairs for charting, plus key metrics (breakevens, max profit/loss).

Parameters* required
legsarray
Array of option legs
spotnumber
Current spot price
pointsinteger
Number of evaluation pointsdefault: 100
price_range_pctnumber
Price range around spot for payoff calculation (percentage)default: 30
fi_yield-curve-interpolateYield curve interpolation: linear, cubic spline, or Nelson-Siegel. Use when interpolating a yield curve at arbitrary maturities. Provide observed maturities and yields, plus query maturities. Returns: interpolated yields via linear, cubic spline, or Nelson-Siegel models.4 params

Yield curve interpolation: linear, cubic spline, or Nelson-Siegel. Use when interpolating a yield curve at arbitrary maturities. Provide observed maturities and yields, plus query maturities. Returns: interpolated yields via linear, cubic spline, or Nelson-Siegel models.

Parameters* required
ratesarray
Array of known rates at each tenor
methodstring
Interpolation methodone of linear · cubic · nelson_siegeldefault: linear
tenorsarray
Array of known tenor points (years)
target_tenorsarray
Array of tenors to interpolate
fi_credit-spreadCredit spread and Z-spread from bond price vs risk-free curve. Use when computing Z-spread and implied default probability from a corporate bond price. Provide bond price, coupon, maturity, and risk-free curve. Returns: Z-spread, option-adjusted spread, implied default probabi...6 params

Credit spread and Z-spread from bond price vs risk-free curve. Use when computing Z-spread and implied default probability from a corporate bond price. Provide bond price, coupon, maturity, and risk-free curve. Returns: Z-spread, option-adjusted spread, implied default probabi...

Parameters* required
bond_pricenumber
Observed bond price
face_valuenumber
Face value of the bonddefault: 1000
coupon_ratenumber
Annual coupon rate
maturity_yearsinteger
Years to maturity
risk_free_curvearray
Risk-free yield curve points
payment_frequencyinteger
Coupon payments per yeardefault: 2
indicators_bollinger-bandsBollinger Bands with %B, bandwidth, and squeeze detection. Use when computing Bollinger Bands with squeeze detection. Provide prices and optional period/multiplier. Returns: upper/mid/lower bands, %B, bandwidth, squeeze flag, and current position relative to bands.3 params

Bollinger Bands with %B, bandwidth, and squeeze detection. Use when computing Bollinger Bands with squeeze detection. Provide prices and optional period/multiplier. Returns: upper/mid/lower bands, %B, bandwidth, squeeze flag, and current position relative to bands.

Parameters* required
pricesarray
Array of price data
windowinteger
Moving average windowdefault: 20
num_stdnumber
Number of standard deviations for bandsdefault: 2
indicators_fibonacci-retracementFibonacci retracement and extension levels. Use when computing Fibonacci retracement and extension levels. Provide a high price and low price. Returns: retracement levels (23.6%, 38.2%, 50%, 61.8%, 78.6%) and extension levels (127.2%, 161.8%, 261.8%).3 params

Fibonacci retracement and extension levels. Use when computing Fibonacci retracement and extension levels. Provide a high price and low price. Returns: retracement levels (23.6%, 38.2%, 50%, 61.8%, 78.6%) and extension levels (127.2%, 161.8%, 261.8%).

Parameters* required
directionstring
Trend direction for level calculationone of up · downdefault: up
swing_lownumber
Swing low price
swing_highnumber
Swing high price
indicators_atrAverage True Range with normalized ATR and volatility regime. Use when measuring volatility via Average True Range. Provide an array of prices. Returns: current ATR, normalized ATR (as % of price), ATR history, and volatility regime classification.4 params

Average True Range with normalized ATR and volatility regime. Use when measuring volatility via Average True Range. Provide an array of prices. Returns: current ATR, normalized ATR (as % of price), ATR history, and volatility regime classification.

Parameters* required
lowarray
Array of low prices
higharray
Array of high prices
closearray
Array of closing prices
periodinteger
ATR lookback perioddefault: 14
portfolio_risk-parity-weightsEqual risk contribution portfolio weights. Use when computing equal risk contribution (risk parity) portfolio weights. Provide a covariance matrix. Returns: risk parity weights and each asset's contribution to total portfolio risk.4 params

Equal risk contribution portfolio weights. Use when computing equal risk contribution (risk parity) portfolio weights. Provide a covariance matrix. Returns: risk parity weights and each asset's contribution to total portfolio risk.

Parameters* required
asset_namesarray
Optional asset name labels
risk_budgetarray
Optional risk budget weights (default: equal)
volatilitiesarray
Array of annualized volatilities per asset
correlation_matrixarray
N x N correlation matrix
risk_transaction-costTransaction cost model: commission + spread + market impact estimation. Use when estimating total transaction costs including commissions, spread, and market impact. Provide trade size, price, spread, and commission structure. Returns: total cost, cost breakdown, and cost as p...9 params

Transaction cost model: commission + spread + market impact estimation. Use when estimating total transaction costs including commissions, spread, and market impact. Provide trade size, price, spread, and commission structure. Returns: total cost, cost breakdown, and cost as p...

Parameters* required
advnumber
Average daily volume in USD (for Almgren model)
sharesinteger
Number of sharesdefault: 1
spread_bpsnumber
Bid-ask spread in basis pointsdefault: 5
trade_valuenumber
Total trade value in USD
commission_pctnumber
Commission as percentage of trade valuedefault: 0
commission_flatnumber
Flat commission per tradedefault: 0
market_impact_bpsnumber
Estimated market impact in basis pointsdefault: 0
participation_ratenumber
Fraction of ADV consumed by tradedefault: 0.1
commission_per_sharenumber
Commission per sharedefault: 0
stats_probabilistic-sharpeProbabilistic Sharpe Ratio — is the observed Sharpe statistically significant? Based on Bailey & Lopez de Prado (2012). Use when testing whether a Sharpe ratio is statistically significant. Provide returns and a benchmark Sharpe. Returns: probabilistic Sharpe ratio (probabilit...4 params

Probabilistic Sharpe Ratio — is the observed Sharpe statistically significant? Based on Bailey & Lopez de Prado (2012). Use when testing whether a Sharpe ratio is statistically significant. Provide returns and a benchmark Sharpe. Returns: probabilistic Sharpe ratio (probabilit...

Parameters* required
returnsarray
Array of portfolio returns
risk_free_ratenumber
Annual risk-free ratedefault: 0.05
benchmark_sharpenumber
Benchmark Sharpe ratio to test againstdefault: 0
annualization_factorinteger
Trading days per year for annualizationdefault: 252
tvm_present-valuePresent value of a future lump sum and/or annuity stream. Use when computing the present value of a future cash flow. Provide future value, discount rate, and number of periods. Returns: present value and discount factor.5 params

Present value of a future lump sum and/or annuity stream. Use when computing the present value of a future cash flow. Provide future value, discount rate, and number of periods. Returns: present value and discount factor.

Parameters* required
ratenumber
Discount rate per period
paymentnumber
Periodic payment amount (annuity)default: 0
periodsinteger
Number of periods
future_valuenumber
Future lump sum to discountdefault: 0
payment_timingstring
Payment at end or beginning of periodone of end · begindefault: end
tvm_future-valueFuture value of a present lump sum and/or annuity stream. Use when computing the future value of a present sum. Provide present value, interest rate, and number of periods. Returns: future value, total interest earned, and growth factor.5 params

Future value of a present lump sum and/or annuity stream. Use when computing the future value of a present sum. Provide present value, interest rate, and number of periods. Returns: future value, total interest earned, and growth factor.

Parameters* required
ratenumber
Interest rate per period
paymentnumber
Periodic payment amount (annuity)default: 0
periodsinteger
Number of periods
present_valuenumber
Present lump sum to growdefault: 0
payment_timingstring
Payment at end or beginning of periodone of end · begindefault: end
tvm_irrInternal rate of return via Newton-Raphson. First cash flow is typically negative (investment). Use when computing the internal rate of return for a cash flow series. Provide an array of cash flows. Returns: IRR (decimal), annualized IRR, and NPV at the computed IRR (should be...1 params

Internal rate of return via Newton-Raphson. First cash flow is typically negative (investment). Use when computing the internal rate of return for a cash flow series. Provide an array of cash flows. Returns: IRR (decimal), annualized IRR, and NPV at the computed IRR (should be...

Parameters* required
cash_flowsarray
Array of cash flows (first is typically negative = initial investment)
tvm_npvNet present value of a cash flow series at a given discount rate. Use when computing net present value of a series of cash flows. Provide discount rate and an array of cash flows (first is typically negative for initial investment). Returns: NPV, profitability index, and disco...2 params

Net present value of a cash flow series at a given discount rate. Use when computing net present value of a series of cash flows. Provide discount rate and an array of cash flows (first is typically negative for initial investment). Returns: NPV, profitability index, and disco...

Parameters* required
cash_flowsarray
Array of future cash flows (period 1 onward)
discount_ratenumber
Discount rate per period
stats_realized-volatilityRealized volatility: close-to-close, Parkinson, Garman-Klass, Yang-Zhang from OHLC. Use when computing historical/realized volatility from a return series. Provide returns and optional annualization factor. Returns: realized volatility (close-to-close), annualized vol, and rol...5 params

Realized volatility: close-to-close, Parkinson, Garman-Klass, Yang-Zhang from OHLC. Use when computing historical/realized volatility from a return series. Provide returns and optional annualization factor. Returns: realized volatility (close-to-close), annualized vol, and rol...

Parameters* required
lowarray
Optional array of low prices (for Parkinson/GK/YZ)
higharray
Optional array of high prices (for Parkinson/GK/YZ)
openarray
Optional array of opening prices (for GK/YZ)
closearray
Array of closing prices
annualization_factorinteger
Trading days per yeardefault: 252
stats_normal-distributionNormal distribution: CDF, PDF, quantile, and confidence intervals. Use when computing normal distribution CDF, PDF, quantiles, or confidence intervals. Provide x (for CDF/PDF), p (for quantile), or confidence_level (for interval), with optional mean and std. Returns: CDF proba...5 params

Normal distribution: CDF, PDF, quantile, and confidence intervals. Use when computing normal distribution CDF, PDF, quantiles, or confidence intervals. Provide x (for CDF/PDF), p (for quantile), or confidence_level (for interval), with optional mean and std. Returns: CDF proba...

Parameters* required
pnumber
Probability for inverse CDF (quantile)
xnumber
Value to compute CDF/PDF for
stdnumber
Distribution standard deviationdefault: 1
meannumber
Distribution meandefault: 0
confidence_levelnumber
Confidence level for interval (e.g. 0.95)
stats_sharpe-ratioStandalone Sharpe ratio from a returns series. Use when computing the Sharpe ratio from a return series. Provide returns and risk-free rate. Returns: annualized Sharpe ratio, annualized return, annualized volatility, and risk-adjusted metrics.3 params

Standalone Sharpe ratio from a returns series. Use when computing the Sharpe ratio from a return series. Provide returns and risk-free rate. Returns: annualized Sharpe ratio, annualized return, annualized volatility, and risk-adjusted metrics.

Parameters* required
returnsarray
Array of periodic returns
risk_free_ratenumber
Annual risk-free ratedefault: 0.05
annualization_factorinteger
Trading days per yeardefault: 252
tvm_cagrCompound Annual Growth Rate with optional forward projections. Use when computing compound annual growth rate. Provide beginning value, ending value, and number of years. Returns: CAGR (decimal), total return, and equivalent annual return.4 params

Compound Annual Growth Rate with optional forward projections. Use when computing compound annual growth rate. Provide beginning value, ending value, and number of years. Returns: CAGR (decimal), total return, and equivalent annual return.

Parameters* required
yearsnumber
Time period in years
end_valuenumber
Ending value
start_valuenumber
Starting value
include_projectionsboolean
Whether to include forward projectionsdefault: false
options_spread-scanScan and rank vertical spreads by risk/reward. Replaces 8-16 individual options/price calls. Use when you need to evaluate and rank multiple vertical spread candidates at once. Instead of calling options/price 8-16 times, this scans all strike combinations in one call. Provide...8 params

Scan and rank vertical spreads by risk/reward. Replaces 8-16 individual options/price calls. Use when you need to evaluate and rank multiple vertical spread candidates at once. Instead of calling options/price 8-16 times, this scans all strike combinations in one call. Provide...

Parameters* required
qnumber
Dividend yielddefault: 0
rnumber
Risk-free ratedefault: 0.05
volnumber
Implied volatility (annualized)
spotnumber
Current spot price
strategystring
one of bull_call_spread · bear_put_spread · bull_put_spread · bear_call_spreaddefault: bull_call_spread
dte_yearsnumber
Days to expiration in years
num_candidatesinteger
Number of spread candidates to evaluatedefault: 8
strike_range_pctnumber
Strike range as fraction of spotdefault: 0.1
indicators_regime-classifyCombined regime classification: trend, vol, RSI, direction, strategy suggestion. Replaces technical + regime + realized-vol. Use when you need a complete market regime assessment combining trend, volatility, RSI, and directional signals. Instead of calling technical + regime +...7 params

Combined regime classification: trend, vol, RSI, direction, strategy suggestion. Replaces technical + regime + realized-vol. Use when you need a complete market regime assessment combining trend, volatility, RSI, and directional signals. Instead of calling technical + regime +...

Parameters* required
lowsarray
Low prices (optional, improves vol estimate)
highsarray
High prices (optional, improves vol estimate)
opensarray
Opening prices (optional, improves vol estimate)
closesarray
Closing prices
rsi_periodinteger
RSI perioddefault: 14
sma_periodinteger
SMA period for trenddefault: 50
vol_windowinteger
Rolling vol windowdefault: 21
risk_full-analysisComplete risk tearsheet: Sharpe, Sortino, VaR, Kelly, drawdown, Hurst, CAGR. Replaces 7 individual calls. Use when you need a complete risk tearsheet for a return series. Instead of calling 7 individual risk/stats endpoints, this returns Sharpe, Sortino, Calmar, VaR, CVaR, Kel...4 params

Complete risk tearsheet: Sharpe, Sortino, VaR, Kelly, drawdown, Hurst, CAGR. Replaces 7 individual calls. Use when you need a complete risk tearsheet for a return series. Instead of calling 7 individual risk/stats endpoints, this returns Sharpe, Sortino, Calmar, VaR, CVaR, Kel...

Parameters* required
returnsarray
Daily returns series
equity_curvearray
Equity curve (optional, derived from returns if omitted)
risk_free_ratenumber
Annual risk-free ratedefault: 0.045
portfolio_valuenumber
Current portfolio valuedefault: 100000
trade_evaluateComplete trade evaluation: sizing, risk/reward, Kelly, costs, regime, signals. Replaces 5 individual calls. Use when evaluating whether to take a specific trade. Combines position sizing, risk/reward analysis, transaction cost estimation, regime detection, and technical signal...10 params

Complete trade evaluation: sizing, risk/reward, Kelly, costs, regime, signals. Replaces 5 individual calls. Use when evaluating whether to take a specific trade. Combines position sizing, risk/reward analysis, transaction cost estimation, regime detection, and technical signal...

Parameters* required
advnumber
Average daily volume in USDdefault: 5000000
pricesarray
Recent price history for signals
returnsarray
Historical returns for Kelly (optional)
stop_lossnumber
Stop loss price
spread_bpsnumber
Bid-ask spread in basis pointsdefault: 5
entry_pricenumber
Planned entry price
take_profitnumber
Take profit price
account_sizenumber
Total account value
risk_per_tradenumber
Max risk per trade as fractiondefault: 0.02
commission_per_sharenumber
Commission per sharedefault: 0.005
portfolio_healthFull portfolio health check: risk metrics, correlation, drawdown, rebalance, stress test. Replaces 6 individual calls. Use when you need a complete portfolio health check. Combines risk metrics, correlation matrix, drawdown analysis, rebalance detection, and stress testing (20...4 params

Full portfolio health check: risk metrics, correlation, drawdown, rebalance, stress test. Replaces 6 individual calls. Use when you need a complete portfolio health check. Combines risk metrics, correlation matrix, drawdown analysis, rebalance detection, and stress testing (20...

Parameters* required
holdingsarray
Portfolio holdings
min_trade_usdnumber
Minimum trade size in USDdefault: 100
risk_free_ratenumber
Annual risk-free ratedefault: 0.045
rebalance_threshold_pctnumber
Drift threshold to trigger rebalance (%)default: 5
pairs_signalComplete pairs trading signal: cointegration, Hurst, z-score, half-life, hedge ratio. Replaces 4 individual calls. Use when analyzing a pairs trading opportunity. Combines cointegration testing, Hurst exponent, z-score analysis, half-life estimation, and trade signal generatio...5 params

Complete pairs trading signal: cointegration, Hurst, z-score, half-life, hedge ratio. Replaces 4 individual calls. Use when analyzing a pairs trading opportunity. Combines cointegration testing, Hurst exponent, z-score analysis, half-life estimation, and trade signal generatio...

Parameters* required
name_astring
Name of asset Adefault: A
name_bstring
Name of asset Bdefault: B
series_aarray
Price series for asset A
series_barray
Price series for asset B
significancestring
one of 0.01 · 0.05 · 0.10default: 0.05
batchExecute multiple computations in a single request. Max 100 per batch. Use when you need to execute multiple computations efficiently. Bundle up to 100 individual endpoint calls into a single request for ~6x throughput improvement. Provide an array of {endpoint, params} objects...1 params

Execute multiple computations in a single request. Max 100 per batch. Use when you need to execute multiple computations efficiently. Bundle up to 100 individual endpoint calls into a single request for ~6x throughput improvement. Provide an array of {endpoint, params} objects...

Parameters* required
requestsarray
List of computation requests (max 100)
backtest_strategyDeterministic backtest of SMA crossover, RSI mean reversion, momentum, or Bollinger breakout. Replaces 10+ individual calls. Use when backtesting a trading strategy on price history. Strategies: sma_crossover (params: fast, slow), rsi_mean_reversion (params: period, oversold,...6 params

Deterministic backtest of SMA crossover, RSI mean reversion, momentum, or Bollinger breakout. Replaces 10+ individual calls. Use when backtesting a trading strategy on price history. Strategies: sma_crossover (params: fast, slow), rsi_mean_reversion (params: period, oversold,...

Parameters* required
paramsobject
Strategy params. SMA: {fast,slow}. RSI: {period,oversold,overbought}. Momentum: {lookback}. Bollinger: {period,std}.
pricesarray
Price history (daily closes, oldest first)
strategystring
sma_crossover | rsi_mean_reversion | momentum | bollinger_breakoutdefault: sma_crossover
slippage_bpsnumber
One-way slippage in basis pointsdefault: 5
commission_bpsnumber
Round-trip commission in basis pointsdefault: 5
initial_capitalnumber
Starting capitaldefault: 10000
portfolio_rebalance-planGenerate trade list to rebalance from current holdings to target weights with transaction cost estimate. Use when generating the exact trades needed to rebalance a portfolio from current holdings to target weights. Provide current_holdings (asset -> USD value), target_weights...4 params

Generate trade list to rebalance from current holdings to target weights with transaction cost estimate. Use when generating the exact trades needed to rebalance a portfolio from current holdings to target weights. Provide current_holdings (asset -> USD value), target_weights...

Parameters* required
min_trade_usdnumber
Minimum trade size in USD (smaller drifts are ignored)default: 10
target_weightsobject
Asset symbol -> target weight (must sum to ~1.0)
current_holdingsobject
Asset symbol -> current dollar value
transaction_cost_bpsnumber
One-way transaction cost in bps (incl. spread + commission)default: 10
options_strategy-optimizerRank top options strategies given market outlook + volatility view. Returns P&L, breakevens, max profit/loss for each. Use when agents need to pick the best options strategy given a market outlook. Provide spot price, outlook (bullish/bearish/neutral), vol_view (rising/falling...8 params

Rank top options strategies given market outlook + volatility view. Returns P&L, breakevens, max profit/loss for each. Use when agents need to pick the best options strategy given a market outlook. Provide spot price, outlook (bullish/bearish/neutral), vol_view (rising/falling...

Parameters* required
Snumber
Spot price
Tnumber
Time to expiration in years
qnumber
Dividend yielddefault: 0
rnumber
Risk-free ratedefault: 0.05
sigmanumber
Current implied volatility
capitalnumber
Available capitaldefault: 10000
outlookstring
bullish | bearish | neutral
vol_viewstring
rising | falling | stabledefault: stable
hedging_recommendRank cheapest effective hedges for a given position. Compares protective puts, collars, inverse hedges. Use when agents need to hedge an existing position. Provide position_type (long_stock/short_stock/long_crypto/long_options), position_value, asset_price, volatility, time_ho...7 params

Rank cheapest effective hedges for a given position. Compares protective puts, collars, inverse hedges. Use when agents need to hedge an existing position. Provide position_type (long_stock/short_stock/long_crypto/long_options), position_value, asset_price, volatility, time_ho...

Parameters* required
rnumber
Risk-free ratedefault: 0.05
volatilitynumber
Annualized volatility
asset_pricenumber
Current spot price
position_typestring
long_stock | short_stock | long_crypto | long_options
position_valuenumber
Current dollar value of position
time_horizon_daysinteger
Hedge time horizon in daysdefault: 30
max_hedge_cost_pctnumber
Max hedge cost as fraction of position (0.05 = 5%)default: 0.05

QuantOracle

The quantitative computation API for autonomous financial agents

63 deterministic, citation-verified calculators + 10 composite workflows. 1,000 free calls/day. Pay-per-call on Base or Solana.

npm Smithery ClawHub Glama CLI x402 MIT License

Calculators  |  CLI  |  MCP Server  |  x402 Payments  |  Free Tier  |  All Endpoints  |  Integrations


Try it without writing code

12 free interactive calculators backed by the same API are live at quantoracle.dev — no signup, no API key:

  • Black-Scholes Option Pricing — call/put price + full Greeks
  • American Option (Binomial Tree) — early exercise + dividends
  • Options Profit Calculator — multi-leg payoff diagrams
  • Implied Volatility — Newton-Raphson IV solver
  • Monte Carlo Simulation — portfolio + retirement scenarios
  • Kelly Criterion — full / half / quarter-Kelly sizing
  • Position Size — fixed-fractional risk
  • Value at Risk (VaR) — parametric VaR + CVaR
  • Sharpe Ratio — with 95% confidence interval
  • CAGR — compound annual growth rate + projections
  • Crypto Liquidation Price — long/short, any leverage
  • Impermanent Loss — Uniswap v2 + v3

Why QuantOracle?

Every financial agent needs math. QuantOracle is that math.

  • 63 pure calculators across options, derivatives, risk, portfolio, statistics, crypto/DeFi, FX/macro, and TVM
  • 10 composite workflows that bundle 5-15 calculator calls (backtest strategies, rebalance planning, options strategy selection, hedging recommendations, full risk analysis, pairs signals, and more)
  • Zero dependencies for the 73 calculators + composites -- no market data, accounts, or third-party APIs; send numbers in, get numbers out
  • QuantOracle Live (new) -- a separate paid tier that brings the data: fresh crypto volatility (/v1/live/volatility) and perp funding rates (/v1/live/funding-rates). We fetch the live market data and run the math, so your agent doesn't have to. 20 free calls/IP/day to evaluate, then pay-per-call via x402.
  • QuantOracle Watch (new) -- 24/7 position monitoring: register a crypto perp position once and get HMAC-signed webhooks on funding-adjusted liquidation distance, funding flips, and vol-regime changes — re-checked every 60 seconds. Free 48h trial; $5 per position per 30 days via x402.
  • Deterministic -- the calculators always produce the same outputs for the same inputs, so agents can cache, verify, and chain calls
  • Citation-verified -- every formula tested against published textbook values (Hull, Wilmott, Bailey & Lopez de Prado)
  • 120 accuracy benchmarks passing with analytical solutions
  • Fast -- sub-millisecond to 70ms compute time per call
  • Free tier -- 1,000 calls/IP/day, no API key, no signup, zero friction

QuantOracle is designed to be called repeatedly. An agent running a backtest might call 10+ endpoints per iteration. That's the model -- be the calculator agents reach for every time they need quant math.

Why not just let the LLM do the math?

QuantOracleLLM in-context math
AccuracyExact (analytical formulas)70-85% on complex math
DeterminismSame input = same output, alwaysDifferent every run
Speed<1ms per calculation2-10s per generation
Cost$0.002-0.015 per call$0.01-0.10 per generation
AuditabilityCacheable, reproducible, testableNon-reproducible
10-Greek BS pricing1 API call, $0.005~500 tokens, frequently wrong on gamma/vanna

📓 LangChain cookbook

Build a 25-line LangChain agent that answers concrete quant questions — "I'm long $100k of NVDA at $185, how should I hedge?" — with deterministic, reproducible math:

Open in Colab integrations/langchain/cookbook/quantoracle_risk_analyst.ipynb

QuantOracle × LangChain hedging composite

Runs in 30 seconds, ~$0.001 in OpenAI tokens, free for QuantOracle's individual calculators. The hedging-recommend composite shown above is $0.04 in USDC via x402.

Add QuantOracle to Your Agent

Drop this into your agent's system prompt:

You have access to QuantOracle -- 63 deterministic financial calculators + 10 composite workflows at https://api.quantoracle.dev.
Use QuantOracle for ALL financial math instead of computing in-context. It is faster, cheaper, and exact.
Send POST requests with JSON. No API key needed (1,000 free calls/day).

Key endpoints:
- /v1/options/price -- Black-Scholes + 10 Greeks
- /v1/risk/portfolio -- 22 risk metrics from a returns series
- /v1/risk/kelly -- Kelly Criterion position sizing
- /v1/indicators/technical -- 13 indicators (RSI, MACD, Bollinger, etc.)
- /v1/simulate/montecarlo -- Monte Carlo simulation (up to 5,000 paths)
- /v1/stats/hurst-exponent -- Mean-reversion detection
- /v1/fixed-income/bond -- Bond pricing + duration + convexity

Paid-only composites (recommended for common agent workflows):
- /v1/backtest/strategy -- Run SMA/RSI/momentum/Bollinger backtest (Sharpe, drawdown, trades)
- /v1/portfolio/rebalance-plan -- Generate trades to hit target weights with cost estimate
- /v1/options/strategy-optimizer -- Rank options strategies given outlook + vol view
- /v1/hedging/recommend -- Cheapest effective hedge for a position
- /v1/risk/full-analysis, /v1/trade/evaluate, /v1/portfolio/health, /v1/pairs/signal, /v1/options/spread-scan, /v1/indicators/regime-classify

Full endpoint list: https://api.quantoracle.dev/tools
OpenAPI spec: https://api.quantoracle.dev/openapi.json
x402 discovery: https://api.quantoracle.dev/.well-known/x402 (advertises Base and Solana USDC)

Discovery URLs (for agent frameworks and crawlers)

FormatURL
OpenAPI spechttps://api.quantoracle.dev/openapi.json
Tool listinghttps://api.quantoracle.dev/tools
MCP endpointnpx quantoracle-mcp
AI Pluginhttps://api.quantoracle.dev/.well-known/ai-plugin.json
Server cardhttps://mcp.quantoracle.dev/.well-known/mcp/server-card.json
Swagger docshttps://api.quantoracle.dev/docs

Quick Start

# Call any endpoint -- no setup required
curl -X POST https://api.quantoracle.dev/v1/options/price \
  -H "Content-Type: application/json" \
  -d '{"S": 100, "K": 105, "T": 0.5, "r": 0.05, "sigma": 0.2, "type": "call"}'
{
  "price": 4.5817,
  "intrinsic": 0,
  "time_value": 4.5817,
  "breakeven": 109.5817,
  "prob_itm": 0.4056,
  "greeks": {
    "delta": 0.4612,
    "gamma": 0.0281,
    "theta": -0.0211,
    "vega": 0.2808,
    "rho": 0.2077,
    "vanna": 0.0047,
    "charm": -0.0006,
    "volga": 0.0327,
    "speed": -0.0001
  },
  "d1": -0.0975,
  "d2": -0.2389,
  "ms": 12.4
}

Python

import requests

# Black-Scholes pricing
r = requests.post("https://api.quantoracle.dev/v1/options/price", json={
    "S": 100, "K": 105, "T": 0.5, "r": 0.05, "sigma": 0.2, "type": "call"
})
print(r.json()["price"])  # 4.5817

# Portfolio risk metrics (22 metrics from a returns series)
r = requests.post("https://api.quantoracle.dev/v1/risk/portfolio", json={
    "returns": [0.01, -0.005, 0.008, -0.003, 0.012, -0.001, 0.006, -0.009, 0.004, 0.002]
})
print(r.json()["risk"]["sharpe"])  # Annualized Sharpe

# Kelly Criterion
r = requests.post("https://api.quantoracle.dev/v1/risk/kelly", json={
    "mode": "discrete", "win_rate": 0.55, "avg_win": 1.5, "avg_loss": 1.0
})
print(r.json()["half_kelly"])  # Recommended bet fraction

# Monte Carlo simulation
r = requests.post("https://api.quantoracle.dev/v1/simulate/montecarlo", json={
    "initial_value": 100000, "annual_return": 0.08, "annual_vol": 0.15, "years": 10, "simulations": 1000
})
print(r.json()["terminal"]["median"])  # Median portfolio value at year 10

TypeScript

const res = await fetch("https://api.quantoracle.dev/v1/options/price", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ S: 100, K: 105, T: 0.5, r: 0.05, sigma: 0.2, type: "call" })
});
const { price, greeks } = await res.json();
const { delta, gamma, vega } = greeks;

CLI

All 63 calculators + 10 composites in your terminal. Zero dependencies.

npm install -g quantoracle-cli

Or run without installing:

npx quantoracle-cli bs --spot 185 --strike 190 --expiry 0.25 --vol 0.25
  QuantOracle · Black-Scholes (call)
  ────────────────────────────────────
  Price           $8.02
  Intrinsic       $0.00
  Time Value      $8.02
  Breakeven      $198.02
  Prob ITM        43.0%

  Greeks
  ────────────────────────────────────
  Delta            0.4797
  Gamma            0.0172
  Theta           -0.0615/day
  Vega             0.3685
  ────────────────────────────────────
  ⏱ 0.05ms · api.quantoracle.dev
# Kelly criterion
qo kelly --win-rate 0.55 --avg-win 120 --avg-loss 100

# Monte Carlo
qo mc --value 80000 --return 0.10 --vol 0.18 --years 2

# JSON output for scripting
qo bs --spot 185 --strike 190 --expiry 0.25 --vol 0.25 --json | jq '.greeks.delta'

# Data from file
qo risk portfolio --returns @returns.txt

# All commands
qo help

Free Tier

1,000 free calls per IP per day. No signup. No API key. Just call the API.

FreePaid (x402)
Calls1,000/dayUnlimited
AuthNonex402 micropayment header
CalculatorsAll 63All 63
Composite workflowsNone (paid-only)All 10
Live data tier20 calls/dayPay-per-call
Watch monitoringFree 48h trial (1 per IP / 30d)$5 per position / 30 days
Rate headersYesYes

Every response includes rate limit headers so agents can self-manage:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 847
X-RateLimit-Reset: 2025-01-15T00:00:00Z

Check usage anytime:

curl https://api.quantoracle.dev/usage

After 1,000 calls, the API returns 402 Payment Required with an x402 payment header. Any x402-compatible agent automatically pays and continues:

HTTP/1.1 402 Payment Required
PAYMENT-REQUIRED: <base64-encoded payment instructions>
TierPriceEndpoints
Simple$0.002Z-score, APY/APR, Fibonacci, Bollinger, ATR, Taylor rule, inflation, real yield, PV, FV, NPV, CAGR, normal distribution, Sharpe ratio, liquidation price, put-call parity
Medium$0.005Black-Scholes, implied vol, Kelly, position sizing, drawdown, regime, crossover, bond amortization, carry trade, IRP, PPP, funding rate, slippage, vesting, rebalance, IRR, realized vol, PSR, transaction cost
Complex$0.008Portfolio risk, binomial tree, barrier/Asian/lookback options, credit spread, VaR, stress test, regression, cointegration, Hurst, distribution fit, risk parity
Heavy$0.015Monte Carlo, GARCH, portfolio optimization, option chain analysis, vol surface, yield curve, correlation matrix
Composite$0.015-0.10Backtest strategy, spread scan, rebalance plan, options strategy optimizer, hedging recommend, full risk analysis, trade evaluate, portfolio health, pairs signal, regime classify (paid-only, no free tier)

Batch Endpoint

Run up to 100 computations in a single HTTP request. One round trip instead of 100.

curl -X POST https://api.quantoracle.dev/v1/batch \
  -H "Content-Type: application/json" \
  -d '{
    "requests": [
      {"endpoint": "options/price", "params": {"S": 100, "K": 105, "T": 0.25, "r": 0.05, "sigma": 0.2}},
      {"endpoint": "stats/zscore", "params": {"series": [10, 12, 14, 11, 13, 15]}},
      {"endpoint": "tvm/cagr", "params": {"start_value": 100, "end_value": 150, "years": 3}}
    ]
  }'

Returns all results in one response with the total price:

{
  "batch_size": 3,
  "total_price_usdc": 0.009,
  "results": [
    {"endpoint": "options/price", "status": 200, "data": {"price": 2.4779, "greeks": {"delta": 0.377, "..."}}},
    {"endpoint": "stats/zscore", "status": 200, "data": {"mean": 12.5, "std_dev": 1.87, "..."}},
    {"endpoint": "tvm/cagr", "status": 200, "data": {"cagr": 0.1447, "doubling_time_years": 5.13, "..."}}
  ],
  "ms": 42.13
}
FreePaid
Batch calls1 trial (ever)Unlimited
Max per batch100100
PriceFreeSum of individual endpoint prices

Batch pricing is the sum of the individual endpoint prices — no markup. You pay for the computations, the speed is free.


QuantOracle Live — fresh market data + compute

Every endpoint above is pure math on inputs you supply — the 73 calculators have zero data dependencies, which is what makes them deterministic and cacheable. QuantOracle Live is the one tier that brings the data: you pass a ticker, the API fetches fresh market data and runs the math, so your agent never has to source or maintain a data feed.

EndpointDescriptionPrice
POST /v1/live/volatilityRealized volatility (7d/30d/90d) + regime for a crypto asset, from fresh daily candles$0.01
POST /v1/live/funding-ratesCurrent perpetual funding rate + annualized carry for a crypto asset$0.005
curl -X POST https://api.quantoracle.dev/v1/live/volatility \
  -H "Content-Type: application/json" \
  -d '{"asset":"BTC"}'

# → {"asset":"BTC","spot":61728.7,"realized_vol_7d":0.4534,
#    "realized_vol_30d":0.3108,"realized_vol_90d":0.3157,"regime":"NORMAL",
#    "as_of_age_seconds":0,"stale":false,"source":"kraken", ...}

Pricing: the Live tier is paid from the first call — it is not part of the 1,000/day calculator free tier (the value is the fresh data + pipeline, which you can't replicate with a local library). You get 20 free calls per IP per day to evaluate, then it settles per-call via x402 (USDC on Base or Solana). You pay for freshness, not arithmetic.

Results are cached server-side (volatility ~5 min, funding ~1 min); if an upstream feed is briefly unavailable, the API serves the last good value flagged stale: true, with as_of_age_seconds telling you how fresh the answer is.

QuantOracle Watch — 24/7 position monitoring

Most monitoring agents rebuild the same loop: poll crypto/liquidation-price + risk/var-parametric on a timer, all day. Watch replaces the loop — register a crypto perp position once and an isolated watcher re-evaluates it every ~60 seconds: funding-adjusted liquidation distance (warn/critical bands with hysteresis), funding-rate sign flips, hourly vol-regime changes, and expiry warnings. Alerts fire as HMAC-signed webhooks (X-QO-Signature, key = your monitor token) and are recorded server-side, so the trial needs zero infrastructure — just poll.

EndpointDescriptionPrice
POST /v1/watch/trialFree 48-hour monitor — one per IP per 30 daysFree
POST /v1/watch/positionRegister a position for 30 days of monitoring$5.00
POST /v1/watch/extend+30 days (also upgrades a trial; body: {monitor_id, token})$5.00
PATCH /v1/watch/{id}Update position params after you add margin / resize / move itFree
GET /v1/watch/{id}Live status + alert history (token auth)Free
DELETE /v1/watch/{id}CancelFree
curl -X POST https://api.quantoracle.dev/v1/watch/trial \
  -H "Content-Type: application/json" \
  -d '{"asset":"BTC","direction":"long","entry_price":62000,
       "position_size":5000,"collateral":1000}'

# → {"monitor_id":"w_...","token":"...","tier":"trial","status":"active",
#    "liquidation_price":49910,"distance_pct":19.5,
#    "status_url":"https://api.quantoracle.dev/v1/watch/w_...", ...}

No exchange keys, no custody, no execution — Watch reads public market data and sends webhooks, so the worst failure mode is a missed alert (the watcher heartbeat is published in /health as watcher_heartbeat_age_s). Webhook targets are SSRF-guarded and deliveries retried. The economics: a DIY loop polling the same math once a minute past the free tier costs ~$7.20/day in per-call fees vs $5 per 30 days. Full walkthrough: quantoracle.dev/writing/crypto-liquidation-alerts-for-agents.

x402 Payments

QuantOracle uses the x402 protocol for pay-per-call micropayments. When an agent exhausts its free tier (or calls a paid-only composite), the API returns a standard 402 response with payment instructions advertising both Base and Solana. x402-compatible agents (Coinbase AgentKit, AgentCash, OpenClaw, etc.) handle the rest automatically:

  1. Agent calls endpoint, gets 402 with PAYMENT-REQUIRED header listing accepted networks
  2. Agent signs a gasless USDC transfer authorization on Base (EIP-3009) or Solana
  3. Agent resends request with PAYMENT-SIGNATURE header
  4. Server verifies via CDP facilitator, serves the response, settles on-chain

No API keys. No subscriptions. No accounts. Just math and micropayments.

Supported Networks

NetworkAssetGasBest for
Base mainnet (eip155:8453)USDC (0x8335...)~$0.005/txEVM agents, Coinbase tooling, LangChain, Base ecosystem
Solana mainnet (solana:5eykt4...)USDC (EPjFWdd5...)~$0.0002/tx (CDP fee-payer)Solana Agent Kit, Eliza, high-frequency bots
  • Settlement: Via Coinbase Developer Platform facilitator (api.cdp.coinbase.com/platform/v2/x402)
  • Base wallet: 0xC94f5F33ae446a50Ce31157db81253BfddFE2af6
  • Solana wallet: 9biztrXscReJ3Wi8EfkD2gL3WXzYUmzTEohD26Bxp39u
  • Discovery: https://api.quantoracle.dev/.well-known/x402 (returns both chains for every endpoint)

Test it with AgentCash

npx agentcash@latest onboard
# Fund the Base or Solana wallet shown, then:
npx agentcash fetch https://api.quantoracle.dev/v1/risk/full-analysis \
  -m POST --payment-network solana \
  --body '{"returns":[0.01,-0.02,0.03,0.005,-0.01,0.02,-0.015,0.025,0.01,-0.005,0.015]}'

MCP Server

QuantOracle is available as a native MCP server with 80 tools (63 calculators + 11 composites + 2 live market-data endpoints + 3 QuantOracle Watch monitoring tools + batch). Works with Claude Desktop, Cursor, Windsurf, Smithery, and any MCP-compatible client.

Install via npm

npx quantoracle-mcp

Claude Desktop / Claude Code

Add as a connector in Settings, or add to claude_desktop_config.json:

{
  "mcpServers": {
    "quantoracle": {
      "url": "https://mcp.quantoracle.dev/mcp"
    }
  }
}

Or run locally via npx:

{
  "mcpServers": {
    "quantoracle": {
      "command": "npx",
      "args": ["-y", "quantoracle-mcp"]
    }
  }
}

Remote MCP (Streamable HTTP)

Connect directly to the hosted server — no install required:

https://mcp.quantoracle.dev/mcp

Smithery

npx @smithery/cli mcp add https://server.smithery.ai/QuantOracle/quantoracle

OpenClaw / ClawHub

clawhub install quantoracle

Integrations

QuantOracle is available across multiple agent ecosystems:

PlatformHow to connect
Claude Desktop / Claude CodeConnector URL: https://mcp.quantoracle.dev/mcp
Cursor / WindsurfMCP config: npx quantoracle-mcp
Smitherynpx @smithery/cli mcp add QuantOracle/quantoracle
OpenClaw / ClawHubclawhub install quantoracle
CLInpm install -g quantoracle-cli or npx quantoracle-cli
Glamaglama.ai/mcp/servers/QuantOracledev/quantoracle
npm (MCP)npx quantoracle-mcp
x402 ecosystemx402.org/ecosystem
ChatGPT GPTQuantOracle GPT
LangChainpip install langchain-quantoracle
AgentCashnpx agentcash fetch https://api.quantoracle.dev/v1/...
x402scanServer page — Base + Solana
REST APIhttps://api.quantoracle.dev/v1/...
OpenAPI spechttps://api.quantoracle.dev/openapi.json
Swagger UIhttps://api.quantoracle.dev/docs

Tool Discovery

# List all tools (63 calculators + 10 composites) with paths and pricing
curl https://api.quantoracle.dev/tools

# x402 discovery (advertises Base + Solana for every endpoint)
curl https://api.quantoracle.dev/.well-known/x402

# Health check
curl https://api.quantoracle.dev/health

# Usage check
curl https://api.quantoracle.dev/usage

# MCP server card
curl https://mcp.quantoracle.dev/.well-known/mcp/server-card.json

Full Endpoint Reference

Options (4 endpoints)

EndpointDescriptionPrice
POST /v1/options/priceBlack-Scholes pricing with 10 Greeks (delta through color)$0.005
POST /v1/options/implied-volNewton-Raphson implied volatility solver$0.005
POST /v1/options/strategyMulti-leg options strategy P&L, breakevens, max profit/loss$0.008
POST /v1/options/payoff-diagramMulti-leg options payoff diagram data generation$0.005

Derivatives (7 endpoints)

EndpointDescriptionPrice
POST /v1/derivatives/binomial-treeCRR binomial tree pricing for American and European options$0.008
POST /v1/derivatives/barrier-optionBarrier option pricing using analytical formulas$0.008
POST /v1/derivatives/asian-optionAsian option pricing: geometric closed-form or arithmetic approximation$0.008
POST /v1/derivatives/lookback-optionLookback option pricing (floating/fixed strike, Goldman-Sosin-Gatto)$0.008
POST /v1/derivatives/option-chain-analysisOption chain analytics: skew, max pain, put-call ratios$0.015
POST /v1/derivatives/put-call-parityPut-call parity check and arbitrage detection$0.002
POST /v1/derivatives/volatility-surfaceBuild implied volatility surface from market data$0.015

Risk (8 endpoints)

EndpointDescriptionPrice
POST /v1/risk/portfolio22 risk metrics: Sharpe, Sortino, Calmar, Omega, VaR, CVaR, drawdown$0.008
POST /v1/risk/kellyKelly Criterion: discrete (win/loss) or continuous (returns series)$0.005
POST /v1/risk/position-sizeFixed fractional position sizing with risk/reward targets$0.005
POST /v1/risk/drawdownDrawdown decomposition with underwater curve$0.005
POST /v1/risk/correlationN x N correlation and covariance matrices from return series$0.008
POST /v1/risk/var-parametricParametric Value-at-Risk and Conditional VaR$0.008
POST /v1/risk/stress-testPortfolio stress test across multiple scenarios$0.008
POST /v1/risk/transaction-costTransaction cost model: commission + spread + Almgren market impact$0.005

Indicators (6 endpoints)

EndpointDescriptionPrice
POST /v1/indicators/technical13 technical indicators (SMA, EMA, RSI, MACD, etc.) + composite signals$0.005
POST /v1/indicators/regimeTrend + volatility regime + composite risk classification$0.005
POST /v1/indicators/crossoverGolden/death cross detection with signal history$0.005
POST /v1/indicators/bollinger-bandsBollinger Bands with %B, bandwidth, and squeeze detection$0.002
POST /v1/indicators/fibonacci-retracementFibonacci retracement and extension levels$0.002
POST /v1/indicators/atrAverage True Range with normalized ATR and volatility regime$0.002

Statistics (12 endpoints)

EndpointDescriptionPrice
POST /v1/stats/linear-regressionOLS linear regression with R-squared, t-stats, standard errors$0.008
POST /v1/stats/polynomial-regressionPolynomial regression of degree n with goodness-of-fit metrics$0.008
POST /v1/stats/cointegrationEngle-Granger cointegration test with hedge ratio and half-life$0.008
POST /v1/stats/hurst-exponentHurst exponent via rescaled range (R/S) analysis$0.008
POST /v1/stats/garch-forecastGARCH(1,1) volatility forecast using maximum likelihood estimation$0.015
POST /v1/stats/zscoreRolling and static z-scores with extreme value detection$0.002
POST /v1/stats/distribution-fitFit data to common distributions and rank by goodness of fit$0.008
POST /v1/stats/correlation-matrixCorrelation and covariance matrices with eigenvalue decomposition$0.015
POST /v1/stats/realized-volatilityRealized vol: close-to-close, Parkinson, Garman-Klass, Yang-Zhang$0.005
POST /v1/stats/normal-distributionNormal distribution: CDF, PDF, quantile, confidence intervals$0.002
POST /v1/stats/sharpe-ratioStandalone Sharpe ratio with Lo (2002) standard error and 95% CI$0.002
POST /v1/stats/probabilistic-sharpeProbabilistic Sharpe Ratio (Bailey & Lopez de Prado 2012)$0.005

Portfolio (2 endpoints)

EndpointDescriptionPrice
POST /v1/portfolio/optimizePortfolio optimization: max Sharpe, min vol, or risk parity$0.015
POST /v1/portfolio/risk-parity-weightsEqual risk contribution portfolio weights (Spinu 2013)$0.008

Fixed Income (4 endpoints)

EndpointDescriptionPrice
POST /v1/fixed-income/bondBond price, Macaulay/modified duration, convexity, DV01$0.008
POST /v1/fixed-income/amortizationFull amortization schedule with extra payment savings analysis$0.005
POST /v1/fi/yield-curve-interpolateYield curve interpolation: linear, cubic spline, Nelson-Siegel$0.015
POST /v1/fi/credit-spreadCredit spread and Z-spread from bond price vs risk-free curve$0.008

Crypto / DeFi (7 endpoints)

EndpointDescriptionPrice
POST /v1/crypto/impermanent-lossImpermanent loss calculator for Uniswap v2/v3 AMM positions$0.005
POST /v1/crypto/apy-apr-convertConvert between APY and APR with configurable compounding$0.002
POST /v1/crypto/liquidation-priceLiquidation price calculator for leveraged positions$0.002
POST /v1/crypto/funding-rateFunding rate analysis with annualization and regime detection$0.005
POST /v1/crypto/dex-slippageDEX slippage estimator for constant-product AMM (x*y=k)$0.005
POST /v1/crypto/vesting-scheduleToken vesting schedule with cliff, linear/graded unlock, TGE$0.005
POST /v1/crypto/rebalance-thresholdPortfolio rebalance analyzer: drift detection and trade sizing$0.005

Live Data (2 endpoints) — paid tier, fresh market data

EndpointDescriptionPrice
POST /v1/live/volatilityLive realized volatility (7d/30d/90d) + regime for a crypto asset$0.01
POST /v1/live/funding-ratesLive perpetual funding rate + annualized carry for a crypto asset$0.005

Paid from the first call (not part of the free tier); 20 free calls/IP/day. See QuantOracle Live.

Watch — position monitoring (6 endpoints)

EndpointDescriptionPrice
POST /v1/watch/trialFree 48-hour trial monitor (one per IP per 30 days)Free
POST /v1/watch/position24/7 monitoring of a perp position for 30 days$5.00
POST /v1/watch/extendExtend or upgrade a monitor by 30 days$5.00
PATCH /v1/watch/{id}Update position params (direction/entry/size/collateral/mmr/webhook/thresholds)Free
GET /v1/watch/{id}Live status + alert history (token auth)Free
DELETE /v1/watch/{id}Cancel a monitorFree

Priced per monitor, not per call. See QuantOracle Watch.

FX / Macro (7 endpoints)

EndpointDescriptionPrice
POST /v1/fx/interest-rate-parityInterest rate parity calculator with arbitrage detection$0.005
POST /v1/fx/purchasing-power-parityPurchasing power parity fair value estimation$0.005
POST /v1/fx/forward-rateBootstrap forward rates from a spot yield curve$0.005
POST /v1/fx/carry-tradeCurrency carry trade P&L decomposition$0.005
POST /v1/macro/inflation-adjustedNominal to real returns using Fisher equation$0.002
POST /v1/macro/taylor-ruleTaylor Rule interest rate prescription$0.002
POST /v1/macro/real-yieldReal yield and breakeven inflation from nominal yields$0.002

Time Value of Money (5 endpoints)

EndpointDescriptionPrice
POST /v1/tvm/present-valuePresent value of a future lump sum and/or annuity stream$0.002
POST /v1/tvm/future-valueFuture value of a present lump sum and/or annuity stream$0.002
POST /v1/tvm/irrInternal rate of return via Newton-Raphson$0.005
POST /v1/tvm/npvNet present value with profitability index and payback period$0.002
POST /v1/tvm/cagrCompound annual growth rate with forward projections$0.002

Simulation (1 endpoint)

EndpointDescriptionPrice
POST /v1/simulate/montecarloGBM Monte Carlo with contributions/withdrawals, up to 5000 paths$0.015

Composite Endpoints (paid-only)

Higher-level endpoints that combine multiple calculations into a single call. Same math as the individual endpoints -- just packaged for common agent workflows. No free tier.

EndpointDescriptionReplacesPrice
POST /v1/backtest/strategyRun SMA crossover, RSI mean reversion, momentum, or Bollinger breakout backtest10+ indicator + risk calls$0.10
POST /v1/options/spread-scanScan and rank vertical spreads by risk/reward8-16 options/price calls$0.05
POST /v1/portfolio/rebalance-planGenerate trade list to hit target weights with cost estimateportfolio/optimize + transaction-cost$0.05
POST /v1/options/strategy-optimizerRank top options strategies given outlook + volatility viewoptions/strategy + payoff-diagram$0.08
POST /v1/hedging/recommendRank cheapest effective hedges (protective put, collar, futures, partial)options/price + Greeks$0.04
POST /v1/risk/full-analysisComplete risk tearsheet: Sharpe, Sortino, VaR, Kelly, drawdown, Hurst, CAGR7 individual calls$0.04
POST /v1/portfolio/healthPortfolio health check: risk, correlation, rebalance, stress test6 individual calls$0.04
POST /v1/trade/evaluateTrade evaluation: sizing, risk/reward, Kelly, costs, regime, signals, verdict5 individual calls$0.025
POST /v1/pairs/signalPairs trading signal: cointegration, Hurst, z-score, half-life, hedge ratio4 individual calls$0.025
POST /v1/indicators/regime-classifyTrend, vol regime, RSI, direction, strategy suggestiontechnical + regime + realized-vol$0.015

Example: Agent Backtest Workflow

A typical agent backtest chains multiple QuantOracle calls per iteration:

1. /v1/indicators/technical    -- generate signals (SMA, RSI, MACD)
2. /v1/risk/position-size      -- size the trade (fixed fractional)
3. /v1/risk/transaction-cost   -- estimate execution costs
4. /v1/options/price            -- price the hedge (Black-Scholes)
5. /v1/risk/portfolio           -- compute running Sharpe, drawdown, VaR
6. /v1/stats/probabilistic-sharpe -- is the Sharpe statistically significant?
7. /v1/tvm/cagr                 -- compute CAGR of the equity curve

Each call is a pure calculator -- no state, no side effects, no API keys.

Strategy Optimizer (1,200+ calls)

examples/strategy_optimizer.py is a full walk-forward parameter optimizer that demonstrates heavy API usage:

PhaseWhat it doesAPI calls
Parameter SweepTest 180 lookback/rebalance/RSI combinations across 8 assets~1,080
Deep Analysis22 risk metrics + VaR + Kelly + Monte Carlo on top 3 configs~60-80
Options OverlayPrice covered calls across 6 assets x 4 expiries x 5 strikes~100-150
Pairs AnalysisCointegration scan + Hurst exponent on 45 asset pairs~50-70
pip install requests
python examples/strategy_optimizer.py

A single run makes ~1,200-1,500 API calls. At paid rates that's ~$6-8 USDC. The same calculations done by an LLM in-context would cost $12-60 in tokens (Sonnet to Opus), take 4x longer, and get 15-30% of the complex math wrong.


Self-Hosting

# Clone and run locally
git clone https://github.com/QuantOracledev/quantoracle.git
cd quantoracle
pip install fastapi uvicorn
uvicorn api.quantoracle:app --host 0.0.0.0 --port 8000

# Docker
docker compose up -d

# Docs at http://localhost:8000/docs

Accuracy

Every endpoint is tested against published analytical solutions:

  • 120 citation-backed benchmarks (Hull, Wilmott, Bailey & Lopez de Prado, Goldman-Sosin-Gatto, Taylor, Fisher, Markowitz)
  • 65+ integration tests covering all 63 calculators
  • Pure Python math -- no numpy/scipy, zero native dependencies
  • Deterministic: same inputs always produce the same outputs

Run the verification suite yourself:

python tests/accuracy_benchmarks.py https://api.quantoracle.dev

Architecture

quantoracle/
  api/quantoracle.py        -- FastAPI app, 63 calculators + 11 composites, pure Python math
  worker/src/index.ts        -- Cloudflare Worker: rate limiting + x402 payments (Base + Solana)
  mcp-server/src/index.ts    -- MCP server: 80 tools (incl. live data + Watch) over Streamable HTTP
  cli/                       -- quantoracle-cli: all endpoints in the terminal (npm)
  tests/
    test_integration.py      -- 65 integration tests (all endpoints, live API)
    accuracy_benchmarks.py   -- 120 citation-backed accuracy tests

Stack: FastAPI + Pydantic | Cloudflare Workers + KV | MCP (Streamable HTTP) | x402 + CDP Facilitator | USDC on Base and Solana


License

MIT -- use QuantOracle however you want.

Featured
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
Keep your Mac awake
Keep your Mac awake
Keep your Mac awake while Claude Code and 40+ AI agents run. Sleeps when they're idle.
One time payment $9 →
Context.devContext.dev
Context.dev
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
Make your agent a DeFi expert
Make your agent a DeFi expert
Agent, run crypto. Access onchain data & trade routes via 1inch.
Install now →
Make money from your Skills
Make money from your Skills
On Capafy, your Skill runs online 24/7 as an agent product, and you get paid every time someone uses it.
Start earning →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
Registryactive
Packagequantoracle-mcp
TransportSTDIO
UpdatedMay 31, 2026
View on GitHub