org.ojalgo.finance.portfolio
Class FinancePortfolio

java.lang.Object
  extended by org.ojalgo.finance.portfolio.FinancePortfolio
Direct Known Subclasses:
BlackLittermanModel, FixedReturnsPortfolio, FixedWeightsPortfolio, MarkowitzModel, SimpleAsset, SimplePortfolio

public abstract class FinancePortfolio
extends Object

Classes in this package relate to modelling of financial investment portfolios, and Modern Portfolio Theory.

Author:
apete

Method Summary
 GeometricBrownianMotion forecast()
           
abstract  double getMeanReturn()
          The mean/expected return of this instrument.
 double getReturnVariance()
          The instrument's return variance.
 double getSharpeRatio(Number aRiskFreeReturn)
           
 double getValueAtRisk(Number aConfidenceLevel, Number aTimePeriod)
          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.
 double getVolatility()
          Volatility refers to the standard deviation of the change in value of an asset with a specific time horizon.
abstract  List<BigDecimal> getWeights()
          This method returns a list of the weights of the Portfolio's contained assets.
 FinancePortfolio normalise()
          Normalised weights Portfolio
 FinancePortfolio shift(Number aReturnShift)
          Deprecated. v32 You'll have to "shift" manually...
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

forecast

public final GeometricBrownianMotion forecast()

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. Calling shift(Number) with an appropriate argument will transform between absolute and excess return.


getReturnVariance

public double getReturnVariance()
The instrument's return variance. Subclasses must override either getReturnVariance() or getVolatility().


getSharpeRatio

public final double getSharpeRatio(Number aRiskFreeReturn)

getValueAtRisk

public final double getValueAtRisk(Number aConfidenceLevel,
                                   Number aTimePeriod)
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.


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

public abstract List<BigDecimal> 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

public final FinancePortfolio normalise()
Normalised weights Portfolio


shift

@Deprecated
public FinancePortfolio shift(Number aReturnShift)
Deprecated. v32 You'll have to "shift" manually...

Will shift the portfolio mean return (all asset returns) upp/down. Can be used to add/remove the risk-free return.