Skip to contents

The function uses the GFD API. You need to set the environment variable GFD_USER and GFD_PWD with your username and password.

Usage

gfd_data(series, ..., skip_rows = 2)

Arguments

series

A string with the series ID.

...

Additional arguments to be passed to the API. (i.e.: periodicity = "Monthly")

Value

A data.frame with the downloaded data.

Examples

gfd_data("_SPXTRD")
#> # A tibble: 155 × 8
#>    date       ticker    open   high    low  close volume openint
#>    <date>     <chr>    <dbl>  <dbl>  <dbl>  <dbl>  <dbl> <lgl>  
#>  1 1871-12-31 _SPXTRD 0.0183 0.0206 0.0183 0.0205      0 NA     
#>  2 1872-12-31 _SPXTRD 0.0211 0.0232 0.0211 0.0232      0 NA     
#>  3 1873-12-31 _SPXTRD 0.0235 0.0238 0.0197 0.0217      0 NA     
#>  4 1874-12-31 _SPXTRD 0.0229 0.0237 0.0225 0.0237      0 NA     
#>  5 1875-12-31 _SPXTRD 0.0238 0.0248 0.0236 0.0242      0 NA     
#>  6 1876-12-31 _SPXTRD 0.0249 0.0255 0.0213 0.0213      0 NA     
#>  7 1877-12-31 _SPXTRD 0.0212 0.0212 0.0168 0.0205      0 NA     
#>  8 1878-12-31 _SPXTRD 0.0205 0.0230 0.0202 0.0228      0 NA     
#>  9 1879-12-31 _SPXTRD 0.0238 0.0340 0.0238 0.0340      0 NA     
#> 10 1880-12-31 _SPXTRD 0.0354 0.0423 0.0336 0.0423      0 NA     
#> # ℹ 145 more rows