Questions tagged [tidyquant]

The R tidyquant package makes it easy to use common financial data analysis packages such as xts, zoo, and quantmod along with tidyverse data manipulation packages such as dplyr, tidyr, and purrr.

's tidyquant package brings financial analysis to the tidyverse. The tidyquant package provides a convenient wrapper to various , , and package functions and returns the objects in the tidy tibble format. The main advantage is being able to use quantitative functions with the tidyverse functions including , , , , , etc. See the tidyquant website for more information, documentation and examples.

Repositories

Detailed HTML vignettes

Other resources

Related tags

93 questions
0
votes
1 answer

How to get real time quote from Tiingo

I am trying to get the updated quotes of cryptocurrencies from Tiingo using this code: library(tidyquant) tiingo_api_key('') prices.hour <- tq_get(c('adausd', 'ethusd', 'xrpusd'), get = "tiingo.crypto", from …
Sal
  • 117
  • 12
0
votes
1 answer

Tidyquant tq_get and tq_transmute: Warning message "missing values removed from data"

I am getting the following error message from the code below: In to_period(xx, period = on.opts[[period]], ...) : missing values removed from data* It works with some stocks, but some get the same error message as this one. Should I just use…
jimjames
  • 41
  • 4
0
votes
1 answer

Troubled Getting Cryptocurrency Data API in R

I've tried two cryptocurrency API package for R, to name it: coinmarketcapr package riingo <- included in tidyquant I really want to get updated historical data of cryptocurrency, my goal is to predict the thing with some timeseries analysis, but…
0
votes
1 answer

Naive portfolio selection rule

I have a xts file with monthly returns for 17 industry portfolios. The data looks as follows: Cars Chems Clths Cnstr Cnsum Durbl FabPr Finan Food Machn Mines Oil Other Rtail Steel Trans 1926-07-31 4.77 1.20 -0.09 4.20 2.05 1.33…
0
votes
0 answers

R merging stock prices to multiple csv files - using title as ticker

I have over 8000 csv files in a folder, each containing 2 columns. The file title is also the stock ticker. e.g. "AAPL.csv" shows the data of the Apple stock. This is the data it contains: glimpse(AAPL) *Columns: 2 $ timestamp
Rifraf
  • 1
  • 1
0
votes
2 answers

How do I retain all the columns while using tq_transmute() function?

I am trying to replicate a trading strategy and backtest in R. However, I am having a slight problem with the tq_transmute() function. Any help would be appreciated. So, I have the following code that I have written until now: #Importing the…
Biv
  • 1
  • 1
0
votes
0 answers

How to refer to list-column using purrr function (map()) with varying input

How do I properly refer to a list-column in R, when I am using a map (or any purrr function) function and want to utilize "x" from the map function in calling the appropriate list? For example, if I have a list of 3 (let's call it testlist) and…
Jcarl
  • 161
  • 2
  • 9
0
votes
1 answer

Converting daily data to weekly data using R

I have the daily data of two stocks (Apple and Google) library(tidyquant) dt = tidyquant::tq_get(c("AAPL", "GOOG")) %>% arrange(symbol, date) I am trying to convert this data from daily to weekly using the following code result = dt %>% …
Saurabh
  • 1,566
  • 10
  • 23
0
votes
1 answer

tibbletime with tq_transmute producing strange error, column obviously exists but says it doesn't

I could have sworn this code worked a week ago, but I guess that I am mistaken. I keep getting the error: Error: Can't subset columns that don't exist. x Column asset doesn't exist. Run rlang::last_error() to see where the error occurred. In…
user12679253
0
votes
1 answer

tidyverse failing to load

Unsure what happened, I installed tidyquant and quantmod to work with stock prices and now get the following error message library(tidyverse) Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(i, c(lib.loc, .libPaths()),…
johnsmith_228
  • 105
  • 3
  • 11
0
votes
1 answer

Get Financial Statements from Yahoo Finance in R?

I want to get Income Statement, Balance Sheet, and Cashflow statement from yahoo finance on companys. I know There is Tidyquant, but I didn't see options to pull this data. Is there other R packages that have an API to get this data? My last resort…
Daniel_j_iii
  • 3,041
  • 2
  • 11
  • 27
0
votes
1 answer

Specifying dates in tidyquant (R) when using the Alpha Vantage plugin

I am trying to create a dataset from Alpha Vantage using the tidyquant package. I'm looking for a solution to specify the date range for my dataset (it appears that using a from and to argument does not work. Any suggestions my code is as…
sa90210
  • 525
  • 2
  • 12
0
votes
1 answer

tq_index error, its creating an excel file?

For some reason, I im getting this error when I run: DOW = tq_index("DOW") and the error: Getting holdings for DOW Error at DOW during download. Error: Evaluation error: zip file 'C:\Users\mbhe\AppData\Local\Temp\RtmpA59N1Y\file1bf4feb669b.xlsx'…
mbih
  • 5
  • 5
0
votes
0 answers

How to install "tidyquant" package to R 3.4.0?

Good afternoon. I face a problem, connected with "tidyquant" package installation. When I type: install.packages ("tidyquant") The installation process begins, but some time later I get several warning messages: Warning in install.packages : …
Maxim
  • 99
  • 1
  • 4
  • 11
0
votes
1 answer

tq_get returning data with different dates on multiple calls

I am using tq_get from the tidyquant package. The SAME incantation yields data with differing TIME ranges. Why is this? Here is a reprex:- library(tidyquant) > tq_get("AACG") # A tibble: 2,666 x 8 symbol date open high low close volume…
user2338823
  • 501
  • 1
  • 3
  • 16