price_adjusted_portfolio: renormalizes portfolio to show total portion of wealth in...

Description Usage Arguments Value

View source: R/portfolio_utils.R

Description

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.

Usage

1
price_adjusted_portfolio(portfolio, tp_price_relatives, .check_input = TRUE)

Arguments

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 portfolio, but now has price p_t, the ith entry of price_relatives is \frac{p_t}{p_{t-1}}.

.check_input

If TRUE, checks that input meets the given assumptions.

Value

A numeric vector whose ith entry is the portion of total wealth in asset i (according to the new prices).


benSepanski/pfselect documentation built on May 1, 2020, 1:57 p.m.