Skip to main content

Overview

This server fits statistical factor models to a supplied numeric panel. It makes no external data-provider calls.

Connection

MCP URL: https://quantx-api.limex.pro/mcps/statistical-factor-models Select Statistical Factor Models in the QuantX marketplace. Use its gateway connection and QuantX authorization; no market-data or broker key is required. See Client Setup. Cursor configuration (.cursor/mcp.json):
Set the referenced environment variables before starting Cursor. For Claude Code or Python, use the client-specific format in Client Setup.

Tools

Each prefix also has -create, -info, -list, and -delete tools. Use types-list to inspect constructors; place model settings in init_kwargs of -create, not in -fit. For reproducible settings, create an explicit handle. Pass exactly one of n_factors or n_factors_max. Rank settings and SW/BM max_iter must be positive JSON integers, not strings, booleans, or floats. Automatic rank selection requires n_factors_max < min(N, T).

Examples

Fit a Balanced Panel

Call complete-panel-factor-extractor-create:
Then call complete-panel-factor-extractor-fit with the returned handle. This is synthetic stationary input, with rows as series and columns as observations:

Fit a Panel With Gaps

Call swfactor-extractor-create:
Then call swfactor-extractor-fit:
Use the bmfactor-extractor-create / bmfactor-extractor-fit pair for the dynamic model and inspect its constructor rather than reusing SW-specific arguments.

Results and Limitations

  • Input shape is (N, T): series by observations. Do not pass a date-by-ticker matrix without transposing it.
  • Rows should already be stationary, for example returns or appropriately differenced series. A model does not make arbitrary price levels stationary for you.
  • Fit payloads include factors_ with shape (k, T), loadings_ with shape (N, k), and X_fitted_ with shape (N, T), plus model-specific diagnostics. Resolve result_id when the payload is stored.
  • JSON null is supported for SW/BM missing observations. Complete-panel PCA rejects it. SW and BM also need at least one observed value in every row and every column; Banbura-Modugno additionally needs at least three time points (T >= 3). Do not replace gaps with zero unless that is a deliberate modeling choice.
  • Classify SW mixed-frequency rows by the stationary series actually supplied: ordinary missing/stock rows do not belong in flow mappings; flow_series and flow_series_diff describe different aggregation assumptions. Inspect the constructor guidance before setting them.
  • Retain the returned factors and diagnostics separately. A later call can reuse the fitted object while it remains loaded.
See Shared MCP Tools for importing tables without losing missing cells and for exporting fit results.