[Returnanalytics-commits] r3147 - in pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm: .Rproj.user/E5D7D248/sdb/prop R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Sep 20 15:50:40 CEST 2013


Author: shubhanm
Date: 2013-09-20 15:50:40 +0200 (Fri, 20 Sep 2013)
New Revision: 3147

Modified:
   pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/.Rproj.user/E5D7D248/sdb/prop/INDEX
   pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/R/table.normDD.R
   pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/man/table.normDD.Rd
Log:
documentation modification

Modified: pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/.Rproj.user/E5D7D248/sdb/prop/INDEX
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/.Rproj.user/E5D7D248/sdb/prop/INDEX	2013-09-20 11:53:14 UTC (rev 3146)
+++ pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/.Rproj.user/E5D7D248/sdb/prop/INDEX	2013-09-20 13:50:40 UTC (rev 3147)
@@ -2,6 +2,7 @@
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2FR%2FAdjustedSharpeRatio.R="43D7BE7F"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2FR%2FCalmarRatio.R="8047D8D6"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2FR%2FES.R="716852E0"
+C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2FR%2FmaxDrawdown.R="41EDF843"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2FR%2Ftable.Correlation.R="37353A3D"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Finst%2Fdoc%2FEmaxdd.Rnw="C9696525"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Finst%2Fdoc%2FPA-Bacon.Rnw="915ED3AD"
@@ -12,7 +13,10 @@
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2FR%2FmaxDDGBM.R="60D2FDD5"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2FR%2Ftable.ComparitiveReturn.GLM.R="41919319"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2FWeek6-7%2FCode%2FCovariance%20Matrix%20Integrated%20Regression%20Function%2Flmi.R="649AEBE6"
+C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2F.Rbuildignore="A38670D5"
+C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2F.Rhistory="80E892C0"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2FDESCRIPTION="5ED82E8C"
+C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2FNAMESPACE="7D033990"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2FR%2FACStdDev.annualized.R="33CAE6A9"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2FR%2FCDrawdown.R="5D302CE3"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2FR%2FEmaxDDGBM.R="4836AC8C"
@@ -29,31 +33,43 @@
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2FR%2Ftable.EMaxDDGBM.R="FFE2C69"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2FR%2Ftable.Sharpe.R="F9E07115"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2FR%2Ftable.UnsmoothReturn.R="CF948D8A"
+C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2FR%2Ftable.normDD.R="3CCE8B2B"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2FRead-and-delete-me="7E8C5556"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2Fman%2FAcarSim.Rd="717883C7"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2Fman%2FEMaxDDGBM.Rd="2EE78BD4"
+C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2Fman%2FEmaxDDGBM.Rd="25C2A70F"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2Fman%2Fglmi.Rd="7909B0E2"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2Fman%2Flmi.Rd="88C0FBC4"
+C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2Fman%2Ftable.normDD.Rd="E66E994D"
+C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2Fvignettes%2FACFSTDEV.rnw="8F0CAC5C"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2Fvignettes%2FCommodityReport.Rnw="DA891E76"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2Fvignettes%2FConditionalDrawdown.Rnw="892D5F16"
+C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2Fvignettes%2FEmaxDDGBM.Rnw="14FC5963"
+C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2Fvignettes%2FGLMReturn.Rnw="69A99C19"
+C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2Fvignettes%2FGLMSmoothIndex.Rnw="B53EBB52"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2Fvignettes%2FLoSharpe.Rnw="2F79FCCA"
+C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2Fvignettes%2FNormCalmar.rnw="C18E8FE4"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2Fvignettes%2FOWReturn.Rnw="E76F5680"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2Fvignettes%2FOWReturn.log="9B1541E6"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2Fvignettes%2FOkunevWhite.Rnw="C9BD1399"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2Fvignettes%2FShaneAcarMaxLoss.Rnw="A036626A"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm%2Fvignettes%2FUnSmoothReturnAnalysis.Rnw="945F7AEE"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm.Rcheck%2F00install.out="CE4BAAEC"
+C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fnoniid.sm.Rcheck%2Fnoniid.sm-manual.log="9D81EC8D"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fsandbox%2FCommodity.Rnw="7A63D707"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fsandbox%2FCommodityReport.Rnw="5049B60E"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fsandbox%2FLoSharpe.R="DA251988"
+C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fsandbox%2FLoSharpe.Rnw="A50A4AC2"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fsandbox%2Fse.LoSharpe.R="D581FC31"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fsandbox%2Ftable.Sharpe.R="1CFFFCF5"
+C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fsandbox%2Fvignettes%2FMaximumLoss.Rnw="FD3F5B42"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fvignettes%2FACFSTDEV.rnw="81399909"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fvignettes%2FCommodity_ResearchReport.Rnw="F0290DA5"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fvignettes%2FLoSharpeRatio.Rnw="915BCBE3"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2F1%20week%2Fpkg%2FPerformanceAnalytics%2Fsandbox%2FShubhankit%2Fvignettes%2FUnSmoothReturnAnalysis.Rnw="5D6C2593"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2Fa.snw="2991F3E9"
 C%3A%2FUsers%2Fshubhankit%2FDesktop%2Fdem.Rnw="AC219D7D"
