Description Usage Arguments Value Examples
Function to settle the tax liabilty. Option to make cash withdraw and add to portfolio activity
1 | settle_tax_liability(pobj, date = Sys.Date(), amount, withdraw = FALSE)
|
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 |
updated portfolio object
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.