[Returnanalytics-commits] r3765 - pkg/Dowd/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jun 30 10:49:02 CEST 2015
Author: dacharya
Date: 2015-06-30 10:49:02 +0200 (Tue, 30 Jun 2015)
New Revision: 3765
Modified:
pkg/Dowd/R/KernelVaREpanechinikovKernel.R
Log:
Mistake in kernel method argument of density function added.
Modified: pkg/Dowd/R/KernelVaREpanechinikovKernel.R
===================================================================
--- pkg/Dowd/R/KernelVaREpanechinikovKernel.R 2015-06-30 08:47:19 UTC (rev 3764)
+++ pkg/Dowd/R/KernelVaREpanechinikovKernel.R 2015-06-30 08:49:02 UTC (rev 3765)
@@ -21,7 +21,7 @@
sigma <- sd(PandL)
# Obtain pdf values
- kernel.data <- density(PandL, kernel = "epanechinikov", from = mu - 4 * sigma, to = mu + 4 * sigma, n = 1000, bw = "nrd")
+ kernel.data <- density(PandL, kernel = "epanechnikov", from = mu - 4 * sigma, to = mu + 4 * sigma, n = 1000, bw = "nrd")
kernel.pdf <- kernel.data$y
x.values <- kernel.data$x
delta.x <- x.values[2]-x.values[1]
@@ -47,4 +47,4 @@
VaR <- (lower.x.bound + upper.x.bound) / 2 # Desired percentile, ie, answer.
return(VaR)
-}
\ No newline at end of file
+}
More information about the Returnanalytics-commits
mailing list