WebCab Options and Futures Demo
v2.5
(J2SE Edition)

webcab.lib.finance.futures
Class Interest

java.lang.Object
  |
  +--webcab.lib.finance.futures.Interest
All Implemented Interfaces:
Serializable

public class Interest
extends Object
implements Serializable

Within this class we consider methods for the evaluation of interest bearing investments.

Remark:

There is a close inter-relationship between interest bearing investments and the evaluation and use of futures and forward contracts.

See Also:
Serialized Form

Constructor Summary
Interest()
          Creates a new instance.
 
Method Summary
 double deposit(double interest, Date purchaseDate, Date saleDate, double deposit, BusinessCalendar businessCalendar)
          Calculates the return for a fixed interest bearing investment over n years
 double deposit(double interest, double years, double deposit)
          Calculates the return for a fixed interest bearing investment over n years
 double depositCompounded(double interest, double periods, Date purchaseDate, Date saleDate, double deposit, BusinessCalendar businessCalendar)
          Calculates the return for a fixed interest bearing investment which is compounded `compoundingPeriods' times a year over n years.
 double depositCompounded(double interest, double periods, double years, double deposit)
          Calculates the return for a fixed interest bearing investment which is compounded `compoundingPeriods' times a year over n years.
 double depositContinuouslyCompounded(double interest, Date purchaseDate, Date saleDate, double deposit, BusinessCalendar businessCalendar)
          Calculates the returns for a fixed interest bearing investment which is continuously compounded.
 double depositContinuouslyCompounded(double interest, double years, double deposit)
          Calculates the returns for a fixed interest bearing investment which is continuously compounded.
 double interestCompoundToContinuous(double interest, double periods)
          This method converts the interest expressed in terms of compounding over `compoundedOver' times per annum to the interest expressed as its continuously compounded equivalent.
 double interestContinuousToCompound(double interest, double periods)
          This method converts the interest expressed in terms of continuously compounded per annum to the interest expressed as the equivalent interest rate with compounding `timesPerAnnum' times per annum
 double interestPeriodConversion(double m, double n, double interest)
          This method converts the interest compounded over m periods per annum to the equivalent interest rate calculated over n periods per annum.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Interest

public Interest()
Creates a new instance.

Method Detail

deposit

public double deposit(double interest,
                      Date purchaseDate,
                      Date saleDate,
                      double deposit,
                      BusinessCalendar businessCalendar)
               throws InterestDemoException
Calculates the return for a fixed interest bearing investment over n years

Parameters:
interest - the fixed interest rate paid by the investment per annum
deposit - the amount which is invested
purchaseDate - the date when the fixed interest investement was purchased
saleDate - the date when the fixed interest investment was sold
businessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
InterestDemoException

deposit

public double deposit(double interest,
                      double years,
                      double deposit)
               throws InterestDemoException
Calculates the return for a fixed interest bearing investment over n years

Parameters:
interest - the fixed interest rate paid by the investment per annum
years - the number of years over which the investment is held
deposit - the amount which is invested
InterestDemoException

depositCompounded

public double depositCompounded(double interest,
                                double periods,
                                Date purchaseDate,
                                Date saleDate,
                                double deposit,
                                BusinessCalendar businessCalendar)
                         throws InterestDemoException
Calculates the return for a fixed interest bearing investment which is compounded `compoundingPeriods' times a year over n years.

Parameters:
interest - the fixed interest rate paid by the investment per annum
periods - the number of times per annum which the interest is compounded over
deposit - the amount which is invested
purchaseDate - the date when the fixed interest investement was purchased
saleDate - the date when the fixed interest investment was sold
businessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
InterestDemoException

depositCompounded

public double depositCompounded(double interest,
                                double periods,
                                double years,
                                double deposit)
                         throws InterestDemoException
Calculates the return for a fixed interest bearing investment which is compounded `compoundingPeriods' times a year over n years.

Parameters:
interest - the fixed interest rate paid by the investment per annum
periods - the number of times per annum which the interest is compounded over
years - the number of years over which the investment in held
deposit - the amount which is invested
InterestDemoException

depositContinuouslyCompounded

public double depositContinuouslyCompounded(double interest,
                                            Date purchaseDate,
                                            Date saleDate,
                                            double deposit,
                                            BusinessCalendar businessCalendar)
                                     throws InterestDemoException
Calculates the returns for a fixed interest bearing investment which is continuously compounded.

Parameters:
interest - the fixed interest rate over the period
deposit - the amount which is invested
purchaseDate - the date when the fixed interest investement was purchased
saleDate - the date when the fixed interest investment was sold
businessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
InterestDemoException

depositContinuouslyCompounded

public double depositContinuouslyCompounded(double interest,
                                            double years,
                                            double deposit)
                                     throws InterestDemoException
Calculates the returns for a fixed interest bearing investment which is continuously compounded.

Parameters:
interest - the fixed interest rate over the period
years - the number of years over which the investment is held
deposit - the amount which is invested
InterestDemoException

interestCompoundToContinuous

public double interestCompoundToContinuous(double interest,
                                           double periods)
                                    throws InterestDemoException
This method converts the interest expressed in terms of compounding over `compoundedOver' times per annum to the interest expressed as its continuously compounded equivalent.

Parameters:
interest - the rate of interest with compounding m times per annum
periods - the number of periods per annum which the interest is compounded
InterestDemoException

interestContinuousToCompound

public double interestContinuousToCompound(double interest,
                                           double periods)
                                    throws InterestDemoException
This method converts the interest expressed in terms of continuously compounded per annum to the interest expressed as the equivalent interest rate with compounding `timesPerAnnum' times per annum

Parameters:
interest - the continuously compounded interest rate
periods - the number of periods per annum which the compound interest is expressed over
InterestDemoException

interestPeriodConversion

public double interestPeriodConversion(double m,
                                       double n,
                                       double interest)
                                throws InterestDemoException
This method converts the interest compounded over m periods per annum to the equivalent interest rate calculated over n periods per annum.

Parameters:
m - the number of input interest rate compounding periods
n - the number of output interest rate compounding periods
interest - the interest rate expressed as the compound interest rate over m periods
InterestDemoException

WebCab Options and Futures Demo
v2.5
(J2SE Edition)