Skip to main content
Glama
Ademscodeisnotsobad

Quant Companion MCP

index.ts4.76 kB
/** * @quant-companion/core * * Deterministic quant engine - pure math & analytics * No network calls. Only math and simple array operations. */ // Types export * from "./types"; // Black-Scholes pricing and Greeks export { priceBlackScholes, greeksBlackScholes, greeksBlackScholesExtended } from "./blackScholes"; // Monte Carlo simulation export { priceOptionMonteCarlo, simulateTerminalPrices } from "./monteCarlo"; // Implied volatility solver export { impliedVol } from "./impliedVol"; export type { ImpliedVolOptions } from "./impliedVol"; // Historical volatility export { computeHistoricalVol, computeRollingVol, computeParkinsonVol, } from "./volatility"; // Risk metrics export { computeRiskMetrics, computeMaxDrawdown, computeDrawdownSeries, computeHistoricalVaR, computeParametricVaR, computeCalmarRatio, } from "./risk"; // Backtesting export { runBacktest, createMACrossoverSignal, createMomentumSignal, createMeanReversionSignal, createDualMomentumSignal, createVolFilteredTrendSignal, createAdaptiveMomentumSignal, createMomentumPlusSignal, computeBacktestStats, extractDetailedTrades, // Multi-asset backtest alignCandlesByDate, runMultiAssetBacktest, } from "./backtest"; export type { DetailedTradeRecord, AlignedCandles } from "./backtest"; // Volatility smile analytics export { computeVolSmile, computeVolSmiles } from "./volSmile"; export type { ComputeVolSmileParams } from "./volSmile"; // Volatility surface analytics export { computeVolSurface, interpolateSurfaceIv, getMaturitySlice, getStrikeSlice, } from "./volSurface"; export type { ComputeVolSurfaceParams } from "./volSurface"; // Local volatility Monte Carlo export { simulateWithLocalVol } from "./localVol"; export type { LocalVolSimParams, LocalVolSimResult } from "./localVol"; // Unusual activity detection export { detectUnusualActivity } from "./unusualActivity"; export type { DetectUnusualActivityParams } from "./unusualActivity"; // SABR model export { sabrImpliedVol, buildSabrSmile, calibrateSabrSmile, sampleSabrDistribution, } from "./sabr"; export type { SabrParams, SabrCalibrationInput, SabrCalibrationResult, } from "./sabr"; // Heston model export { simulateHestonPaths, priceOptionHestonMonteCarlo, calibrateHestonSurface, hestonDistributionStats, } from "./heston"; export type { HestonParams, HestonSimResult, HestonPriceResult, HestonCalibrationInput, HestonCalibrationResult, } from "./heston"; // Forecasting utilities export { computeDistributionStats, evaluateForecast, aggregateForecastEvaluations, computeDisagreement, daysToYears, addBusinessDays, daysBetween, } from "./forecasts"; export type { ForecastDistribution, ForecastEvaluation, ForecastBacktestResult, DisagreementMetrics, } from "./forecasts"; // Utilities (exported for advanced usage) export { normalCDF, normalPDF, randomNormal, mean, stdDev, logReturns, simpleReturns, percentile, percentiles, TRADING_DAYS_PER_YEAR, CALENDAR_DAYS_PER_YEAR, } from "./utils"; // ============================================ // STRATEGY FRAMEWORK (Decision Layer + Risk + Virtual Broker) // ============================================ // Strategy types export type { VolRegime, DisagreementLevel, StrategyAnalytics, StrategyContext, StrategyDecision, StrategyFn, RiskLimits, RiskState, RiskAdjustedDecision, TradeRecord, StrategyBacktestConfig, PriceBar, StrategyBacktestResult, StrategyBacktestMetrics, BacktestSummary, SMACrossoverConfig, VolRegimeConfig, RSIMeanReversionConfig, TrendVolFilterConfig, DualMomentumConfig, StrategyType, } from "./strategy"; export { DEFAULT_RISK_LIMITS } from "./strategy"; // Risk management export { createRiskState, updateRiskState, calculateDrawdown, calculateDailyLoss, calculateNotional, maxSharesByNotional, applyRiskManagement, validateRiskLimits, createRiskLimits, } from "./strategy"; // Strategy backtest (renamed to avoid conflict with simple backtest) export { runBacktest as runStrategyBacktest, printBacktestSummary, ohlcvToPriceBars, calculateSMA, calculateRSI, calculateHistoricalVol as calculateHV, } from "./strategy"; // Strategies export { createAlwaysLongStrategy, createSMACrossoverStrategy, createVolRegimeStrategy, createRSIMeanReversionStrategy, createTrendVolFilterStrategy, createDualMomentumStrategy, createStrategy, } from "./strategy"; // Options Backtesting (synthetic) export { runWheelBacktest, runCoveredCallBacktest, runPutSellingBacktest, } from "./optionsBacktest"; export type { OptionsBacktestConfig, OptionsBacktestResult, OptionsTrade, } from "./optionsBacktest";

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Ademscodeisnotsobad/Quant-Companion-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server