[Returnanalytics-commits] r2883 - in pkg/PerformanceAnalytics/sandbox/pulkit: . R data man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Aug 25 15:20:41 CEST 2013


Author: pulkit
Date: 2013-08-25 15:20:41 +0200 (Sun, 25 Aug 2013)
New Revision: 2883

Modified:
   pkg/PerformanceAnalytics/sandbox/pulkit/NAMESPACE
   pkg/PerformanceAnalytics/sandbox/pulkit/R/DrawdownBetaMulti.R
   pkg/PerformanceAnalytics/sandbox/pulkit/R/EDDCOPS.R
   pkg/PerformanceAnalytics/sandbox/pulkit/R/Edd.R
   pkg/PerformanceAnalytics/sandbox/pulkit/R/MaxDD.R
   pkg/PerformanceAnalytics/sandbox/pulkit/R/REDDCOPS.R
   pkg/PerformanceAnalytics/sandbox/pulkit/data/ret.csv
   pkg/PerformanceAnalytics/sandbox/pulkit/man/EDDCOPS.Rd
   pkg/PerformanceAnalytics/sandbox/pulkit/man/EconomicDrawdown.Rd
   pkg/PerformanceAnalytics/sandbox/pulkit/man/MultiBetaDrawdown.Rd
   pkg/PerformanceAnalytics/sandbox/pulkit/man/REDDCOPS.Rd
Log:
documentation changes

Modified: pkg/PerformanceAnalytics/sandbox/pulkit/NAMESPACE
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/NAMESPACE	2013-08-25 12:00:35 UTC (rev 2882)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/NAMESPACE	2013-08-25 13:20:41 UTC (rev 2883)
@@ -10,6 +10,7 @@
 export(EconomicDrawdown)
 export(EDDCOPS)
 export(golden_section)
+export(MaxDD)
 export(MinTrackRecord)
 export(MonteSimulTriplePenance)
 export(MultiBetaDrawdown)

Modified: pkg/PerformanceAnalytics/sandbox/pulkit/R/DrawdownBetaMulti.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/R/DrawdownBetaMulti.R	2013-08-25 12:00:35 UTC (rev 2882)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/R/DrawdownBetaMulti.R	2013-08-25 13:20:41 UTC (rev 2883)
@@ -39,6 +39,7 @@
 #'of Florida,September 2012.
 #'
 #'@examples
+#'data(edhec)
 #'MultiBetaDrawdown(cbind(edhec,edhec),cbind(edhec[,2],edhec[,2]),sample = 2,ps=c(0.4,0.6))
 #'BetaDrawdown(edhec[,1],edhec[,2]) #expected value 0.5390431
 #'@export

Modified: pkg/PerformanceAnalytics/sandbox/pulkit/R/EDDCOPS.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/R/EDDCOPS.R	2013-08-25 12:00:35 UTC (rev 2882)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/R/EDDCOPS.R	2013-08-25 13:20:41 UTC (rev 2883)
@@ -8,7 +8,7 @@
 #' \deqn{x_t = Max\left\{0,\biggl(\frac{\lambda/\sigma + 1/2}{1-\delta.\gamma}\biggr).\biggl[\frac{\delta-EDD(t)}{1-EDD(t)}\biggr]\right\}}
 #' 
 #' The risk free asset accounts for the rest of the portfolio allocation \eqn{x_f = 1 - x_t}.
-#' 
+#'dt<-read.zoo("../data/ret.csv",sep=",",header = TRUE)
 #'
 #'@param R an xts, vector, matrix, data frame, timeSeries or zoo object of
 #' asset returns
@@ -30,9 +30,8 @@
 #'@examples
 #'
 #' # with S&P 500 data and T-bill data
-#'
-#'dt<-read.zoo("../data/ret.csv",sep=",",header = TRUE)
-#'dt<-as.xts(dt)
+#'data(ret)
+#'dt<-as.xts(read.zoo(ret))
 #'EDDCOPS(dt[,1],delta = 0.33,gamma = 0.7,Rf = (1+dt[,2])^(1/12)-1,geometric = TRUE)
 #'
 #'data(edhec)

Modified: pkg/PerformanceAnalytics/sandbox/pulkit/R/Edd.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/R/Edd.R	2013-08-25 12:00:35 UTC (rev 2882)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/R/Edd.R	2013-08-25 13:20:41 UTC (rev 2883)
@@ -24,6 +24,7 @@
 #'@references Yang, Z. George and Zhong, Liang, Optimal Portfolio Strategy to 
 #'Control Maximum Drawdown - The Case of Risk Based Dynamic Asset Allocation (February 25, 2012)
 #'@examples
+#'data(edhec)
 #'EconomicDrawdown(edhec,0.08,100)
 #'
 #' @export

Modified: pkg/PerformanceAnalytics/sandbox/pulkit/R/MaxDD.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/R/MaxDD.R	2013-08-25 12:00:35 UTC (rev 2882)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/R/MaxDD.R	2013-08-25 13:20:41 UTC (rev 2883)
@@ -48,7 +48,7 @@
 #' data(edhec)
 #' MaxDD(edhec,0.95,"ar")
 #' MaxDD(edhec[,1],0.95,"normal") #expected values 4.241799 6.618966
