`interp_copomscenarios` creates the Interpolation object.

interp_copomscenarios(
  copom_dates,
  copom_moves = numeric(0),
  future_rates = numeric(0)
)

Arguments

copom_dates

a vector of `Date` objects.

copom_moves

a numeric vector with scenarios for changes in short term rates.

future_rates

a numeric vector with scenarios for short term rates.

`copom_dates` is a vector with de dates of the meetings that must be considered in the interpolation.

`copom_moves` is a vector with the scenarios for changes in short term rates, in this case, SELIC rates. The scenarios are decimal (not basis points or percentual), so a scenario of 100 bps must be declared as 0.01, for example. `future_rates` is a numeric vector with scenarios for future values of the short term rate. `copom_moves` and `future_rates` arguments are complementary, if one is set, the other must be `NULL`.

Value

A `COPOMScenarios` object.

Examples

if (require(fixedincome) && require(bizdays)) {
  copom_dates <- as.Date(
    c("2022-03-17", "2022-05-05", "2022-06-17", "2022-08-04")
  )
  terms <- c(1, 3, 25, 44, 66, 87, 108, 131, 152, 172, 192, 214, 236, 277)
  rates <- c(
    0.1065, 0.1064, 0.111, 0.1138, 0.1168, 0.1189, 0.1207, 0.1219,
    0.1227, 0.1235, 0.1234, 0.1236, 0.1235, 0.1235
  )
  curve <- spotratecurve(
    rates, terms, "discrete", "business/252", "Brazil/ANBIMA",
    refdate = as.Date("2022-02-23")
  )
  moves <- c(50, 0, 0, 0) / 1e4
  interpolation(curve) <- interp_copomscenarios(copom_dates, moves)
}