recieve_dividend: Recieve Dividend payment

Description Usage Arguments Value Examples

View source: R/Income.R

Description

Function updates cash balance and adds record to activity and income records

Usage

1
2
recieve_dividend(pobj, date = Sys.Date(), symbol, quantity = NULL,
  dividend = NULL, amount = NULL, desc = "")

Arguments

pobj

portfolio object

date

date of dividend. Date type

symbol

symbol ticker. character type

quantity

number of shares. numeric type

dividend

dividend per share. numeric type

amount

dollar amount. numeric type

desc

optional description of dividend. string type

Value

updated portfolio object

Examples

1
2
3
4
5
library(tidyverse)
portfolio("new_port") %>%
make_deposit(amount = 2000) %>%
make_buy(symbol = "SPY", quantity = 10, price = 100) %>%
recieve_dividend(symbol = "SPY", quantity = 10, dividend = 2)

chrishaarstick/madstork documentation built on Jan. 3, 2022, 8:34 p.m.