Overview
The Volatility Scaling Lab Server supports volatility-scaling research workflows: EWMA volatility estimation, volatility-targeting data preparation, Monte Carlo band analysis, and performance/risk diagnostics.Connection
Add this server to your MCP client configuration.- Cursor
- Bearer auth
Transport
| Property | Value |
|---|---|
| Protocol | MCP over Streamable HTTP |
| MCP URL | https://volatility-scaling-lab-production.up.railway.app/mcp/qca-open-loop-volatility |
| Health URL | https://volatility-scaling-lab-production.up.railway.app/health |
| MCP path | /mcp/qca-open-loop-volatility |
| Request envelope | {"request": {...}} |
| Auth | Optional bearer token when enabled for the endpoint |
Best-Fit Workflows
- Load market and risk-free data for a ticker/date range.
- Compute EWMA volatility from returns or from ticker/date input.
- Analyze Monte Carlo percentiles and band widths.
- Compare a strategy volatility path against Monte Carlo confidence bands.
- Compute return, volatility, Sharpe, drawdown, and tracking-error metrics.
Recommended Tools
- compute-ewma-volatility-series
- load-and-prepare-data
- analyze-monte-carlo-results
- compare-strategy-to-monte-carlo
- compute-annualized-return
- compute-annualized-volatility
- compute-sharpe-ratio
Tools
| Tool | Description | Returns | |
|---|---|---|---|
dual-ewmaestimator-update | Updates the dual exponential weighted moving average (EWMA) estimator for volatility calculations using risky and index return values. Params: r_risky: float (risky asset return), r_index: float (index return) | Any | |
ewmavolatility-estimator-update | Updates an EWMA volatility estimator with a new return value, computing the exponentially weighted moving average volatility. Params: return_value (float): the latest return value to incorporate into the volatility estimate | Any | |
ewmavolatility-estimator-reset | Resets the EWMA volatility estimator to its initial state, clearing any accumulated data and starting fresh. Params: none | Any | |
ewmavolatility-estimator-get-current-volatility | Retrieves the current EWMA volatility estimate from the volatility estimator. Params: No parameters. | Any | |
dual-ewmaestimator-reset | Resets the internal state of the DualEWMAEstimator volatility estimator. Params: none | Any | |
dual-ewmaestimator-get-current-volatilities | Returns the current volatility estimates calculated by the DualEWMA estimator. Params: none | Any | |
compute-volatility-tracking-error | Computes annualized volatility tracking error by measuring the mean absolute difference between daily volatility estimates and a target volatility, scaled by the square root of trading periods per year. Params: sigma_hat_index (np.ndarray): daily volatility estimates; sigma_target (float): target daily volatility; periods_per_year (int, default=252): trading days per year | float | |
compute-annualized-return | Calculates annualized return from daily returns using either arithmetic mean or geometric (CAGR) method. Params: Inputs: returns (np.ndarray of daily returns), periods_per_year (int, default 252 trading days), method (‘arithmetic’ or ‘geometric’) | float | |
compute-annualized-volatility | Compute annualized volatility from daily returns. Takes an array of daily returns and returns a single float representing the annualized volatility, scaled by the number of trading days per year. Params: returns: np.ndarray (daily returns), periods_per_year: int (default=252) | float | |
compute-sharpe-ratio | Computes the Sharpe ratio from daily returns by annualizing return and volatility. Returns a float ratio without risk-free rate subtraction. Params: returns (np.ndarray): daily returns array; periods_per_year (int, default=252): trading days per year | float | |
compute-maximum-drawdown | Computes the maximum drawdown of a cumulative return series, returning the largest peak-to-trough decline as a positive percentage (e.g., 0.55 for 55% drawdown). Params: cumulative_returns: np.ndarray - cumulative return series starting at 1.0 (e.g., np.array([1.0, 1.05, 0.98])) | float | |
metrics-to-dataframe | Converts a dictionary of strategy metrics into a comparison DataFrame, organizing strategies as rows and metrics as columns. Params: metrics_dict: Dictionary mapping strategy names to their metrics (e.g., {‘Strategy A’: {‘Sharpe Ratio’: 1.2, ‘Volatility’: 0.05}}) | pd.DataFrame | |
load-and-prepare-data | Loads and prepares financial data for backtesting, including asset prices and risk-free rates, aligned to a trading calendar and transformed into returns. Params: start_date (str, default ‘2000-06-06’), end_date (str | None, defaults to today when omitted), cash_rate_convention (str, default ‘calendar_day’), ticker (str, default ‘IVV’) | pd.DataFrame |
compute-ewma-volatility-series | Compute the EWMA volatility series for returns. Accepts direct returns, tabular/stored payloads with return_column, or ticker + date range to load data inside the tool. Params: halflife (default 126), annualize (default true), periods_per_year (default 252). | pd.DataFrame | |
analyze-monte-carlo-results | Analyze Monte Carlo simulation results to compute summary statistics including final, steady-state, and early-period percentiles and band widths. Params: df: pd.DataFrame - simulation results (required) | Dict[str, float] | |
compare-strategy-to-monte-carlo | Compares a strategy’s running annualized volatility to Monte Carlo confidence bands and returns key statistics. Params: strategy_sigma_hat_ann: np.ndarray of strategy’s volatility estimates; mc_df: pd.DataFrame with p10, p50, p90 columns | Dict[str, float] | |
plot-cumulative-returns | Generates a line plot comparing cumulative returns across multiple trading strategies over time. Saves the figure if a path is provided. Params: Inputs: results_dict (dict of strategy name to DataFrame), save_path (optional save location), title (plot title, default: ‘Cumulative Returns Comparison’) | None | |
plot-weights | Plots strategy weights over time from a DataFrame, showing risky and cash allocations with optional title and saving capability. Params: Inputs: results_df (pd.DataFrame with ‘w’ and ‘c’ columns), strategy_name (optional title), save_path (optional save location) | None | |
plot-controller-states | Generates a plot showing controller states (kappa) over time from a results DataFrame, with optional leverage controller visualization. Params: results_df (pd.DataFrame): DataFrame containing ‘kappa’ and optional ‘kappa_lev’ columns; strategy_name (str): Strategy name for plot title; save_path (Optional[str]): Path to save the figure | None | |
plot-drawdown | Generates a drawdown plot comparing multiple trading strategies over time, showing percentage drawdowns from running maximums. Params: Inputs: results_dict (dict of strategy names to DataFrames with ‘R_index’ column), save_path (optional path to save figure), title (plot title, default ‘Drawdown Comparison’) | None | |
create-metrics-table-markdown | Generates a markdown table summarizing performance metrics for different strategies and saves it to a file. Params: metrics_dict: Dict[str, Dict[str, float]] - strategy metrics (e.g., {‘Strategy A’: {‘Sharpe Ratio’: 1.2, ‘Win Rate’: 0.65}}); filename: str - output path (default: ‘results/metrics_table.md’) | None |
Examples
Compute EWMA volatility from market data
Load aligned market and cash-rate data
Analyze Monte Carlo output
Notes
compute-ewma-volatility-seriesis the preferred one-step tool for requests that start from a ticker and date range.- When
end_dateis omitted, data-loading tools use the current date on the server. - Large tabular outputs can be returned as result handles.
Client setup
Configure this endpoint in Cursor, Claude Desktop, or a generic MCP client.
Shared tools
Use health, result, artifact, environment, and table helper tools.
Other Servers
Dataloader
Market-data retrieval, TA-Lib indicators, and dataframe exports.
Fama-French Replicate
Official and replicated Fama-French factors plus loadings and alpha estimation.
Statistical Factor Models
Stock-Watson, complete-panel, and dynamic statistical factor extraction.
Jump Models
JumpModel and SparseJumpModel regime fitting, online prediction, and backtesting.
Wavelet Mean Reversion
Wavelet-based mean reversion analysis for financial time series.
Parallax ExtremeHurst
ExtremeHurst signal generation from OHLCV data.
EP Ratio Screener
Fundamental stock screening based on earnings yield and balance-sheet quality.