Questions tagged [quantmod]

quantmod is a package for R designed to assist quantitative traders in the development, testing, and deployment of statistically based trading models.

quantmod is an package for quantitative financial modelling and trading framework. The package is designed to assist quantitative traders in the development, testing, and deployment of statistically based trading models.

Repositories

Other resources

Related tags

1182 questions
-2
votes
1 answer

Hello, I have a problem when I try to creating heatmap. It just won't show

I try to create heatmap in R using ggplot where I want the X-axis to be the date and Y-axis to be the return. I exported a stock data using quantmod and I calculated the daily returns. This is my…
Restu
  • 3
  • 2
-2
votes
1 answer

Quantmod function OpCl

I am confused about these quantmod functions. If I make an OpCl column and manually create another by Diff <- (GBPUSD$Close - GBPUSD$Open) the two columns are different. How is OpCl calculated?
-2
votes
2 answers

Swing high and low from Pine to R

I am trying to translate a Swing High and Low function from Pine to R, and I cannot really get the logic behind the Pine code. Basically, this function loops over a time series database of high and low prices, and yields: A swing high: as the…
Camilo
  • 153
  • 7
-2
votes
2 answers

filter date index in xts format

I download some rates from FRED, how I can filter the index date in order to keep only the dates after '2010' ?
pRo
  • 89
  • 12
-2
votes
1 answer

Cumulative compound stock returns

I need to create holding returns on 100USD from 3 different stocks. I made a data frame containing stocks GE, IBM and index NYA taken from yahoo: stocks <- as.xts(data.frame(GE = GE[,6], IBM = IBM[,6], NYA = NYA[,6])) Then, I found their…
-2
votes
4 answers

importing financial statements from getFin() to data.frame or data.table?

the getFin() function returns an object of type "financials". which contains a list of lists. getFin("AAPL") structure of resulting object i need to create tables for each of the following: Balance Sheet Income Statement Cash Flow End goal is…
pranav
  • 96
  • 2
  • 9
-2
votes
1 answer

Replace list of permutations with getSymbols data in R

I downloaded some stock data: require("quantmod") s <- c("AAPL", "ADBE", "ADI", "ADP", "ADSK") e <- new.env() getSymbols(s, src='yahoo', from='2015-01-10', env = e ) #get closing prices close <- do.call(merge, eapply(e, function(x) Cl(x))) I…
Rhodo
  • 1,234
  • 4
  • 19
  • 35
-2
votes
1 answer

Plot Timeseries ts object in R

How to plot ts object. month in x axis and monthly.returns in y axis for each year in same graph. please find the code that i am using. stock<-"^GSPC" getSymbols(stock,from = "2000-01-01",to =…
-2
votes
2 answers

R in quantmod error

x=read.csv(file.choose()) head(x) Date Open High Low Close Volume 1 2013/1/2 13257 13289 13162 13194 168353 2 2013/1/3 13195 13198 13055 13055 242457 3 2013/1/4 13050 13100 13005 13079 256215 4 2013/1/7 13085 13128 13025 13126 228488 5…
-3
votes
1 answer

R getsymbols from csv file

I am trying to use getSymbols (quantmod) package in R to download stock prices from a list of stocks that I have in a .csv file. I have the .csv file imported into R but unsure on how to use getSymbols to read from a .csv file So I have my list of…
user1016078
  • 103
  • 1
  • 4
  • 14
-4
votes
1 answer

Is there an R function to read Company's names off Yahoo Finance

Curious if it is possible to input a list of company names like c("Netflix", "Tesla", "Apple") and it returns the associated Ticker names such as c("NFLX", "TSLA", "AAPL") which I can then input into a function I created which returns the current…
sdda
  • 1
  • 1
-5
votes
1 answer

Query in back-testing strategy in R- Indian trader perspective

There is a documentation for backtesting in R in GitHub(https://timtrice.github.io/backtesting-strategies/). I have a query in two lines of code mentioned in this document…
Praveen Kumar-M
  • 223
  • 2
  • 10
1 2 3
78
79