[Returnanalytics-commits] r2917 - in pkg/PerformanceAnalytics/sandbox/Shubhankit: . R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Aug 28 12:38:55 CEST 2013
Author: shubhanm
Date: 2013-08-28 12:38:55 +0200 (Wed, 28 Aug 2013)
New Revision: 2917
Added:
pkg/PerformanceAnalytics/sandbox/Shubhankit/R/chart.AcarSim.R
pkg/PerformanceAnalytics/sandbox/Shubhankit/man/chart.AcarSim.Rd
Removed:
pkg/PerformanceAnalytics/sandbox/Shubhankit/R/CalmarRatio.Normalized.R
pkg/PerformanceAnalytics/sandbox/Shubhankit/R/table.normDD.R
pkg/PerformanceAnalytics/sandbox/Shubhankit/man/CalmarRatio.normalized.Rd
pkg/PerformanceAnalytics/sandbox/Shubhankit/man/table.normDD.Rd
Modified:
pkg/PerformanceAnalytics/sandbox/Shubhankit/DESCRIPTION
pkg/PerformanceAnalytics/sandbox/Shubhankit/NAMESPACE
pkg/PerformanceAnalytics/sandbox/Shubhankit/R/AcarSim.R
pkg/PerformanceAnalytics/sandbox/Shubhankit/man/AcarSim.Rd
Log:
.Rd/R addition for Shane Acar Loss Simulation chart wrapper
Modified: pkg/PerformanceAnalytics/sandbox/Shubhankit/DESCRIPTION
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Shubhankit/DESCRIPTION 2013-08-28 08:55:04 UTC (rev 2916)
+++ pkg/PerformanceAnalytics/sandbox/Shubhankit/DESCRIPTION 2013-08-28 10:38:55 UTC (rev 2917)
@@ -17,7 +17,6 @@
ByteCompile: TRUE
Collate:
'ACStdDev.annualized.R'
- 'CalmarRatio.Normalized.R'
'CDDopt.R'
'CDrawdown.R'
'chart.Autocorrelation.R'
@@ -27,7 +26,6 @@
'na.skip.R'
'Return.GLM.R'
'table.ComparitiveReturn.GLM.R'
- 'table.normDD.R'
'table.UnsmoothReturn.R'
'UnsmoothReturn.R'
'AcarSim.R'
@@ -37,3 +35,4 @@
'LoSharpe.R'
'Return.Okunev.R'
'se.LoSharpe.R'
+ 'chart.AcarSim.R'
Modified: pkg/PerformanceAnalytics/sandbox/Shubhankit/NAMESPACE
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Shubhankit/NAMESPACE 2013-08-28 08:55:04 UTC (rev 2916)
+++ pkg/PerformanceAnalytics/sandbox/Shubhankit/NAMESPACE 2013-08-28 10:38:55 UTC (rev 2917)
@@ -1,21 +1,18 @@
export(AcarSim)
export(ACStdDev.annualized)
export(CalmarRatio.Norm)
-export(CalmarRatio.Normalized)
export(CDD.Opt)
export(CDDOpt)
export(CDrawdown)
+export(chart.AcarSim)
export(chart.Autocorrelation)
export(EMaxDDGBM)
export(GLMSmoothIndex)
export(LoSharpe)
-export(QP.Norm)
export(Return.GLM)
export(Return.Okunev)
export(se.LoSharpe)
export(SterlingRatio.Norm)
-export(SterlingRatio.Normalized)
export(table.ComparitiveReturn.GLM)
export(table.EMaxDDGBM)
-export(table.NormDD)
export(table.UnsmoothReturn)
Modified: pkg/PerformanceAnalytics/sandbox/Shubhankit/R/AcarSim.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Shubhankit/R/AcarSim.R 2013-08-28 08:55:04 UTC (rev 2916)
+++ pkg/PerformanceAnalytics/sandbox/Shubhankit/R/AcarSim.R 2013-08-28 10:38:55 UTC (rev 2917)
@@ -7,12 +7,12 @@
#' \emph{two to two} by step of \emph{0.1} . The process has been repeated \bold{six thousand times}.
#' @details Unfortunately, there is no \bold{analytical formulae} to establish the maximum drawdown properties under
#' the random walk assumption. We should note first that due to its definition, the maximum drawdown
-#' divided by volatility is an only function of the ratio mean divided by volatility.
+#' divided by volatility can be interpreted as the only function of the ratio mean divided by volatility.
#' \deqn{MD/[\sigma]= Min (\sum[X(j)])/\sigma = F(\mu/\sigma)}
#' Where j varies from 1 to n ,which is the number of drawdown's in simulation
#' @param R an xts, vector, matrix, data frame, timeSeries or zoo object of
#' asset returns
-#' @author Peter Carl, Brian Peterson, Shubhankit Mohan
+#' @author Shubhankit Mohan
#' @references Maximum Loss and Maximum Drawdown in Financial Markets,\emph{International Conference Sponsored by BNP and Imperial College on:
#' Forecasting Financial Markets, London, United Kingdom, May 1997} \url{http://www.intelligenthedgefundinvesting.com/pubs/easj.pdf}
#' @keywords Maximum Loss Simulated Drawdown
@@ -22,7 +22,7 @@
#' @rdname AcarSim
#' @export
AcarSim <-
- function(R)
+ function()
{
R = checkData(Ra, method="xts")
# Get dimensions and labels
Deleted: pkg/PerformanceAnalytics/sandbox/Shubhankit/R/CalmarRatio.Normalized.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Shubhankit/R/CalmarRatio.Normalized.R 2013-08-28 08:55:04 UTC (rev 2916)
+++ pkg/PerformanceAnalytics/sandbox/Shubhankit/R/CalmarRatio.Normalized.R 2013-08-28 10:38:55 UTC (rev 2917)
@@ -1,139 +0,0 @@
-#' QP function fo calculation of Sharpe Ratio
-#'
-#' calculate a Normalized Calmar or Sterling reward/risk ratio
-#'
-#' Normalized Calmar and Sterling Ratios are yet another method of creating a
-#' risk-adjusted measure for ranking investments similar to the
-#' \code{\link{SharpeRatio}}.
-#'
-#' Both the Normalized Calmar and the Sterling ratio are the ratio of annualized return
-#' over the absolute value of the maximum drawdown of an investment. The
-#' Sterling ratio adds an excess risk measure to the maximum drawdown,
-#' traditionally and defaulting to 10\%.
-#'
-#' It is also traditional to use a three year return series for these
-#' calculations, although the functions included here make no effort to
-#' determine the length of your series. If you want to use a subset of your
-#' series, you'll need to truncate or subset the input data to the desired
-#' length.
-#'
-#' Many other measures have been proposed to do similar reward to risk ranking.
-#' It is the opinion of this author that newer measures such as Sortino's
-#' \code{\link{UpsidePotentialRatio}} or Favre's modified
-#' \code{\link{SharpeRatio}} are both \dQuote{better} measures, and
-#' should be preferred to the Calmar or Sterling Ratio.
-#'
-#' @aliases Normalized.CalmarRatio Normalized.SterlingRatio
-#' @param R an xts, vector, matrix, data frame, timeSeries or zoo object of
-#' asset returns
-#' @param scale number of periods in a year (daily scale = 252, monthly scale =
-#' 12, quarterly scale = 4)
-#' @param excess for Sterling Ratio, excess amount to add to the max drawdown,
-#' traditionally and default .1 (10\%)
-#' @author Brian G. Peterson
-#' @seealso
-#' \code{\link{Return.annualized}}, \cr
-#' \code{\link{maxDrawdown}}, \cr
-#' \code{\link{SharpeRatio.modified}}, \cr
-#' \code{\link{UpsidePotentialRatio}}
-#' @references Bacon, Carl. \emph{Magdon-Ismail, M. and Amir Atiya, Maximum drawdown. Risk Magazine, 01 Oct 2004.
-#' @keywords ts multivariate distribution models
-#' @examples
-#'
-#' data(managers)
-#' Normalized.CalmarRatio(managers[,1,drop=FALSE])
-#' Normalized.CalmarRatio(managers[,1:6])
-#' Normalized.SterlingRatio(managers[,1,drop=FALSE])
-#' Normalized.SterlingRatio(managers[,1:6])
-#'
-#' @export
-#' @rdname CalmarRatio.normalized
-QP.Norm <- function (R, tau,scale = NA)
-{
- Sharpe= as.numeric(SharpeRatio.annualized(edhec))
-return(.63519+(.5*log(tau))+log(Sharpe))
-}
-
-#' @export
-CalmarRatio.Normalized <- function (R, tau = 1,scale = NA)
-{ # @author Brian G. Peterson
-
- # DESCRIPTION:
- # Inputs:
- # Ra: in this case, the function anticipates having a return stream as input,
- # rather than prices.
- # tau : scaled Time in Years
- # scale: number of periods per year
- # Outputs:
- # This function returns a Calmar Ratio
-
- # FUNCTION:
-
- R = checkData(R)
- if(is.na(scale)) {
- freq = periodicity(R)
- switch(freq$scale,
- minute = {stop("Data periodicity too high")},
- hourly = {stop("Data periodicity too high")},
- daily = {scale = 252},
- weekly = {scale = 52},
- monthly = {scale = 12},
- quarterly = {scale = 4},
- yearly = {scale = 1}
- )
- }
- Time = nyears(R)
- annualized_return = Return.annualized(R, scale=scale)
- drawdown = abs(maxDrawdown(R))
- result = (annualized_return/drawdown)*(QP.Norm(R,Time)/QP.Norm(R,tau))*(tau/Time)
- rownames(result) = "Normalized Calmar Ratio"
- return(result)
-}
-
-#' @export
-#' @rdname CalmarRatio.normalized
-SterlingRatio.Normalized <-
- function (R, tau=1,scale=NA, excess=.1)
- { # @author Brian G. Peterson
-
- # DESCRIPTION:
- # Inputs:
- # Ra: in this case, the function anticipates having a return stream as input,
- # rather than prices.
- # scale: number of periods per year
- # Outputs:
- # This function returns a Sterling Ratio
-
- # FUNCTION:
- Time = nyears(R)
- R = checkData(R)
- if(is.na(scale)) {
- freq = periodicity(R)
- switch(freq$scale,
- minute = {stop("Data periodicity too high")},
- hourly = {stop("Data periodicity too high")},
- daily = {scale = 252},
- weekly = {scale = 52},
- monthly = {scale = 12},
- quarterly = {scale = 4},
- yearly = {scale = 1}
- )
- }
- annualized_return = Return.annualized(R, scale=scale)
- drawdown = abs(maxDrawdown(R)+excess)
- result = annualized_return/drawdown*(QP.Norm(R,Time)/QP.Norm(R,tau))*(tau/Time)
- rownames(result) = paste("Normalized Sterling Ratio (Excess = ", round(excess*100,0), "%)", sep="")
- return(result)
- }
-
-###############################################################################
-# R (http://r-project.org/) Econometrics for Performance and Risk Analysis
-#
-# Copyright (c) 2004-2013 Peter Carl and Brian G. Peterson
-#
-# This R package is distributed under the terms of the GNU Public License (GPL)
-# for full details see the file COPYING
-#
-# $Id: CalmarRatioNormalized.R 1955 2012-05-23 16:38:16Z braverock $
-#
-###############################################################################
Added: pkg/PerformanceAnalytics/sandbox/Shubhankit/R/chart.AcarSim.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Shubhankit/R/chart.AcarSim.R (rev 0)
+++ pkg/PerformanceAnalytics/sandbox/Shubhankit/R/chart.AcarSim.R 2013-08-28 10:38:55 UTC (rev 2917)
@@ -0,0 +1,94 @@
+#' @title Acar-Shane Maximum Loss Plot
+#'
+#'@description To get some insight on the relationships between maximum drawdown per unit of volatility
+#'and mean return divided by volatility, we have proceeded to Monte-Carlo simulations.
+#' We have simulated cash flows over a period of 36 monthly returns and measured maximum
+#'drawdown for varied levels of annualised return divided by volatility varying from minus
+#' \emph{two to two} by step of \emph{0.1} . The process has been repeated \bold{six thousand times}.
+#' @details Unfortunately, there is no \bold{analytical formulae} to establish the maximum drawdown properties under
+#' the random walk assumption. We should note first that due to its definition, the maximum drawdown
+#' divided by volatility is an only function of the ratio mean divided by volatility.
+#' \deqn{MD/[\sigma]= Min (\sum[X(j)])/\sigma = F(\mu/\sigma)}
+#' Where j varies from 1 to n ,which is the number of drawdown's in simulation
+#' @param R an xts, vector, matrix, data frame, timeSeries or zoo object of
+#' asset returns
+#' @author Shubhankit Mohan
+#' @references Maximum Loss and Maximum Drawdown in Financial Markets,\emph{International Conference Sponsored by BNP and Imperial College on:
+#' Forecasting Financial Markets, London, United Kingdom, May 1997} \url{http://www.intelligenthedgefundinvesting.com/pubs/easj.pdf}
+#' @keywords Maximum Loss Simulated Drawdown
+#' @examples
+#' library(PerformanceAnalytics)
+#' chart.AcarSim(edhec)
+#' @rdname chart.AcarSim
+#' @export
+chart.AcarSim <-
+ function(R)
+ {
+ R = checkData(Ra, method="xts")
+ # Get dimensions and labels
+ # simulated parameters using edhec data
+ mu=mean(Return.annualized(edhec))
+ monthly=(1+mu)^(1/12)-1
+ sig=StdDev.annualized(edhec[,1])[1];
+ T= 36
+ j=1
+ dt=1/T
+ nsim=6000;
+ thres=4;
+ r=matrix(0,nsim,T+1)
+ monthly = 0
+ r[,1]=monthly;
+ # Sigma 'monthly volatiltiy' will be the varying term
+ ratio= seq(-2, 2, by=.1);
+ len = length(ratio)
+ ddown=array(0, dim=c(nsim,len,thres))
+ fddown=array(0, dim=c(len,thres))
+ Z <- array(0, c(len))
+ for(i in 1:len)
+ {
+ monthly = sig*ratio[i];
+
+ for(j in 1:nsim)
+ {
+ dz=rnorm(T)
+
+ # 3 factor due to 36 month time frame investigated in the paper
+ r[j,2:37]=monthly+(sig*dz*sqrt(3*dt))
+
+ ddown[j,i,1]= ES((r[j,]),.99)
+ ddown[j,i,1][is.na(ddown[j,i,1])] <- 0
+ fddown[i,1]=fddown[i,1]+ddown[j,i,1]
+ ddown[j,i,2]= ES((r[j,]),.95)
+ ddown[j,i,2][is.na(ddown[j,i,2])] <- 0
+ fddown[i,2]=fddown[i,2]+ddown[j,i,2]
+ ddown[j,i,3]= ES((r[j,]),.90)
+ ddown[j,i,3][is.na(ddown[j,i,3])] <- 0
+ fddown[i,3]=fddown[i,3]+ddown[j,i,3]
+ ddown[j,i,4]= ES((r[j,]),.85)
+ ddown[j,i,4][is.na(ddown[j,i,4])] <- 0
+ fddown[i,4]=fddown[i,4]+ddown[j,i,4]
+ assign("last.warning", NULL, envir = baseenv())
+ }
+ }
+ plot(((fddown[,1])/(sig*nsim)),xlab="Annualised Return/Volatility from [-2,2]",ylab="Maximum Drawdown/Volatility",type='o',col="blue")
+ lines(((fddown[,2])/(sig*nsim)),type='o',col="pink")
+ lines(((fddown[,3])/(sig*nsim)),type='o',col="green")
+ lines(((fddown[,4])/(sig*nsim)),type='o',col="red")
+ legend(32,-4, c("%99", "%95", "%90","%85"), col = c("blue","pink","green","red"), text.col= "black",
+ lty = c(2, -1, 1), pch = c(-1, 3, 4), merge = TRUE, bg='gray90')
+
+ title("Maximum Drawdown/Volatility as a function of Return/Volatility
+36 monthly returns simulated 6,000 times")
+ }
+
+###############################################################################
+# R (http://r-project.org/) Econometrics for Performance and Risk Analysis
+#
+# Copyright (c) 2004-2012 Peter Carl and Brian G. Peterson
+#
+# This R package is distributed under the terms of the GNU Public License (GPL)
+# for full details see the file COPYING
+#
+# $Id: AcarSim.R 2163 2012-07-16 00:30:19Z braverock $
+#
+###############################################################################
\ No newline at end of file
Deleted: pkg/PerformanceAnalytics/sandbox/Shubhankit/R/table.normDD.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Shubhankit/R/table.normDD.R 2013-08-28 08:55:04 UTC (rev 2916)
+++ pkg/PerformanceAnalytics/sandbox/Shubhankit/R/table.normDD.R 2013-08-28 10:38:55 UTC (rev 2917)
@@ -1,109 +0,0 @@
-#'@title Generalised Lambda Distribution Simulated 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
-#'research to show investors how to begin to answer this tricky question
-#'@details To simulate net asset value (NAV) series where skewness and kurtosis are zero,
-#' we draw sample returns from a lognormal return distribution. To capture skewness
-#' and kurtosis, we sample returns from a \bold{generalised \eqn{\lambda} distribution}.The values of
-#' skewness and excess kurtosis used were roughly consistent with the range of values the paper
-#' observed for commodity trading advisers in our database. The NAV series is constructed
-#' from the return series. The simulated drawdowns are then derived and used to produce
-#' the theoretical drawdown distributions. A typical run usually requires \bold{10,000}
-#' iterations to produce a smooth distribution.
-#'
-#'
-#' @param R an xts, vector, matrix, data frame, timeSeries or zoo object of
-#' asset returns
-#' @references Burghardt, G., and L. Liu, \emph{ It's the Autocorrelation, Stupid (November 2012) Newedge
-#' working paper.}
-#' \code{\link[stats]{}} \cr
-#' \url{http://www.amfmblog.com/assets/Newedge-Autocorrelation.pdf}
-#' Burghardt, G., Duncan, R. and L. Liu, \eph{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
-#' @seealso Drawdowns.R
-#' @rdname table.normDD
-#' @export
-table.NormDD <-
- function (R,digits =4)
- {# @author
-
- # DESCRIPTION:
- # Downside Risk Summary: Statistics and Stylized Facts
-
- # Inputs:
- # R: a regular timeseries of returns (rather than prices)
- # Output: Table of Estimated Drawdowns
- require("gld")
-
- y = checkData(R, method = "xts")
- columns = ncol(y)
- rows = nrow(y)
- columnnames = colnames(y)
- rownames = rownames(y)
- T= nyears(y);
- n <- 1000
- dt <- 1/T;
- r0 <- 0;
- s0 <- 1;
- # for each column, do the following:
- for(column in 1:columns) {
- x = y[,column]
- mu = Return.annualized(x, scale = NA, geometric = TRUE)
- sig=StdDev.annualized(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)
-
- for(j in 1:n){
- r[2:(T+1),j]= rgl(T,mu,sig,skew,kurt)
- for(i in 2:(T+1)){
-
- dr <- r[i,j]*dt
- s[i,j] <- s[i-1,j] + (dr/100)
- }
-
-
- drawdown[j] = as.numeric(maxdrawdown(s[,j])[1])
- }
- z = c((mu*100),
- (sig*100),
- ((mean(drawdown))))
- znames = c(
- "Annual Returns in %",
- "Std Devetions in %",
- "Normalized Drawdown Drawdown in %"
- )
- if(column == 1) {
- resultingtable = data.frame(Value = z, row.names = znames)
- }
- else {
- nextcolumn = data.frame(Value = z, row.names = znames)
- resultingtable = cbind(resultingtable, nextcolumn)
- }
- }
- colnames(resultingtable) = columnnames
- ans = base::round(resultingtable, digits)
- ans
- # t <- seq(0, T, dt)
- # matplot(t, r[1,1:T], type="l", lty=1, main="Short Rate Paths", ylab="rt")
-
- }
-
-###############################################################################
-# R (http://r-project.org/)
-#
-# Copyright (c) 2004-2013
-#
-# This R package is distributed under the terms of the GNU Public License (GPL)
-# for full details see the file COPYING
-#
-# $Id: EMaxDDGBM
-#
-###############################################################################
Modified: pkg/PerformanceAnalytics/sandbox/Shubhankit/man/AcarSim.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Shubhankit/man/AcarSim.Rd 2013-08-28 08:55:04 UTC (rev 2916)
+++ pkg/PerformanceAnalytics/sandbox/Shubhankit/man/AcarSim.Rd 2013-08-28 10:38:55 UTC (rev 2917)
@@ -1,50 +1,50 @@
-\name{AcarSim}
-\alias{AcarSim}
-\title{Acar-Shane Maximum Loss Plot}
-\usage{
- AcarSim(R)
-}
-\arguments{
- \item{R}{an xts, vector, matrix, data frame, timeSeries
- or zoo object of asset returns}
-}
-\description{
- To get some insight on the relationships between maximum
- drawdown per unit of volatility and mean return divided
- by volatility, we have proceeded to Monte-Carlo
- simulations. We have simulated cash flows over a period
- of 36 monthly returns and measured maximum drawdown for
- varied levels of annualised return divided by volatility
- varying from minus \emph{two to two} by step of
- \emph{0.1} . The process has been repeated \bold{six
- thousand times}.
-}
-\details{
- Unfortunately, there is no \bold{analytical formulae} to
- establish the maximum drawdown properties under the
- random walk assumption. We should note first that due to
- its definition, the maximum drawdown divided by
- volatility is an only function of the ratio mean divided
- by volatility. \deqn{MD/[\sigma]= Min (\sum[X(j)])/\sigma
- = F(\mu/\sigma)} Where j varies from 1 to n ,which is the
- number of drawdown's in simulation
-}
-\examples{
-library(PerformanceAnalytics)
-AcarSim(edhec)
-}
-\author{
- Peter Carl, Brian Peterson, Shubhankit Mohan
-}
-\references{
- Maximum Loss and Maximum Drawdown in Financial
- Markets,\emph{International Conference Sponsored by BNP
- and Imperial College on: Forecasting Financial Markets,
- London, United Kingdom, May 1997}
- \url{http://www.intelligenthedgefundinvesting.com/pubs/easj.pdf}
-}
-\keyword{Drawdown}
-\keyword{Loss}
-\keyword{Maximum}
-\keyword{Simulated}
-
+\name{AcarSim}
+\alias{AcarSim}
+\title{Acar-Shane Maximum Loss Plot}
+\usage{
+ AcarSim()
+}
+\arguments{
+ \item{R}{an xts, vector, matrix, data frame, timeSeries
+ or zoo object of asset returns}
+}
+\description{
+ To get some insight on the relationships between maximum
+ drawdown per unit of volatility and mean return divided
+ by volatility, we have proceeded to Monte-Carlo
+ simulations. We have simulated cash flows over a period
+ of 36 monthly returns and measured maximum drawdown for
+ varied levels of annualised return divided by volatility
+ varying from minus \emph{two to two} by step of
+ \emph{0.1} . The process has been repeated \bold{six
+ thousand times}.
+}
+\details{
+ Unfortunately, there is no \bold{analytical formulae} to
+ establish the maximum drawdown properties under the
+ random walk assumption. We should note first that due to
+ its definition, the maximum drawdown divided by
+ volatility can be interpreted as the only function of the
+ ratio mean divided by volatility. \deqn{MD/[\sigma]= Min
+ (\sum[X(j)])/\sigma = F(\mu/\sigma)} Where j varies from
+ 1 to n ,which is the number of drawdown's in simulation
+}
+\examples{
+library(PerformanceAnalytics)
+AcarSim(edhec)
+}
+\author{
+ Shubhankit Mohan
+}
+\references{
+ Maximum Loss and Maximum Drawdown in Financial
+ Markets,\emph{International Conference Sponsored by BNP
+ and Imperial College on: Forecasting Financial Markets,
+ London, United Kingdom, May 1997}
+ \url{http://www.intelligenthedgefundinvesting.com/pubs/easj.pdf}
+}
+\keyword{Drawdown}
+\keyword{Loss}
+\keyword{Maximum}
+\keyword{Simulated}
+
Deleted: pkg/PerformanceAnalytics/sandbox/Shubhankit/man/CalmarRatio.normalized.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Shubhankit/man/CalmarRatio.normalized.Rd 2013-08-28 08:55:04 UTC (rev 2916)
+++ pkg/PerformanceAnalytics/sandbox/Shubhankit/man/CalmarRatio.normalized.Rd 2013-08-28 10:38:55 UTC (rev 2917)
@@ -1,77 +0,0 @@
-\name{QP.Norm}
-\alias{Normalized.CalmarRatio}
-\alias{Normalized.SterlingRatio}
-\alias{QP.Norm}
-\alias{SterlingRatio.Normalized}
-\title{QP function fo calculation of Sharpe Ratio}
-\usage{
- QP.Norm(R, tau, scale = NA)
-
- SterlingRatio.Normalized(R, tau = 1, scale = NA,
- excess = 0.1)
-}
-\arguments{
- \item{R}{an xts, vector, matrix, data frame, timeSeries
- or zoo object of asset returns}
-
- \item{scale}{number of periods in a year (daily scale =
- 252, monthly scale = 12, quarterly scale = 4)}
-
- \item{excess}{for Sterling Ratio, excess amount to add to
- the max drawdown, traditionally and default .1 (10\%)}
-}
-\description{
- calculate a Normalized Calmar or Sterling reward/risk
- ratio
-}
-\details{
- Normalized Calmar and Sterling Ratios are yet another
- method of creating a risk-adjusted measure for ranking
- investments similar to the \code{\link{SharpeRatio}}.
-
- Both the Normalized Calmar and the Sterling ratio are the
- ratio of annualized return over the absolute value of the
- maximum drawdown of an investment. The Sterling ratio
- adds an excess risk measure to the maximum drawdown,
- traditionally and defaulting to 10\%.
-
- It is also traditional to use a three year return series
- for these calculations, although the functions included
- here make no effort to determine the length of your
- series. If you want to use a subset of your series,
- you'll need to truncate or subset the input data to the
- desired length.
-
- Many other measures have been proposed to do similar
- reward to risk ranking. It is the opinion of this author
- that newer measures such as Sortino's
- \code{\link{UpsidePotentialRatio}} or Favre's modified
- \code{\link{SharpeRatio}} are both \dQuote{better}
- measures, and should be preferred to the Calmar or
- Sterling Ratio.
-}
-\examples{
-data(managers)
- Normalized.CalmarRatio(managers[,1,drop=FALSE])
- Normalized.CalmarRatio(managers[,1:6])
- Normalized.SterlingRatio(managers[,1,drop=FALSE])
- Normalized.SterlingRatio(managers[,1:6])
-}
-\author{
- Brian G. Peterson
-}
-\references{
- Bacon, Carl. \emph{Magdon-Ismail, M. and Amir Atiya,
- Maximum drawdown. Risk Magazine, 01 Oct 2004.
-}
-\seealso{
- \code{\link{Return.annualized}}, \cr
- \code{\link{maxDrawdown}}, \cr
- \code{\link{SharpeRatio.modified}}, \cr
- \code{\link{UpsidePotentialRatio}}
-}
-\keyword{distribution}
-\keyword{models}
-\keyword{multivariate}
-\keyword{ts}
-
Added: pkg/PerformanceAnalytics/sandbox/Shubhankit/man/chart.AcarSim.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Shubhankit/man/chart.AcarSim.Rd (rev 0)
+++ pkg/PerformanceAnalytics/sandbox/Shubhankit/man/chart.AcarSim.Rd 2013-08-28 10:38:55 UTC (rev 2917)
@@ -0,0 +1,50 @@
+\name{chart.AcarSim}
+\alias{chart.AcarSim}
+\title{Acar-Shane Maximum Loss Plot}
+\usage{
+ chart.AcarSim(R)
+}
+\arguments{
+ \item{R}{an xts, vector, matrix, data frame, timeSeries
+ or zoo object of asset returns}
+}
+\description{
+ To get some insight on the relationships between maximum
+ drawdown per unit of volatility and mean return divided
+ by volatility, we have proceeded to Monte-Carlo
+ simulations. We have simulated cash flows over a period
+ of 36 monthly returns and measured maximum drawdown for
+ varied levels of annualised return divided by volatility
+ varying from minus \emph{two to two} by step of
+ \emph{0.1} . The process has been repeated \bold{six
+ thousand times}.
+}
+\details{
+ Unfortunately, there is no \bold{analytical formulae} to
+ establish the maximum drawdown properties under the
+ random walk assumption. We should note first that due to
+ its definition, the maximum drawdown divided by
+ volatility is an only function of the ratio mean divided
+ by volatility. \deqn{MD/[\sigma]= Min (\sum[X(j)])/\sigma
+ = F(\mu/\sigma)} Where j varies from 1 to n ,which is the
+ number of drawdown's in simulation
+}
+\examples{
+library(PerformanceAnalytics)
+chart.AcarSim(edhec)
+}
+\author{
+ Shubhankit Mohan
+}
+\references{
+ Maximum Loss and Maximum Drawdown in Financial
+ Markets,\emph{International Conference Sponsored by BNP
+ and Imperial College on: Forecasting Financial Markets,
+ London, United Kingdom, May 1997}
+ \url{http://www.intelligenthedgefundinvesting.com/pubs/easj.pdf}
+}
+\keyword{Drawdown}
+\keyword{Loss}
+\keyword{Maximum}
+\keyword{Simulated}
+
Deleted: pkg/PerformanceAnalytics/sandbox/Shubhankit/man/table.normDD.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/Shubhankit/man/table.normDD.Rd 2013-08-28 08:55:04 UTC (rev 2916)
+++ pkg/PerformanceAnalytics/sandbox/Shubhankit/man/table.normDD.Rd 2013-08-28 10:38:55 UTC (rev 2917)
@@ -1,56 +0,0 @@
-\name{table.NormDD}
-\alias{table.NormDD}
-\title{Generalised Lambda Distribution Simulated Drawdown}
-\usage{
- table.NormDD(R, digits = 4)
-}
-\arguments{
- \item{R}{an xts, vector, matrix, data frame, timeSeries
- or zoo object of asset returns}
-}
-\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
- research to show investors how to begin to answer this
- tricky question
-}
-\details{
- To simulate net asset value (NAV) series where skewness
- and kurtosis are zero, we draw sample returns from a
- lognormal return distribution. To capture skewness and
- kurtosis, we sample returns from a \bold{generalised
- \eqn{\lambda} distribution}.The values of skewness and
- excess kurtosis used were roughly consistent with the
- range of values the paper observed for commodity trading
- advisers in our database. The NAV series is constructed
- from the return series. The simulated drawdowns are then
- derived and used to produce the theoretical drawdown
- distributions. A typical run usually requires
- \bold{10,000} iterations to produce a smooth
- distribution.
-}
-\author{
- Peter Carl, Brian Peterson, Shubhankit Mohan
-}
-\references{
- Burghardt, G., and L. Liu, \emph{ It's the
- Autocorrelation, Stupid (November 2012) Newedge working
- paper.} \code{\link[stats]{}} \cr
- \url{http://www.amfmblog.com/assets/Newedge-Autocorrelation.pdf}
- Burghardt, G., Duncan, R. and L. Liu, \eph{Deciphering
- drawdown}. Risk magazine, Risk management for investors,
- September, S16-S20, 2003.
- \url{http://www.risk.net/data/risk/pdf/investor/0903_risk.pdf}
-}
-\seealso{
- Drawdowns.R
-}
-\keyword{Assumptions}
-\keyword{Brownian}
-\keyword{Drawdown}
-\keyword{Motion}
-\keyword{Simulated}
-\keyword{Using}
-
More information about the Returnanalytics-commits
mailing list