BlackLittermanNeural<T>

Models & Types · AiDotNet.Finance.Portfolio

Neural network adaptation of the Black-Litterman model.

Inheritance: NeuralNetworkBase<T> → FinancialModelBase<T> → PortfolioOptimizerBase<T> → BlackLittermanNeural<T>

For Beginners

The Black-Litterman model combines “market equilibrium” (what everyone thinks) with “investor views” (your specific predictions). This neural version learns to generate these “views” and “confidence levels” from data automatically, blending them with the market baseline to produce robust portfolios.

Example

// Create a Neural Black-Litterman model for view-based portfolio optimization
var architecture = new NeuralNetworkArchitecture<double>(
    inputType: InputType.OneDimensional,
    taskType: NeuralNetworkTaskType.Regression,
    inputHeight: 60, inputWidth: 10, inputDepth: 1, outputSize: 10);
var model = new BlackLittermanNeural<double>(architecture);
            
// Or load a pre-trained ONNX model for Bayesian portfolio optimization
var onnxModel = new BlackLittermanNeural<double>(architecture, "blacklitterman.onnx");

Constructors

Constructor Summary
BlackLittermanNeural() Initializes a new instance of the BlackLittermanNeural model.
BlackLittermanNeural(NeuralNetworkArchitecture<T> architecture, BlackLittermanNeuralOptions<T> options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer, ILossFunction<T> lossFunction)
BlackLittermanNeural(NeuralNetworkArchitecture<T> architecture, string onnxModelPath, BlackLittermanNeuralOptions<T> options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer, ILossFunction<T> lossFunction) Initializes a new instance from ONNX.

Methods

Method Summary
Vector<T> OptimizePortfolio(Tensor<T> marketData) Optimizes portfolio weights by generating views and blending with equilibrium.