- java.lang.Object
-
- org.ojalgo.data.domain.finance.portfolio.FinancePortfolio
-
- org.ojalgo.data.domain.finance.portfolio.NormalisedPortfolio
-
- All Implemented Interfaces:
java.lang.Comparable<FinancePortfolio>
final class NormalisedPortfolio extends FinancePortfolio
Normalised weights Portfolio
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ojalgo.data.domain.finance.portfolio.FinancePortfolio
FinancePortfolio.Context
-
-
Field Summary
Fields Modifier and Type Field Description private FinancePortfoliomyBasePortfolioprivate java.math.BigDecimalmyTotalWeightprivate NumberContextmyWeightsContext-
Fields inherited from class org.ojalgo.data.domain.finance.portfolio.FinancePortfolio
MATRIX_FACTORY
-
-
Constructor Summary
Constructors Modifier Constructor Description privateNormalisedPortfolio()(package private)NormalisedPortfolio(FinancePortfolio basePortfolio, NumberContext weightsContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetMeanReturn()The mean/expected return of this instrument.private java.math.BigDecimalgetTotalWeight()doublegetVolatility()Volatility refers to the standard deviation of the change in value of an asset with a specific time horizon.java.util.List<java.math.BigDecimal>getWeights()This method returns a list of the weights of the Portfolio's contained assets.protected voidreset()-
Methods inherited from class org.ojalgo.data.domain.finance.portfolio.FinancePortfolio
compareTo, forecast, getConformance, getLossProbability, getLossProbability, getReturnVariance, getSharpeRatio, getSharpeRatio, getValueAtRisk, getValueAtRisk95, normalise, normalise, toString
-
-
-
-
Field Detail
-
myBasePortfolio
private final FinancePortfolio myBasePortfolio
-
myTotalWeight
private transient java.math.BigDecimal myTotalWeight
-
myWeightsContext
private final NumberContext myWeightsContext
-
-
Constructor Detail
-
NormalisedPortfolio
private NormalisedPortfolio()
-
NormalisedPortfolio
NormalisedPortfolio(FinancePortfolio basePortfolio, NumberContext weightsContext)
-
-
Method Detail
-
getMeanReturn
public double getMeanReturn()
Description copied from class:FinancePortfolioThe mean/expected return of this instrument. May return either the absolute or excess return of the instrument. The context in which an instance is used should make it clear which. return.- Specified by:
getMeanReturnin classFinancePortfolio
-
getVolatility
public double getVolatility()
Description copied from class:FinancePortfolioVolatility refers to the standard deviation of the change in value of an asset with a specific time horizon. It is often used to quantify the risk of the asset over that time period. Subclasses must override either FinancePortfolio.getReturnVariance() or FinancePortfolio.getVolatility().- Overrides:
getVolatilityin classFinancePortfolio
-
getWeights
public java.util.List<java.math.BigDecimal> getWeights()
Description copied from class:FinancePortfolioThis method returns a list of the weights of the Portfolio's contained assets. An asset weight is NOT restricted to being a share/percentage - it can be anything. Most subclasses do however assume that the list of asset weights are shares/percentages that sum up to 100%. Calling FinancePortfolio.normalise() will transform any set of weights to that form.- Specified by:
getWeightsin classFinancePortfolio
-
getTotalWeight
private java.math.BigDecimal getTotalWeight()
-
reset
protected void reset()
- Specified by:
resetin classFinancePortfolio
-
-