[Returnanalytics-commits] r2966 - in pkg/PerformanceAnalytics/sandbox/pulkit: R inst/doc man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Sep 1 03:41:09 CEST 2013


Author: pulkit
Date: 2013-09-01 03:41:03 +0200 (Sun, 01 Sep 2013)
New Revision: 2966

Modified:
   pkg/PerformanceAnalytics/sandbox/pulkit/R/GoldenSection.R
   pkg/PerformanceAnalytics/sandbox/pulkit/R/ProbSharpeRatio.R
   pkg/PerformanceAnalytics/sandbox/pulkit/inst/doc/ProbSharpe.Rnw
   pkg/PerformanceAnalytics/sandbox/pulkit/man/ProbSharpeRatio.Rd
   pkg/PerformanceAnalytics/sandbox/pulkit/man/golden_section.Rd
Log:
documentation changes

Modified: pkg/PerformanceAnalytics/sandbox/pulkit/R/GoldenSection.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/R/GoldenSection.R	2013-09-01 01:10:05 UTC (rev 2965)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/R/GoldenSection.R	2013-09-01 01:41:03 UTC (rev 2966)
@@ -6,12 +6,12 @@
 #' The Golden Section Search method is used to find the maximum or minimum of a unimodal
 #" function. (A unimodal function contains only one minimum or maximum on the interval 
 #' [a,b].) To make the discussion of the method simpler, let us assume that we are trying to find 
-#' the maximum of a function. choose three points \eqn{x_l},\eqn{x_1} and \eqn{x_u} \eqn{(x_l \textless x_1 \textless x_u)}
+#' the maximum of a function. choose three points \eqn{x_l},\eqn{x_1} and \eqn{x_u} \eqn{(x_l < x_1 < x_u)}
 #' along the x-axis with the corresponding values of the function \eqn{f(x_l)},\eqn{f(x_1)} and \eqn{f(x_u)}, respectively. Since
-#' \eqn{f(x_1)\textgreater f(x_l)} and \eqn{f(x_1) \textgreater f(x_u)}, the maximum must lie between \eqn{x_l} and \eqn{x_u}. Now 
+#' \eqn{f(x_1)< f(x_l)} and \eqn{f(x_1)< f(x_u)}, the maximum must lie between \eqn{x_l} and \eqn{x_u}. Now 
 #' a fourth point denoted by \eqn{x_2} is chosen to be between the larger of the two intervals of \eqn{[x_l,x_1]} and \eqn{[x_1,x_u]}/
 #' Assuming that the interval \eqn{[x_l,x_1]} is larger than the interval \eqn{[x_1,x_u]} we would choose \eqn{[x_l,x_1]} as the interval 
-#' in which \eqn{x_2} is chosen. If \eqn{f(x_2)>f(x_1)} then the new three points would be \eqn{x_l \textless x_2 \textless x_1} else if
+#' in which \eqn{x_2} is chosen. If \eqn{f(x_2)>f(x_1)} then the new three points would be \eqn{x_l > x_2 > x_u} else if
 #' \eqn{f(x_2)<f(x_1)} then the three new points are \eqn{x_2<x_1<x_u}. This process is continued until the distance between the outer point
 #' is sufficiently small.
 #'@param a initial point

Modified: pkg/PerformanceAnalytics/sandbox/pulkit/R/ProbSharpeRatio.R
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/R/ProbSharpeRatio.R	2013-09-01 01:10:05 UTC (rev 2965)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/R/ProbSharpeRatio.R	2013-09-01 01:41:03 UTC (rev 2966)
@@ -8,7 +8,7 @@
 #' probability of skill. The reference Sharpe Ratio should be less than 
 #' the Observed Sharpe Ratio.
 #' 
