Learn R Programming

riskR (version 1.1)

risk.hedge: Computes optimal hedging ratios based on risk measures

Description

Determines optimal hedging ratios based on risk measures (StD, VaR, EL, ELD, ES, SDR, EVaR, DEVaR, ENT, DENT, ML) by minimization of position risk.

Usage

risk.hedge(x, y, alpha = c(0.05), beta = 1, p = 2)

Arguments

x
a vector of observations.
y
a vector of observations of the asset used for hedging.
alpha
a vector of probabilities for significance level.
beta
a positive risk aversion parameter.
p
a positive value for the power of deviation terms.

Value

A matrix with values of optimal hedging ratios for each risk measure at all probabilities of interest.

Examples

Run this code
## computes optimal hedging ratios between AAPL and SP500.

data(returns)
s <- returns[, 3]
h <- returns[, 2]
risk.hedge(s, h, c(0.01, 0.05))

Run the code above in your browser using DataLab