Saltar al contenido principal

Analysis Flows Reference

Framework: alphaswarm_docs/analysis-framework.md · UI: alphaswarm_docs/analysis-lab.md.

Every flow in the registry. Each flow is identified by a namespaced name (namespace.flow), declares a Pydantic params model, and returns a FlowResult with metrics / rows / chart / optional arrow_table for Iceberg persistence.

GET /analysis/flows lists every entry with the JSON-schema body derived from the params model — the lab UI auto-renders forms from this surface.

profiling.*​

NameLabelNotes
profiling.describeColumn profileWraps alphaswarm.data.profiling.compute_profile
profiling.dtypesDtypesPer-column dtype + memory footprint
profiling.null_auditNull auditNull counts + null fractions
profiling.topkTop-K valuesMost-frequent values + share

distribution.*​

NameLabelNotes
distribution.descriptive_statsDescriptive statsMean / median / std / skew / kurt / IQR / MAD / quantiles
distribution.histogramHistogramEqual-width bins + Plotly chart
distribution.ecdfEmpirical CDFSorted-value ECDF (down-sampled to max_points)
distribution.qq_plot_pointsQ-Q plot pointsSlope/intercept fit vs. norm/t/uniform/expon
distribution.shapiro_wilkShapiro-WilkNormality test (capped at 5000 samples)
distribution.jarque_beraJarque-BeraSkew + kurt goodness-of-fit
distribution.kolmogorov_smirnovK-SOne-sample vs reference dist (norm / t / uniform / expon / lognorm)

outlier.*​

NameLabelNotes
outlier.zscoreZ-scoreRobust (median/MAD) or classical
outlier.iqrIQR fencesTukey [Q1 - kIQR, Q3 + kIQR]
outlier.iforestIsolation Forestsklearn
outlier.dbscanDBSCANDensity-based; -1 is noise
outlier.lofLOFsklearn LocalOutlierFactor
outlier.ecodECODPyOD; falls back to z-score
outlier.pulse_vs_stepPulse vs StepDistinguish transient pulses from level shifts

imputation.*​

NameLabelNotes
imputation.ffill_bfillForward / backward fillDefault ffill_then_bfill
imputation.linearLinear interpolationpandas axis=0
imputation.splineCubic splinepandas spline (order configurable)
imputation.knnKNN imputersklearn KNNImputer
imputation.miceMICE (IterativeImputer)sklearn IterativeImputer

regression.*​

NameLabelNotes
regression.ols_diagnosticsOLS diagnosticsCoefs + SE + t / p + Durbin-Watson + AIC / BIC
regression.white_testWhite's testHeteroskedasticity (general form)
regression.breusch_paganBreusch-PaganHeteroskedasticity vs regressors
regression.vifVIFVariance Inflation Factors per regressor
regression.fama_macbethFama-MacBeth Two-StepCross-sectional risk-premium estimation
regression.panel_pooledPooled panel OLSalphaswarm/analysis/flows/econometrics_panel.py
regression.panel_fixedFixed-effects panel OLSalphaswarm/analysis/flows/econometrics_panel.py
regression.panel_random_effectsRandom-effects panelalphaswarm/analysis/flows/econometrics_panel.py
regression.panel_betweenBetween panel estimatoralphaswarm/analysis/flows/econometrics_panel.py
regression.panel_first_differenceFirst-difference panelalphaswarm/analysis/flows/econometrics_panel.py

time_series.*​

NameLabelNotes
time_series.stlSTL decompositionTrend / seasonal / residual
time_series.adfAugmented Dickey-FullerH0 = unit root
time_series.kpssKPSSH0 = stationary (ADF complement)
time_series.acf_pacfACF / PACFAuto- and partial-autocorrelation series
time_series.garchGARCH(p, q)Volatility model + horizon variance forecast
time_series.change_pointChange-pointruptures.KernelCPD with rbf kernel
time_series.granger_causalityGranger causalityUp to max_lag
time_series.cointegrationEngle-GrangerPair cointegration
time_series.spectral_fftSpectral (FFT)Real FFT magnitude + power spectrum
time_series.spectral_waveletContinuous wavelet transformPyWavelets (optional)
time_series.hurst_exponentHurst exponentLong-range dependence
time_series.theil_senTheil-Sen slopeRobust median-of-pairwise-slopes

derivatives.*​

