Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

applyFUN

Apply a risk or return function to a set of weights


Description

This function is used to calculate risk or return metrics given a matrix of weights and is primarily used as a convenience function used in chart.Scatter functions

Usage

applyFUN(R, weights, FUN = "mean", arguments)

Arguments

R

xts object of asset returns

weights

a matrix of weights generated from random_portfolios or optimize.portfolio

FUN

name of a function

arguments

named list of arguments to FUN

Author(s)

Ross Bennett


PortfolioAnalytics

Portfolio Analysis, Including Numerical Methods for Optimization of Portfolios

v1.1.0
GPL-2 | GPL-3
Authors
Brian G. Peterson [cre, aut, cph], Peter Carl [aut, cph], Kris Boudt [ctb, cph], Ross Bennett [ctb, cph], Hezky Varon [ctb], Guy Yollin [ctb], R. Douglas Martin [ctb]
Initial release
2018-05-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.