Closed Financebro1 closed 3 years ago
Just ran this:
> tidyquant::tq_get("AAPL", from = "2017-01-01", to = "2018-03-01", get = 'stock.prices')
# A tibble: 291 x 8
symbol date open high low close volume adjusted
<chr> <date> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 AAPL 2017-01-03 29.0 29.1 28.7 29.0 115127600 27.5
2 AAPL 2017-01-04 29.0 29.1 28.9 29.0 84472400 27.5
3 AAPL 2017-01-05 29.0 29.2 29.0 29.2 88774400 27.6
4 AAPL 2017-01-06 29.2 29.5 29.1 29.5 127007600 27.9
5 AAPL 2017-01-09 29.5 29.9 29.5 29.7 134247600 28.2
6 AAPL 2017-01-10 29.7 29.8 29.6 29.8 97848400 28.2
7 AAPL 2017-01-11 29.7 30.0 29.6 29.9 110354400 28.4
8 AAPL 2017-01-12 29.7 29.8 29.6 29.8 108344800 28.2
9 AAPL 2017-01-13 29.8 29.9 29.7 29.8 104447600 28.2
10 AAPL 2017-01-17 29.6 30.1 29.6 30 137759200 28.4
# ... with 281 more rows
What version of tidyquant
are you running?
Thanks for the quick response, i am using tidyquant_1.0.2
Might be a bug. The cli
package is used for some messaging, and there might be an issue there.
Hey figured it out, an embarrassing problem, just had to update some of the other packages. Thank you for answering tho!
Ah no worries. Happens all the time.
Hey,
When i try to use certain commands i get Error:'cli_h1' is not an exported object from 'namespace:cli' Here is my code, and the error occurs when i try to use the tq_get?? Is tidyquant not working anymore, or is it a quick fix?
library(tidyverse) library(tidyquant)
options("getSymbols.warning4.0"=FALSE) options("getSymbols.yahoo.warning"=FALSE)
Downloading Apple price using quantmod
getSymbols("AAPL", from = '2017-01-01', to = "2018-03-01",warnings = FALSE, auto.assign = TRUE) head(AAPL)
class(AAPL) chart_Series(AAPL) chart_Series(AAPL['2017-12/2018-03']) tickers = c("AAPL", "NFLX", "AMZN", "K", "O")
getSymbols(tickers, from = "2017-03-01", to = "2017-04-01") prices <- map(tickers,function(x) Ad(get(x))) prices <- reduce(prices,merge) colnames(prices) <- tickers head(prices) class(prices)
aapl <- tq_get('AAPL', from = "2017-01-01", to = "2018-03-01", get = "stock.prices")