Skip to main content

Overview

The Statistical Factor Models Server fits statistical factor models from numeric panel matrices. It covers Stock-Watson EM, complete-panel Bai-Ng style extraction, and Banbura-Modugno dynamic factor extraction.

Connection

Add this server to your MCP client configuration.
Restart the client after changing MCP configuration. The server tools appear automatically after the connection is established.

Transport

Best-Fit Workflows

  • Fit a balanced panel with no missing values.
  • Fit a missing-value panel with Stock-Watson EM.
  • Fit a missing-value panel with a dynamic/state-space factor model.
  • Use explicit mixed-frequency mappings for Stock-Watson runs.
  • complete-panel-factor-extractor-fit
  • swfactor-extractor-create -> swfactor-extractor-fit
  • bmfactor-extractor-fit

Tools

Examples

Fit a balanced panel directly

Create a Stock-Watson extractor

Fit the created Stock-Watson extractor

n8n Workflow

This server can be exposed as an n8n Webhook for panel factor extraction. The workflow can accept JSON or uploaded CSV, validate rank settings, build the numeric panel X, route by algorithm, call the MCP tool, and respond with a compact fit summary. Recommended n8n MCP chain:
  1. Normalize webhook body or uploaded CSV into a numeric panel with rows as series and columns as observations.
  2. Validate the selected algorithm: complete-panel, stock-watson, or banbura-modugno.
  3. For complete-panel runs, call complete-panel-factor-extractor-fit directly or create a handle first with complete-panel-factor-extractor-create.
  4. For Stock-Watson, call swfactor-extractor-create with explicit flow_series and flow_series_diff, then swfactor-extractor-fit.
  5. For Banbura-Modugno, call bmfactor-extractor-create / bmfactor-extractor-fit when a configured handle is needed, or call bmfactor-extractor-fit directly for the simple path.
  6. If the fit returns result_id, call result_get before responding from n8n.
Keep panel data and model parameters in the webhook body or Code-node output. Keep credentials in n8n Credentials, not in exported workflow JSON. See n8n Workflows for the shared webhook and MCP session patterns. Available n8n template:

Notes

  • Primary fitting tools expect X as a JSON array of arrays with shape (N, T): rows are series, columns are time points.
  • Input rows should already be stationary / I(0).
  • Use null for missing observations in the Stock-Watson and dynamic factor tools.
  • For Stock-Watson mixed-frequency work, create a handle with explicit flow_series and flow_series_diff first.

Client setup

Configure this endpoint in Cursor, Claude Desktop, or a generic MCP client.

n8n workflows

Build webhook and scheduled factor-model flows around this MCP endpoint.

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.

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.

Volatility Scaling Lab

Volatility targeting, EWMA volatility, Monte Carlo bands, and risk diagnostics.