R QUANTMOD 莱特币

R QUANTMOD LiteCoin

我正在尝试使用 QuantMod 导入 LiteCoin #cryptocurrency 上的一些数据,它可以用于股票以外的其他东西吗?

如果是这样,我会使用什么来源?下面的代码示例,谢谢!

如果 Quantmod 不支持,那么用于导入 R 的良好数据源是什么?

# Get quantmod
if (!require("quantmod")) {
  install.packages("quantmod")
  library(quantmod)
}

start <- as.Date("2016-11-18")
end <- as.Date("2017-11-18")

getSymbols("LTC.X", src = "???", from = start, to = end)

您可以使用 yahoo 中的代码 "LTC-USD" 来检索莱特币数据:

library(quantmod)
start <- as.Date("2016-11-18")
end <- as.Date("2017-12-15")
ltcData <- getSymbols("LTC-USD", src = "yahoo", from = start, to = end, auto.assign = FALSE)
candleChart(ltcData, col=TRUE, theme=chartTheme('white'), log.scale=TRUE, name="LTC" )