gold | R Documentation |
Gold price log-returns for the year 2023 obtained from Yahoo Finance using
the quantmod
R package.
Code used to download, format, and save the data:
gold = quantmod::getSymbols("GC=F", src = "yahoo", auto.assign = FALSE) gold = quantmod::dailyReturn(gold, type = "log") gold = data.frame("date" = as.Date(zoo::index(gold)), "log.returns" = as.vector(gold$daily.returns), row.names = NULL)
A data frame with the following variables:
Date (format: yyyy-mmm-dd).
Daily log-return.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.