immunize | R Documentation |
immunize
Immunizes a fixed-income portfolio of investments against interest changes with respect to a liability that should be covered by this portfolio, cf. section Details.
immunize(x, target, yield, isPercentage=TRUE, period, ...)
x |
the portfolio of contracts that should be adjusted. |
target |
the liabilities (contract or portfolio) whose value and duration should be matched. |
yield |
a numeric, indicating the yield used to calculate the duration. |
isPercentage |
a logical, indicating if the 'yield' is expressed as percentage (TRUE) or as fraction (FALSE). |
period |
argument currently not used. |
... |
additional parameters to be passed. |
immunize
minimizes the interest rate risk of a fixed-income portfolio
by adjusting the
portfolio duration such that it matches the duration of the liabilities that
should be covered with this portfolio.
(NOT CORRECT, MUST BE UPDATED)
the immunization of the contract or portfolio with respect to the target.
bnd1 <- bond(start="2015-01-01", maturity="30 years", nominal=1000,
coupon=0.06, couponFreq="1 year", role="long", variable=FALSE)
bnd2 <- bond(start="2015-01-01", maturity="10 years", nominal=1000,
coupon=0.11, couponFreq="1 year", role="long", variable=FALSE)
bnd3 <- bond(start="2015-01-01", maturity="20 years", nominal=1000,
coupon=0.09, couponFreq="1 year", role="long", variable=FALSE)
ptf <- Portfolio(b1=bnd1,b2=bnd2,b3=bnd3)
target <- bond(start="2015-01-01", maturity="10 years", nominal=1000000, coupon=0,
couponFreq="10 year", role="long", variable=FALSE)
immunize(ptf, target, yield=9, from=NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.