Description Usage Arguments Value Examples
View source: R/Portfolio-update.R
Updateds current market price and annual dividends for portfolio holdings. Calculates market value, income and yield
1 | update_holdings_market_value(pobj, prices = NULL)
|
pobj |
portfolio object |
prices |
tibble with symbol prices. requires symbol, and price columns |
tibble with portfolio's holdings market value
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.