WebCab Bonds Demo
(J2EE Edition)

com.webcab.ejb.finance.interest
Interface ValueReturnYield

All Superinterfaces:
EJBObject, Remote

public interface ValueReturnYield
extends EJBObject

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

presentValue

public double presentValue(double interest,
                           double finalSum,
                           double noOfPeriods)
                    throws ValueReturnYieldDemoException,
                           RemoteException
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.

Parameters:
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

presentValue

public double presentValue(double interest,
                           double noOfPeriods,
                           double finalWorth,
                           double rateOfInflation,
                           int dayCountConvention,
                           int days)
                    throws ValueReturnYieldDemoException,
                           RemoteException
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.

Parameters:
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 investment
days - the number of days in each period over which the investment is compounded
finalWorth - the value required of the invested asset at the end of the investment periods
rateOfInflation - 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

realReturnRepo

public double realReturnRepo(double price,
                             double finalPayment,
                             double inflation,
                             double periods)
                      throws ValueReturnYieldDemoException,
                             RemoteException
Calculates the real return of a Repo agreement when the initial purchase price and the final payment and annual rate of inflation is known.

Parameters:
price - the initial purchase price of the investment asset when the Repo agreement is initiated
finalPayment - the final payment make at the end of the Repo Agreement in order to repurchase the assets
inflation - 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

yield

public double yield(double investment,
                    double amountRepaid,
                    int numberOfPeriods)
             throws ValueReturnYieldDemoException,
                    RemoteException
Calculates the yield per period of an investment knowing the initial investment and the value at expiry/redemption of the investment.

Parameters:
investment - the amount paid in order to purchase the investment
amountRepaid - the value of the investment at expiry/redemption
numberOfPeriods - the number of periods until the expiry/redemption of the investment
Returns:
the yield is returned in decimal format (i.e. 1 percent = 0.01)
ValueReturnYieldDemoException
RemoteException

nominalYield

public double nominalYield(double interest,
                           double inflation)
                    throws ValueReturnYieldDemoException,
                           RemoteException
Calculates the nominal yield of an investment knowing the annual interest and rate of inflation.

Parameters:
interest - the annual rate of interest paid by the investment
inflation - the annual rate of inflation
ValueReturnYieldDemoException
RemoteException

WebCab Bonds Demo
(J2EE Edition)