-#' \deqn{\hat{PSR}(SR^{*}) = Z\bigg[\frac{(\hat{SR}-SR^\ast)\sqrt{n-1}}{\sqrt{1-\hat{\gamma_3}SR^\ast + \frac{\hat{\gamma_4}-1}{4}\hat{SR^2}}}\bigg]}
+#' \deqn{\hat{PSR}(SR^{*}) = Z\bigg[\frac{(\hat{SR}-SR^{*})\sqrt{n-1}}{\sqrt{1-\hat{\gamma_3}SR^{*} + \frac{\hat{\gamma_4}-1}{4}\hat{SR^2}}}\bigg]}
 
 #' Here \eqn{n} is the track record length or the number of data points. It can be daily,weekly or yearly depending on the input given
 

Modified: pkg/PerformanceAnalytics/sandbox/pulkit/inst/doc/ProbSharpe.Rnw
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/inst/doc/ProbSharpe.Rnw	2013-09-01 01:10:05 UTC (rev 2965)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/inst/doc/ProbSharpe.Rnw	2013-09-01 01:41:03 UTC (rev 2966)
@@ -49,12 +49,12 @@
 
 
 \section{Probabilistic Sharpe Ratio}
- Given a predefined benchmark Sharpe ratio $SR^\ast$ , the observed Sharpe ratio $\hat{SR}$  can be expressed in probabilistic terms as
+ Given a predefined benchmark Sharpe ratio \eqn{SR^{*}} , the observed Sharpe ratio $\hat{SR}$  can be expressed in probabilistic terms as
  
- \deqn{\hat{PSR}(SR^\ast) = Z\biggl[\frac{(\hat{SR}-SR^\ast)\sqrt{n-1}}{\sqrt{1-\hat{\gamma_3}SR^\ast + \frac{\hat{\gamma_4}-1}{4}\hat{SR^2}}}\biggr]}
+  \deqn{\hat{PSR}(SR^{*}) = Z\bigg[\frac{(\hat{SR}-SR^{*})\sqrt{n-1}}{\sqrt{1-\hat{\gamma_3}SR^{*} + \frac{\hat{\gamma_4}-1}{4}\hat{SR^2}}}\bigg]}
+
+ Here \eqn{n} is the track record length or the number of data points. It can be daily,weekly or yearly depending on the input given
  
- Here $n$ is the track record length or the number of data points. It can be daily,weekly or yearly depending on the input given
- 
  \eqn{\hat{\gamma{_3}}} and \eqn{\hat{\gamma{_4}}} are the skewness and kurtosis respectively.
  It is not unusual to find strategies with irregular trading frequencies, such as weekly strategies that may not trade for a month. This poses a problem when computing an annualized Sharpe ratio, and there is no consensus as how skill should be measured in the context of irregular bets. Because PSR measures skill in probabilistic terms, it is invariant to calendar conventions. All calculations are done in the original frequency
 of the data, and there is no annualization. The Reference Sharpe Ratio is also given in the non-annualized form and should be greater than the Observed Sharpe Ratio.
@@ -83,12 +83,12 @@
 
 We would like to find the vector of weights that maximize the expression
 
- \deqn{\hat{PSR}(SR^\ast) = Z\biggl[\frac{(\hat{SR}-SR^\ast)\sqrt{n-1}}{\sqrt{1-\hat{\gamma_3}SR^\ast + \frac{\hat{\gamma_4}-1}{4}\hat{SR^2}}}\biggr]}
+\deqn{\hat{PSR}(SR^{*}) = Z\bigg[\frac{(\hat{SR}-SR^{*})\sqrt{n-1}}{\sqrt{1-\hat{\gamma_3}SR^{*} + \frac{\hat{\gamma_4}-1}{4}\hat{SR^2}}}\bigg]}
 
