Learn R Programming

PortfolioAnalytics (version 2.1.0)

extract_risk: extract the risk value when knowing the weights

Description

extract the risk value when knowing the weights

Usage

extract_risk(R, w, ES_alpha = 0.05, CSM_alpha = 0.05, moment_setting = NULL)

Arguments

R

an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns

w

the weight of the portfolio

ES_alpha

the default value is 0.05, but could be specified as any value between 0 and 1

CSM_alpha

the default value is 0.05, but could be specified as any value between 0 and 1

moment_setting

the default is NULL, should provide moment_setting=list(mu=, sigma=) if customize momentFUN