VaR.norm {VaR} | R Documentation |
Value at Risk Calculation in Lognormal Approximation
Description
This function estimates Value of Risk (VaR) value in lognormal approximation.Usage
VaR.norm(ydat, p = 0.99, dt = 1, type = "long", drift.appx = FALSE, lin.appx = TRUE)
Arguments
ydat |
Numeric vector of data for which VaR is to be calculated |
p |
Confidence level for VaR calculation |
dt |
Liquidation period |
type |
String describing type of VaR calculated: "long" or "short" |
drift.appx |
Logical; if TRUE VaR is calculated in non-zero drift approximation |
lin.appx |
Logical; if TRUE VaR is calculated in linear approximation |
Details
This function estimates VaR for a single risk factor S(t) in lognormal approximation. The final expression for VaR of {bf long} and {bf short} position is
VaR_{long}(c)=S(t)[1-exp(μ delta t + Q^{N(0,1)}_{1-c} σ sqrt{delta t})]
VaR_{short}(c)=-S(t)[1-exp(μ delta t - Q^{N(0,1)}_{1-c} σ sqrt{delta t})]
Here, c is a desired confidence, Q^{N(0,1)}_{1-c} is a 1-c percentile of normal
distribution, delta t is liquidation period, and parameters μ and σ are
mean value (or drift) and standard deviation of delta S(t).
If drift.appx
=FALSE
, μ = 0. If lin.appx
=TRUE
, the above functions are expanded
according exp(x) = 1+x.
Value
Return value is a list containing following components:VaR |
Value at Risk for input data |
data |
Input data |
cdata |
Log-transformed data |
liq.period |
Same as dt |
type |
Same as type |
conf.level |
Same as p |
mean |
Mean value of cdata |
std |
Standard deviation of cdata |
Author(s)
T. DaniyarovReferences
Deutsch, H.P., Derivatives and Internal Models, 2nd Edition, Palgrave, London 2001See Also
VaR.norm.plots
, VaR.backtest
Examples
data(exchange.rates) attach(exchange.rates) y <- USDJPY[!is.na(USDJPY)] z <- VaR.norm(y) z$VaR detach(exchange.rates)
[Package VaR version 0.2 Index]
No comments:
Post a Comment
Thank you