addDiv: Add cash dividend transactions to a portfolio.

View source: R/addTxn.R

addDivR Documentation

Add cash dividend transactions to a portfolio.

Description

Adding a cash dividend does not affect position quantity, like a split would.

Usage

addDiv(Portfolio, Symbol, TxnDate, DivPerShare, ..., TxnFees = 0,
  ConMult = NULL, verbose = TRUE)

Arguments

Portfolio

A portfolio name that points to a portfolio object structured with initPortf.

Symbol

An instrument identifier for a symbol included in the portfolio, e.g., IBM.

TxnDate

Transaction date as ISO 8601, e.g., '2008-09-01' or '2010-01-05 09:54:23.12345'.

DivPerShare

The amount of the cash dividend paid per share or per unit quantity.

...

Any other passthrough parameters.

TxnFees

Fees associated with the transaction, e.g. commissions. See Details.

ConMult

Contract or instrument multiplier for the Symbol if it is not defined in an instrument specification.

verbose

If TRUE (default) the function prints the elements of the transaction in a line to the screen, e.g., "2007-01-08 IBM 50 @ 77.6". Suppress using FALSE.

Note

# TODO add TxnTypes to $txn table

# TODO add AsOfDate


braverock/blotter documentation built on Feb. 13, 2023, 1 p.m.