Questions tagged [quantmod]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
45 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 ...
0
votes
1answer
52 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 ...
2
votes
1answer
376 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% ...
0
votes
2answers
115 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 ...
1
vote
1answer
207 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 ...
1
vote
1answer
446 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 ...
0
votes
1answer
39 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: <...
0
votes
0answers
743 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="...
2
votes
1answer
569 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....
2
votes
2answers
457 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: ...
2
votes
0answers
140 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 ...
1
vote
1answer
954 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:- ...
2
votes
2answers
656 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
2
votes
2answers
638 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....
1
vote
1answer
2k 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 ...
1
vote
1answer
511 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 ...
1
vote
0answers
110 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 ...
2
votes
3answers
3k 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 ...
4
votes
3answers
5k 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 ...
0
votes
1answer
2k 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 ...
1
vote
1answer
960 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 '...