transfer_in: Transfer In Holdings function

Description Usage Arguments Value Examples

View source: R/Trades.R

Description

Function adds holding from portfolio without a cash transaction

Usage

1
2
transfer_in(pobj, date = Sys.Date(), symbol, quantity, price,
  desc = "")

Arguments

pobj

portfolio object

date

date of transaction. Date type

symbol

symbol ticker. character type

quantity

number of shares. numeric type

price

price of shares. numeric type

desc

trade description. string type

Value

updated portfolio object

Examples

1
2
3
4
library(tidyverse)
 p1 <- portfolio("new_port") %>%
       make_deposit(Sys.Date(), amount = 2000) %>%
       transfer_in(Sys.Date()-1, symbol = "SPY", quantity = 10, price = 100)

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