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):
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
Callcomplete-panel-factor-extractor-create:
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
Callswfactor-extractor-create:
swfactor-extractor-fit:
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), andX_fitted_with shape(N, T), plus model-specific diagnostics. Resolveresult_idwhen the payload is stored. - JSON
nullis 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_seriesandflow_series_diffdescribe 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.