ind-classes: A Reference Class extending 'RiskFactor' class and...

YieldCurve-classR Documentation

A Reference Class extending RiskFactor class and representing a yield curve risk factor

Description

Yield curves define a class of market risk factors that in the ACTUS model may directly affect future cash flows arising from a financial instrument, e.g. Floating- rate bonds, or are used for valuation of instruments, e.g. in discounting.

Yield curves define a class of market risk factors that in the ACTUS model may directly affect future cash flows arising from a financial instrument, e.g. Floating- rate bonds, or are used for valuation of instruments, e.g. in discounting.

Reference indices define a class of market risk factors that in the ACTUS model may directly affect future cash flows arising from a financial instrument, e.g. Inflation- linked bonds, or are used for valuation of instruments, e.g. a Stock market index when using CAPM.

Fields

jref

A rJava java object reference

jref

A rJava java object reference

MarketObjectCode

character name of the risk factor

TimeSeries

data.frame representating time series data

See Also

RiskFactor, ReferenceIndex, ForeignExchangeRate

RiskFactor, ReferenceIndex, ForeignExchangeRate

RiskFactor, YieldCurve, ForeignExchangeRate

Examples

yc <- YieldCurve()
tenors <- c("1W", "1M", "6M", "1Y", "2Y", "5Y")
rates <- c(0.001, 0.0015, 0.002, 0.01, 0.02, 0.03)
set(yc, what = list(MarketObjectCode = "YC_Prim",
  Nodes = list(ReferenceDate = "2015-01-01T00", Tenors = tenors, Rates = rates)))

get(ind, "MarketObjectCode")
get(yc, "ReferenceDate")
get(yc, "Tenors")
get(yc, "Rates")

yc <- DynamicYieldCurve()
tenors <- c("1W", "1M", "6M", "1Y", "2Y", "5Y")
rates <- c(0.001, 0.0015, 0.002, 0.01, 0.02, 0.03)
set(yc, what = list(MarketObjectCode = "YC_Prim",
  Nodes = list(ReferenceDate = "2015-01-01T00", Tenors = tenors, Rates = rates)))

get(ind, "MarketObjectCode")
get(yc, "ReferenceDate")
get(yc, "Tenors")
get(yc, "Rates")


# create an ReferenceIndex object
ind <- Index()

# define time stamps and values
times <- c("2015-01-01", "2016-01-01", "2017-01-01", "2018-01-01",
           "2019-01-01")
values <- c(100, 110, 120, 130, 140)

# set the MarketObjectCode and Data
set(ind, what = list(MarketObjectCode = "CHF_SMI",
                     Data = list(Dates = times, 
                                       Values = values)))

# get MarketObjectCode
get(ind, "MarketObjectCode")

# get values of the risk factor at certain times
valueAt(ind, "2016-01-01")
valueAt(ind, c("2016-01-01", "2018-07-01", "2018-07-01"))


wbreymann/FEMS documentation built on Dec. 8, 2022, 9:43 a.m.