+~%2FR%2Fwin-library%2F3.0%2Fhighfrequency%2Fdoc%2Fhighfrequency.Rnw="FCE481B1"
 ~%2FR%2Fwin-library%2F3.0%2Fxtable%2Fdoc%2Fmargintable.Rnw="F24BE9F7"
 ~%2FR%2Fwin-library%2F3.0%2Fxtable%2Fdoc%2FxtableGallery.R="A16037E8"
 ~%2FR%2Fwin-library%2F3.0%2Fxtable%2Fdoc%2FxtableGallery.Rnw.R="EF28E7CC"

Modified: pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/R/table.normDD.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/R/table.normDD.R	2013-09-20 11:53:14 UTC (rev 3146)
+++ pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/R/table.normDD.R	2013-09-20 13:50:40 UTC (rev 3147)
@@ -1,4 +1,4 @@
-#'@title Generalised Lambda Distribution Simulated Drawdown 
+#'@title Generalised Lambda Distribution  Drawdown 
 #'@description When selecting a hedge fund manager, one risk measure investors often
 #' consider is drawdown. How should drawdown distributions look? Carr Futures'
 #' Galen Burghardt, Ryan Duncan and Lianyan Liu share some insights from their
@@ -23,6 +23,10 @@
 #' Burghardt, G., Duncan, R. and L. Liu, \emph{Deciphering drawdown}. Risk magazine, Risk management for investors, September, S16-S20, 2003. \url{http://www.risk.net/data/risk/pdf/investor/0903_risk.pdf}
 #' @author Peter Carl, Brian Peterson, Shubhankit Mohan
 #' @keywords Simulated Drawdown Using Brownian Motion Assumptions
+#' @examples 
+#' library(PerformanceAnalytics)
+#' data(edhec)
+#' table.normDD(edhec[,1])
 #' @seealso Drawdowns.R
 #' @rdname table.normDD
 #' @export
@@ -53,29 +57,32 @@
       x = y[,column]
       mu = Return.annualized(x, scale = NA, geometric = TRUE)
       sig=StdDev.annualized(x)
-      skew = skewness(x)
-      kurt = kurtosis(x)
+      #skew = skewness(x)
+      #kurt = kurtosis(x)
       r <- matrix(0,T+1,n)  # matrix to hold short rate paths
       s <- matrix(0,T+1,n)
       r[1,] <- r0  
       s[1,] <- s0
       drawdown <- matrix(0,n)
       #  return(Ed)
+      data=as.numeric(x)
+      # using starship model to fit lambda distribution
+      lpara= starship.adaptivegrid(data,list(lcvect=(0:4)/10,ldvect=(0:4)/10))
       
       for(j in 1:n){
-        r[2:(T+1),j]= rgl(T,mu,sig,skew,kurt)
+             r[2:(T+1),j]= rgl(T,lpara$lambda[1],lpara$lambda[2],lpara$lambda[3],lpara$lambda[4],param="fkml")
           for(i in 2:(T+1)){
           
-            dr <- r[i,j]*dt 
-            s[i,j] <- s[i-1,j] + (dr/100)
+            dr <- r[i,j] 
+            s[i,j] <- (dr)
         }
         
         
-        drawdown[j] = as.numeric(maxdrawdown(s[,j])[1])
+        drawdown[j] = as.numeric(maxDrawdown(s[,j])[1])
       }
       z = c((mu*100),
             (sig*100),
-            ((mean(drawdown))))
+            ((mean(drawdown)*100)))
       znames = c(
         "Annual Returns in %",
         "Std Devetions in %",

Modified: pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/man/table.normDD.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/man/table.normDD.Rd	2013-09-20 11:53:14 UTC (rev 3146)
+++ pkg/PerformanceAnalytics/sandbox/Shubhankit/noniid.sm/man/table.normDD.Rd	2013-09-20 13:50:40 UTC (rev 3147)
@@ -1,6 +1,6 @@
 \name{table.normDD}
 \alias{table.normDD}
-\title{Generalised Lambda Distribution Simulated Drawdown}
+\title{Generalised Lambda Distribution  Drawdown}
 \usage{
   table.normDD(R, digits = 4)
 }



More information about the Returnanalytics-commits mailing list