Questions tagged [blotter]

blotter is an R package typically used with the R package quantstrat (as a dependency package for quantstrat). Blotter provides transaction-oriented infrastructure for constructing transactions, portfolios and accounts for trading systems and simulation in R. blotter is under active development at https://github.com/braverock/blotter

71 questions
0
votes
0 answers

R blotter package initPosQty usage

In the following simple example, the portfolio has an initial short position of 50 shares of IBM on 01-02, the position is covered on 01-04. blotter showed a realized pnl of -4855. This is unexpected. It looks like blotter assumes the initial 50…
Jim Green
  • 261
  • 4
  • 10
0
votes
1 answer

R error: initPortf subassignment issue

I keep getting the following error when running this code, anyone know how to fix it?: library(blotter) getSymbols('BP;AAPL') symbols <- c(BP, AAPL) initDate = "1990-01-01" portfolio.st <- "mas" initPortf(portfolio.st, symbols = symbols, initDate =…
Jolien .A
  • 173
  • 3
  • 18
0
votes
0 answers

Cant install blotter package

Im at a complete loss and have tried several solutions suggested by others on StackOverflow. I struggled to install quanstrat and eventually managed to get thsi sorted out with @MrFlick's help. However, quanstrat needs the package blotter to be…
NMRQL
  • 65
  • 1
  • 6
0
votes
1 answer

R Packages Blotter and Quantstrat: Extend framework to implement signal based on fundamental data?

I am looking for a way to extend Quantstrat in order to fetch data from bloomberg using the rbbg package and to backtest strategies based on indicators which are calculated using fundamental data. Is there any documentation on what's the best way to…
Ueli Hofstetter
  • 2,409
  • 4
  • 29
  • 52
0
votes
1 answer

Add a new stock to an existing portfolio?

I'm working on a rotational strategy using blotter. The architecture of it is sort of one account, 8 portfolios, 100 markets. The code looks for markets getting stronger, looks in the portfolio for holdings getting weaker, sells the weak, buys the…
LGTrader
  • 2,349
  • 4
  • 23
  • 29
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
-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

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
1 2 3 4
5