[Returnanalytics-commits] r2004 - pkg/PortfolioAnalytics/sandbox/attribution
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jun 11 18:56:19 CEST 2012
Author: braverock
Date: 2012-06-11 18:56:19 +0200 (Mon, 11 Jun 2012)
New Revision: 2004
Modified:
pkg/PortfolioAnalytics/sandbox/attribution/attribution.R
Log:
- correct ommission of reference name
- move example back into the documentation
Modified: pkg/PortfolioAnalytics/sandbox/attribution/attribution.R
===================================================================
--- pkg/PortfolioAnalytics/sandbox/attribution/attribution.R 2012-06-11 16:44:03 UTC (rev 2003)
+++ pkg/PortfolioAnalytics/sandbox/attribution/attribution.R 2012-06-11 16:56:19 UTC (rev 2004)
@@ -12,12 +12,24 @@
#' @param wb benchmark weights
#' @author Andrii Babii
#' @seealso
-#' @references Jon A. Christopherson, David R., Wayne E. Ferson
+#' @references Christopherson, Jon A., Carino, David R., Ferson, Wayne E.
#' \emph{Portfolio Performance Measurement and Benchmarking}. McGraw-Hill. 2009.
#' @examples
#'
#'
#'
+#' #EXAMPLE:
+#' data(attrib) # !!! Load attrib.RData workspace
+#' require(FinancialInstrument)
+#' require(PerformanceAnalytics)
+#' attribution(Rp, wp, Rb, wb, method = "top.down", linking = "carino")
+#' attribution(Rp, wp, Rb, wb, method = "bottom.up", linking = "menchero")
+#' attribution(Rp, wp, Rb, wb, method = "simple", linking = "grap")
+#' attribution(Rp, wp, Rb, wb, method = "top.down", linking = "frongello")
+#' attribution(Rp, wp, Rb, wb, method = "bottom.up", linking = "geometric")
+#'
+#' @export
+#' @rdname attribution
attribution <-
function (Rp, wp, Rb, wb, method = c("top.down", "bottom.up", "simple"),
linking = c("carino", "menchero", "grap", "frongello", "geometric"))
@@ -202,19 +214,7 @@
return(result)
}
-#EXAMPLE:
-data(attrib) # !!! Load attrib.RData workspace
-require(FinancialInstrument)
-require(PerformanceAnalytics)
-attribution(Rp, wp, Rb, wb, method = "top.down", linking = "carino")
-attribution(Rp, wp, Rb, wb, method = "bottom.up", linking = "menchero")
-attribution(Rp, wp, Rb, wb, method = "simple", linking = "grap")
-attribution(Rp, wp, Rb, wb, method = "top.down", linking = "frongello")
-attribution(Rp, wp, Rb, wb, method = "bottom.up", linking = "geometric")
-#' @export
-#' @rdname attribution
-
###############################################################################
# R (http://r-project.org/) Econometrics for Performance and Risk Analysis
#
More information about the Returnanalytics-commits
mailing list