public final class SimplePortfolio extends FinancePortfolio implements FinancePortfolio.Context
FinancePortfolio.Context
MATRIX_FACTORY
Constructor and Description |
---|
SimplePortfolio(Access2D<?> correlationsMatrix,
List<SimpleAsset> someAssets) |
SimplePortfolio(double[] someWeights) |
SimplePortfolio(FinancePortfolio.Context portfolioContext,
FinancePortfolio weightsPortfolio) |
SimplePortfolio(List<SimpleAsset> someAssets) |
SimplePortfolio(Number... someWeights) |
Modifier and Type | Method and Description |
---|---|
double |
calculatePortfolioReturn(FinancePortfolio weightsPortfolio) |
double |
calculatePortfolioVariance(FinancePortfolio weightsPortfolio) |
BasicMatrix |
getAssetReturns() |
BasicMatrix |
getAssetVolatilities() |
double |
getCorrelation(int row,
int col) |
BasicMatrix |
getCorrelations() |
double |
getCovariance(int row,
int col) |
BasicMatrix |
getCovariances() |
double |
getMeanReturn()
The mean/expected return of this instrument.
|
double |
getMeanReturn(int index) |
double |
getReturnVariance()
The instrument's return variance.
|
double |
getReturnVariance(int index) |
PortfolioSimulator |
getSimulator() |
double |
getVolatility(int index) |
BigDecimal |
getWeight(int index) |
List<BigDecimal> |
getWeights()
This method returns a list of the weights of the Portfolio's contained assets.
|
protected void |
reset() |
int |
size() |
compareTo, forecast, getConformance, getLossProbability, getLossProbability, getSharpeRatio, getSharpeRatio, getValueAtRisk, getValueAtRisk95, getVolatility, normalise, normalise, toString
public SimplePortfolio(Access2D<?> correlationsMatrix, List<SimpleAsset> someAssets)
public SimplePortfolio(FinancePortfolio.Context portfolioContext, FinancePortfolio weightsPortfolio)
public SimplePortfolio(double[] someWeights)
public SimplePortfolio(List<SimpleAsset> someAssets)
public SimplePortfolio(Number... someWeights)
public double calculatePortfolioReturn(FinancePortfolio weightsPortfolio)
calculatePortfolioReturn
in interface FinancePortfolio.Context
public double calculatePortfolioVariance(FinancePortfolio weightsPortfolio)
calculatePortfolioVariance
in interface FinancePortfolio.Context
public BasicMatrix getAssetReturns()
getAssetReturns
in interface FinancePortfolio.Context
public BasicMatrix getAssetVolatilities()
getAssetVolatilities
in interface FinancePortfolio.Context
public double getCorrelation(int row, int col)
public BasicMatrix getCorrelations()
getCorrelations
in interface FinancePortfolio.Context
public double getCovariance(int row, int col)
public BasicMatrix getCovariances()
getCovariances
in interface FinancePortfolio.Context
public double getMeanReturn()
FinancePortfolio
getMeanReturn
in class FinancePortfolio
public double getMeanReturn(int index)
public double getReturnVariance()
FinancePortfolio
getReturnVariance
in class FinancePortfolio
public double getReturnVariance(int index)
public PortfolioSimulator getSimulator()
public double getVolatility(int index)
public BigDecimal getWeight(int index)
public List<BigDecimal> getWeights()
FinancePortfolio
getWeights
in class FinancePortfolio
public int size()
size
in interface FinancePortfolio.Context
protected void reset()
reset
in class FinancePortfolio
Copyright © 2017 Optimatika. All rights reserved.