|
WebCab Portfolio Demo v4.2 (J2EE Edition) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Here we present a number of methods which enables the evaluation of risk/return characteristics of portfolios which consist of two assets. In this special case the optimal portfolio can be constructed without the overhead of computationally intensive optimization techniques.
In fact, in the case of portfolios with only two assets evaluation of the portfolio risk, expected
return and optimal weights are all closed formulae. The usefulness of these closed formulae is that
the effect of a single purchase (or sale) has to a portfolios risk/reward profile can be studied by
viewing the portfolio (or portfolio minus a holding) itself as a single asset. This portfolio which
is viewed as a single asset could however have been constructed by use of the Markowitz (see Markowitz Enterprise JavaBean)
or CAPM (see CapitalMarket Enterprise JavaBean) Theories.
| Method Summary | |
double |
correlationCoef(double covariance,
double standardDeviation1,
double standardDeviation2)
Returns the correlation coefficient between two assets. |
double |
covariance(double[] historicalReturns1,
double[] historicalReturns2)
This method returns the covariance between the returns of the two assets. |
double |
covariance(double[] probability,
double[] rateOfReturn1,
double[] rateOfReturn2)
Evaluates the covariance between the returns of two assets given the probability return distribution of each asset. |
double |
portfolio2Return(double alpha,
double expectedReturn1,
double expectedReturn2)
The expected return for a portfolio with two assets |
double |
portfolio2Risk(double alpha,
double standardDeviation1,
double standardDeviation2,
double covariance)
The risk (or standard deviation) for a portfolio with two assets. |
double |
portfolio2Variance(double alpha,
double standardDeviation1,
double standardDeviation2,
double correlation)
The variance for a portfolio with two assets. |
double |
standardDeviation(double[] historicalReturns)
Evaluates the standard deviation of an asset from its historical returns. |
double |
standardDeviation(double[] probability,
double[] rateOfReturn)
Evaluates the standard deviation of an asset given its probability distribution of its returns. |
double |
weight2MinimizeRisk(double standardDeviation1,
double standardDeviation2,
double covariance)
Evaluates the weight of the first asset within a two asset portfolio which achieves the optimal diversification (i.e. minimizes the risk) of the portfolio. |
| Methods inherited from interface javax.ejb.EJBObject |
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove |
| Method Detail |
public double correlationCoef(double covariance,
double standardDeviation1,
double standardDeviation2)
throws TwoAssetPortfolioDemoException,
RemoteException
covariance - the covariance between the two assets of the portfoliostandardDeviation1 - standard deviation of the first assetstandardDeviation2 - standard deviation of the second asset
TwoAssetPortfolioDemoException
RemoteException
public double covariance(double[] probability,
double[] rateOfReturn1,
double[] rateOfReturn2)
throws TwoAssetPortfolioDemoException,
RemoteException
probability - probability[s] is an array of the probability of the state s occurringrateOfReturn1 - rateOfReturn1[s] is the return (increase in market value) for the first asset in the state srateOfReturn2 - rateOfReturn2[s] is the return (increase in market value) for the second asset in the state s
TwoAssetPortfolioDemoException
RemoteException
public double covariance(double[] historicalReturns1,
double[] historicalReturns2)
throws TwoAssetPortfolioDemoException,
RemoteException
historicalReturns1 - historicalReturns1[t] is the return (increase in market value) of the first asset in the tth periodhistoricalReturns2 - historicalReturns2[t] is the return (increase in market value) of the second asset in the tth period
TwoAssetPortfolioDemoException
RemoteException
public double standardDeviation(double[] probability,
double[] rateOfReturn)
throws TwoAssetPortfolioDemoException,
RemoteException
probability - probability[s] is an array of the probability of the state s occurringrateOfReturn - rateOfReturn[s] is the return (increase in market value) for the first asset in the state s.
TwoAssetPortfolioDemoException
RemoteException
public double standardDeviation(double[] historicalReturns)
throws TwoAssetPortfolioDemoException,
RemoteException
historicalReturns - historicalReturns1[t] is the return (increase in market value) of the first asset in the tth period
TwoAssetPortfolioDemoException
RemoteException
public double portfolio2Variance(double alpha,
double standardDeviation1,
double standardDeviation2,
double correlation)
throws TwoAssetPortfolioDemoException,
RemoteException
alpha - the weight of the first asset. Note, that the weight of an asset lies in the interval [0,1], and the sum of the assets (in this case the two assets) is 1; hence the weight of the second asset is `1-alpha'standardDeviation1 - the standard deviation of returns for the first asset expressed in decimal format (i.e. 1 percent = 0.01)standardDeviation2 - the standard deviation of returns for the second asset expressed in decimal format (i.e. 1 percent = 0.01)correlation - the correlation coefficient between the assets
TwoAssetPortfolioDemoException
RemoteException
public double portfolio2Risk(double alpha,
double standardDeviation1,
double standardDeviation2,
double covariance)
throws TwoAssetPortfolioDemoException,
RemoteException
alpha - the weight for the first assetstandardDeviation1 - the standard deviation of returns for the first assetstandardDeviation2 - the standard deviation of returns for the second assetcovariance - the covariance of returns for the two assets
TwoAssetPortfolioDemoException
RemoteException
public double portfolio2Return(double alpha,
double expectedReturn1,
double expectedReturn2)
throws TwoAssetPortfolioDemoException,
RemoteException
alpha - the weight for the first asset. Note that, the weights of both assets are positive and sum to one, hence the weight of the second asset is `1-alpha'expectedReturn1 - the expected return for the first assetexpectedReturn2 - the expected return for the second asset
TwoAssetPortfolioDemoException
RemoteException
public double weight2MinimizeRisk(double standardDeviation1,
double standardDeviation2,
double covariance)
throws TwoAssetPortfolioDemoException,
RemoteException
The ability to gain from the effects of diversification will depend on the covariance between the two assets. In particular, the higher the absolute value of the covariance the greater the influence in proportion of the weight of the asset. If the covariance between the two assets is zero, then there will not be any diversification effects. Moreover, the larger the absolute size of the covariance the greater the effects diversification will be.
standardDeviation1 - the standard deviation of the returns of the first assetstandardDeviation2 - the standard deviation of the return of the second assetcovariance - the covariance between the two assets within the portfolio
TwoAssetPortfolioDemoException
RemoteException
|
WebCab Portfolio Demo v4.2 (J2EE Edition) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||