plot,ContractType,character-method | R Documentation |
Create a graphical representation of a YieldCurve- object.
Create a graphical representation of an index-like RiskFactor-object.
## S4 method for signature 'ContractType,character'
plot(x, y, yc = NULL, ...)
## S4 method for signature 'FEMSContract,character'
plot(x, y, yc = NULL, to = NULL, ...)
## S4 method for signature 'EventSeries,character'
plot(x, y, yc = NULL, ...)
## S4 method for signature 'YieldCurve,missing'
plot(x, y, ...)
## S4 method for signature 'RiskFactor,ANY'
plot(x, y, ...)
object |
The RiskFactor object to plot |
YieldCurve,plot
ReferenceIndex,plot
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)))
plot(yc)
idx <- Index()
times <- c("2015-01-01T00", "2016-01-01T00", "2017-01-01T00", "2018-01-01T00",
"2019-01-01T00")
values <- c(100, 110, 120, 130, 140)
set(idx, what=list(
MarketObjectCode = "IND_CPI_EA",
Data=list(Dates=times,Values=values)))
plot(idx)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.