blotter-package |
Portfolio and transaction infrastructure for trading |
.calcPosAvgCost |
Calculates the average cost of a resulting position from a transaction |
.calcTxnAvgCost |
Calculates a per share or per contract cost of the transaction to match the units the price is quoted in |
.calcTxnValue |
Calculates the total value of a transaction or trade |
.getByPortf |
get attributes from each portfolio in an account |
.getBySymbol |
Retrieves calculated attributes for each position in the portfolio |
.getPortfAcct |
get a protfolio in an account |
.getPortfolio |
get a portfolio object |
.getPosAvgCost |
Retrieves the most recent average cost of the position |
.initPosPL |
initializes position P&L for a portfolio instrument |
.initSummary |
initialize the summary table used in portfolio and account lists |
.initTxn |
Constructs the data container used to store transactions and resulting positions. |
.updatePosPL |
Calculates position PL from the position data and corresponding close price data. |
AcctReturns |
Calculate account returns |
addAcctTxn |
Add capital account transactions, such as capital additions and withdrawals or interest income (expense) |
addDiv |
Add cash dividend transactions to a portfolio. |
addPortfInstr |
add an instrument to a portfolio |
addTxn |
Add transactions to a portfolio. |
addTxns |
Add transactions to a portfolio. |
amzn |
Hypothetical Intra-Day AMZN Trades |
amzn.trades |
Hypothetical Intra-Day AMZN Trades |
blotter |
Portfolio and transaction infrastructure for trading |
calcPortfWgt |
Calculates the portfolio weights for positions within a given portfolio. |
chart.ME |
Chart Maximum Adverse/Favorable Excursion |
chart.Posn |
Chart trades against market data, position through time, and cumulative P&L |
chart.Reconcile |
Chart trades against market data, position through time, and cumulative P&L |
chart.Spread |
Charts the transaction series, positions, and P&L of a spread against prices |
dailyEqPL |
generate daily Transaction Realized or Equity Curve P&L by instrument |
dailyStats |
calculate statistics on transactions and P&L for a symbol or symbols in a portfolio or portfolios |
dailyTxnPL |
generate daily Transaction Realized or Equity Curve P&L by instrument |
extractTxns |
Extract transactions from a portfolio |
getAccount |
Get an account object from the .blotter environment |
getEndEq |
Retrieves the most recent value of the capital account |
getPortfolio |
get a portfolio object |
getPos |
Retrieves all information about the position as of a date |
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 account values such as aggregated P&L, equity, etc. |
initPortf |
Initializes a portfolio object. |
is.account |
generic is.function for account, will take either a string or an object |
is.portfolio |
generic is.function for portfolio, will take either a string or an object |
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 symbols in a portfolio or portfolios |
updateAcct |
Constructs the equity account calculations from the portfolio data and corresponding close prices. |
updateEndEq |
update ending equity for an account |
updatePortf |
update Portfilio P&L over a Dates range |