NameLabelNotes
derivatives.bsmBlack-Scholes-MertonClosed-form European price + Greeks
derivatives.greeks_surfaceGreeks surfaceΔ/Γ/ν/Θ/ρ across strikes × expiries
derivatives.implied_volatilityImplied volatility (Brent)Recover σ from a market quote
derivatives.monte_carlo_europeanMC European optionVectorised GBM; opt-in CUDA via cupy
derivatives.monte_carlo_barrierMC barrier optionKnock-in / knock-out variants
derivatives.monte_carlo_asianMC Asian optionArithmetic / geometric averaging
derivatives.sabr_smileSABR smile (Hagan)Hagan-Kumar-Lesniewski-Woodward 2002
derivatives.bachelierBachelier (normal model)Wraps alphaswarm.options.normal_model
derivatives.greeks_surface_jaxGreeks surface (JAX/vmap)JAX-vmap / fast-vollib backend via alphaswarm.options.greeks_jax
derivatives.lucic_tse_quotesLucic-Tse portfolio quotesLucic-Tse (2024-2026) optimal bid/ask matrix; see alphaswarm.options.portfolio_mm
derivatives.chain_summaryChain summaryWraps alphaswarm/analysis/flows/derivatives_chain.py
derivatives.chain_strategiesChain strategy quotesWraps alphaswarm/analysis/flows/derivatives_chain.py
derivatives.chain_skewChain IV skewWraps alphaswarm/analysis/flows/derivatives_chain.py

portfolio.*​

NameLabelNotes
portfolio.markowitz_efficient_frontierEfficient frontiercvxpy if available, numpy-only fallback
portfolio.ledoit_wolf_shrinkageLedoit-Wolf covarianceStabilised covariance matrix
portfolio.fama_french_5_rollingFF5 rolling betasRolling-window OLS on Mkt-RF / SMB / HML / RMW / CMA
portfolio.risk_parityRisk parityEqual-risk-contribution weights (Spinu 2013)
portfolio.robust_optimizeRobust Mean-Variancealphaswarm/analysis/flows/portfolio.py
portfolio.mdpf_allocateMDPF Allocationalphaswarm/analysis/flows/portfolio.py
portfolio.concentrationWeight Concentration Analysisalphaswarm/analysis/flows/concentration.py

factors.*​

NameLabelNotes
factors.evaluateFactor evaluationWraps alphaswarm.data.factors.evaluate_factor (IC + quantile spread + turnover)

microstructure.*​

NameLabelNotes
microstructure.realised_volatilityRealised volatility (OHLC)Close-to-close / Parkinson / GK / RS / YZ
microstructure.order_book_imbalanceOrder-book imbalanceTop-of-book
microstructure.vpinVPINWraps alphaswarm.data.microstructure.vpin

Other namespaces​

The registry has grown beyond the tables above since this page was last synced. alphaswarm/analysis/flows/ also ships arbitrage.* (arbitrage.johansen_basket, arbitrage.pair_signal, arbitrage.ah_share_basis, arbitrage.adr_basis), futures.* (futures.continuous_curve), fundamentals.* (fundamentals.piotroski_fscore, fundamentals.altman_zscore, fundamentals.beneish_mscore, fundamentals.mohanram_gscore), market_dynamics.* (market_dynamics.slice_and_merge), optimal_control.* (optimal_control.avellaneda_stoikov_quotes, optimal_control.cartea_jaimungal_liquidation, optimal_control.lucic_tse_portfolio_quotes, optimal_control.obizhaeva_wang_solve, optimal_control.toxicity_regime), risk.* (risk.daily_portfolio), screening.* (screening.rank), and technical.* (technical.vwap, technical.fib, technical.cones, technical.clenow). These aren't broken out into full tables here yet — check GET /analysis/flows or the corresponding module under alphaswarm/analysis/flows/ for current params.

Optional dependencies​

Flows tag their optional deps (optional_dependencies field on the descriptor). Missing extras raise a friendly RuntimeError("install extra X") instead of crashing the catalog.

DepUsed by
scikit-learnoutlier.{iforest,dbscan,lof}, imputation.{knn,mice}, portfolio.ledoit_wolf_shrinkage
statsmodelsregression.*, time_series.{adf,kpss,acf_pacf,granger_causality,cointegration,stl}
archtime_series.garch
rupturestime_series.change_point
pywaveletstime_series.spectral_wavelet
pyodoutlier.ecod (falls back to z-score)
cvxpyportfolio.markowitz_efficient_frontier (falls back to numpy projection)
cupyderivatives.monte_carlo_* (opt-in GPU acceleration)