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
Questions tagged [blotter]
71 questions
4
votes
0 answers
How do blotter/quantstrat/quantmod/performanceanalytics handle internal cashflows and expiring instruments?
I don't understand how internal cashflows are handled in blotter/quantstrat/quantmod/performanceanalytics. This mainly concerns two aspects: Regular cashflows like dividends, coupons etc. as well as cashflows from expiring instruments (e.g. a cash…

Ueli Hofstetter
- 2,409
- 4
- 29
- 52
3
votes
0 answers
Multicurrency strategy - Blotter & Quantstrat
I would want to rebound on this thread
http://r.789695.n4.nabble.com/Multi-currency-example-for-blotter-td1692132.html
Basically, I'm backtesting a strategy using quantstrat where I have instruments in several currencies but I would want an…

NicolasB
- 83
- 5
3
votes
1 answer
Add Technical Indicator to chart.Posn
For some reason I cannot add a ROC signal to a blotter chart. In the documentation it should be allowed. I want to create a new chart bellow with this indicator.
Can someone help?
# plot performance for symbol
chart.Posn(strategy_AbsMom, Symbol =…

husvar
- 373
- 1
- 3
- 13
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
2 answers
Guy Yollin's QuantStrat I lecture issue
I've been going through Guy's quantstrat lecture (link below) and after repeatedly attempting to re-execute the code, I'm getting a few initial errors that are preventing most of the subsequent code in the lecture from functioning.
Here is the code…
user1462733
3
votes
1 answer
backtest simple strategies using R
I am looking to do simple backtesting that could properly keep track of pnl, rebalance portfolio, liquidate etc. I need it to do things a bit differently than backtest. That is, backtest splits things up by quntile and the sort. I would like a more…

Alex
- 19,533
- 37
- 126
- 195
3
votes
0 answers
(R, Blotter) How to change color of trade markers on the chart when using chart.Posn() API?
Context:
I have a list of transactions (trades) in a csv file. I like to import these transactions into R and then plot the trades on the chart so that I can see visually the entries and exits. I finally figured the import part (from amzn_test.R in…

Atrad
- 85
- 6
3
votes
1 answer
R Blotter demo not working under linux
I am looking to run the r blotter demo program under linux, and get the following error when I run demo(amzn_test)
> # update the portfolio stats
> updatePortf("amzn_port",Dates="2010-01-14")
Error in if (nzchar(intervals[1])) s <-…

Generalenthu
- 107
- 1
- 7
2
votes
1 answer
Add text label near the position arrows in chart.Posn () function of blotter
Is it possible to add texts like "BUY" and "SELL" near the green and red arrows in chart.Posn() function. (not with manual trial of coordinates, I need an automatic solution) I have changed the source code of function a bit and increased the size of…

Serhat Akay
- 115
- 10
2
votes
2 answers
How to Write a Custom Rule Function for Quantstrat in R - Replace trailing stop order with stoplimit with ruleOrderProc
My goal is to use the rule that I outline below to generate a signal to place a new 'stoplimit' order that replaces my trailing stop. I don't want my stop to trail indefinitely, only until it reaches my breakeven price (if this can be achieved…

Jared Marks
- 948
- 8
- 15
2
votes
1 answer
saving and loading blotter portfolio
I am using blotter to hold and do the accounting of some transactions, but I would need to save and load them on a daily basis.
I haven´t been able to save my transactions, I believe that that happens because they are in a different enviroment…

Augusto
- 51
- 1
- 6
2
votes
2 answers
Installing Quantstrat in a recently updated R in Fedora Linux
I have updated my Fedora Distribution recently, and R was updated too. I re installed most of the packages, but I couuldnt install blotter and quantstrat.
How can I solve this issue? Thank you!
The error I get is the following…

santi_oberto
- 23
- 4
2
votes
1 answer
Keep getting the "dims do not match the length of object" in quantstrat
I have been modifying a backtest I made a few months ago using quantstrat. It was all working fine until I added in signal and rule 6 (donchian channel low)
My full code is below. Any help would be greatly appreciated.
Thanks in advance.
PS: Sorry…

Cameron Giles
- 72
- 1
- 8
2
votes
0 answers
Tradestats for whole portfolio
I am using R / Quantstrat for backtesting and it all works well.
I have a strategy which only generates a few trades per year for a symbol, but I have many symbols in my portfolio.
I like the statistics generated by the tradeStats() function,…

Sebastian Stuecker
- 113
- 5
2
votes
1 answer
Using the addDiv(command) in R from quantstrat/blotter
What is the format for using the addDiv command in R? I know how to use the function as far as inputs go, but I can't figure out where it should be placed beyond a general idea. Do I place it after where I instantiate the portfolio? Below is the…

user5145790
- 21
- 1