bond {FinancialMath} | R Documentation |
Bond Analysis
Description
Solves for the price, premium/discount, and Durations and Convexities (in terms of periods). At a specified period (t), it solves for the full and clean prices, and the write up/down amount. Also has the option to plot the convexity of the bond.
Usage
bond(f,r,c,n,i,ic=1,cf=1,t=NA,plot=FALSE)
Arguments
f |
face value |
r |
coupon rate convertible cf times per year |
c |
redemption value |
n |
the number of coupons/periods for the bond |
i |
nominal interest rate convertible ic times per year |
ic |
interest conversion frequency per year |
cf |
coupon frequency- number of coupons per year |
t |
specified period for which the price and write up/down amount is solved for, if not NA |
plot |
tells whether or not to plot the convexity |
Details
Effective Rate of Interest:
coupon (per period)
price = coupon
Price (for period t):
If t is an integer: price =coupon
If t is not an integer then where
is an integer and
:
full price coupon
clean price = full pricecoupon
If price > c :
premium = price
Write-down amount (for period t) coupon
If price < c :
discount price
Write-up amount (for period t) coupon
Value
A matrix of all of the bond details and calculated variables.
Note
t must be less than n.
To make the duration in terms of years, divide it by cf.
To make the convexity in terms of years, divide it by .
Examples
bond(f=100,r=.04,c=100,n=20,i=.04,ic=1,cf=1,t=1)
bond(f=100,r=.05,c=110,n=10,i=.06,ic=1,cf=2,t=5)