incur_fee: Incur Fee function

Description Usage Arguments Details Value Examples

View source: R/Activity.R

Description

incurr fee on a portfolio. fees could be transaction or management fees

Usage

1
incur_fee(pobj, date = Sys.Date(), amount, desc = "")

Arguments

pobj

portfolio object

date

date of activity. Date type

amount

activity dollar amount. numeric type

desc

activity description. string type

Details

subtracts fee amount from cash balance and adds record to actvity

Value

updated portfolio object

Examples

1
2
3
4
library(tidyverse)
portfolio("new_port") %>%
make_deposit(amount = 100) %>%
incur_fee(amount = 50)

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