-
+#'@export
 MaxDD<-function(R,confidence,type=c("ar","normal"),...)
 {
   

Modified: pkg/PerformanceAnalytics/sandbox/pulkit/R/REDDCOPS.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/R/REDDCOPS.R	2013-08-25 12:00:35 UTC (rev 2882)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/R/REDDCOPS.R	2013-08-25 13:20:41 UTC (rev 2883)
@@ -18,6 +18,7 @@
 #'   .\gamma}\biggr).\biggl[\frac{\delta-REDD(t,h)}{1-REDD(t,h)}\biggr]\right\}}
 #'  
 #'The portion of the risk free asset is \eqn{x_f = 1 - x_1 - x_2}.
+#'dt<-read.zoo("../data/ret.csv",sep=",",header = TRUE)
 #'
 #'@param R an xts, vector, matrix, data frame, timeSeries or zoo object of
 #' asset returns
@@ -39,8 +40,7 @@
 #'@examples
 #'
 #' # with S&P 500 data and T-bill data
-#'
-#'dt<-read.zoo("../data/ret.csv",sep=",",header = TRUE)
+#'dt<-data(ret)
 #'dt<-as.xts(dt)
 #'REDDCOPS(dt[,1],delta = 0.33,Rf = (1+dt[,3])^(1/12)-1,h = 12,geometric = TRUE,asset = "one")
 #'

Modified: pkg/PerformanceAnalytics/sandbox/pulkit/data/ret.csv
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/data/ret.csv	2013-08-25 12:00:35 UTC (rev 2882)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/data/ret.csv	2013-08-25 13:20:41 UTC (rev 2883)
@@ -1,4 +1,4 @@
-Index;S.P;barc[1:432, 2];X3.month.T.bill
+;"S&P";"barclays";"3 month t-bill"
 1976-01-31;0.1183057989;0.0109;0.0473
 1976-02-29;-0.0114019433;0.0033;0.05
 1976-03-31;0.0306889981;0.0214;0.0497

Modified: pkg/PerformanceAnalytics/sandbox/pulkit/man/EDDCOPS.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/man/EDDCOPS.Rd	2013-08-25 12:00:35 UTC (rev 2882)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/man/EDDCOPS.Rd	2013-08-25 13:20:41 UTC (rev 2883)
@@ -34,12 +34,12 @@
 
   The risk free asset accounts for the rest of the
   portfolio allocation \eqn{x_f = 1 - x_t}.
+  dt<-read.zoo("../data/ret.csv",sep=",",header = TRUE)
 }
 \examples{
 # with S&P 500 data and T-bill data
-
-dt<-read.zoo("../data/ret.csv",sep=",",header = TRUE)
-dt<-as.xts(dt)
+data(ret)
+dt<-as.xts(read.zoo(ret))
 EDDCOPS(dt[,1],delta = 0.33,gamma = 0.7,Rf = (1+dt[,2])^(1/12)-1,geometric = TRUE)
 
 data(edhec)

Modified: pkg/PerformanceAnalytics/sandbox/pulkit/man/EconomicDrawdown.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/man/EconomicDrawdown.Rd	2013-08-25 12:00:35 UTC (rev 2882)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/man/EconomicDrawdown.Rd	2013-08-25 13:20:41 UTC (rev 2883)
@@ -32,6 +32,7 @@
   \code{\link{EconomicMax}}
 }
 \examples{
+data(edhec)
 EconomicDrawdown(edhec,0.08,100)
 }
 \author{

Modified: pkg/PerformanceAnalytics/sandbox/pulkit/man/MultiBetaDrawdown.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/man/MultiBetaDrawdown.Rd	2013-08-25 12:00:35 UTC (rev 2882)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/man/MultiBetaDrawdown.Rd	2013-08-25 13:20:41 UTC (rev 2883)
@@ -57,6 +57,7 @@
   the market performs well.
 }
 \examples{
+data(edhec)
 MultiBetaDrawdown(cbind(edhec,edhec),cbind(edhec[,2],edhec[,2]),sample = 2,ps=c(0.4,0.6))
 BetaDrawdown(edhec[,1],edhec[,2]) #expected value 0.5390431
 }

Modified: pkg/PerformanceAnalytics/sandbox/pulkit/man/REDDCOPS.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/man/REDDCOPS.Rd	2013-08-25 12:00:35 UTC (rev 2882)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/man/REDDCOPS.Rd	2013-08-25 13:20:41 UTC (rev 2883)
@@ -50,12 +50,12 @@
   .\gamma}\biggr).\biggl[\frac{\delta-REDD(t,h)}{1-REDD(t,h)}\biggr]\right\}}
 
   The portion of the risk free asset is \eqn{x_f = 1 - x_1
-  - x_2}.
+  - x_2}. dt<-read.zoo("../data/ret.csv",sep=",",header =
+  TRUE)
 }
 \examples{
 # with S&P 500 data and T-bill data
-
-dt<-read.zoo("../data/ret.csv",sep=",",header = TRUE)
+dt<-data(ret)
 dt<-as.xts(dt)
 REDDCOPS(dt[,1],delta = 0.33,Rf = (1+dt[,3])^(1/12)-1,h = 12,geometric = TRUE,asset = "one")
 



More information about the Returnanalytics-commits mailing list