[Returnanalytics-commits] r2627 - in pkg/PortfolioAnalytics: . R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jul 23 01:59:46 CEST 2013


Author: rossbennett34
Date: 2013-07-23 01:59:46 +0200 (Tue, 23 Jul 2013)
New Revision: 2627

Added:
   pkg/PortfolioAnalytics/man/set.portfolio.moments_v1.Rd
Modified:
   pkg/PortfolioAnalytics/NAMESPACE
   pkg/PortfolioAnalytics/R/moment.functions.R
   pkg/PortfolioAnalytics/man/set.portfolio.moments.Rd
Log:
alias _v2 of set.portfolio.moments and add _v1 to old set.portfolio.moments

Modified: pkg/PortfolioAnalytics/NAMESPACE
===================================================================
--- pkg/PortfolioAnalytics/NAMESPACE	2013-07-22 23:56:57 UTC (rev 2626)
+++ pkg/PortfolioAnalytics/NAMESPACE	2013-07-22 23:59:46 UTC (rev 2627)
@@ -59,8 +59,8 @@
 export(return_objective)
 export(risk_budget_objective)
 export(rp_transform)
+export(set.portfolio.moments_v1)
 export(set.portfolio.moments_v2)
-export(set.portfolio.moments)
 export(summary.optimize.portfolio.rebalancing)
 export(summary.optimize.portfolio)
 export(summary.portfolio)

Modified: pkg/PortfolioAnalytics/R/moment.functions.R
===================================================================
--- pkg/PortfolioAnalytics/R/moment.functions.R	2013-07-22 23:56:57 UTC (rev 2626)
+++ pkg/PortfolioAnalytics/R/moment.functions.R	2013-07-22 23:59:46 UTC (rev 2627)
@@ -66,7 +66,7 @@
 #' @param momentargs list containing arguments to be passed down to lower level functions, default NULL
 #' @param \dots any other passthru parameters
 #' @export
-set.portfolio.moments <- function(R, constraints, momentargs=NULL,...){
+set.portfolio.moments_v1 <- function(R, constraints, momentargs=NULL,...){
 
     if(!hasArg(momentargs) | is.null(momentargs)) momentargs<-list()
     if(is.null(constraints$objectives)) {
@@ -146,6 +146,8 @@
 #' @param portfolio an object of type "portfolio" specifying the constraints and objectives for the optimization, see \code{\link{portfolio.spec}}
 #' @param momentargs list containing arguments to be passed down to lower level functions, default NULL
 #' @param \dots any other passthru parameters
+#' @aliases set.portfolio.moments
+#' @rdname set.portfolio.moments
 #' @export
 set.portfolio.moments_v2 <- function(R, portfolio, momentargs=NULL,...){
   
@@ -224,6 +226,9 @@
   return(momentargs)
 }
 
+# Alias for set.portfolio.moments
+set.portfolio.moments <- set.portfolio.moments_v2
+
 garch.mm <- function(R,mu_ts, covlist,momentargs=list(),...) {
     #momentargs<-list()
     #momentargs$mu<-mu_ts[last(index(R)),]

Modified: pkg/PortfolioAnalytics/man/set.portfolio.moments.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/set.portfolio.moments.Rd	2013-07-22 23:56:57 UTC (rev 2626)
+++ pkg/PortfolioAnalytics/man/set.portfolio.moments.Rd	2013-07-22 23:59:46 UTC (rev 2627)
@@ -1,17 +1,18 @@
-\name{set.portfolio.moments}
+\name{set.portfolio.moments_v2}
 \alias{set.portfolio.moments}
+\alias{set.portfolio.moments_v2}
 \title{set portfolio moments for use by lower level optimization functions}
 \usage{
-  set.portfolio.moments(R, constraints, momentargs = NULL,
+  set.portfolio.moments_v2(R, portfolio, momentargs = NULL,
     ...)
 }
 \arguments{
   \item{R}{an xts, vector, matrix, data frame, timeSeries
   or zoo object of asset returns}
 
-  \item{constraints}{an object of type "constraints"
-  specifying the constraints for the optimization, see
-  \code{\link{constraint}}}
+  \item{portfolio}{an object of type "portfolio" specifying
+  the constraints and objectives for the optimization, see
+  \code{\link{portfolio.spec}}}
 
   \item{momentargs}{list containing arguments to be passed
   down to lower level functions, default NULL}

Added: pkg/PortfolioAnalytics/man/set.portfolio.moments_v1.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/set.portfolio.moments_v1.Rd	                        (rev 0)
+++ pkg/PortfolioAnalytics/man/set.portfolio.moments_v1.Rd	2013-07-22 23:59:46 UTC (rev 2627)
@@ -0,0 +1,25 @@
+\name{set.portfolio.moments_v1}
+\alias{set.portfolio.moments_v1}
+\title{set portfolio moments for use by lower level optimization functions}
+\usage{
+  set.portfolio.moments_v1(R, constraints,
+    momentargs = NULL, ...)
+}
+\arguments{
+  \item{R}{an xts, vector, matrix, data frame, timeSeries
+  or zoo object of asset returns}
+
+  \item{constraints}{an object of type "constraints"
+  specifying the constraints for the optimization, see
+  \code{\link{constraint}}}
+
+  \item{momentargs}{list containing arguments to be passed
+  down to lower level functions, default NULL}
+
+  \item{\dots}{any other passthru parameters}
+}
+\description{
+  set portfolio moments for use by lower level optimization
+  functions
+}
+



More information about the Returnanalytics-commits mailing list