plot_VIX: Create a time-series plot of VIX data

View source: R/visualisations.R

plot_VIXR Documentation

Create a time-series plot of VIX data

Description

Create a time-series plot of VIX data

Usage

plot_VIX(data, index_var = "t", VIX_vars = c("VIX_wk", "VIX_mn"))

Arguments

data

A data.table with at least three columns:

  • ticker (character, giving the name of the stock symbol)

  • t (datetime or numeric, giving the time of observation for the x-axis. It is recommended to use a numeric index if multiple days should be displayed)

  • \<values\> (numeric, a column with values to plot, e.g. the VIX)

  • ... optional other \<value\> columns

index_var

Character scalar or vector corresponding to the name of the index columns in the input data. Defaults to t

VIX_vars

Character scalar or vector corresponding to the names of the value columns in the input data which should be plotted. Defaults to c("VIX_wk", "VIX_mn")

Value

Returns a ggplot


m-g-h/R.MFIV documentation built on July 4, 2022, 3:35 a.m.