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

ForeignExchangeRate-classR Documentation

A Reference Class extending RiskFactor class and representing a foreign exchange rate risk factor

Description

Foreign exchange rates 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. Cash-settled cross-currency-swaps, or are used to normalize cash flows in different currencies for reporting.

Fields

MarketObjectCode

character name of the risk factor

CurrencyPair

character currency pair represented by risk factor

TimeSeries

data.frame representating time series data

See Also

RiskFactor, YieldCurve, ReferenceIndex

Examples


# create an FX-Rate object
fx <- FxRate() 

# define time stamps and values
times <- c("2015-01-01", "2016-01-01", "2017-01-01", 
           "2018-01-01", "2019-01-01")
values <- c(1.04, 1.05, 1.2, 1.0, 0.9)

# set the MarketObjectCode and TimeSeries
set(fx, what = list(MarketObjectCode = "CHF/USD",
                    TimeSeries = list(Dates = times, 
                                      Values = values)))  

# get MarketObjectCode
get(fx, "MarketObjectCode")


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