-where \eqn{\sigma = \sqrt{E[(r-\mu)^2]}} ,its standard deviation.\eqn{\gamma_3=\frac{E\biggl[(r-\mu)^3\biggr]}{\sigma^3}} its skewness,\eqn{\gamma_4=\frac{E\biggl[(r-\mu)^4\biggr]}{\sigma^4}} its kurtosis and \eqn{SR = \frac{\mu}{\sigma}} its Sharpe Ratio.
-
-Because \eqn{\hat{PSR}(SR^\ast)=Z[\hat{Z^\ast}]} is a monotonic increasing function of 
-\eqn{\hat{Z^\ast}} ,it suffices to compute the vector that maximizes \eqn{\hat{Z^\ast}}
+where \eqn{\sigma = \sqrt{E[(r-\mu)^2]}} ,its standard deviation.\eqn{\gamma_3=\frac{E\biggl[(r-\mu)^3\biggr]}{\sigma^3}} its skewness,
+\eqn{\gamma_4=\frac{E\bigg[(r-\mu)^4\bigg]}{\sigma^4}} its kurtosis and \eqn{SR = \frac{\mu}{\sigma}} its Sharpe Ratio.
+Because \eqn{\hat{PSR}(SR^{*})=Z[\hat{Z^{*}}]} is a monotonic increasing function of 
+\eqn{\hat{Z^{*}}} ,it suffices to compute the vector that maximizes \eqn{\hat{Z^{*}}}
  This optimal vector is invariant of the value adopted by the parameter \eqn{SR^\ast}. 
 
 

Modified: pkg/PerformanceAnalytics/sandbox/pulkit/man/ProbSharpeRatio.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/man/ProbSharpeRatio.Rd	2013-09-01 01:10:05 UTC (rev 2965)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/man/ProbSharpeRatio.Rd	2013-09-01 01:41:03 UTC (rev 2966)
@@ -48,7 +48,7 @@
   the Observed Sharpe Ratio.
 
   \deqn{\hat{PSR}(SR^{*}) =
-  Z\bigg[\frac{(\hat{SR}-SR^\ast)\sqrt{n-1}}{\sqrt{1-\hat{\gamma_3}SR^\ast
+  Z\bigg[\frac{(\hat{SR}-SR^{*})\sqrt{n-1}}{\sqrt{1-\hat{\gamma_3}SR^{*}
   + \frac{\hat{\gamma_4}-1}{4}\hat{SR^2}}}\bigg]} Here
   \eqn{n} is the track record length or the number of data
   points. It can be daily,weekly or yearly depending on the

Modified: pkg/PerformanceAnalytics/sandbox/pulkit/man/golden_section.Rd
===================================================================
--- pkg/PerformanceAnalytics/sandbox/pulkit/man/golden_section.Rd	2013-09-01 01:10:05 UTC (rev 2965)
+++ pkg/PerformanceAnalytics/sandbox/pulkit/man/golden_section.Rd	2013-09-01 01:41:03 UTC (rev 2966)
@@ -22,11 +22,10 @@
   discussion of the method simpler, let us assume that we
   are trying to find the maximum of a function. choose
   three points \eqn{x_l},\eqn{x_1} and \eqn{x_u} \eqn{(x_l
-  \textless x_1 \textless x_u)} along the x-axis with the
-  corresponding values of the function
-  \eqn{f(x_l)},\eqn{f(x_1)} and \eqn{f(x_u)}, respectively.
-  Since \eqn{f(x_1)\textgreater f(x_l)} and \eqn{f(x_1)
-  \textgreater f(x_u)}, the maximum must lie between
+  < x_1 < x_u)} along the x-axis with the corresponding
+  values of the function \eqn{f(x_l)},\eqn{f(x_1)} and
+  \eqn{f(x_u)}, respectively. Since \eqn{f(x_1)< f(x_l)}
+  and \eqn{f(x_1)< f(x_u)}, the maximum must lie between
   \eqn{x_l} and \eqn{x_u}. Now a fourth point denoted by
   \eqn{x_2} is chosen to be between the larger of the two
   intervals of \eqn{[x_l,x_1]} and \eqn{[x_1,x_u]}/
@@ -34,7 +33,7 @@
   the interval \eqn{[x_1,x_u]} we would choose
   \eqn{[x_l,x_1]} as the interval in which \eqn{x_2} is
   chosen. If \eqn{f(x_2)>f(x_1)} then the new three points
-  would be \eqn{x_l \textless x_2 \textless x_1} else if
+  would be \eqn{x_l > x_2 > x_u} else if
   \eqn{f(x_2)<f(x_1)} then the three new points are
   \eqn{x_2<x_1<x_u}. This process is continued until the
   distance between the outer point is sufficiently small.



More information about the Returnanalytics-commits mailing list