Description Usage Arguments Value
View source: R/portfolio_utils.R
Starting with a portfolio whose ith entry was the portion of ones total wealth in asset i for the previous prices, return a new vector reflecting the portion of total wealth in each asset under the new prices.
1 | price_adjusted_portfolio(portfolio, tp_price_relatives, .check_input = TRUE)
|
portfolio |
A vector of non-negative numbers which sum to 1, the ith entry representing the portion of total wealth in asset i. |
tp_price_relatives |
A vector whose ith entry
is the ratio of the ith asset's new price
to its old price at the end of this
trading period. More precisely, if asset i
had price p_{t-1} when wealth was distributed
according to |
.check_input |
If |
A numeric vector whose ith entry is the portion of total wealth in asset i (according to the new prices).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.