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
3
votes
2 answers

how to extract row index from data.frame in R with quantmod package

using the quantmod package, I am pulling stock data, as below library(quantmod) getSymbols('F') head(F) which gives the output F.Open F.High F.Low F.Close F.Volume 2007-01-03 7.56 7.67 7.44 7.51 78671500 2007-01-04 7.56 7.72 …
Liz Young
  • 408
  • 5
  • 17
3
votes
1 answer

Get maximum from xts object using merge function

Hi I'm using R quantmod library and I would like to find and return the maximum of two values (volume today, vs volume yesterday). require(quantmod) getSymbols("HELE") # Ok now when I do this it does not return a single column with the highest #…
Ahdee
  • 4,679
  • 4
  • 34
  • 58
3
votes
2 answers

R: how to avoid explicit names when using a variable

I have the following code in R: library(quantmod) mySymbol = "^STOXX50E" getSymbols(mySymbol, from="2004-01-01", to=Sys.Date()) chartSeries(Cl(STOXX50E)) which simply download the time series for the inder Eurostoxx and then plots the closing…
opt
  • 477
  • 1
  • 10
  • 25
3
votes
1 answer

Quantstrat Multiple Currencies. Possible Bug in Blotter::UpdateAcct?

General info: R-Version: 3.1.0 blotter: 0.8.19 Problem description: I am trying to implement a quantstrat account which uses multiple portofolios with different currencies. So here's my basic setup: 1 account in EUR 1 portfolio in USD So in order…
Buggy
  • 2,050
  • 21
  • 27
3
votes
0 answers

Quanstrat - chain and OCO orders

I have a simple strategy that: enters long when the rolling volume sum of last 5 seconds is higher or equal to 20. submits a 1% take-profit order when entering long, and submits a -1% stop-loss order when entering long. The first entry order is…
Steef Gregor
  • 544
  • 1
  • 7
  • 21
3
votes
1 answer

How to fetch 3-years historical price serie from Oanda with R?

I would like to process Bitcoin price in R but I'm unable to download time serie from Yahoo and Google. From Yahoo the BTCUSD historical time serie is missing and the Google doesn't recognize the URL formated by getSymbols when symbol is…
Florent
  • 1,791
  • 22
  • 40
3
votes
3 answers

Retrieve monthly Adjusted stock quotes using the quantmod package in R

I'm learning R this semester and this is my first assignment. I want to retrieve monthly Adjusted stock quotes within a set date range using a for loop. And once I am able to do that I want to merge all the data into a data frame. My code so far…
user4187141
3
votes
3 answers

QuantMod getOptionChain "subscript out of bounds" error

I am trying to use the function getOptionChain() from the QuantMod library to download option chains for VIX, SP500 and Eurostoxx 50 but the following doesn't work: library(quantmod) VIX.OPT <- getOptionChain("^VIX") I'm getting this error: Error…
opt
  • 477
  • 1
  • 10
  • 25
3
votes
2 answers

Does chart_Series() work with logarithmic axis?

Is there a way to produce logarithmic y-axis with chart_Series()? I am using the experimental chart_Series() rather than the chartSeries() method in quantmod, because it is more convenient when adding additional lines to the…
3
votes
0 answers

Simple intraday signal processing code in quantstrat package

I'm new to R and quantstrat, so I appreciate your patience. I note that a lot of the demo / example files around the web for quantstrat give great examples using TA rules. My Question / TL;DR How can I construct a simple intraday threshold crossing…
rStack
  • 31
  • 1
3
votes
2 answers

Rbind with XTS. How to stack without sorting by index date

I am using quantmod which generates XTS objects with ticker info, and I am looking to compile/stack a bunch of XTS documents on top of each other to process code. Using Rbind with XTS I find that it does not stack XTS on top of each other, rather…
3
votes
1 answer

get Symbols quantmod OHLC currency data

I am trying to retrieve the OHLC Price data for currency pairs. As you can see below I have managed to get the Close price for a defined period of time. Ideally I would also like the Open, High and Low prices too. From there I aim to analyse the…
user3740289
  • 265
  • 3
  • 15
3
votes
1 answer

R quantmod chartSeries newTA chob - modify legend and axis (primary and secundary)

This is an advanced question. I use my own layout for the chartSeries quantmod function, and I can even create my own newTA. Everything works fine. But ... What I want to do but I can't: a) Manipulate the legend of each of the 3 charts: - move…
luis_js
  • 611
  • 5
  • 11
3
votes
2 answers

Accessing objects of environment in R using quantmod library

I have some experience in R but so far never used my own environment. Over the last months I had to use my own environment from time to time and I have some questions about it. The main reason for using an environment as "data-container"…
math
  • 1,868
  • 4
  • 26
  • 60
3
votes
1 answer

Is get.hist.quote() still returning data with source=yahoo finance?

HNY. As the question in the subject line implies, I'm getting errors trying to use the tseries package function get.hist.quote(). Can anyone shed light on my calling it incorrectly, or in a change of its signature/functionality? I noticed these…
StatsViaCsh
  • 2,600
  • 10
  • 44
  • 63