[Returnanalytics-commits] r3792 - pkg/Dowd/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jul 8 14:35:49 CEST 2015


Author: dacharya
Date: 2015-07-08 14:35:49 +0200 (Wed, 08 Jul 2015)
New Revision: 3792

Modified:
   pkg/Dowd/R/LogtVaRPlot2DCL.R
Log:
Label in plot corrected.

Modified: pkg/Dowd/R/LogtVaRPlot2DCL.R
===================================================================
--- pkg/Dowd/R/LogtVaRPlot2DCL.R	2015-07-08 12:32:01 UTC (rev 3791)
+++ pkg/Dowd/R/LogtVaRPlot2DCL.R	2015-07-08 12:35:49 UTC (rev 3792)
@@ -101,11 +101,11 @@
     stop("Confidence level(s) must be greater than 0")
   }
   # VaR estimation  
-  VaR <- investment - exp( ((df-2)/df)*sigma[1,1] * sqrt(hp[1,1]) * qt(1 - cl, df)+mu[1,1]*hp[1,1]*matrix(1,cl.col,cl.row) + log(investment)
+  VaR <- investment - exp(((df-2)/df)*sigma[1,1] * sqrt(hp[1,1]) * qt(1 - cl, df)+mu[1,1]*hp[1,1]*matrix(1,cl.col,cl.row) + log(investment)
                           ) # VaR
   # Plotting
-  plot(cl, VaR, type = "l", xlab = "Holding Period", ylab = "VaR")
-  title("Log-t VaR against holding period")
+  plot(cl, VaR, type = "l", xlab = "Confidence Level", ylab = "VaR")
+  title("Log-t VaR against confidence level")
   xmin <-min(cl)+.3*(max(cl)-min(cl))
   text(xmin,max(VaR)-.1*(max(VaR)-min(VaR)),
        'Input parameters', cex=.75, font = 2)



More information about the Returnanalytics-commits mailing list