Class FinancePortfolio
java.lang.Object
org.ojalgo.data.domain.finance.portfolio.FinancePortfolio
- All Implemented Interfaces:
Comparable<FinancePortfolio>
- Direct Known Subclasses:
BlackLittermanModel.View, EquilibriumModel, NormalisedPortfolio, SimpleAsset, SimplePortfolio
A FinancePortfolio is primarily a set of portfolio asset weights.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal intcompareTo(FinancePortfolio reference) final GeometricBrownianMotionforecast()final doublegetConformance(FinancePortfolio reference) final doublefinal doublegetLossProbability(Number timePeriod) abstract doubleThe mean/expected return of this instrument.doubleThe instrument's return variance.final doublefinal doublegetSharpeRatio(Number riskFreeReturn) final doublegetValueAtRisk(Number confidenceLevel, Number timePeriod) Value at Risk (VaR) is the maximum loss not exceeded with a given probability defined as the confidence level, over a given period of time.final doubledoubleVolatility refers to the standard deviation of the change in value of an asset with a specific time horizon.abstract List<BigDecimal> This method returns a list of the weights of the Portfolio's contained assets.final FinancePortfolioNormalised weights Portfoliofinal FinancePortfolionormalise(NumberContext weightsContext) Normalised weights Portfolioprotected abstract voidreset()toString()
-
Field Details
-
MATRIX_FACTORY
-
-
Constructor Details
-
FinancePortfolio
protected FinancePortfolio()
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<FinancePortfolio>
-
forecast
-
getConformance
-
getLossProbability
public final double getLossProbability() -
getLossProbability
-
getMeanReturn
public abstract double getMeanReturn()The 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. -
getReturnVariance
public double getReturnVariance()The instrument's return variance. Subclasses must override either getReturnVariance() or getVolatility(). -
getSharpeRatio
public final double getSharpeRatio() -
getSharpeRatio
-
getValueAtRisk
-
getValueAtRisk95
public final double getValueAtRisk95() -
getVolatility
public double getVolatility()Volatility 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 getReturnVariance() or getVolatility(). -
getWeights
This 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 normalise() will transform any set of weights to that form. -
normalise
Normalised weights Portfolio -
normalise
Normalised weights Portfolio -
toString
-
reset
protected abstract void reset()
-