Finance[YieldFromDirtyPrice] - calculate the yield of a bond given its dirty price
|
Calling Sequence
|
|
YieldFromDirtyPrice(bond, price, compounding, opts)
|
|
Parameters
|
|
bond
|
-
|
fixed- or floating-rate bond data structure; bond
|
price
|
-
|
non-negative constant; bond's dirty price
|
compounding
|
-
|
Simple, Continuous, Compounded, or SimpleThenCompounded; the underlying compounding type
|
opts
|
-
|
equations of the form option = value where option is one of accuracy, iterations, or evaluationdate; specify options for the YieldFromDirtyPrice command
|
|
|
|
|
Description
|
|
•
|
The YieldFromDirtyPrice command calculates a bond's yield based on the specified dirty price.
|
•
|
The parameter bond can be either a fixed-rate bond or a floating-rate bond.
|
•
|
The parameter price is the desired dirty price.
|
•
|
The (optional) parameter compounding specifies what type of compounding will be used to calculate the yield. By default Continuous compounding is assumed.
|
|
|
Options
|
|
•
|
accuracy = positive -- This option specifies the desired accuracy of the result. The default value is 1e-9.
|
•
|
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).
|
•
|
iterations = posint -- This option specifies the maximum number of iterations. The default value is 100000.
|
|
|
Compatibility
|
|
•
|
The Finance[YieldFromDirtyPrice] command was introduced in Maple 15.
|
|
|
Examples
|
|
>
|
|
>
|
|
>
|
|
| (1) |
>
|
|
| (2) |
Consider a zero-coupon bond with a face value of 100 maturing in five years.
>
|
|
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
Consider a 3-year bond with a face value of 100 that pays a fixed coupon of 3% issued on March 15, 2005.
>
|
|
>
|
|
| (7) |
>
|
|
>
|
|
>
|
|
>
|
|
Calculate the bond's dirty price given its yield and vice-versa.
>
|
|
| (8) |
>
|
|
| (9) |
>
|
|
| (10) |
>
|
|
| (11) |
>
|
|
| (12) |
Consider the same bond but with semi-annual coupons.
>
|
|
Calculate the bond's dirty price given its yield and vice-versa.
>
|
|
| (13) |
>
|
|
| (14) |
>
|
|
| (15) |
>
|
|
| (16) |
>
|
|
| (17) |
Note that since the bond has semi-annual coupons, the Compounded yield is based on semi-annual compounding.
>
|
|
| (18) |
>
|
|
| (19) |
>
|
|
| (20) |
|
|
See Also
|
|
Finance[AccruedAmount], Finance[CleanPrice], Finance[DayCounter], Finance[DirtyPrice], Finance[FixedCouponBond], Finance[FloatingRateBond], Finance[FormatDate], Finance[ParseDate], Finance[YearFraction], Finance[YieldFromCleanPrice], Finance[ZeroCouponBond]
|
|
Download Help Document
Was this information helpful?