wnw_ces: Weighted Nadaraya Watson Estimator of Conditional Expected...

Description Usage Arguments Details References

View source: R/wnw.R

Description

WNW estimator of CES

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
wnw_ces(
  formula,
  data,
  prob = 0.95,
  nw_kernel = c("Gaussian", "Epanechinikov", "Tricube", "Boxcar"),
  nw_h,
  h0,
  init = 0,
  eps = 1e-05,
  iter = 1000,
  lower_invert = -3,
  upper_invert = 3
)

Arguments

formula

an object class formula.

data

an optional data to be used.

prob

upper tail probability for VaR

nw_kernel

Kernel for weighted nadaraya watson

nw_h

Bandwidth for WNW. If not specified, use the asymptotic optimal.

h0

Binwidth

init

initial value for finding lambda

eps

small value

iter

maximum iteration when finding lambda

lower_invert

lower y when inverting the cdf

upper_invert

upper y when inverting the cdf

Details

Plugging-in in methods gives

\hat{μ}_p(x) = \frac{1}{p} ∑_{t = 1}^n W_{c,t}(x, h) ≤ft[ Y_t \bar{G}_{h_0} (\hat{ν}_p (x) - Y_t) + h_0 G_{1, h_0} (\hat{ν}_p (x) - Y_t) \right]

References

Cai, Z., & Wang, X. (2008). Nonparametric estimation of conditional VaR and expected shortfall. Journal of Econometrics, 147(1), 120-130.


ygeunkim/ceshat documentation built on Dec. 16, 2019, 12:39 p.m.