riskfun: Portfolio Risk Measures

View source: R/p-fun.R

riskfunR Documentation

Portfolio Risk Measures

Description

Calculates a given portfolio risk/deviation measure given a set of weights and matrix of returns, possible representing a forecast scenario.

Usage

riskfun(weights, Data, risk = c("mad", "ev", "minimax", "cvar", "cdar", "lpm"), 
benchmark = NULL, alpha = 0.05, moment = 1, threshold = 0, VaR = NULL, DaR = NULL)

Arguments

weights

vector of weights.

Data

Matrix of returns.

risk

Choice of measure.

benchmark

(Optional) vector of benchmark returns with same number of rows as Data.

alpha

The lower quantile for the “cvar” and “cdar” measures.

moment

The “lpm” measure moment.

threshold

The “lpm” measure threshold. A value of 999 will subtract the portfolio mean.

VaR

(Optional) The pre-calculated VaR for the “cvar” measure.

DaR

(Optional) The pre-calculated DaR for the “cdar” measure.

Details

A simple utility function for the calculation and understanding of some of the risk and deviation measures implemented in the package.

Value

A numeric value representing the risk/deviation measure.

Author(s)

Alexios Galanos


parma documentation built on Oct. 29, 2022, 1:08 a.m.