getSymbols.yahoo 的问题

Problems with getSymbols.yahoo

我正在尝试分析来自 yahoo finance 的有关 Tether USD(一种加密货币)的时间序列。 我下载了资料,我有以下代码:

###librarys
library("tseries")
library("quantmod")
library("timeSeries")

#read data
path <- file.path("Bases de datos")
CRYPTO <- file.path(path, "USDT-USD.csv") #original file name
USDT <- read.csv(CRYPTO)

#time serie
usdt_ts <- get.hist.quote(instrument = 'USDT',start = "2018-01-01",end = "2021-12-31",quote = c("Open", "High", "Low", "Close","Adjusted", "Vol"),compression = "d")

但出现下一个错误:

Warning: USDT download failed; trying again.
Error in getSymbols.yahoo(Symbols = "USDT", env = <environment>, verbose = FALSE,  : 
  Unable to import “USDT”.
argument "conn" is missing, with no default

我正在尝试使用此解决方案,但它不起作用

有解决这个问题的想法吗?

雅虎财经不承认 USDT 是有效的代码。如果要下载此数据,您需要使用“USDT-USD”。

USDT <- getSymbols("USDT-USD",start = "2018-01-01",end = "2021-12-31", auto.assign = F)

head(USDT)
           USDT-USD.Open USDT-USD.High USDT-USD.Low USDT-USD.Close USDT-USD.Volume USDT-USD.Adjusted
2017-11-09       1.01087       1.01327     0.996515        1.00818       358188000           1.00818
2017-11-10       1.00650       1.02423     0.995486        1.00601       756446016           1.00601
2017-11-11       1.00598       1.02621     0.995799        1.00899       746227968           1.00899
2017-11-12       1.00602       1.10591     0.967601        1.01247      1466060032           1.01247
2017-11-13       1.00448       1.02929     0.975103        1.00935       767884032           1.00935
2017-11-14       1.00524       1.01343     0.996898        1.00683       429857984           1.00683