Model near zero interest-rates

Codecov test coverage R-CMD-check Lifecycle: experimental

Installation

You can install the development version from github:

# install.packages("devtools")
devtools::install_github("Reckziegel/ShadowRates")

Toy Example

library(ShadowRates)
library(dplyr, warn.conflicts = FALSE)
library(ggplot2)

data("us_yield_curve")

us_yield_curve %>%
  # shadow
  shadow_rates(.group_col = maturity, .dbl_col = rates, .eta = 0.015) %>% 
  # plotting
  ggplot(aes(x = index, y = rates, color = maturity)) + 
  geom_line() + 
  geom_hline(yintercept = 0, size = 1, color=  "grey") + 
  scale_y_continuous(labels = scales::percent_format(), breaks = scales::breaks_width(0.025)) + 
  labs(title    = "US Yield Curve", 
       subtitle = "Implied 'Shadow Rates' by the Inverse Call Transformation", 
       x        = NULL, 
       y        = NULL)