org.ojalgo.finance
Class MarkowitzModel

java.lang.Object
  extended by org.ojalgo.finance.MarkowitzModel

Deprecated. Since Version 24. Use the org.ojalgo.finance.portfolio package instead.

@Deprecated
public final class MarkowitzModel
extends Object

The Markowitz Model is normally defined as:

min [w]T[C][w]
subject to [w]T[r] = ro
and |[w]| = 1

or

max [w]T[r]
subject to [w]T[C][w] = vo
and |[w]| = 1

Here it is defined as:

min (RAF/2) [w]T[C][w] - [w]T[r]
subject to |[w]| = 1

RAF stands for Risk Aversion Factor. Instead of specifying a desired risk or return level you specify a level of risk aversion.

The expected returns for each of the instruments/assets must be excess returns. Otherwise this formulation is wrong.

The total weights of all instruments will always be 100%, but shorting can be allowed or not according to your preference.

Risk-free asset: That means there is no excess return and zero variance. Don't (try to) include a risk-free asset here.

Author:
apete

Constructor Summary
MarkowitzModel(BasicMatrix aCovariances, BasicMatrix anExpectedExcessReturns, BigDecimal aRiskAversion)
          Deprecated.  
MarkowitzModel(MarketEquilibrium aMarket, BasicMatrix anExpectedExcessReturns)
          Deprecated.  
 
Method Summary
 BasicMatrix calculatePortfolioWeights()
          Deprecated. Constrained optimisation.
 BasicMatrix getCovariances()
          Deprecated.  
 BasicMatrix getExpectedExcessReturns()
          Deprecated.  
 BigDecimal getMeanReturn()
          Deprecated. The mean/expected return of this asset.
 BigDecimal getReturnVariance()
          Deprecated.  
 BigDecimal getRiskAversion()
          Deprecated.  
 String[] getSymbols()
          Deprecated.  
 List<BigDecimal> getWeights()
          Deprecated.  
 boolean isShortingAllowed()
          Deprecated.  
 EquilibriumPortfolio makeEquilibriumPortfolio()
          Deprecated.  
 void setRiskAversion(BigDecimal aFactor)
          Deprecated.  
 void setShortingAllowed(boolean aFlag)
          Deprecated.  
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarkowitzModel

public MarkowitzModel(BasicMatrix aCovariances,
                      BasicMatrix anExpectedExcessReturns,
                      BigDecimal aRiskAversion)
Deprecated. 

MarkowitzModel

public MarkowitzModel(MarketEquilibrium aMarket,
                      BasicMatrix anExpectedExcessReturns)
Deprecated. 
Method Detail

calculatePortfolioWeights

public BasicMatrix calculatePortfolioWeights()
Deprecated. 
Constrained optimisation.


getCovariances

public BasicMatrix getCovariances()
Deprecated. 

getExpectedExcessReturns

public BasicMatrix getExpectedExcessReturns()
Deprecated. 

getMeanReturn

public BigDecimal getMeanReturn()
Deprecated. 
The mean/expected return of this asset. May return either the absolute or excess return of the asset. The context in which an instance is used should make it clear which.


getReturnVariance

public BigDecimal getReturnVariance()
Deprecated. 

getRiskAversion

public BigDecimal getRiskAversion()
Deprecated. 

getSymbols

public String[] getSymbols()
Deprecated. 

getWeights

public List<BigDecimal> getWeights()
Deprecated. 

isShortingAllowed

public boolean isShortingAllowed()
Deprecated. 

makeEquilibriumPortfolio

public EquilibriumPortfolio makeEquilibriumPortfolio()
Deprecated. 

setRiskAversion

public void setRiskAversion(BigDecimal aFactor)
Deprecated. 

setShortingAllowed

public void setShortingAllowed(boolean aFlag)
Deprecated.