Close
Close window
CleanPrice - 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

CleanPrice

calculate the clean price of a bond

Calling Sequence

CleanPrice(bond, yield, compounding, opts)

Parameters

bond

-

fixed or floating rate bond data structure; bond

yield

-

non-negative constant; desired yield

compounding

-

Simple, Continuous, Compounded, or SimpleThenCompounded; the underlying compounding type

opts

-

equations of the form option = value where option is evaluationdate; specify options for the CleanPrice command

Options

evaluationdate = a string containing a date specification in a format recognized by ParseDate or a Date data structure -- This option specifies the evaluation date. By default this is set to the global evaluation date (see EvaluationDate ).

Description

The CleanPrice command computes the clean price of a bond, given its yield. Clean price does not include any accrued interest that has accumulated since the last coupon payment.

The parameter bond is either a fixed coupon bond or floating rate bond . The parameter yield is the desired yield.

Examples

>

withFinance:

>

SetEvaluationDateNovember 25, 2006:

>

EvaluationDate

November 25, 2006

(1)
>

Settingsdaycounter=Historical,settlementdays=0,businessdayconvention=Unadjusted,compounding=Continuous

daycounter=Historical,settlementdays=0,businessdayconvention=Unadjusted,compounding=Continuous

(2)

Consider a zero-coupon bond with a face value of 100 maturing in one year.

>

bond1ZeroCouponBond100,5,Years:

>

price1CleanPricebond1,0.05,Compounded

price178.35261665

(3)
>

100DiscountFactor0.05,5,compounding=Annual

78.35261665

(4)
>

10011.055

78.35261665

(5)
>

yield1YieldFromCleanPricebond1,price1

yield10.04879016417

(6)
>

EquivalentRateyield1,Continuous,Annual

0.05000000000

(7)
>

yield1YieldFromCleanPricebond1,price1,Compounded

yield10.05000000006

(8)

Consider a 3-year bond with a face value of 100 that pays a fixed coupon of 3 percent issued on March 15, 2005.

>

Settingsdaycounter=Thirty360European:

>

Settingsdaycounter

Thirty360European

(9)
>

principal2100:

>

coupon20.03:

>

rate20.05:

>

bond2FixedCouponBondprincipal2,3,Years,coupon2,issuedate=March 17, 2005:

Calculate the bond's clean price given its yield and vice-versa.

>

yield2YieldFromCleanPricebond2,100,Compounded

yield20.02992505925

(10)
>

cleanprice2CleanPricebond2,yield2,Compounded

cleanprice2100.0000000

(11)
>

YieldFromCleanPricebond2,cleanprice2

0.02948604163

(12)
>

CleanPricebond2,rate2

97.35137029

(13)
>

dirtyprice2DirtyPricebond2,rate2

dirtyprice299.41803696

(14)
>

YieldFromDirtyPricebond2,dirtyprice2

0.05000000002

(15)

Consider the same bond but with semi-annual coupons.

>

bond3FixedCouponBondprincipal2,3,Years,coupon2,issuedate=March 17, 2005,frequency=Semiannual:

Calculate the bond's clean price given its yield and vice-versa.

>

yield3YieldFromCleanPricebond3,100,Compounded

yield30.02997946101

(16)
>

cleanprice3CleanPricebond3,yield3,Compounded

cleanprice3100.0000000

(17)
>

YieldFromCleanPricebond3,cleanprice3

0.02975698958

(18)
>

CleanPricebond3,rate2

97.41008628

(19)
>

dirtyprice3DirtyPricebond3,rate2

dirtyprice397.97675295

(20)
>

YieldFromDirtyPricebond3,dirtyprice3

0.05000000002

(21)

Note that since the bond has semi-annual coupons, the Compounded yield is based on semi-annual compounding.

>

dirtyprice3DirtyPricebond3,rate2,Compounded

dirtyprice398.05440635

(22)
>

cashflows3CashFlowsbond3

cashflows31.500000000 on 'March 17, 2007',1.500000000 on 'September 17, 2007',1.500000000 on 'March 17, 2008',100. on 'March 17, 2008'

(23)
>

addtamountDiscountFactorrate2,tdate,compounding=Semiannual,tincashflows3

98.05440635

(24)

Compatibility

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

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


Download Help Document

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