[Returnanalytics-commits] r2879 - in pkg/PerformanceAnalytics/sandbox/pulkit: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Aug 25 01:07:08 CEST 2013
Author: pulkit
Date: 2013-08-25 01:07:08 +0200 (Sun, 25 Aug 2013)
New Revision: 2879
Modified:
pkg/PerformanceAnalytics/sandbox/pulkit/NAMESPACE
pkg/PerformanceAnalytics/sandbox/pulkit/R/DrawdownBeta.R
pkg/PerformanceAnalytics/sandbox/pulkit/R/EDDCOPS.R
pkg/PerformanceAnalytics/sandbox/pulkit/R/ExtremeDrawdown.R
pkg/PerformanceAnalytics/sandbox/pulkit/R/REDDCOPS.R
pkg/PerformanceAnalytics/sandbox/pulkit/man/BetaDrawdown.Rd
pkg/PerformanceAnalytics/sandbox/pulkit/man/EDDCOPS.Rd
pkg/PerformanceAnalytics/sandbox/pulkit/man/REDDCOPS.Rd
Log:
some changes
Modified: pkg/PerformanceAnalytics/sandbox/pulkit/NAMESPACE
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/NAMESPACE 2013-08-24 20:33:49 UTC (rev 2878)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/NAMESPACE 2013-08-24 23:07:08 UTC (rev 2879)
@@ -1,5 +1,6 @@
export(AlphaDrawdown)
export(BenchmarkSR)
+export(BetaDrawdown)
export(CDaR)
export(CdarMultiPath)
export(chart.BenchmarkSR)
Modified: pkg/PerformanceAnalytics/sandbox/pulkit/R/DrawdownBeta.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/R/DrawdownBeta.R 2013-08-24 20:33:49 UTC (rev 2878)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/R/DrawdownBeta.R 2013-08-24 23:07:08 UTC (rev 2879)
@@ -51,9 +51,10 @@
#'of Florida,September 2012.
#'
#'@examples
+#'data(edhec)
#'BetaDrawdown(edhec[,1],edhec[,2])
#'
-#'
+#'@export
BetaDrawdown<-function(R,Rm,h=0,p=0.95,weights=NULL,geometric=TRUE,type=c("alpha","average","max"),...){
# DESCRIPTION:
Modified: pkg/PerformanceAnalytics/sandbox/pulkit/R/EDDCOPS.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/R/EDDCOPS.R 2013-08-24 20:33:49 UTC (rev 2878)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/R/EDDCOPS.R 2013-08-24 23:07:08 UTC (rev 2879)
@@ -31,7 +31,7 @@
#'
#' # with S&P 500 data and T-bill data
#'
-#'dt<-read.zoo("returns.csv",sep=",",header = TRUE)
+#'dt<-read.zoo("../data/ret.csv",sep=",",header = TRUE)
#'dt<-as.xts(dt)
#'EDDCOPS(dt[,1],delta = 0.33,gamma = 0.7,Rf = (1+dt[,2])^(1/12)-1,geometric = TRUE)
#'
Modified: pkg/PerformanceAnalytics/sandbox/pulkit/R/ExtremeDrawdown.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/R/ExtremeDrawdown.R 2013-08-24 20:33:49 UTC (rev 2878)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/R/ExtremeDrawdown.R 2013-08-24 23:07:08 UTC (rev 2879)
@@ -8,7 +8,8 @@
#'
#' Modified Generalized Pareto Distribution is given by the following formula
#'
-#' \dqeqn{G_{\eta}(m) = \begin{array}{l} 1-(1+\eta\frac{m^\gamma}{\psi})^(-1/\eta), if \eta \neq 0 \\ 1- e^{-frac{m^\gamma}{\psi}}, if \eta = 0,\end{array}}
+#' \deqn{
+#' G_{\eta}(m) = \begin{array}{l} 1-(1+\eta\frac{m^\gamma}{\psi})^(-1/\eta), if \eta \neq 0 \\ 1- e^{-frac{m^\gamma}{\psi}}, if \eta = 0,\end{array}}
#'
#' Here \eqn{\gamma{\epsilon}R} is the modifying parameter. When \eqn{\gamma<1} the corresponding densities are
#' strictly decreasing with heavier tail; the GDP is recovered by setting \eqn{\gamma = 1} .\eqn{\gamma \textgreater 1}
@@ -30,16 +31,11 @@
#' @param threshold The threshold beyond which the drawdowns have to be modelled
#'
#'
-#'@examples
-#'
-#'DrawdownGPD(edhec[,1],"gpd",0.95)
-#'
-#'DrawdownGPD(edhec[,1],"weibull")
-#'
#'@references
#'Mendes, Beatriz V.M. and Leal, Ricardo P.C., Maximum Drawdown: Models and Applications (November 2003).
#'Coppead Working Paper Series No. 359.Available at SSRN: http://ssrn.com/abstract=477322 or http://dx.doi.org/10.2139/ssrn.477322.
#'
+#'@export
DrawdownGPD<-function(R,type=c("gpd","weibull"),threshold=0.90){
x = checkData(R)
columns = ncol(R)
Modified: pkg/PerformanceAnalytics/sandbox/pulkit/R/REDDCOPS.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/R/REDDCOPS.R 2013-08-24 20:33:49 UTC (rev 2878)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/R/REDDCOPS.R 2013-08-24 23:07:08 UTC (rev 2879)
@@ -40,7 +40,7 @@
#'
#' # with S&P 500 data and T-bill data
#'
-#'dt<-read.zoo("returns.csv",sep=",",header = TRUE)
+#'dt<-read.zoo("../data/ret.csv",sep=",",header = TRUE)
#'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/man/BetaDrawdown.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/man/BetaDrawdown.Rd 2013-08-24 20:33:49 UTC (rev 2878)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/man/BetaDrawdown.Rd 2013-08-24 23:07:08 UTC (rev 2879)
@@ -63,6 +63,7 @@
the market performs well.
}
\examples{
+data(edhec)
BetaDrawdown(edhec[,1],edhec[,2])
}
\author{
Modified: pkg/PerformanceAnalytics/sandbox/pulkit/man/EDDCOPS.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/man/EDDCOPS.Rd 2013-08-24 20:33:49 UTC (rev 2878)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/man/EDDCOPS.Rd 2013-08-24 23:07:08 UTC (rev 2879)
@@ -38,7 +38,7 @@
\examples{
# with S&P 500 data and T-bill data
-dt<-read.zoo("returns.csv",sep=",",header = TRUE)
+dt<-read.zoo("../data/ret.csv",sep=",",header = TRUE)
dt<-as.xts(dt)
EDDCOPS(dt[,1],delta = 0.33,gamma = 0.7,Rf = (1+dt[,2])^(1/12)-1,geometric = TRUE)
Modified: pkg/PerformanceAnalytics/sandbox/pulkit/man/REDDCOPS.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/man/REDDCOPS.Rd 2013-08-24 20:33:49 UTC (rev 2878)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/man/REDDCOPS.Rd 2013-08-24 23:07:08 UTC (rev 2879)
@@ -55,7 +55,7 @@
\examples{
# with S&P 500 data and T-bill data
-dt<-read.zoo("returns.csv",sep=",",header = TRUE)
+dt<-read.zoo("../data/ret.csv",sep=",",header = TRUE)
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