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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jun 24 00:25:07 CEST 2013


Author: rossbennett34
Date: 2013-06-24 00:25:07 +0200 (Mon, 24 Jun 2013)
New Revision: 2412

Added:
   pkg/PortfolioAnalytics/man/constrained_group_tmp.Rd
Modified:
   pkg/PortfolioAnalytics/DESCRIPTION
   pkg/PortfolioAnalytics/NAMESPACE
Log:
Adding updated documentation after running roxygenize on package

Modified: pkg/PortfolioAnalytics/DESCRIPTION
===================================================================
--- pkg/PortfolioAnalytics/DESCRIPTION	2013-06-23 22:20:50 UTC (rev 2411)
+++ pkg/PortfolioAnalytics/DESCRIPTION	2013-06-23 22:25:07 UTC (rev 2412)
@@ -43,3 +43,4 @@
     'trailingFUN.R'
     'objectiveFUN.R'
     'portfolio.R'
+    'constraintsFUN.R'

Modified: pkg/PortfolioAnalytics/NAMESPACE
===================================================================
--- pkg/PortfolioAnalytics/NAMESPACE	2013-06-23 22:20:50 UTC (rev 2411)
+++ pkg/PortfolioAnalytics/NAMESPACE	2013-06-23 22:25:07 UTC (rev 2412)
@@ -9,6 +9,7 @@
 export(chart.Weights.RP)
 export(charts.DE)
 export(charts.RP)
+export(constrained_group_tmp)
 export(constrained_objective)
 export(constraint_ROI)
 export(constraint_v2)

Added: pkg/PortfolioAnalytics/man/constrained_group_tmp.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/constrained_group_tmp.Rd	                        (rev 0)
+++ pkg/PortfolioAnalytics/man/constrained_group_tmp.Rd	2013-06-23 22:25:07 UTC (rev 2412)
@@ -0,0 +1,45 @@
+\name{constrained_group_tmp}
+\alias{constrained_group_tmp}
+\title{Generic function to impose group constraints on a vector of weights}
+\usage{
+  constrained_group_tmp(groups, cLO, cUP, weights, min_sum,
+    max_sum, normalize = TRUE)
+}
+\arguments{
+  \item{groups}{vector to group assets}
+
+  \item{cLO}{vector of group weight minimums}
+
+  \item{cUP}{vector of group weight maximums}
+
+  \item{weights}{vector of weights}
+
+  \item{min_sum}{minimum sum of weights}
+
+  \item{max_sum}{maximum sum of weights}
+
+  \item{normalize}{TRUE/FALSE to normalize the weights
+  vector to satisfy the min_sum and max_sum constraints}
+}
+\description{
+  This function gets group subsets of the weights vector
+  and checks if the sum of the weights in that group
+  violates the minimum or maximum value. If the sum of
+  weights in a given group violates its maximum or minimum
+  value, the group of weights is normalized to be equal to
+  the minimum or maximum value. This group normalization
+  causes the sum of weights to change. The weights vector
+  is then normalized so that the min_sum and max_sum
+  constraints are satisfied. This "re-normalization" of the
+  weights vector may then cause the group constraints to
+  not be satisfied.
+}
+\details{
+  Group constraints are implemented in ROI solvers, but
+  this function could be used in constrained_objective for
+  random portfolios, DEoptim, pso, or gensa solvers.
+}
+\author{
+  Ross Bennett
+}
+



More information about the Returnanalytics-commits mailing list