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
8
votes
1 answer

How to draw a line on chartSeries plot using quantmod?

I would like to produce a plot like this https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20110826/19da3834/attachment.png using quantmod. I am a bit frustrated with, I guess, a very simple task. I would like to be able to draw a line on the…
Samo
  • 2,065
  • 20
  • 41
8
votes
0 answers

quantmod::getSymbols() cannot retrieve data from Yahoo Finance

Update: April 29, 2022 As per this discussion in Github, Joshua Ulrich had uploaded a patch into Github which resolves the issue. The issue was with Yahoo website having stopped to provide the crumb(s) that were expected by the new.session() but not…
whereupon
  • 81
  • 2
8
votes
1 answer

quantmod::chart_Series and mapply gives error with chart parameters

How do I use MoreArgs properly with chart_Series? p.txt s,n ABBV,AbbVie BMY,Bristol LLY,EliLily MRK,Merck PFE,Pfizer sof.r # R --silent --vanilla <…
AG1
  • 6,648
  • 8
  • 40
  • 57
8
votes
1 answer

R Statistics: Average True Range Trailing Stop indicator

I am using the following article: marintrading.com/106VERV.PDF to create the Average True Range Trailing Stop indicator in R. I have tried various ways to do this, including for loops, pmin and creating a lagging time series, and nothing seems to…
Jessica
  • 83
  • 1
  • 3
8
votes
1 answer

What is the fastest and/or better way to use getSymbols()? To get each equity separate or all together?

Let's assume that you would like to get the data from a lot of equities (>100) from Yahoo and Alpha Vantage (AV) since 2000. I was wondering if somebody did investigate any of the following 2 questions: 1) What is faster when using getSymbols()? To…
H.L.
  • 699
  • 6
  • 12
8
votes
1 answer

How to find Support/Resistance Levels using R

I have not found any good answers on how to go about finding Support/Resistance levels in R. Essentially I would like clusters/areas or pivots where the stock is consolidating, but have found it difficult to do so. # loads quatmod &…
Rime
  • 912
  • 2
  • 11
  • 39
8
votes
1 answer

fixing interpolation over volatility surface graph in R programming

This script below pulls yahoo data via a function in quantmod, then massages the data around to forumalate a 3D graph with RGL library, attached is a ggplot to show the data i'm trying to create a surface with in separate line geoms . the issue is…
cdcaveman
  • 175
  • 1
  • 14
8
votes
3 answers

Vertical Histogram

I'd like to do a vertical histogram. Ideally I should be able to put multiple on a single plot per day. If this could be combined with quantmod experimental chart_Series or some other library capable of drawing bars for a time series that would be…
Dave
  • 2,386
  • 1
  • 20
  • 38
8
votes
1 answer

ggplot2: highlight chart area

I am working with some time series data and would like to highlight chart area whenever certain conditions become true. For example: require(ggplot2) require(quantmod) initDate <- "1993-01-31" endDate <- "2012-08-10" symbols <-…
user1234440
  • 22,521
  • 18
  • 61
  • 103
8
votes
1 answer

quantstrat in R: Setting a date based exit signal

Much of quantstrat and the accompanying examples seem to be set around entering and exiting trades by crossing some kind of technical indicator. However, let's say you have an arbitrary indicator which you're using to trigger an entry to the trade,…
n.e.w
  • 1,128
  • 10
  • 23
7
votes
2 answers

R/quantmod: multiple charts all using the same y-axis

I'm trying to plot 6 days of intraday data as 6 charts. Quantmod's experimental chart_Series() function works with par() settings. I've pre-loaded the data into bars (a vector of XTS objects) so my code looks like this: par(mfrow=c(3,2)) #3 rows,…
Darren Cook
  • 27,837
  • 13
  • 117
  • 217
7
votes
1 answer

How to add heatmap to quantmod::chart_Series?

I would like to plot heatmap(s) below quantmod::chart_Series(). How to add the below heatmap to chart_Series (or xts::plot.xts): library(quantmod) # Get data fro symbol from Google Finance symbol <- "SPY" src <- "google" from <-…
Samo
  • 2,065
  • 20
  • 41
7
votes
1 answer

How can i see all available data series from quantmod package?

How to show which list of all quotes / data series available for example with getSymbols from Yahoo?
Dwa Winka
  • 71
  • 1
  • 2
7
votes
1 answer

What is the correct way to do a multi time frame strategy with quantstrat?

Here is an example of a multi-timeframe strategy I'm working on with quantstrat. Is this the correct way of doing a multi-timeframe strategy or am I doing it all wrong? I haven't come across any other examples doing multi-timeframe in the quantstrat…
GeV 126
  • 351
  • 1
  • 3
  • 14
7
votes
1 answer

Quantmod, getSymbols error trying to replicate answer

I just downloaded the package Quantmod and have been playing with getSymbols. I want to be able to get data for multiple stocks as in this question: getSymbols and using lapply, Cl, and merge to extract close prices. Unfortuantely, when I try to…
user2492310
  • 89
  • 1
  • 8
1
2
3
78 79