Close
Close window
ForwardRate - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


[フレーム] [フレーム]

Finance

ForwardRate

compute forward rates based an a given term structure

Calling Sequence

ForwardRate(termstructure, maturitytime, opts)

ForwardRate(termstructure, maturitydate, opts)

ForwardRate(termstructure, expirytime, maturitytime, opts)

ForwardRate(termstructure, expirydate, maturitydate, opts)

Parameters

termstructure

-

yield term structure; term structure

maturitytime

-

non-negative constant; maturity time in years

expirytime

-

non-negative constant; expiry time in years

maturitydate

-

non-negative constant; maturity date

expirydate

-

non-negative constant; expiry date

opts

-

Equations of the form option = value where option is compounding; specify options for the ForwardRate command

Options

compounding = Simple, Continuous, Annual, Semiannual, EveryFourthMonth, Quarterly, Bimonthly, Monthly, SimpleThenAnnual, SimpleThenSemiannual, SimpleThenEveryFourthMonth, SimpleThenQuarterly, SimpleThenBimonthly, or SimpleThenMonthly -- This option specifies the compounding type for the returned rate. The default value is Continuous.

Description

The ForwardRate(termstructure, expirytime, maturitytime) and ForwardRate(termstructure, expirytime, maturitytime) calling sequences return the forward interest rate for the specified expiry and maturity. The parameter termstructure can be a zero curve , a discount curve , or a forward curve . The compounding type for the returned rate can be controlled through the corresponding option.

The ForwardRate(termstructure, maturitytime) and ForwardRate(termstructure, maturitytime) calling sequences calculate an approximation of the instantaneous forward interest rate for the maturity maturitytime or maturitydate based on the specified term structure.

Examples

>

withFinance:

>

times0,0.5,1,1.5,2:

>

rates0.03,0.04,0.06,0.07,0.075:

>

RZeroCurvetimes,rates,interpolation=LogLinear:

>

ForwardRateR,0.,0.5

0.04000000000

(1)
>

ForwardRateR,0.1,0.5

0.04205582119

(2)
>

ForwardRateR,1.5

0.08448956888

(3)
>

plotsdisplayplotForwardRateR,0.1,t,t=0.5..2,color=blue,thickness=3,plotForwardRateR,0.3,t,t=0.5..2,color=blue,thickness=3,axes=BOXED,gridlines=true

In this example, create a flat zero curve with reference date set to January 5, 2006.

>

R1ZeroCurve0.05,referencedate=Jan-05-2006:

>

R11.0

0.05000000000

(4)
>

ForwardRateR1,1.0

0.05000000000

(5)
>

ForwardRateR1,0.5,1.5

0.05000000000

(6)
>

ForwardRateR1,Jan-05-2007

0.04999999999

(7)
>

TYearFractionJan-05-2006,Jan-05-2007,R1:-daycounter

T1.

(8)

In this example, create a zero curve with the same parameters as above but assume that the interest rate is based on the monthly compounding.

>

R2ZeroCurve0.05,compounding=Monthly,referencedate=Jan-05-2005:

>

R2Jan-05-2005

0.04989612178

(9)
>

R21.0

0.04989612178

(10)
>

ForwardRateR2,0.5,1.0

0.04989612178

(11)

In this example, create a zero curve based on a piecewise interpolation of zero rates. Use the default interpolation.

>

rates0.02,0.01,0.04,0.06,0.07:

>

times0.,0.5,1.0,1.5,2.0:

>

R3ZeroCurvetimes,rates:

>

ForwardRateR3,0.5,1.0

0.07000000000

(12)

References

Brigo, D., Mercurio, F., Interest Rate Models: Theory and Practice. New York:

Hull, J., Options, Futures, and Other Derivatives, 5th. edition. Upper Saddle River, New Jersey: Prentice Hall, 2003.

Compatibility

The Finance[ForwardRate] command was introduced in Maple 15.

For more information on Maple 15 changes, see Updates in Maple 15 .


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /