Class NMSAAM
- java.lang.Object
-
- tech.nmfin.portfoliooptimization.nmsaam.NMSAAM
-
- All Implemented Interfaces:
PortfolioOptimizationAlgorithm
public class NMSAAM extends Object implements PortfolioOptimizationAlgorithm
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface tech.nmfin.portfoliooptimization.PortfolioOptimizationAlgorithm
PortfolioOptimizationAlgorithm.CovarianceEstimator, PortfolioOptimizationAlgorithm.MeanEstimator, PortfolioOptimizationAlgorithm.SampleCovarianceEstimator, PortfolioOptimizationAlgorithm.SampleMeanEstimator, PortfolioOptimizationAlgorithm.SymbolLookup
-
-
Constructor Summary
Constructors Constructor Description NMSAAM(double riskAverse)NMSAAM(double shrinkage, double riskAverse)NMSAAM(double shrinkage, double riskAverse, int maxStocks)NMSAAM(double shrinkage, double riskAverse, int nBoots, int maxStocks, double explained)NMSAAM(double riskAverse, int maxStocks)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VectorgetOptimalWeights(Matrix returns, Vector weights0, PortfolioOptimizationAlgorithm.SymbolLookup symbolLookup, LocalDateTimeInterval interval)Computes the optimal weights for the products using returns.
-
-
-
Constructor Detail
-
NMSAAM
public NMSAAM(double shrinkage, double riskAverse, int nBoots, int maxStocks, double explained)- Parameters:
shrinkage- shrinkageriskAverse- risk adverse parameters; the bigger the more risk adversenBoots- number of bootstrapped pathsmaxStocks- maximum number of stocksexplained- weights explained
-
NMSAAM
public NMSAAM(double shrinkage, double riskAverse)
-
NMSAAM
public NMSAAM(double riskAverse)
-
NMSAAM
public NMSAAM(double shrinkage, double riskAverse, int maxStocks)
-
NMSAAM
public NMSAAM(double riskAverse, int maxStocks)
-
-
Method Detail
-
getOptimalWeights
public Vector getOptimalWeights(Matrix returns, Vector weights0, PortfolioOptimizationAlgorithm.SymbolLookup symbolLookup, LocalDateTimeInterval interval) throws Exception
Description copied from interface:PortfolioOptimizationAlgorithmComputes the optimal weights for the products using returns.- Specified by:
getOptimalWeightsin interfacePortfolioOptimizationAlgorithm- Parameters:
returns- the returns of the productsweights0- the initial/current/original weightssymbolLookup- the lookup service for product symbols and indicesinterval- the time interval of the returns matrix- Returns:
- the optimal weights
- Throws:
Exception- if fail to compute optimal weights
-
-