calc_returns: Calculate Portfolio Returns

Description Usage Arguments Value Examples

View source: R/calc_returns.R

Description

This function calculates the returns of all of the portfolios considered, adding in a portfolio with even weight across the universe for comparison

Usage

1
2
calc_returns(weighted_universe, universe, portfolio.weight, ret.var,
  points)

Arguments

weighted_universe

is the universe parameter with characteristic-matching random weights joined

universe

is the universe of assets and their characteristics

portfolio.weight

is the name of the column which contains the target portfolio weights (for calculating exposures)

ret.var

is the name of the column which contains the returns of each asset

points

is the number of randomly sampled portfolios

Value

returns, a data.frame of each portfolio's return

Examples

1
2
3
4
## Not run: 
returns <- calc_returns(weighted_universe, universe, portfolio.weight, ret.var, points)

## End(Not run)

jluby/portfoliowalkr documentation built on April 4, 2020, 1:46 a.m.