[Returnanalytics-commits] r2293 - in pkg/PerformanceAnalytics: . R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Nov 8 15:52:28 CET 2012
Author: bodanker
Date: 2012-11-08 15:52:28 +0100 (Thu, 08 Nov 2012)
New Revision: 2293
Modified:
pkg/PerformanceAnalytics/DESCRIPTION
pkg/PerformanceAnalytics/NAMESPACE
pkg/PerformanceAnalytics/R/chart.RollingRegression.R
pkg/PerformanceAnalytics/R/zzz.R
Log:
- un-register rollapply.xts S3 method (now in xts)
- copy (unexported) sd.xts from xts namespace
- convert chart.RollingRegression.R to use rollapply.xts
- bump version
Modified: pkg/PerformanceAnalytics/DESCRIPTION
===================================================================
--- pkg/PerformanceAnalytics/DESCRIPTION 2012-11-05 21:21:01 UTC (rev 2292)
+++ pkg/PerformanceAnalytics/DESCRIPTION 2012-11-08 14:52:28 UTC (rev 2293)
@@ -1,7 +1,7 @@
Package: PerformanceAnalytics
Type: Package
Title: Econometric tools for performance and risk analysis.
-Version: 1.0.5.1
+Version: 1.0.5.2
Date: $Date$
Author: Peter Carl, Brian G. Peterson
Maintainer: Brian G. Peterson <brian at braverock.com>
Modified: pkg/PerformanceAnalytics/NAMESPACE
===================================================================
--- pkg/PerformanceAnalytics/NAMESPACE 2012-11-05 21:21:01 UTC (rev 2292)
+++ pkg/PerformanceAnalytics/NAMESPACE 2012-11-08 14:52:28 UTC (rev 2293)
@@ -229,8 +229,6 @@
S3method(textplot, data.frame)
S3method(textplot, matrix)
-S3method(rollapply,xts)
-
# # Export These
# ActivePremium
# apply.fromstart
Modified: pkg/PerformanceAnalytics/R/chart.RollingRegression.R
===================================================================
--- pkg/PerformanceAnalytics/R/chart.RollingRegression.R 2012-11-05 21:21:01 UTC (rev 2292)
+++ pkg/PerformanceAnalytics/R/chart.RollingRegression.R 2012-11-08 14:52:28 UTC (rev 2293)
@@ -67,8 +67,8 @@
# FUNCTION:
# Transform input data to a data frame
- Ra = checkData(Ra, method="zoo")
- Rb = checkData(Rb, method="zoo")
+ Ra = checkData(Ra)
+ Rb = checkData(Rb)
#Rf = checkDataMatrix(Rf)
attribute=attribute[1]
@@ -87,9 +87,9 @@
for(column.b in 1:columns.b) { # against each asset passed in as Rb
merged.assets = merge(Ra.excess[,column.a,drop=FALSE], Rb.excess[,column.b,drop=FALSE])
if(attribute == "Alpha")
- column.result = rollapply.xts(na.omit(merged.assets), width = width, FUN= function(x) lm(x[,1,drop=FALSE]~x[,2,drop=FALSE])$coefficients[1], by = 1, by.column = FALSE, na.pad = na.pad, align = "right")
+ column.result = rollapply(na.omit(merged.assets), width = width, FUN= function(x) lm(x[,1,drop=FALSE]~x[,2,drop=FALSE])$coefficients[1], by = 1, by.column = FALSE, fill = na.pad, align = "right")
if(attribute == "Beta")
- column.result = rollapply.xts(na.omit(merged.assets), width = width, FUN= function(x) lm(x[,1,drop=FALSE]~x[,2,drop=FALSE])$coefficients[2], by = 1, by.column = FALSE, na.pad = na.pad, align = "right")
+ column.result = rollapply(na.omit(merged.assets), width = width, FUN= function(x) lm(x[,1,drop=FALSE]~x[,2,drop=FALSE])$coefficients[2], by = 1, by.column = FALSE, fill = na.pad, align = "right")
if(attribute == "R-Squared")
column.result = rollapply(na.omit(merged.assets), width = width, FUN= function(x) summary(lm(x[,1,drop=FALSE]~x[,2,drop=FALSE]))$r.squared, by = 1, by.column = FALSE, align = "right")
Modified: pkg/PerformanceAnalytics/R/zzz.R
===================================================================
--- pkg/PerformanceAnalytics/R/zzz.R 2012-11-05 21:21:01 UTC (rev 2292)
+++ pkg/PerformanceAnalytics/R/zzz.R 2012-11-08 14:52:28 UTC (rev 2293)
@@ -15,7 +15,7 @@
odd <- function (x) x%%2==1
-rollapply.xts <- xts:::rollapply.xts
+sd.xts <- xts:::sd.xts
###############################################################################
# R (http://r-project.org/) Econometrics for Performance and Risk Analysis
#
@@ -26,4 +26,4 @@
#
# $Id$
#
-###############################################################################
\ No newline at end of file
+###############################################################################
More information about the Returnanalytics-commits
mailing list