Class Lai2010NPEBModel
- java.lang.Object
-
- tech.nmfin.portfoliooptimization.lai2010.Lai2010NPEBModel
-
public class Lai2010NPEBModel extends Object
The Non-Parametric Empirical Bayes (NPEB) model described in the reference computes the optimal weights for asset allocation.- See Also:
- "Tze Leung Lai, Haipeng Xing, Zehao Chen. "Mean-variance portfolio optimization when means and covariances are unknown," Annals of Applied Statistics 2011, Vol. 5, No. 2A, p. 798-823"
- MATLAB code
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Lai2010NPEBModel.OptimalWeights
-
Constructor Summary
Constructors Constructor Description Lai2010NPEBModel(MVOptimizer optimizer, int nBootstraps)
Constructs an instance of the model using MomentsEstimatorLedoitWolf as the default estimator of covariance matrix, and assuming IID for each individual asset for re-sampling.Lai2010NPEBModel(MVOptimizer mvOptimizer, int nBootstraps, ReturnsMoments.Estimator returnsMomentsEstimator, ReturnsResamplerFactory resamplerFactory, CetaMaximizer cetaMaximizer)
Constructs an instance of the model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Lai2010NPEBModel.OptimalWeights
optimalWeights(Matrix returns, double lambda)
Computes the weights based on given historical returns and the risk-aversion index λ.
-
-
-
Constructor Detail
-
Lai2010NPEBModel
public Lai2010NPEBModel(MVOptimizer optimizer, int nBootstraps)
Constructs an instance of the model using MomentsEstimatorLedoitWolf as the default estimator of covariance matrix, and assuming IID for each individual asset for re-sampling.- Parameters:
optimizer
- an optimizer to compute optimal weightsnBootstraps
- the number of bootstraps to be used
-
Lai2010NPEBModel
public Lai2010NPEBModel(MVOptimizer mvOptimizer, int nBootstraps, ReturnsMoments.Estimator returnsMomentsEstimator, ReturnsResamplerFactory resamplerFactory, CetaMaximizer cetaMaximizer)
Constructs an instance of the model.- Parameters:
mvOptimizer
- an optimizer to compute optimal weightsnBootstraps
- the number of bootstraps to be usedreturnsMomentsEstimator
- an estimator of covariance matrixresamplerFactory
- the resampling mechanismcetaMaximizer
- a maximizer for the C-eta function
-
-
Method Detail
-
optimalWeights
public Lai2010NPEBModel.OptimalWeights optimalWeights(Matrix returns, double lambda)
Computes the weights based on given historical returns and the risk-aversion index λ.- Parameters:
returns
- the historical returns matrixlambda
- the risk-aversion index- Returns:
- the optimal weight vector
-
-