settle_tax_liability: Settle Portfolio Tax Liability

Description Usage Arguments Value Examples

View source: R/Portfolio.R

Description

Function to settle the tax liabilty. Option to make cash withdraw and add to portfolio activity

Usage

1

Arguments

pobj

portfolio object

date

date of transaction. default is current date

amount

amount of tax settlement

withdraw

logical option to make a cash withdraw from portfolio

Value

updated portfolio object

Examples

1
2
3
4
5
6
library(tidyverse)
portfolio("new_port") %>%
 make_deposit(amount = 2000) %>%
 make_buy(Sys.Date()-1, symbol = "SPY", quantity = 10, price = 100) %>%
 make_sell(id = 1, quantity = 5, price = 105) %>%
 settle_tax_liability(amount = 7.5, withdraw = TRUE)

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