Finance

211 public types in this namespace, organized by kind.

Models & Types (153)

Type Summary
AlphaFactorModel<T> Neural network model for learning alpha factors from market data.
Autoformer<T> Autoformer (Decomposition Transformers with Auto-Correlation) neural network for time series forecasting.
BlackLittermanNeural<T> Neural network adaptation of the Black-Litterman model.
BlackScholes<T> Closed-form Black-Scholes-Merton European option pricing, the full first-order Greeks (delta, gamma, vega, theta, rho) and implied-volatility solve.
BloombergGPT<T> BloombergGPT neural network model for comprehensive financial language processing.
BrokerOptionsProfile A broker’s mapping from the stable OptionStrategyClass archetypes to its own approval OptionsApprovalLevel numbers, plus the level this account is authorized for.
CCDM<T> CCDM — Channel-aware Contrastive Conditional Diffusion for multivariate probabilistic time series forecasting (Li, Chen and Xiong, 2024).
CSDI<T> CSDI — Conditional Score-based Diffusion Model for Probabilistic Time Series Imputation.
CVaRPortfolioObjective<T> SIT’s decision-focused training objective: the Conditional Value-at-Risk of the realized portfolio loss (Hwang and Zohren, arXiv:2510.03129).
ChronosBolt<T> Chronos-Bolt — Fast Non-Autoregressive Time Series Forecasting from the Chronos Family.
Chronos<T> Chronos-T5 (Ansari et al.
Crossformer<T> Crossformer (Cross-Dimension Transformer) neural network for multivariate time series forecasting.
DCRNN<T> DCRNN (Diffusion Convolutional Recurrent Neural Network) for spatial-temporal forecasting.
DeepAR<T> DeepAR probabilistic autoregressive forecasting model using LSTM networks.
DeepFactor<T> DeepFactor (Deep Factor Model) for multivariate time series forecasting.
DeepPortfolioManager<T> Deep Portfolio Manager for end-to-end portfolio weight optimization.
DeepState<T> DeepState (Deep State Space Model) for probabilistic time series forecasting.
DifferentialSharpeReward Differential Sharpe Ratio reward (Moody & Saffell, 1998) — the canonical risk-adjusted objective for RL trading.
DiffusionTS<T> DiffusionTS (Interpretable Diffusion for Time Series) for probabilistic forecasting with seasonal-trend decomposition.
DirectionalAccuracyMetric<T> Fraction of steps where the forecast got the DIRECTION right (sign match) — the hit rate.
EGarchModel<T> EGARCH(1,1) — Nelson (1991, “Conditional Heteroskedasticity in Asset Returns: A New Approach”, Econometrica 59).
ETSformer<T> ETSformer: Exponential Smoothing Transformer for time series forecasting.
FEDformer<T> FEDformer (Frequency Enhanced Decomposed Transformer) for long-term time series forecasting.
FactorVAE<T> Variational autoencoder for learning disentangled financial factors.
FeedforwardPolicyAgent<T> A MEMORYLESS (feed-forward MLP) continuous policy for the portfolio-manager harness — the controlled counterpart to RecurrentPolicyAgent.
FinBERTTone<T> FinBERT-tone neural network model specialized for financial sentiment analysis.
FinBERT<T> FinBERT (Financial BERT) model for financial sentiment analysis.
FinGPT<T> FinGPT neural network model for domain-specific financial language generation and analysis.
FinMA<T> FinMA (Financial Multi-Agent) neural network model for collaborative financial task solving.
FinRLAgent<T> Unified FinRL-style agent that can switch between multiple RL algorithms.
FinancialA2CAgent<T> Financial Advantage Actor-Critic (A2C) agent for fast trading policy learning.
FinancialAutoML<T> AutoML implementation for finance models (forecasting and risk).
FinancialBERT<T> FinancialBERT neural network model for domain-specific financial language processing.
FinancialDQNAgent<T> Financial Deep Q-Network (DQN) agent for discrete action trading.
FinancialDataLoader<T> Data loader for financial time series forecasting.
FinancialEvaluationResult The financial evaluation of a model: a name→value map of the metrics that were run.
FinancialEvaluator<T> Runs a set of financial metrics over a model’s predicted-vs-realized returns.
FinancialPPOAgent<T> Proximal Policy Optimization (Schulman et al.
FinancialPreprocessor<T> Preprocesses financial time series data into model-ready tensors.
FinancialSACAgent<T> Soft Actor-Critic for trading, as Haarnoja et al.
FinancialSearchSpace Provides default AutoML search spaces for finance models.
FlowState<T> FlowState — IBM’s SSM-based Time Series Foundation Model (9.1M parameters).
Fold One purged/embargoed walk-forward fold: the surviving train indices and the test indices.
GIFTEvalBenchmark<T> GIFT-Eval benchmark implementation for standardized evaluation of time series foundation models.
GPT4TS<T> GPT4TS — One Fits All: Power General Time Series Analysis by Pretrained LM.
Garch11Model<T> GARCH(1,1) — Bollerslev (1986, “Generalized Autoregressive Conditional Heteroskedasticity”, Journal of Econometrics 31).
GjrGarchModel<T> GJR-GARCH(1,1,1) — Glosten, Jagannathan & Runkle (1993, “On the Relation between the Expected Value and the Volatility of the Nominal Excess Return on Stocks”, Journal of Finance 48).
GraphAttentionLayerCore<T> The graph attention computation used by GraphAttentionPortfolio (Korangi, Mues and Bravo, arXiv:2407.15532, following Velickovic et al.): a(u,v) = softmax_v( LeakyReLU( a^T [W x_u || W x_v] ) ), aggregated over neighbours and CONCATENAT…
GraphAttentionPortfolio<T> A time-varying portfolio optimiser over a filtered asset graph, trained directly on the Sharpe ratio (Korangi, Mues and Bravo, arXiv:2407.15532).
GraphWaveNet<T> GraphWaveNet (Graph WaveNet) for deep spatial-temporal graph modeling.
HarRvModel<T> HAR-RV — the Heterogeneous AutoRegressive model of Realized Volatility (Corsi, 2009, “A Simple Approximate Long-Memory Model of Realized Volatility”, Journal of Financial Econometrics 7(2)).
HierarchicalRiskParity<T> Neural Hierarchical Risk Parity (HRP) for portfolio optimization.
Hippo<T> HiPPO (High-order Polynomial Projection Operators) for time series forecasting.
ITransformer<T> iTransformer (Inverted Transformer) neural network for time series forecasting.
InformationCoefficientMetric<T> Information coefficient: Pearson correlation between predicted and realized returns.
Informer<T> Informer (Efficient Transformer for Long Sequence Forecasting) neural network.
Interval<T> The percentile confidence interval plus the point estimate computed on the full sample.
InvestLM<T> InvestLM neural network model specialized for investment professionals and research.
Kairos<T> Kairos — Adaptive and Generalizable Time Series Foundation Model with Mixture-of-Size Encoder.
KellyCriterion<T> Kelly-criterion position sizing — the bet fraction that maximizes long-run log-growth of capital.
Kronos<T> Kronos — Foundation Model for the Language of Financial Markets.
LLMTime<T> LLM-Time — Zero-Shot Time Series Forecasting via LLM Tokenization.
LSTNet<T> LSTNet (Long Short-Term Time-series Network) model for multivariate time series forecasting.
LagLlama<T> Lag-Llama foundation model for probabilistic time series forecasting.
MGTSD<T> MG-TSD — Multi-Granularity Time Series Diffusion Model with Guided Learning.
MOIRAI<T> MOIRAI (Masked EncOder-based UnIveRsAl TIme Series Foundation Model) implementation.
MOMENT<T> MOMENT (Multi-task Optimization through Masked Encoding for Time series) foundation model.
MQCNN<T> MQCNN (Multi-Quantile Convolutional Neural Network) for probabilistic time series forecasting.
MTGNN<T> MTGNN (Multivariate Time-series Graph Neural Network) for automatic graph learning and forecasting.
Mamba2<T> Mamba-2 (State Space Duality) implementation for time series forecasting.
Mamba<T> Mamba (Selective State Space Model) implementation for time series forecasting.
MarketDataPoint<T> Represents a single market data point (OHLCV).
MarketDataProvider<T> Stores and serves market data for finance workflows.
MarketMakingAgent<T> Specialized market making agent using reinforcement learning for optimal quoting.
MarketMakingEnvironment<T> Market making environment that simulates bid/ask quoting and inventory risk.
MarkowitzOptimizer<T> Closed-form Markowitz mean-variance portfolio optimization: the global minimum-variance portfolio, the tangency (maximum-Sharpe) portfolio, and the efficient-frontier target-return portfolio.
MaxDrawdownMetric<T> Max drawdown of the strategy equity curve (NEGATED so higher is better for uniform ranking).
MultiTaskEvaluationHarness<T> Multi-task evaluation harness for time series foundation models, supporting standardized evaluation across forecasting, anomaly detection, classification, imputation, and embedding tasks.
NBEATSFinance<T> N-BEATS (Neural Basis Expansion Analysis for Time Series) model for financial forecasting.
NHiTSFinance<T> N-HiTS (Neural Hierarchical Interpolation for Time Series) model for financial forecasting.
NeuralCVaR<T> A neural network model for estimating Conditional Value at Risk (CVaR), also known as Expected Shortfall.
NeuralGARCH<T> Neural GARCH model for forecasting asset volatility.
NeuralStressTest<T> Neural network model for generating and evaluating stress test scenarios.
NeuralVaR<T> Neural Value-at-Risk (VaR) model for non-linear market risk assessment.
NonStationaryTransformer<T> Non-stationary Transformer neural network for time series forecasting with changing statistics.
OptionLeg One option leg of a strategy.
OptionStrategy A named option strategy: a set of OptionLegs (plus an optional StockLeg), with the broker approval level it requires, whether its risk is defined, and its expiry payoff profile (max loss, max gain, breakevens) computed by sampling the p…
PatchTST<T> PatchTST (Patch Time Series Transformer) neural network for long-term time series forecasting.
PathSignatureTransform<T> Truncated path signatures for SIT (Hwang and Zohren, “Signature-Informed Transformer for Asset Allocation”, arXiv:2510.03129), including the pairwise signed area that measures lead-lag.
PortfolioBacktestResult Risk-and-cost-aware performance of running one policy through a PortfolioManagerEnvironment once.
PortfolioExperiment One experiment in the greenfield trading-agent research: a named environment configuration to train + evaluate.
PortfolioExperimentOutcome The holdout result of one experiment: the trained agent’s performance vs the no-skill equal-weight baseline on the untouched holdout, and whether it beat the baseline (higher Sharpe).
PortfolioFrictions The friction knobs for an experiment’s environment — a market-realism axis.
PortfolioManagerEnvironment<T> A SOTA cross-sectional portfolio-manager environment: the agent manages a whole book at once.
PortfolioTradingEnvironment<T> Multi-asset portfolio trading environment with continuous weight actions.
ProfitFactorMetric<T> Profit factor: gross profit / gross loss of the signal-following strategy.
QuantileForecastResult<T> Represents the result of a probabilistic/quantile forecast from a time series foundation model.
RWKVForecaster<T> RWKV (Receptance Weighted Key Value) implementation for time series forecasting.
RealizedVolatilityTransformer<T> Realized Volatility Transformer for attention-based volatility forecasting.
RecurrentPolicyAgent<T> A RECURRENT continuous policy for the portfolio-manager harness: an LSTM carries hidden state across the episode, so the policy conditions each action on the whole history it has seen — not just the fixed observation window an MLP policy is…
RelationalGCN<T> RelationalGCN (Relational Graph Convolutional Network) for multi-relational graph learning.
Result Result of the BH procedure: per-hypothesis rejection flags and adjusted q-values.
RiskRatios<T> Risk-adjusted performance ratios from a periodic return series: Sharpe, Sortino, and Calmar.
S4<T> S4 (Structured State Space Sequence Model) for time series forecasting.
SAINT<T> SAINT (Self-Attention and Intersample Attention Transformer) for tabular data.
SECBERT<T> SEC-BERT neural network model for domain-specific financial language processing.
STGNN<T> STGNN (Spatio-Temporal Graph Neural Network) for forecasting on graph-structured time series data.
ScoreGrad<T> ScoreGrad (Score-based Gradient Model) for probabilistic time series forecasting using score matching.
SentimentResult<T> Result of sentiment analysis on a single text.
SharpeRatioPortfolioObjective<T> The Sharpe-ratio training objective and the sum-normalizing allocation layer for GraphAttentionPortfolio (Korangi, Mues and Bravo, arXiv:2407.15532).
SignatureAugmentedAttention<T> SIT’s signature-augmented attention bias (Hwang and Zohren, arXiv:2510.03129): Logits = QK^T / sqrt(d_k) + gamma * B, where B carries pairwise lead-lag evidence.
SignatureInformedTransformer<T> SIT: a decision-focused asset allocator that reads path signatures and outputs portfolio weights directly, trained on portfolio CVaR (Hwang and Zohren, arXiv:2510.03129).
SimMTM<T> SimMTM — Simple Pre-Training Framework for Masked Time-Series Modeling.
StockLeg An optional stock leg (covered strategies pair stock with options).
StockTradingEnvironment<T> Simple single-asset trading environment with buy/hold/sell actions.
StockformerAttention<T> Scaled dot-product attention as Stockformer defines it, over caller-owned projection layers.
StockformerBands<T> The dual-frequency band split behind Stockformer: a single-level discrete wavelet transform that separates a return series into a LOW-frequency band (trend) and a HIGH-frequency band (short-term fluctuation and abrupt events).
StockformerDualEncoder<T> Stockformer’s Dual-Frequency Spatiotemporal Encoder and its fusion decoder, following the paper’s equations rather than the shape of its prose.
Stockformer<T> Stockformer: price-volume factor stock selection using a wavelet band split and a dual-frequency spatiotemporal encoder, trained on returns and direction simultaneously.
StrategySharpeMetric<T> Annualized Sharpe ratio of the signal-following strategy.
StrategySortinoMetric<T> Annualized Sortino ratio (downside-only volatility) of the signal-following strategy.
Sundial<T> Sundial — A Family of Highly Capable Time Series Foundation Models.
TCN<T> TCN (Temporal Convolutional Network) model for time series forecasting.
TEST<T> TEST — Text Prototype Aligned Embedding to Activate LLM’s Ability for Time Series.
TFC<T> TF-C — Time-Frequency Consistency for Self-Supervised Time Series.
TFT<T> Temporal Fusion Transformer (TFT) neural network for multi-horizon time series forecasting.
TOTEM<T> TOTEM — TOkenized Time Series EMbeddings via VQ-VAE.
TOTO<T> TOTO — Datadog’s Time Series Foundation Model for Observability.
TS2Vec<T> TS2Vec — Contrastive Learning of Universal Time Series Representations.
TSDiff<T> TSDiff — Self-Guiding Diffusion Models for Probabilistic Time Series Forecasting.
TSMixer<T> TSMixer: An all-MLP architecture for time series forecasting.
TabNet<T> TabNet model for tabular data learning, combining tree-based interpretability with deep learning performance.
TabTransformer<T> TabTransformer model for tabular data, using transformers for categorical features.
TemporalGCN<T> TemporalGCN (Temporal Graph Convolutional Network) for time series forecasting on graph-structured data.
TimeBridge<T> TimeBridge — Non-Stationarity Matters for Time Series Foundation Models.
TimeDiff<T> TimeDiff — Non-autoregressive Conditional Diffusion Models for Time Series Prediction.
TimeGPT<T> TimeGPT-style time series foundation model implementation.
TimeGrad<T> TimeGrad — Autoregressive Denoising Diffusion Model for Time Series Forecasting.
TimeLLM<T> Time-LLM (Large Language Model Reprogramming for Time Series) implementation.
TimeMAE<T> TimeMAE — Masked Autoencoder for Time Series with Decoupled Masked Autoencoders.
TimeMachine<T> TimeMachine’s four-Mamba architecture for long-term time series forecasting.
TimeMoE<T> Time-MoE — Billion-Scale Time Series Foundation Models with Mixture of Experts.
TimeSeriesTokenizer<T> Standard tokenization pipeline for time series foundation models, supporting patching, quantization, and instance normalization strategies.
Timer<T> Timer (Generative Pre-Training for Time Series) implementation.
TimesFM<T> TimesFM (Time Series Foundation Model) for zero-shot time series forecasting.
TimesNet<T> TimesNet (Temporal 2D-Variation Modeling) neural network for time series analysis.
TinyTimeMixers<T> Tiny Time Mixers (TTM) foundation model for compact, high-performance time series forecasting.
TotalReturnReward Plain total-return reward with optional turnover and drawdown penalties: return − turnoverPenalty·turnover − drawdownPenalty·drawdown.
UniTS<T> UniTS (Unified Time Series Model) implementation for multi-task time series processing.
VisionTS<T> VisionTS — Visual Masked Autoencoders as Zero-Shot Time Series Forecasters.
VolEdge The volatility edge: our FORECAST realized vol vs the option market’s IMPLIED vol, and the resulting stance.
WaveNet<T> WaveNet model adapted for time series forecasting.
YingLong<T> YingLong — Alibaba’s Enterprise Time Series Foundation Model.

Layers (1)

Type Summary
Layer<T> One stacked encoder layer’s blocks.

Base Classes (10)

Type Summary
ClassicalVolatilityModelBase<T> Base for CLASSICAL (econometric) conditional-volatility models — GARCH and its variants — estimated by maximum likelihood, exactly as in their original papers, rather than by neural-network training.
CrossSectionalGraphModelBase<T> Base class for financial models that operate on a CROSS-SECTION of assets connected by a graph, and that predict more than one quantity per asset.
FinancialModelBase<T> Base class for all financial AI models, providing dual ONNX/native mode support.
FinancialNLPModelBase<T> Base class for all financial NLP models, implementing the dual-mode pattern.
ForecastingModelBase<T> Base class for financial forecasting models, adding forecasting-specific behavior on top of the core financial model infrastructure.
PortfolioOptimizerBase<T> Base class for portfolio optimization models.
RiskModelBase<T> Base class for risk management models, providing common infrastructure for risk assessment.
TimeSeriesFoundationModelBase<T> Abstract base class for time series foundation models that support multiple downstream tasks.
TradingAgentBase<T> Base class for financial trading agents using reinforcement learning.
TradingEnvironment<T> Base environment for financial trading simulations.

Interfaces (17)

Type Summary
IFactorModel<T> Interface for financial factor models that learn latent factors from market data.
IFinancialMetric<T> A financial-performance metric for a FORECASTING/financial model — the analogue of a cluster-validity index for a clustering model.
IFinancialModel<T> Base interface for all financial AI models in AiDotNet.Finance.
IFinancialNLPModel<T> Interface for financial Natural Language Processing models.
IForecastingModel<T> Interface for time series forecasting models in the Finance module.
IMaskableAgent<T> An agent whose discrete action selection can be restricted to a legal subset.
IMeanVarianceOptimizer<T> A closed-form mean-variance portfolio optimizer: the analytic (training-free) weight solutions.
IOptionPricer<T> A European-option pricing engine: fair value, first-order Greeks, and implied volatility.
IPortfolioAgent<T> The MINIMAL agent surface the portfolio trainer needs: choose an action, remember a transition, learn, and reset per episode.
IPortfolioOptimizer<T> Interface for portfolio optimization models that determine optimal asset allocations.
IPortfolioReward A pluggable portfolio reward function for reinforcement-learning trading agents.
IPositionSizer<T> A bet/position-sizing rule: given an edge, returns the fraction of capital to allocate.
IRiskModel<T> Interface for financial risk models that estimate potential losses.
IRiskRatioCalculator<T> Computes risk-adjusted performance ratios (Sharpe, Sortino, Calmar) from a periodic return series.
ITimeSeriesFoundationModel<T> Interface for multi-task time series foundation models that support forecasting, anomaly detection, classification, imputation, and embedding generation.
ITradingAgent<T> Interface for financial trading agents using reinforcement learning.
IVolatilityModel<T> Interface for volatility models that forecast price variability.

Enums (8)

Type Summary
FinRLAlgorithm RL algorithms supported by FinRLAgent.
FinancialDomain Defines which finance sub-domain AutoML should focus on.
FinancialNLPTaskType Defines the different types of NLP tasks for financial text processing.
OptionRight Call or put.
OptionStrategyClass Broker-INDEPENDENT risk archetype of an option strategy — what the position actually IS, regardless of how any particular broker numbers its approval tiers.
OptionTradeAction Buy (long) or sell (short) a leg.
OptionsApprovalLevel Broker options-approval tiers.
VolStance Whether the vol edge says to sell, buy, or sit out volatility.

Structs (3)

Type Summary
GraphEdge<T> An undirected edge of the filtered graph.
PortfolioRewardContext The information a portfolio reward function needs at each environment step.
Prediction<T> The model’s four outputs for one cross-section.

Options & Configuration (1)

Type Summary
ClassicalVolatilityModelOptions Options for the classical (econometric) volatility models.

Helpers & Utilities (18)

Type Summary
AssetGraphBuilder<T> Builds the filtered asset graph for GraphAttentionPortfolio: distance correlation over return-volatility series, filtered by the Triangulated Maximally Filtered Graph (TMFG) method (Korangi, Mues and Bravo, arXiv:2407.15532).
BaselinePolicies No-skill baseline policies to rank a learned agent against.
BenjaminiHochbergFdr Benjamini-Hochberg false-discovery-rate (FDR) control for multiple hypothesis testing.
BootstrapConfidenceInterval<T> Bootstrap confidence intervals for a statistic of a return series.
DeflatedSharpeRatio<T> López de Prado’s Deflated Sharpe Ratio (DSR): the probability that a strategy’s true Sharpe ratio is positive, after deflating the observed Sharpe for (a) the number of strategy configurations tried (multiple-testing / selection bias) and…
FinancialDataLoaderFactory Factory helpers for creating financial data loaders.
InformationCoefficient<T> Information Coefficient (IC): the correlation between predicted and realized forward returns, plus its statistical significance (t-statistic, two-sided p-value) and the IC information ratio (ICIR) over a time series of per-period ICs.
PortfolioAgent Adapts a full IRLAgent (PPO/SAC/TD3/…) to the narrow IPortfolioAgent.
PortfolioAgentTrainer Drives one agent through a PortfolioManagerEnvironment for a number of episodes — the standard experience-collection loop (select action, step, store transition, learn).
PortfolioBacktest Runs a policy through a portfolio environment deterministically and scores it.
PortfolioExperimentMatrix Generates the cross-product of experiment axes — objective x leverage x frictions — as a flat list of PortfolioExperiment.
PortfolioExperimentRunner Runs a set of reward experiments: for each, train a FRESH agent on the training split, then evaluate it and the equal-weight baseline on the UNTOUCHED holdout split, and rank by holdout Sharpe.
PortfolioStudy One-call research entry point: given the FULL history, split it walk-forward (train on the past, hold out a strictly-later tail with an embargo gap), run every experiment through PortfolioExperimentRunner, and return the outcomes ranked b…
PurgedWalkForwardValidator López de Prado purged-and-embargoed walk-forward cross-validation for time-ordered financial data.
StockformerMultiTaskLoss<T> Stockformer’s multi-task objective: a masked regression loss on returns plus a classification loss on direction, summed with the paper’s task weight (default 1.0, the reference’s 1:1 sum).
TradingEnvironmentFactory Factory helpers for creating trading environments from market data.
VolatilityOptionsSignal Turns a realized-volatility FORECAST (the one signal that is actually predictable — see the platform’s vol research) into an options stance and a concrete DEFINED-RISK structure, by comparing it to the option market’s implied vol: - foreca…
WalkForwardSplit Chronological train/holdout split for portfolio experiments: train on the earlier history, evaluate on a strictly-later UNTOUCHED tail, with an optional embargo gap dropped at the boundary so no information leaks across it.