Questions tagged [quantmod]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
4 votes
3 answers
7k views

Daily option data

I am wondering where I can pull daily (hourly, by-the-minute, etc. even better) option data for a particular underlying. I would prefer a database I could scrape through and API, but would not mind ...
connor's user avatar
  • 43
2 votes
3 answers
6k views

How to get list of all symbols in fred database?

I am trying to query every single series in the fred database using r. I have checked out both the quantmod and fImport packages, and they work fine, though it seems that quantmod fits my use a bit ...
Paul's user avatar
  • 223
2 votes
1 answer
2k views

R: Calculating cumulative return of a portfolio

I've downloaded adjusted closing prices from Yahoo using the quantmod-package, and used that to create a portfolio consisting of 50% ...
Tyler D's user avatar
  • 181
2 votes
2 answers
2k views

How many years of historical data is require for Portfolio Optimization?

I would like to know about below questions. How many years of historical data is require for Portfolio Optimization in R programming. Thanks Atul
Atul Agarawal's user avatar
2 votes
2 answers
987 views

Is it possible to download stock-data countrywise with quantmod package for R?

Is it possible to download stock-data countrywise with quantmod package for R ? Hi, I'm wondering if it's possible to download equities countrywise. Let's say i want all data from the Finnish market....
user19265's user avatar
2 votes
1 answer
1k views

Calculating Quarterly Returns using Daily Prices in R

I am trying to compute quarterly returns with daily stock prices. However, I don't want to use the quantmod function "quarterlyReturn(x)" for each single stock but instead for the whole list of stocks....
Backs's user avatar
  • 31
2 votes
2 answers
842 views

Computing multiple indicators in tidyquant

I am trying to get multiple indicator values such as RSI and EMA for equities using the package tidyquant in R. I tried the example from the vignette which is: ...
geodex's user avatar
  • 123
2 votes
1 answer
703 views

Collect all stock returns in one single matrix using quantmod in R

My problem is similar to the one in this question: how do I loop through all the stocks with quantmod and ttr? To estimate the covariance matrix of stock returns, I need a $NxT$ matrix $X$ of returns ...
Olivier's user avatar
  • 23
2 votes
0 answers
161 views

How to reset indicators in quantstrat / quantmod?

I am currently trying to back test a strategy on a file which contains minutely data for the whole month. I would like to reset my indicators at 3:30 PM . Is there a way I can reset the indicators ...
Yatharth Narang's user avatar
1 vote
1 answer
1k views

negative gamma value for gjr-garch output

I was wondering if anyone could tell me if my model is completely incorrect as I haven't been able to find anything online for this. I am running a Gjr Garch model to measure volatility in gold ...
Ellen Hynes's user avatar
1 vote
1 answer
4k views

Log daily returns of multiple securities for multiple time period in R

I have dataset containing daily closing prices of 5413 companies from 2000 to 2014. I want to calculate daily log returns for the stocks as according to dates as log(Price today/Price yesterday). I ...
Aquarius's user avatar
1 vote
1 answer
357 views

Simulating the Value-at-Risk with $t$ distributed returns

I want to understand how the value at risk and the simulating the VaR with simple Monte Carlo method. But I want just a confirmation and are welcome any comments, since I don't have the full picture ...
user avatar
1 vote
2 answers
543 views

How to find sector/industry and market cap for securities in my portfolio using R?

I am working on a project where I need sector/industry classification and market cap for some securities, many of them are not in SP500, but are part of US market. I am using R for this. I don't have ...
deb's user avatar
  • 146
1 vote
1 answer
2k views

Getting monthly return using quantmod, if input ticker is a variable

I am new to package quantmod and quandl. I encountered a problem while I was trying to fetch period return data. Below is my ...
jsh6303's user avatar
  • 113
1 vote
1 answer
1k views

How to plot custom hourly data into R with quantmod?

I'm trying to get into R because for some personal project, I need R and quantmod to create OHCL charts for me. I'm stuck at the candleChart creation step, and I'm not sure I understand why. Using a '...
RitonLaJoie's user avatar
1 vote
1 answer
592 views

Anomaly or feature from Quantmod in R regarding getFX - currency data

I am using R to analyse stock data, using the quantmod package to get all sorts of data, but here specifically FX data using the function ...
n1k31t4's user avatar
  • 121
1 vote
1 answer
2k views

How to extract all the ticker symbols of an exchange with Quantmod in R?

I am using the Quantmod package in R for some data analysis. Now I can downbload price history of particular stocks or index with the following code:- ...
Deb's user avatar
  • 353
1 vote
0 answers
142 views

ROC -- Output from Calculating Stock Returns Producing Lower Numbers Than Actual

I tried this on stack exchange, but think it is a better question here. I am beginning user and I need help with an error / bad output I am getting when calculating returns (using ROC) on stock ...
SJSU2013's user avatar
0 votes
1 answer
83 views

Berkshire Hathaway ticker symbol B

I want to read the Berkshire Hathaway data using the getSymbols function in the quantmod package in R. The ticker symbol is BRK-B. getSymbols ( "BRK-B" ) ...
Daryl's user avatar
  • 1
0 votes
1 answer
163 views

getQuote function in quantmod package [closed]

just wondering if there is a similar function that I can use to get the last traded price of a stock? Cuz the getQuote function from quantmod package does not seem to be working no more. It would show ...
Bubbles's user avatar
  • 103
0 votes
1 answer
126 views

Inaccurate data from quantmod

For some reason getSymbols is returning inaccurate data for the below symbol. Example for this data in the high column the price went from 35 to 3515 between 2021 feb and 2021 march 16th. ...
Stupid_Intern's user avatar
0 votes
1 answer
3k views

I want to keep a column in getSymbols or get.hist.quote with the Date as as.Date format [closed]

I use getSymbols to download historical information over an environment with 200 tickers but I cannot seem to keep the date information from becoming an index. I ...
Edgar S Martinez's user avatar
0 votes
2 answers
211 views

r: analyse series of historical positions as portfolio using 'standard' tools

I have a series of historical trading positions in the form Symbol OpenPrice OpenDate InvestmentInDollars CloseDate ReturnInDollars I need to evaluate the ...
Darrell Berry's user avatar
0 votes
2 answers
315 views

Calculate return for a set of securities downloaded using quantmod

I downloaded adjusted closing price using quantmod for a set of securities. I want to calculate daily/weekly/monthly return for all securities. Usual dailyReturn, weeklyReturn etc not working. What do ...
deb's user avatar
  • 146
0 votes
1 answer
45 views

How can I fix both the open and close data using quantmod's periodReturns?

I am retrieving data from yahoo using the getSymbols to get then monthly returns. But I want to subset the data, I want to have monthly returns from January 2016 until May 2017. I am running this: <...
Pau Gimeno's user avatar
0 votes
0 answers
1k views

Quantmod - converting daily data to weekly data (changing time intervals from monday to monday)

I'm trying to convert daily data into weekly data, but with the time interval from monday to monday. First I download historical prices from Yahoo: Tickername<-getSymbols("Tickeername",from="...
Neri Kim's user avatar