Questions tagged [quantstrat]

quantstrat is a quantitative strategy framework for R

quantstrat (an R package) provides a generic infrastructure to model and backtest signal-based quantitative trading strategies. It is a high-level abstraction layer (built on the R packages xts, FinancialInstrument, blotter, etc.) that allows you to build and test strategies in very few lines of code. quantstrat is still under development but is used on real portfolios.

The latest codebase for quantstrat and blotter is at:

https://github.com/braverock/quantstrat

https://github.com/braverock/blotter

274 questions
0
votes
1 answer

R: Quantstrat examples of Guy Yollin. Indicators necessary? And what is stored in these financial instruments?

Hi I'm working through this code (this works and is reproducible) if (!exists('.blotter')) .blotter <- new.env() if (!exists('.strategy')) .strategy <- new.env() if (!exists('.instrument')) .instrument <-…
MichiZH
  • 5,587
  • 12
  • 41
  • 81
0
votes
1 answer

R blotter: Posn before any position is opened generates an error

I'm trying to backtest a trading strategy using blotter. After a long search I've found out that the error is only as long as no trade has taken place and no position is opened. Before any trade is opened Posn is listed in the Workspace of RStudio…
MichiZH
  • 5,587
  • 12
  • 41
  • 81
0
votes
1 answer

R: Quantstrat example Guy Yollin

I'm working through Guy Yollin slides for quanstrat blotter etc. Here's the code I'm trying to execute: #According to quantstrat lectures 1-3 von Guy…
MichiZH
  • 5,587
  • 12
  • 41
  • 81
0
votes
1 answer

Upgraded quantstrat 0.7.8 from 0.7.7 then old code does not work

I have upgraded quantstrat package from 0.7.7(installed on Jan 7th 2013) to 0.7.8, however old code does not work properly. looks like we can not put any entry orders niether buy or sell, and only exit orders are executed. Here is the detail.…
0
votes
1 answer

quantstrat in R, stoplimit order does not work properly when market is gapped open through stop level

Assuming that I have long position with stop sell level at 75, previous day's OHLC was 95,100, 80,85. Today market gapped down and opened at 65, and finally OHLC was 65,70,55,60. In this case if I put stoplimit order at 75, it is never filled. If I…
0
votes
1 answer

quantstrat demos error

I've installed quantsrat and tried the demos to get a better understanding of the way it works but all them end up with errors. For example for RSI, I get Error in rbind(deparse.level, ...) : data must have same number of columns to bind by row…
patzoul
  • 49
  • 2
  • 6
0
votes
1 answer

Comparing previous values using min and tail in R using quantstrat

I am trying to write my own signal function in quantstrat. The logic I am struggling with is the same as is used in other R operations. data[,colNums[1]] etc. returns a vector of values. sigPair <- function( label, data = mktdata, columns ) { …
nikke
  • 111
  • 8
-1
votes
1 answer

Going crazy trying to install Quantstrat

I am trying to install quanstrat. So far I have downloaded Rtools35 I am using R 3.5.1 when i use the code devtools::install_github("braverock/blotter") I receive this error Downloading GitHub repo braverock/blotter@master Error: Could not…
Jordan Wrong
  • 1,205
  • 1
  • 12
  • 32
-1
votes
3 answers

Tried Everying, Searched Everything, Issues installing Quantstrat package from Github

Installing Quantstrat Issues. I am running the latest versions of R, RStudio, and Rtools. I have installed devtools / remotes packages and cannot seem to get quantstrat installed. enter image description here
-1
votes
1 answer

R with no transactions/positions to chart

I am working on blotter and quantstrat. I am wondering why there is an error info that keep showing no transactions/positions to chart. Could you please offer me some help? #### Set up packages we need to use below …
-1
votes
1 answer

Cryptocurrency bitcoin back testing returns

I want to know the USD returns while back testing crypto pairs. For example backtesting BTC_ETH will show returns in BTC, but i want the relative USD returns. (as USD_BTC will be changing over the time series) I'm thinking i need both time series…
GeV 126
  • 351
  • 1
  • 3
  • 14
-1
votes
1 answer

object mktdata not found

I believe this is a formatting issue with my indicator. Can someone tell me what im doing wrong here? #....omitted the portfolio initialization above #returns change from past day, or NA if one of the values is…
Rilcon42
  • 9,584
  • 18
  • 83
  • 167
-1
votes
1 answer

Quantstrat and Windows

I've looked at previous correspondence, have followed the advice but am still unable to install quantstrat and blotter. I'm at a loss. Perhaps I've missed a previous post which would help and would be grateful if someone could point me in the right…
Farmer George
  • 47
  • 1
  • 2
  • 8
-2
votes
1 answer

Calculate average return of strategy

Scenario (using quantstrat, blotter and portfolioanalytics) I have 10k initial equity I have a strategy that i want to backtest over 3000 symbol universe (stocks) Let say the strategy is a simple MA crossover Every time i get a buy crossover I buy…
GeV 126
  • 351
  • 1
  • 3
  • 14
-2
votes
1 answer

How to choose appropriate version of R to work with quantstrat and blotter packages?

Should I worry about the compatibility between the latest R with the latest quantstrat and blotter packages? At the time when I wrote this question, the latest blotter was updated 2016-01-16 15:48:02+01, the latest quantstrat was updated on…
Daniel
  • 1,428
  • 3
  • 16
  • 35
1 2 3
18
19