immunize: 'immunize'

View source: R/immunization.R

immunizeR Documentation

immunize

Description

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.

Usage

immunize(x, target, yield, isPercentage=TRUE, period, ...)

Arguments

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.

Details

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)

Value

the immunization of the contract or portfolio with respect to the target.

Examples

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)


wbreymann/FEMS documentation built on May 6, 2024, 2:19 p.m.