gold {mclustAddons} | R Documentation |
Gold price log-returns
Description
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)
Format
A data frame with the following variables:
- date
Date (format: yyyy-mmm-dd).
- log.returns
Daily log-return.
[Package mclustAddons version 0.9.1 Index]