[Returnanalytics-commits] r2817 - in pkg/PerformanceAnalytics/sandbox/pulkit: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Aug 18 14:39:18 CEST 2013
Author: pulkit
Date: 2013-08-18 14:39:18 +0200 (Sun, 18 Aug 2013)
New Revision: 2817
Removed:
pkg/PerformanceAnalytics/sandbox/pulkit/man/DrawdownGPD.Rd
Modified:
pkg/PerformanceAnalytics/sandbox/pulkit/DESCRIPTION
pkg/PerformanceAnalytics/sandbox/pulkit/NAMESPACE
pkg/PerformanceAnalytics/sandbox/pulkit/R/BenchmarkPlots.R
pkg/PerformanceAnalytics/sandbox/pulkit/R/CDaRMultipath.R
pkg/PerformanceAnalytics/sandbox/pulkit/R/ExtremeDrawdown.R
pkg/PerformanceAnalytics/sandbox/pulkit/R/MaxDD.R
pkg/PerformanceAnalytics/sandbox/pulkit/R/chart.Penance.R
pkg/PerformanceAnalytics/sandbox/pulkit/R/chart.REDD.R
Log:
some errors and documentation modifications
Modified: pkg/PerformanceAnalytics/sandbox/pulkit/DESCRIPTION
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/DESCRIPTION 2013-08-18 12:19:32 UTC (rev 2816)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/DESCRIPTION 2013-08-18 12:39:18 UTC (rev 2817)
@@ -27,7 +27,6 @@
'DrawdownBetaMulti.R'
'DrawdownBeta.R'
'EDDCOPS.R'
- 'edd.R'
'Edd.R'
'ExtremeDrawdown.R'
'GoldenSection.R'
Modified: pkg/PerformanceAnalytics/sandbox/pulkit/NAMESPACE
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/NAMESPACE 2013-08-18 12:19:32 UTC (rev 2816)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/NAMESPACE 2013-08-18 12:39:18 UTC (rev 2817)
@@ -1,10 +1,21 @@
export(AlphaDrawdown)
-#export(BenchmarkSR)
-#export(chart.BenchmarkSR)
-#export(chart.SRIndifference)
-#export(EconomicDrawdown)
-#export(EDDCOPS)
-#export(MinTrackRecord)
-#export(REDDCOPS)
-#export(rollDrawdown)
-#export(rollEconomicMax)
+export(BenchmarkSR)
+export(chart.BenchmarkSR)
+export(chart.SRIndifference)
+export(EconomicDrawdown)
+export(EDDCOPS)
+export(MinTrackRecord)
+export(REDDCOPS)
+export(rollDrawdown)
+export(rollEconomicMax)
+export(CDaR)
+export(CdarMultiPath)
+export(chart.Penance)
+export(chart.REDD)
+export(chart.SharpeEfficientFrontier)
+export(BetaDrawdown)
+export(MultiBetaDrawdown)
+export(EDDCOPS)
+export(DrawdownGPD)
+export(golden_section)
+export(MaxDD)
Modified: pkg/PerformanceAnalytics/sandbox/pulkit/R/BenchmarkPlots.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/R/BenchmarkPlots.R 2013-08-18 12:19:32 UTC (rev 2816)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/R/BenchmarkPlots.R 2013-08-18 12:39:18 UTC (rev 2817)
@@ -41,6 +41,7 @@
#'
#'chart.BenchmarkSR(edhec,vs="strategies")
#'chart.BenchmarkSR(edhec,vs="sharpe")
+#'
#'@export
chart.BenchmarkSR<-function(R=NULL,main=NULL,ylab = NULL,xlab = NULL,element.color="darkgrey",lwd = 2,pch = 1,cex = 1,cex.axis=0.8,cex.lab = 1,cex.main = 1,vs=c("sharpe","correlation","strategies"),xlim = NULL,ylim = NULL,...){
Modified: pkg/PerformanceAnalytics/sandbox/pulkit/R/CDaRMultipath.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/R/CDaRMultipath.R 2013-08-18 12:19:32 UTC (rev 2816)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/R/CDaRMultipath.R 2013-08-18 12:39:18 UTC (rev 2817)
@@ -31,8 +31,9 @@
#'
#'@references
#'Zabarankin, M., Pavlikov, K., and S. Uryasev. Capital Asset Pricing Model (CAPM)
-#' with Drawdown Measure.Research Report 2012-9, ISE Dept., University of Florida,
-#' September 2012
+#' with Drawdown Measure.Research Report 2012-9, ISE Dept., University of Florida, September 2012
+#'
+#'@export
CdarMultiPath<-function (R,ps,sample, geometric = TRUE,p = 0.95, ...)
Modified: pkg/PerformanceAnalytics/sandbox/pulkit/R/ExtremeDrawdown.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/R/ExtremeDrawdown.R 2013-08-18 12:19:32 UTC (rev 2816)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/R/ExtremeDrawdown.R 2013-08-18 12:39:18 UTC (rev 2817)
@@ -8,7 +8,7 @@
#'
#' 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}
Modified: pkg/PerformanceAnalytics/sandbox/pulkit/R/MaxDD.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/R/MaxDD.R 2013-08-18 12:19:32 UTC (rev 2816)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/R/MaxDD.R 2013-08-18 12:39:18 UTC (rev 2817)
@@ -9,7 +9,7 @@
#' Maximum Drawdown is given by the formula
#' When the distibution is normal
#'
-#' \deqn{MaxDD_{\alpha}=max\left\{0,\frac{(z_{\alpha}\sigma)^2}{4\mu}\right\}}
+#' \deqn{MaxDD_\alpha=max\left\{0,\frac{(z_\alpha\sigma)^2}{4\mu}\right\}}
#'
#' The time at which the Maximum Drawdown occurs is given by
#' \deqn{t^\ast=\biggl(\frac{Z_{\alpha}\sigma}{2\mu}\biggr)^2}
Modified: pkg/PerformanceAnalytics/sandbox/pulkit/R/chart.Penance.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/R/chart.Penance.R 2013-08-18 12:19:32 UTC (rev 2816)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/R/chart.Penance.R 2013-08-18 12:39:18 UTC (rev 2817)
@@ -34,6 +34,8 @@
#'chart.Penance(edhec,0.95)
#'
#'@references Bailey, David H. and Lopez de Prado, Marcos,Drawdown-Based Stop-Outs and the ‘Triple Penance’ Rule(January 1, 2013).
+#'
+#'@export
chart.Penance<-function(R,confidence,type=c("ar","normal"),reference.grid = TRUE,main=NULL,ylab = NULL,xlab = NULL,element.color="darkgrey",lwd = 2,pch = 1,cex = 1,cex.axis=0.8,cex.lab = 1,cex.main = 1,xlim = NULL,ylim = NULL,...){
Modified: pkg/PerformanceAnalytics/sandbox/pulkit/R/chart.REDD.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/R/chart.REDD.R 2013-08-18 12:19:32 UTC (rev 2816)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/R/chart.REDD.R 2013-08-18 12:39:18 UTC (rev 2817)
@@ -1,3 +1,23 @@
+#'@title
+#' Time series of Rolling Economic Drawdown
+#'
+#'@description
+#' This function plots the time series of Rolling Economic Drawdown.
+#' For more details on rolling economic drawdown see \code{rollDrawdown}.
+#'
+#'@param R an xts, vector, matrix, data frame, timeseries, or zoo object of asset return.
+#'@param Rf risk free rate can be vector such as government security rate of return
+#'@param h lookback period
+#'@param geometric utilize geometric chaining (TRUE) or simple/arithmetic chaining(FALSE) to aggregate returns, default is TRUE.
+#'@param legend.loc set the legend.loc, as in \code{\link{plot}}
+#'@param colorset set the colorset label, as in \code{\link{plot}}
+#'@param \dots any other variable
+#'@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
+#'chart.REDD(edhec,0.08,20)
+#'
+
chart.REDD<-function(R,rf,h, geometric = TRUE,legend.loc = NULL, colorset = (1:12),...)
{
#DESCRIPTION:
Deleted: pkg/PerformanceAnalytics/sandbox/pulkit/man/DrawdownGPD.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/man/DrawdownGPD.Rd 2013-08-18 12:19:32 UTC (rev 2816)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/man/DrawdownGPD.Rd 2013-08-18 12:39:18 UTC (rev 2817)
@@ -1,88 +0,0 @@
-\name{DrawdownGPD}
-\alias{DrawdownGPD}
-\title{Modelling Drawdown using Extreme Value Theory
-
-It has been shown empirically that Drawdowns can be modelled using Modified Generalized Pareto
-distribution(MGPD), Generalized Pareto Distribution(GPD) and other particular cases of MGPD such
-as weibull distribution \eqn{MGPD(\gamma,0,\psi)} and unit exponential distribution\eqn{MGPD(1,0,\psi)}
-
-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}}
-
-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}
-
-The GDP is given by the following equation. \eqn{MGPD(1,\eta,\psi)}
-
-\deqn{G_{\eta}(m) = \begin{array}{l} 1-(1+\eta\frac{m}{\psi})^(-1/\eta), if \eta \neq 0 \\ 1- e^{-frac{m}{\psi}}, if \eta = 0,\end{array}}
-
-The weibull distribution is given by the following equation \eqn{MGPD(\gamma,0,\psi)}
-
-\deqn{G(m) = 1- e^{-frac{m^\gamma}{\psi}}}
-
-The unit exponential distribution is given by the following equation \eqn{MGPD(1,0,\psi)}
-
-\deqn{G(m) = 1- e^{-m}}}
-\usage{
- DrawdownGPD(R, type = c("gpd", "pd", "weibull"),
- threshold = 0.9)
-}
-\arguments{
- \item{R}{an xts, vector, matrix, data frame, timeSeries
- or zoo object of asset return}
-
- \item{type}{The type of distribution
- "gpd","pd","weibull"}
-
- \item{threshold}{The threshold beyond which the drawdowns
- have to be modelled}
-}
-\description{
- Modelling Drawdown using Extreme Value Theory
-
- It has been shown empirically that Drawdowns can be
- modelled using Modified Generalized Pareto
- distribution(MGPD), Generalized Pareto Distribution(GPD)
- and other particular cases of MGPD such as weibull
- distribution \eqn{MGPD(\gamma,0,\psi)} and unit
- exponential distribution\eqn{MGPD(1,0,\psi)}
-
- 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}}
-
- 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}
-
- The GDP is given by the following equation.
- \eqn{MGPD(1,\eta,\psi)}
-
- \deqn{G_{\eta}(m) = \begin{array}{l}
- 1-(1+\eta\frac{m}{\psi})^(-1/\eta), if \eta \neq 0 \\ 1-
- e^{-frac{m}{\psi}}, if \eta = 0,\end{array}}
-
- The weibull distribution is given by the following
- equation \eqn{MGPD(\gamma,0,\psi)}
-
- \deqn{G(m) = 1- e^{-frac{m^\gamma}{\psi}}}
-
- The unit exponential distribution is given by the
- following equation \eqn{MGPD(1,0,\psi)}
-
- \deqn{G(m) = 1- e^{-m}}
-}
-\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.
-}
-
More information about the Returnanalytics-commits
mailing list