|
WebCab Bonds Demo (J2EE Edition) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This Enterprise JavaBean performs calculations related to the present value and yield of an interest bearing investment. We also provide a method which allow the return from a Repo agreement to be evaluated.
| Method Summary | |
double |
nominalYield(double interest,
double inflation)
Calculates the nominal yield of an investment knowing the annual interest and rate of inflation. |
double |
presentValue(double interest,
double finalSum,
double noOfPeriods)
Calculates the initial amount of money which has to be invested within a fixed interest bearing investment in order to accumulate a given final sum. |
double |
presentValue(double interest,
double noOfPeriods,
double finalWorth,
double rateOfInflation,
int dayCountConvention,
int days)
Calculates the initial amount of money which has to be invested in order to accumulate a given final worth (that is, an inflation adjusted sum) from an fixed interest bearing investment. |
double |
realReturnRepo(double price,
double finalPayment,
double inflation,
double periods)
Calculates the real return of a Repo agreement when the initial purchase price and the final payment and annual rate of inflation is known. |
double |
yield(double investment,
double amountRepaid,
int numberOfPeriods)
Calculates the yield per period of an investment knowing the initial investment and the value at expiry/redemption of the investment. |
| Methods inherited from interface javax.ejb.EJBObject |
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove |
| Method Detail |
public double presentValue(double interest,
double finalSum,
double noOfPeriods)
throws ValueReturnYieldDemoException,
RemoteException
interest - the fixed rate of interest over all periods expressed in decimal format (i.e. 1 percent = 0.01)finalSum - the final sum which is required by the investor
ValueReturnYieldDemoException
RemoteException
public double presentValue(double interest,
double noOfPeriods,
double finalWorth,
double rateOfInflation,
int dayCountConvention,
int days)
throws ValueReturnYieldDemoException,
RemoteException
interest - the fixed rate of interest paid by the interest bearing investment expressed in decimal format (i.e. 1 percent = 0.01) over each period during the life of the investmentdays - the number of days in each period over which the investment is compoundedfinalWorth - the value required of the invested asset at the end of the investment periodsrateOfInflation - the (fixed) annual rate of inflation expressed in decimal format (i.e. 1 percent = 0.01)dayCountConvention - the number of days that the annual inflation is quoted over. For example, the UK/Japan convention uses 365 days whereas the European convention for quoted inflation uses 360 days.
ValueReturnYieldDemoException
RemoteException
public double realReturnRepo(double price,
double finalPayment,
double inflation,
double periods)
throws ValueReturnYieldDemoException,
RemoteException
price - the initial purchase price of the investment asset when the Repo agreement is initiatedfinalPayment - the final payment make at the end of the Repo Agreement in order to repurchase the assetsinflation - the rate of inflation in decimal format (i.e. 1 percent = 0.01) over the given period (see description of periods parameter))periods - the number of the given time peridos used (days, years etc) over which the Repo agreement holds
ValueReturnYieldDemoException
RemoteException
public double yield(double investment,
double amountRepaid,
int numberOfPeriods)
throws ValueReturnYieldDemoException,
RemoteException
investment - the amount paid in order to purchase the investmentamountRepaid - the value of the investment at expiry/redemptionnumberOfPeriods - the number of periods until the expiry/redemption of the investment
ValueReturnYieldDemoException
RemoteException
public double nominalYield(double interest,
double inflation)
throws ValueReturnYieldDemoException,
RemoteException
interest - the annual rate of interest paid by the investmentinflation - the annual rate of inflation
ValueReturnYieldDemoException
RemoteException
|
WebCab Bonds Demo (J2EE Edition) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||