chart_fwd_curves: Plots historical forward curves

View source: R/chart_fwd_curves.R

chart_fwd_curvesR Documentation

Plots historical forward curves

Description

Returns a plot of forward curves through time

Usage

chart_fwd_curves(df = dfwide, cmdty = "cmewti", weekly = TRUE, ...)

Arguments

df

Wide dataframe with date column and multiple series columns (multivariate). tibble

cmdty

Futures contract code in expiry_table object: unique(expiry_table$cmdty). character

weekly

Defaults to TRUE for weekly forward curves. logical

...

other graphical parameters

Value

plot of forward curves through time. NULL

Author(s)

Philippe Cote

Examples

df <- dfwide %>%
  dplyr::select(date, dplyr::starts_with("CL")) %>%
  tidyr::drop_na()
chart_fwd_curves(
  df = df, cmdty = "cmewti", weekly = TRUE,
  main = "WTI Forward Curves", ylab = "$ per bbl", xlab = "", cex = 2
)

risktoollib/RTL documentation built on April 17, 2024, 1:35 p.m.