I'm struggling to download the stock price in R. Here are my questions. I used getMasterIndex to download the MasterIndex of all SEC filings and ...
I'm struggling to download the stock price in R. Here are my questions. I used getMasterIndex to download the MasterIndex of all SEC filings and ...
In the code below, the first call to the EOMONTH function returns NA when I expect February 28, 2019. The second call works correctly. Both calls work ...
I have the following R dataframe df: I'd like to add a daily returns column for each of the two assets. To do so, I use the following: But, I ge ...
I'm trying to add more standard deviation to my current plot. I need to add 1std and 3std, I've already addeed the 2std to my plot. This is my code: ...
I retrieve a bunch of data using the Tidyquant API, as follows: The data looks as follows: I would like to rename the generic price column with ...
I'm using the tq_get() function in Tidyquant to retrieve economic data from FRED: How do I change the name of the price column to cpi? The desired ...
I created an custom function to add working days to a date. The function depends on the following packages: This is the function I created: When ...
For example, I'm getting stock prices from yahoo finance using tidyquant in r. This will result in 4 rows. How many api calls does this result in? ...
I am plotting the donchian high and low using tidy packages. the low value does not look correct. I am probably not calling the donchian function prop ...
I'd like to retrieve financial data from Yahoo using the tidyquant package (or any other package). For retrieving Microsoft's (index: MSFT) closing p ...
I want to get the investment values for each stock, but I am getting, I think, for the overall dataset. What am I doing wrong? I want to get the i ...
I'm trying to generate rolling betas for stocks and my rolling function is not working. What I have tried so far: Any ideas on how to make this wor ...
I am new to analyzing time series data and am looking for some help pull the monthly high and low prices from some OHLC data. When I try and aggregate ...
Moving averages appear to be plotting from right to left on my timeseries. Here is my code: And here is the output chart: Chart of CL with Moving A ...
ie. returns of 10% are recorded as 0.01 in the returns column, how can I change this decimal to a whole number? ...
I want to change the following data set : date A B 01/01/2018 391 585 02/01/2018 420 595 03/01/2018 455 642 04/01/2018 469 654 05/01/2 ...
I am trying to get the updated quotes of cryptocurrencies from Tiingo using this code: It works well but the most updates data is several hours ago ...
I am getting the following error message from the code below: It works with some stocks, but some get the same error message as this one. Should I ...
I've tried two cryptocurrency API package for R, to name it: coinmarketcapr package riingo <- included in tidyquant I really want to get upda ...
I have a xts file with monthly returns for 17 industry portfolios. The data looks as follows: My aim is to perform a backtest with a naive portfoli ...