update_holdings_market_value: Updated Porfolio Holding's Market Value

Description Usage Arguments Value Examples

View source: R/Portfolio-update.R

Description

Updateds current market price and annual dividends for portfolio holdings. Calculates market value, income and yield

Usage

1

Arguments

pobj

portfolio object

prices

tibble with symbol prices. requires symbol, and price columns

Value

tibble with portfolio's holdings market value

Examples

1
2
3
4
5
6
7
8
## Not run: 
p1 <- portfolio("new_port", cash=0) %>%
 make_deposit(amount = 5000) %>%
 make_buy(Sys.Date()-365, symbol = "SPY", quantity = 10, price = 200) %>%
 make_buy(Sys.Date()-365, symbol = "TLT", quantity = 25, price = 100)
 update_holdings_market_value(p1)

## End(Not run)

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