Why does the code respond by dropping the second part of the symbol string?
> getSymbols('FTT-USD')
[1] "FTT-USD"
> str(FTT-USD)
Error: object 'FTT' not found
2
You can use get
here.
library(quantmod)
rm(list=ls())
getSymbols('FTT-USD')
ls()
# [1] "FTT-USD"
FTT.USD <- get("FTT-USD")
str(FTT.USD)
An xts object on 2019-07-31 / 2024-07-18 containing:
Data: double [1815, 6]
Columns: FTT-USD.Open, FTT-USD.High, FTT-USD.Low, FTT-USD.Close, FTT-USD.Volume ... with 1 more column
Index: Date [1815] (TZ: "UTC")
xts Attributes:
$ src : chr "yahoo"
$ updated: POSIXct[1:1], format: "2024-07-18 10:19:30"
plot(FTT.USD)