blotter: Tools for Transaction-Oriented Trading Systems Development

Transaction infrastructure for defining instruments, transactions, portfolios and accounts for trading systems and simulation. Provides portfolio support for multi-asset class and multi-currency portfolios. Actively maintained and developed.

AuthorPeter Carl [aut], Brian G. Peterson [aut, cre], Daniel Cegielka [ctb], Dirk Eddelbuettel [ctb], Jan Humme [ctb], Lance Levenson [ctb], Ben McCann [ctb], Jeff Ryan [ctb], Garrett See [ctb], Joshua Ulrich [ctb], Wolfgang Wu [ctb]
Date of publication2016-04-03 14:22:28
MaintainerBrian G. Peterson <>

View on R-Forge

Man pages

AcctReturns: Calculate account returns

addAcctTxn: Add capital account transactions, such as capital additions...

addDiv: Add cash dividend transactions to a portfolio.

addPortfInstr: add an instrument to a portfolio

addTxn: Add transactions to a portfolio.

amzn: Hypothetical Intra-Day AMZN Trades

blotter-package: Tools for Transaction-Oriented Trading Systems Development

calcPortfWgt: Calculates the portfolio weights for positions within a given...

calcPosAvgCost: Calculates the average cost of a resulting position from a...

calcTxnAvgCost: Calculates a per share or per contract cost of the...

calcTxnValue: Calculates the total value of a transaction or trade

chart.ME: Chart Maximum Adverse/Favorable Excursion

chart.Posn: Chart trades against market data, position through time, and...

chart.Reconcile: Chart trades against market data, position through time, and...

chart.Spread: Charts the transaction series, positions, and P&L of a spread...

dailyTxnPL: generate daily Transaction Realized or Equity Curve P&L by...

extractTxns: Extract transactions from a portfolio

getAccount: Get an account object from the .blotter environment

getByPortf: get attributes from each portfolio in an account

getBySymbol: Retrieves calculated attributes for each position in the...

getEndEq: Retrieves the most recent value of the capital account

getPortfAcct: get a protfolio in an account

getPortfolio: get a portfolio object

getPos: Retrieves all information about the position as of a date

getPosAvgCost: Retrieves the most recent average cost of the position

getPosQty: gets position at Date

getTxns: Retrieve transactions and their attributes.

IBM: IBM stock price data for one month

initAcct: Constructs the data container used to store calculated...

initPortf: Initializes a portfolio object.

initPosPL: initializes position P&L for a portfolio instrument

initSummary: initialize the summary table used in portfolio and account...

initTxn: Constructs the data container used to store transactions and...

is.account: generic is.function for account, will take either a string or...

is.portfolio: generic is.function for portfolio, will take either a string...

pennyPerShare: Example TxnFee cost function

perTradeStats: calculate flat to flat per-trade statistics

PortfReturns: Calculate portfolio instrument returns

put.account: put a account object in .blotter env

put.portfolio: put a portfolio object in .blotter env

tradeQuantiles: quantiles of per-trade stats

tradeStats: calculate statistics on transactions and P&L for a symbol or...

updateAcct: Constructs the equity account calculations from the portfolio...

updateEndEq: update ending equity for an account

updatePortf: update Portfilio P&L over a Dates range

updatePosPL: Calculates position PL from the position data and...


AcctReturns Man page
addAcctTxn Man page
addDiv Man page
addPortfInstr Man page
addTxn Man page
addTxns Man page
amzn Man page
amzn.trades Man page
blotter Man page
blotter-package Man page
calcPortfWgt Man page
.calcPosAvgCost Man page
.calcTxnAvgCost Man page
.calcTxnValue Man page
chart.ME Man page
chart.Posn Man page
chart.Reconcile Man page
chart.Spread Man page
dailyEqPL Man page
dailyStats Man page
dailyTxnPL Man page
extractTxns Man page
getAccount Man page
.getByPortf Man page
.getBySymbol Man page
getEndEq Man page
.getPortfAcct Man page
getPortfolio Man page
.getPortfolio Man page
getPos Man page
.getPosAvgCost Man page
getPosQty Man page
getTxns Man page
IBM Man page
initAcct Man page
initPortf Man page
.initPosPL Man page
.initSummary Man page
.initTxn Man page
is.account Man page
is.portfolio Man page
pennyPerShare Man page
perTradeStats Man page
PortfReturns Man page
put.account Man page
put.portfolio Man page
tradeQuantiles Man page
tradeStats Man page
updateAcct Man page
updateEndEq Man page
updatePortf Man page
.updatePosPL Man page


blotter/R/AcctReturns.R blotter/R/PortfReturns.R blotter/R/addAcctTxn.R blotter/R/addPortfInstr.R blotter/R/addTxn.R blotter/R/blotter-package.R blotter/R/calcPortfWgt.R blotter/R/calcPosAvgCost.R blotter/R/calcTxnAvgCost.R blotter/R/calcTxnValue.R blotter/R/chart.ME.R blotter/R/chart.Posn.R blotter/R/chart.Reconcile.R blotter/R/chart.Spread.R blotter/R/extractTests.R blotter/R/getAccount.R blotter/R/getByPortf.R blotter/R/getBySymbol.R blotter/R/getEndEq.R blotter/R/getPortfAcct.R blotter/R/getPortfolio.R blotter/R/getPos.R blotter/R/getPosAvgCost.R blotter/R/getPosQty.R blotter/R/getTxn.R blotter/R/initAcct.R blotter/R/initPortf.R blotter/R/initPosPL.R blotter/R/initSummary.R blotter/R/initTxn.R blotter/R/mcsim.R blotter/R/perTradeStats.R blotter/R/put.account.R blotter/R/put.portfolio.R blotter/R/tradeStats.R blotter/R/updateAcct.R blotter/R/updateEndEq.R blotter/R/updatePortf.R blotter/R/updatePosPL.R
blotter/man/AcctReturns.Rd blotter/man/IBM.Rd blotter/man/PortfReturns.Rd blotter/man/addAcctTxn.Rd blotter/man/addDiv.Rd blotter/man/addPortfInstr.Rd blotter/man/addTxn.Rd blotter/man/amzn.Rd blotter/man/blotter-package.Rd blotter/man/calcPortfWgt.Rd blotter/man/calcPosAvgCost.Rd blotter/man/calcTxnAvgCost.Rd blotter/man/calcTxnValue.Rd blotter/man/chart.ME.Rd blotter/man/chart.Posn.Rd blotter/man/chart.Reconcile.Rd blotter/man/chart.Spread.Rd blotter/man/dailyTxnPL.Rd blotter/man/extractTxns.Rd blotter/man/getAccount.Rd blotter/man/getByPortf.Rd blotter/man/getBySymbol.Rd blotter/man/getEndEq.Rd blotter/man/getPortfAcct.Rd blotter/man/getPortfolio.Rd blotter/man/getPos.Rd blotter/man/getPosAvgCost.Rd blotter/man/getPosQty.Rd blotter/man/getTxns.Rd blotter/man/initAcct.Rd blotter/man/initPortf.Rd blotter/man/initPosPL.Rd blotter/man/initSummary.Rd blotter/man/initTxn.Rd blotter/man/is.account.Rd blotter/man/is.portfolio.Rd blotter/man/pennyPerShare.Rd blotter/man/perTradeStats.Rd blotter/man/put.account.Rd blotter/man/put.portfolio.Rd blotter/man/tradeQuantiles.Rd blotter/man/tradeStats.Rd blotter/man/updateAcct.Rd blotter/man/updateEndEq.Rd blotter/man/updatePortf.Rd blotter/man/updatePosPL.Rd

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.