|
WebCab Portfolio Demo v4.2 (J2EE Edition) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Local interface of TwoAssetPortfolio. This interface provides the same functionality as the TwoAssetPortfolio remote interface.
TwoAssetPortfolio| Method Summary | |
double |
correlationCoef(double covariance,
double standardDeviation1,
double standardDeviation2)
Method correlationCoef(double, double, double) as defined in the TwoAssetPortfolio remote interface. |
double |
covariance(double[] historicalReturns1,
double[] historicalReturns2)
Method covariance(double[], double[]) as defined in the TwoAssetPortfolio remote interface. |
double |
covariance(double[] probability,
double[] rateOfReturn1,
double[] rateOfReturn2)
Method covariance(double[], double[], double[]) as defined in the TwoAssetPortfolio remote interface. |
double |
portfolio2Return(double alpha,
double expectedReturn1,
double expectedReturn2)
Method portfolio2Return(double, double, double) as defined in the TwoAssetPortfolio remote interface. |
double |
portfolio2Risk(double alpha,
double standardDeviation1,
double standardDeviation2,
double covariance)
Method portfolio2Risk(double, double, double, double) as defined in the TwoAssetPortfolio remote interface. |
double |
portfolio2Variance(double alpha,
double standardDeviation1,
double standardDeviation2,
double correlation)
Method portfolio2Variance(double, double, double, double) as defined in the TwoAssetPortfolio remote interface. |
double |
standardDeviation(double[] historicalReturns)
Method standardDeviation(double[]) as defined in the TwoAssetPortfolio remote interface. |
double |
standardDeviation(double[] probability,
double[] rateOfReturn)
Method standardDeviation(double[], double[]) as defined in the TwoAssetPortfolio remote interface. |
double |
weight2MinimizeRisk(double standardDeviation1,
double standardDeviation2,
double covariance)
Method weight2MinimizeRisk(double, double, double) as defined in the TwoAssetPortfolio remote interface. |
| Methods inherited from interface javax.ejb.EJBLocalObject |
getEJBLocalHome, getPrimaryKey, isIdentical, remove |
| Method Detail |
public double correlationCoef(double covariance,
double standardDeviation1,
double standardDeviation2)
throws TwoAssetPortfolioDemoException
Description copied from the TwoAssetPortfolio interface:
Returns the correlation coefficient between two assets.
covariance - the covariance between the two assets of the portfoliostandardDeviation1 - standard deviation of the first assetstandardDeviation2 - standard deviation of the second asset
TwoAssetPortfolioDemoExceptionTwoAssetPortfolio.correlationCoef(double, double, double)
public double covariance(double[] probability,
double[] rateOfReturn1,
double[] rateOfReturn2)
throws TwoAssetPortfolioDemoException
Description copied from the TwoAssetPortfolio interface:
Evaluates the covariance between the returns of two assets given the probability return distribution of each asset.
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
TwoAssetPortfolioDemoExceptionTwoAssetPortfolio.covariance(double[], double[], double[])
public double covariance(double[] historicalReturns1,
double[] historicalReturns2)
throws TwoAssetPortfolioDemoException
Description copied from the TwoAssetPortfolio interface:
This method returns the covariance between the returns of the two assets. The historical returns for each asset on the `same' historical time periods must be known.
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
TwoAssetPortfolioDemoExceptionTwoAssetPortfolio.covariance(double[], double[])
public double standardDeviation(double[] probability,
double[] rateOfReturn)
throws TwoAssetPortfolioDemoException
Description copied from the TwoAssetPortfolio interface:
Evaluates the standard deviation of an asset given its probability distribution of its returns.
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.
TwoAssetPortfolioDemoExceptionTwoAssetPortfolio.standardDeviation(double[], double[])
public double standardDeviation(double[] historicalReturns)
throws TwoAssetPortfolioDemoException
Description copied from the TwoAssetPortfolio interface:
Evaluates the standard deviation of an asset from its historical returns.
historicalReturns - historicalReturns1[t] is the return (increase in market value) of the first asset in the tth period
TwoAssetPortfolioDemoExceptionTwoAssetPortfolio.standardDeviation(double[])
public double portfolio2Variance(double alpha,
double standardDeviation1,
double standardDeviation2,
double correlation)
throws TwoAssetPortfolioDemoException
Description copied from the TwoAssetPortfolio interface:
The variance for a portfolio with two assets.
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
TwoAssetPortfolioDemoExceptionTwoAssetPortfolio.portfolio2Variance(double, double, double, double)
public double portfolio2Risk(double alpha,
double standardDeviation1,
double standardDeviation2,
double covariance)
throws TwoAssetPortfolioDemoException
Description copied from the TwoAssetPortfolio interface:
The risk (or standard deviation) for a portfolio with two assets.
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
TwoAssetPortfolioDemoExceptionTwoAssetPortfolio.portfolio2Risk(double, double, double, double)
public double portfolio2Return(double alpha,
double expectedReturn1,
double expectedReturn2)
throws TwoAssetPortfolioDemoException
Description copied from the TwoAssetPortfolio interface:
The expected return for a portfolio with two assets
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
TwoAssetPortfolioDemoExceptionTwoAssetPortfolio.portfolio2Return(double, double, double)
public double weight2MinimizeRisk(double standardDeviation1,
double standardDeviation2,
double covariance)
throws TwoAssetPortfolioDemoException
Description copied from the TwoAssetPortfolio interface:
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.
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
TwoAssetPortfolioDemoExceptionTwoAssetPortfolio.weight2MinimizeRisk(double, double, double)
|
WebCab Portfolio Demo v4.2 (J2EE Edition) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||