Package tech.nmfin.portfoliooptimization
Interface PortfolioOptimizationAlgorithm
-
- All Known Implementing Classes:
Lai2010OptimizationAlgorithm
,NMSAAM
,TopNOptimizationAlgorithm
public interface PortfolioOptimizationAlgorithm
Computes the optimal weights based only on returns. In general, portfolio optimization takes in more parameters than just the return matrix. Those parameters, such as risk parameters, constraints, are usually fixed. We can fix them in the constructors. Therefore, this API takes only the variable parameters that can change between calls.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
PortfolioOptimizationAlgorithm.CovarianceEstimator
Define how the expected covariances of an asset for a future period is computed.static interface
PortfolioOptimizationAlgorithm.MeanEstimator
Define how the expected mean of an asset for a future period is computed.static class
PortfolioOptimizationAlgorithm.SampleCovarianceEstimator
Estimate the expected covariances of an asset using sample covariances.static class
PortfolioOptimizationAlgorithm.SampleMeanEstimator
Estimate the expected mean of an asset using sample mean.static interface
PortfolioOptimizationAlgorithm.SymbolLookup
Provides a lookup for product symbols and indices.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Vector
getOptimalWeights(Matrix returns, Vector weights0, PortfolioOptimizationAlgorithm.SymbolLookup symbolLookup, LocalDateTimeInterval interval)
Computes the optimal weights for the products using returns.
-
-
-
Method Detail
-
getOptimalWeights
Vector getOptimalWeights(Matrix returns, Vector weights0, PortfolioOptimizationAlgorithm.SymbolLookup symbolLookup, LocalDateTimeInterval interval) throws Exception
Computes the optimal weights for the products using returns.- 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
-
-