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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jul 3 03:55:19 CEST 2013


Author: rossbennett34
Date: 2013-07-03 03:55:18 +0200 (Wed, 03 Jul 2013)
New Revision: 2493

Added:
   pkg/PortfolioAnalytics/man/rp_transform.Rd
Modified:
   pkg/PortfolioAnalytics/NAMESPACE
   pkg/PortfolioAnalytics/R/constraint_fn_map.R
Log:
updating documentation

Modified: pkg/PortfolioAnalytics/NAMESPACE
===================================================================
--- pkg/PortfolioAnalytics/NAMESPACE	2013-07-03 01:44:29 UTC (rev 2492)
+++ pkg/PortfolioAnalytics/NAMESPACE	2013-07-03 01:55:18 UTC (rev 2493)
@@ -46,6 +46,7 @@
 export(randomize_portfolio)
 export(return_objective)
 export(risk_budget_objective)
+export(rp_transform)
 export(set.portfolio.moments)
 export(summary.optimize.portfolio.rebalancing)
 export(trailingFUN)

Modified: pkg/PortfolioAnalytics/R/constraint_fn_map.R
===================================================================
--- pkg/PortfolioAnalytics/R/constraint_fn_map.R	2013-07-03 01:44:29 UTC (rev 2492)
+++ pkg/PortfolioAnalytics/R/constraint_fn_map.R	2013-07-03 01:55:18 UTC (rev 2493)
@@ -198,7 +198,7 @@
 
 #' Transform a weights vector to min_sum/max_sum leverage and min/max box constraints using logic from randomize_portfolio
 #' 
-#' This function uses a block of code from \link{\code{randomize_portfolio}} 
+#' This function uses a block of code from \code{\link{randomize_portfolio}} 
 #' to transform the weight vector if either the weight_sum (leverage) 
 #' constraints or box constraints are violated.
 #' The resulting weights vector might be quite different from the original weights vector.

Added: pkg/PortfolioAnalytics/man/rp_transform.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/rp_transform.Rd	                        (rev 0)
+++ pkg/PortfolioAnalytics/man/rp_transform.Rd	2013-07-03 01:55:18 UTC (rev 2493)
@@ -0,0 +1,41 @@
+\name{rp_transform}
+\alias{rp_transform}
+\title{Transform a weights vector to min_sum/max_sum leverage and min/max box constraints using logic from randomize_portfolio}
+\usage{
+  rp_transform(w, min_sum = 0.99, max_sum = 1.01, min, max,
+    max_permutations = 200)
+}
+\arguments{
+  \item{w}{weights vector to be transformed}
+
+  \item{min_sum}{minimum sum of all asset weights, default
+  0.99}
+
+  \item{max_sum}{maximum sum of all asset weights, default
+  1.01}
+
+  \item{min}{numeric or named vector specifying minimum
+  weight box constraints}
+
+  \item{max}{numeric or named vector specifying maximum
+  weight box constraints}
+
+  \item{max_permutations}{integer: maximum number of
+  iterations to try for a valid portfolio, default 200}
+}
+\value{
+  named weighting vector
+}
+\description{
+  This function uses a block of code from
+  \code{\link{randomize_portfolio}} to transform the weight
+  vector if either the weight_sum (leverage) constraints or
+  box constraints are violated. The resulting weights
+  vector might be quite different from the original weights
+  vector.
+}
+\author{
+  Peter Carl, Brian G. Peterson, Ross Bennett (based on an
+  idea by Pat Burns)
+}
+



More information about the Returnanalytics-commits mailing list