|
WebCab Portfolio Demo v4.2 (J2EE Edition) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Within this Enterprise JavaBean we provide methods by which the optimal portfolio can be selected from the Efficient Frontier when the investor describes his investment preferences. The investors preferences can be given in terms of one of the following:
Remark: Since the Efficient Frontier is monotonically increasing in the risk and expected return a given value of the risk or expected return will determine a unique portfolio if the given Efficient Frontier takes the given values of the expected return and risk at some point. However, knowledge of the investors Utility function does not guarantee the existence of a corresponding optimal portfolio.
Selecting a Portfolio from the Efficient Frontier when its risk or expected return is known
Once we are provided with either the maximum risk or the expected returns we are able to select the corresponding portfolio from the Efficient Frontier using one of:
findReturn(double, double[], double[]) - The maximum
risk which the investor will accept is given
and then the weights and the expected return of the Efficient Frontier is
returned. Once the Efficient Frontier is known you are able to evaluate the (possibly
constrained) weights of the corresponding portfolio by calling the method
Markowitz.efficientFrontier(double, double[][], double[], double)
or its stateful version Markowitz.efficientFrontier(double, int),
if the Efficient Frontier be been pre-evaluation.
findRisk(double, double[], double[]) - The expected
return of the portfolio which the investor requires
is given and then the risk of the corresponding Efficient Frontier is returned.
That is, the portfolio with the lowest risk from the given expected return
required. If you require to know the corresponding weights of the asset
of this portfolio then you can use the method
Markowitz.efficientFrontier(double, double[][], double[], double)
or its stateful version Markowitz.efficientFrontier(double, int),
if the Efficient Frontier be been pre-evaluation.
Selecting a Portfolio from the Efficient Frontier when the Utility function in known
Depending on whether you are provided of the Utility function which is a function of the expected return or the risk you should use of the following methods in order to evaluate the risk or expected return of the optimal portfolio(s) (if it exists) on the Efficient Frontier:
findRisk(double[], double[], double[], double[], double)
in order to evaluate the risk of the optimal portfolio (if it exists) on the Efficient Frontier.
findReturn(double[], double[], double[], double[], double)
in order to evaluate the return of the optimal portfolio (if it exists) on the Efficient Frontier.
Once the expected return or the risk of the Efficient Frontier is known you will be able
to evaluate the asset weights and other properties of the optimal portfolio. The advantage here
over the methods provided within the Markowitz Enterprise JavaBean is that we are able to provide
a Utility function which is a function of the risk or the return rather than only of the return.
Internal Interpolation Algorithm used
Within this class we use cubic spline interpolation in order to interpolate
the Efficient Frontier around the finite set of points at which it is evaluated using
the method Markowitz.efficientFrontier(double, double[][], double[], double)
Internal Equation Solver Algorithm used
Internally within this class we use the Interval bisection method which allows the solution of equations of one variable to be found. In this instance since the Efficient Frontier is a continuous function defined over a finite interval (of risk and return) this approach will always produce a solution to a given degree of accuracy.
Finding the Asset Weights when the Risk and Expected Return is known
Whether you know the expected risk which to the investor will accept or the expected return desired you will determine a unique portfolio on the Efficient Frontier constructed from the available assets. Here we details how you are able to find the assets weights of this given portfolio on the Efficient Frontier.
If the expected return which the investor requires is known then the weights
of the corresponding portfolio can be evaluated using
Markowitz.efficientFrontier(double, double[][], double[], double). If the
risk is known then the corresponding unique expected return should be evaluated using
the method findReturn(double, double[], double[]). Once the corresponding
expected return is known the same procedure can be applied using
Markowitz.efficientFrontier(double, double[][], double[], double), in order
to find the corresponding weights of the portfolio with the given maximum risk.
| Method Summary | |
double |
findReturn(double[] riskUtility,
double[] returnUtility,
double[] riskAtPoints,
double[] returnAtPoints,
double precision)
Evaluates a value of the expected return of the portfolio on the Efficient Frontier which is optimal with respect to the investors (Return) Utility function which is a function of the expected return. |
double |
findReturn(double risk,
double[] riskAtPoints,
double[] returnAtPoints)
Evaluates the expected return of a portfolio on the efficient frontier which has a given level of risk. |
double |
findRisk(double[] riskUtility,
double[] returnUtility,
double[] riskPoints,
double[] returnPoints,
double precision)
Evaluates a value of the risk of the portfolio on the Efficient Frontier which is optimal with respect to the investors (Risk) Utility function which is a function of risk. |
double |
findRisk(double expectedReturn,
double[] riskPoints,
double[] returnPoints)
Evaluates the risk of the portfolio on the Efficient Frontier which has a given expected return. |
| Methods inherited from interface javax.ejb.EJBObject |
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove |
| Method Detail |
public double findRisk(double expectedReturn,
double[] riskPoints,
double[] returnPoints)
throws InterpolationException,
ReferencedServiceException,
SolveFrontierDemoException,
RemoteException
Remarks:
SolveFrontier class API documentation.
Notes on the input Parameters
A set of points on the Efficient Frontier should be evaluated using
methods from the Markowitz Enterprise JavaBean, in particular:
Markowitz.portfolioRisksEfficientFrontier(double[][])
Markowitz.expectedReturnEfficientFrontier()
Note: Alternatively you may choose to use the complex type
PointsOnEfficientFrontier, and the related methods from the
portfolio class in order to find the set of points on the efficient
frontier for which it is evaluated.
expectedReturn - the value of the expected return of the portfolio on the Efficient Frontier for which the risk will be evaluated.riskPoints - an array of doubles where the first term is the lowest value of the risk from the set of points at which the Efficient Frontier is known, the second term is the next lowest value of the risk and so on.returnPoints - an array of doubles where the first term is the lowest value of the return from the set of points at which the Efficient Frontier is known, the second term is the next lowest values of the return and so on.
InterpolationException - thrown when there does not correspond a point on
the interpolation function corresponding to the parameters given.
ReferencedServiceException - thrown if an error occurs while invoking
methods of another Enterprise JavaBean.
SolveFrontierDemoException
RemoteExceptionfindRisk(double[], double[], double[], double[], double) - evaluates
the value of the risk on the Efficient Frontier where the expected return desire
is given as a function of the risk. If this function is a constant function in
risk then it reduces to the special case implemented here.
public double findRisk(double[] riskUtility,
double[] returnUtility,
double[] riskPoints,
double[] returnPoints,
double precision)
throws SolveFrontierException,
InterpolationException,
SolveFrontierDemoException,
RemoteException
findReturn(double, double[], double[]).
Notes on the Efficient Frontier input parameters
A set of points on the Efficient Frontier should be evaluated using
methods from the Markowitz Enterprise JavaBean, in particular:
Markowitz.portfolioRisksEfficientFrontier(double[][])
Markowitz.expectedReturnEfficientFrontier()
Note: Alternatively you may choose to use the complex type
PointsOnEfficientFrontier, and the related methods from the
portfolio class in order to find the set of points on the efficient
frontier for which it is evaluated.
The parameters of the Investors Utility Function
The (Risk) Utility function is given by a set of points which lie on the Utility curve. The (Risk) Utility function is assumed to take the same range of values of the risk parameter as the range of the risk over which the efficient frontier is defined. It is essential within the formation of this approach that the (Risk) Utility function is a function of risk. In particular, if we are given a value of the risk then there corresponds a unique value of the expected return. In practice, since we are applying Cubic spline method in order to interpolate the (Risk) Utility function from a finite set of points it is enough to ensure that from this finite set of points there does not exist two distinct points which have the same value of the risk.
Advantages of a General Utility Function
A more general Utility function allows the investor to express the likely
fact that as the risk increase they desirer a higher expected level of return.
In the case when the (Risk) Utility function returns a constant value of the
expected return this methods reduced to the case considered in findRisk(double, double[], double[]).
riskUtility - an array of double where the first term is the lowest value of the risk from the set of points at which the investors risk/reward Utility function is given, the second term is the next lowest value of the risk and so on.returnUtility - an array of double where the first term is the lowest value of the expected return from the set of points at which the investors risk/reward Utility function is given, the second term is the next lowest value of the expected return and so on.riskPoints - an array of doubles where the first term is the lowest value of the risk from the set of points at which the Efficient Frontier is known, the second term is the next lowest value of the risk and so on.returnPoints - an array of doubles where the first term is the lowest value of the return from the set of points at which the Efficient Frontier is known, the second term is the next lowest values of the return and so on.precision - the precision for which the value of the risk of an optimal portfolio will be returned. Since there may be more than one optimal portfolio we used the term `an optimal'. In particular, if the precision is set to 0.001 then the risk will be returned to within 0.001 etc, of the `exact' solution.
InterpolationException - thrown when there does not correspond a points on
the interpolation function corresponding to the parameters given.
SolveFrontierException - thrown if no value is found for the given input
parameters.
SolveFrontierDemoException
RemoteExceptionfindRisk(double, double[], double[]) - this is a special case of this
method which corresponds to the case where the (Risk) Utility function is a constant
function which states that the investor requires a given expected return and is
not influenced by the level of risk.
public double findReturn(double risk,
double[] riskAtPoints,
double[] returnAtPoints)
throws InterpolationException,
ReferencedServiceException,
SolveFrontierDemoException,
RemoteException
Remark:
SolveFrontier class API documentation.
Notes on the input Parameters
A set of points on the Efficient Frontier should be evaluated using
methods from the Markowitz Enterprise JavaBean, in particular:
Markowitz.portfolioRisksEfficientFrontier(double[][])
Markowitz.expectedReturnEfficientFrontier()
Note: Alternatively you may choose to use the complex type
PointsOnEfficientFrontier, and the related methods from the
portfolio class in order to find the set of points on the efficient
frontier for which it is evaluated.
risk - the value of the portfolio risk of a portfolio on the efficient frontier for which the corresponding expected return will be evaluated.
InterpolationException - thrown when there does not correspond a points on
the interpolation function corresponding to the parameters given.
ReferencedServiceException - thrown if an error occurs while invoking
methods of another Enterprise JavaBean.
SolveFrontierDemoException
RemoteExceptionfindReturn(double[], double[], double[], double[], double) -
evaluates the value of the expected return on the Efficient Frontier when the maximum risk is given as a function
of the expected return. If this function is a constant function in the expected return
then this methods reduces to the special case implemented here.
public double findReturn(double[] riskUtility,
double[] returnUtility,
double[] riskAtPoints,
double[] returnAtPoints,
double precision)
throws SolveFrontierException,
InterpolationException,
SolveFrontierDemoException,
RemoteException
findRisk(double, double[], double[]).
Notes on the Efficient Frontier input parameters
A set of points on the Efficient Frontier should be evaluated using
methods from the Markowitz Enterprise JavaBean, in particular:
Markowitz.portfolioRisksEfficientFrontier(double[][])
Markowitz.expectedReturnEfficientFrontier()
Note: Alternatively you may choose to use the complex type
PointsOnEfficientFrontier, and the related methods from the
portfolio class in order to find the set of points on the efficient
frontier for which it is evaluated.
The parameters of the Investors Utility Function
The (Return) Utility function is given by a set of points which lie on the utility curve. The (Return) utility function is assumed to take the same range of values of the expected return parameter as the range of the expected return over which the Efficient Frontier is defined. It is essential within the formation of this approach that the (Return) Utility function is a function of the expected return. In particular, if we are given a value of the return then there corresponds a unique value of the risk. In practice, since we are applying a Cubic spline method in order to interpolate the (Return) Utility function from the finite set of points it is enough to ensure that from this set of points there does not exist two distinct points with have the same value of the return.
Advantages of a General Utility Function
A more general Utility function allows the investor to express the likely
fact that as the expected return increase they may except a higher level of risk.
In the case when the (Return) Utility function returns a constant value of the
risk this methods reduced to the case considered in findReturn(double, double[], double[]).
riskUtility - an array of double where the first term is the lowest value of the risk from the set of points at which the investors risk/reward utility function is given, the second term is the next lowest value of the risk and so on.returnUtility - an array of double where the first term is the lowest value of the expected return from the set of points at which the investors risk/reward utility function is given, the second term is the next lowest value of the expected return and so on.precision - the precision for which the value of the risk of an optimal portfolio will be returned. Since there may be more than one optimal portfolio we used the term `an optimal'. In particular, if the precision is set to 0.001 then the risk will be returned to within 0.001 etc, of the `exact' solution.
SolveFrontierException - thrown if no value is found for the given input
parameters.
InterpolationException - thrown when there does not correspond a points on
the interpolation function corresponding to the parameters given.
SolveFrontierDemoException
RemoteExceptionfindReturn(double, double[], double[]) -
this is a special case of this method
which corresponds to the case where the (Return) Utility function is a constant
function which states that the investor will accept of given maximum risk and is
not influence by the corresponding level of expected return.
|
WebCab Portfolio Demo v4.2 (J2EE Edition) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||