Class SimpleAsset
java.lang.Object
org.ojalgo.data.domain.finance.portfolio.FinancePortfolio
org.ojalgo.data.domain.finance.portfolio.SimpleAsset
- All Implemented Interfaces:
Comparable<FinancePortfolio>
SimpleAsset is used to describe 1 asset (portfolio member).
-
Nested Class Summary
Nested classes/interfaces inherited from class FinancePortfolio
FinancePortfolio.Context -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final doubleprivate final doubleprivate final BigDecimalFields inherited from class FinancePortfolio
MATRIX_FACTORY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateSimpleAsset(Comparable<?> weight) SimpleAsset(Comparable<?> meanReturn, Comparable<?> volatility) SimpleAsset(Comparable<?> meanReturn, Comparable<?> volatility, Comparable<?> weight) SimpleAsset(FinancePortfolio portfolio) SimpleAsset(FinancePortfolio portfolio, Comparable<?> weight) -
Method Summary
Modifier and TypeMethodDescriptiondoubleThe mean/expected return of this instrument.doubleVolatility refers to the standard deviation of the change in value of an asset with a specific time horizon.Assuming there is precisely 1 weight - this class is used to describe 1 asset (portfolio member).This method returns a list of the weights of the Portfolio's contained assets.protected voidreset()Methods inherited from class FinancePortfolio
compareTo, forecast, getConformance, getLossProbability, getLossProbability, getReturnVariance, getSharpeRatio, getSharpeRatio, getValueAtRisk, getValueAtRisk95, normalise, normalise, toString
-
Field Details
-
myMeanReturn
private final double myMeanReturn -
myVolatility
private final double myVolatility -
myWeight
-
-
Constructor Details
-
SimpleAsset
-
SimpleAsset
-
SimpleAsset
-
SimpleAsset
-
SimpleAsset
-
SimpleAsset
private SimpleAsset()
-
-
Method Details
-
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
-
getWeight
Assuming there is precisely 1 weight - this class is used to describe 1 asset (portfolio member). -
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
-
reset
protected void reset()- Specified by:
resetin classFinancePortfolio
-