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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Aug 6 23:47:01 CEST 2013


Author: rossbennett34
Date: 2013-08-06 23:47:01 +0200 (Tue, 06 Aug 2013)
New Revision: 2733

Added:
   pkg/PortfolioAnalytics/man/chart.Scatter.pso.Rd
   pkg/PortfolioAnalytics/man/chart.Weights.pso.Rd
   pkg/PortfolioAnalytics/man/charts.pso.Rd
   pkg/PortfolioAnalytics/man/plot.optimize.portfolio.pso.Rd
Modified:
   pkg/PortfolioAnalytics/DESCRIPTION
   pkg/PortfolioAnalytics/NAMESPACE
   pkg/PortfolioAnalytics/R/extractstats.R
Log:
adding chart methods for pso optimization methods

Modified: pkg/PortfolioAnalytics/DESCRIPTION
===================================================================
--- pkg/PortfolioAnalytics/DESCRIPTION	2013-08-06 19:15:24 UTC (rev 2732)
+++ pkg/PortfolioAnalytics/DESCRIPTION	2013-08-06 21:47:01 UTC (rev 2733)
@@ -48,3 +48,4 @@
     'optFUN.R'
     'charts.ROI.R'
     'applyFUN.R'
+    'charts.PSO.R'

Modified: pkg/PortfolioAnalytics/NAMESPACE
===================================================================
--- pkg/PortfolioAnalytics/NAMESPACE	2013-08-06 19:15:24 UTC (rev 2732)
+++ pkg/PortfolioAnalytics/NAMESPACE	2013-08-06 21:47:01 UTC (rev 2733)
@@ -6,12 +6,15 @@
 export(box_constraint)
 export(CCCgarch.MM)
 export(chart.Scatter.DE)
+export(chart.Scatter.pso)
 export(chart.Scatter.ROI)
 export(chart.Scatter.RP)
 export(chart.Weights.DE)
+export(chart.Weights.pso)
 export(chart.Weights.ROI)
 export(chart.Weights.RP)
 export(charts.DE)
+export(charts.pso)
 export(charts.ROI)
 export(charts.RP)
 export(constrained_group_tmp)
@@ -53,6 +56,7 @@
 export(optimize.portfolio.rebalancing)
 export(optimize.portfolio)
 export(plot.optimize.portfolio.DEoptim)
+export(plot.optimize.portfolio.pso)
 export(plot.optimize.portfolio.random)
 export(plot.optimize.portfolio.ROI)
 export(plot.optimize.portfolio)

Modified: pkg/PortfolioAnalytics/R/extractstats.R
===================================================================
--- pkg/PortfolioAnalytics/R/extractstats.R	2013-08-06 19:15:24 UTC (rev 2732)
+++ pkg/PortfolioAnalytics/R/extractstats.R	2013-08-06 21:47:01 UTC (rev 2733)
@@ -294,7 +294,7 @@
   
   result <- cbind(tmpout, psoweights)
   colnames(result) <- c("out", paste('w',names(object$weights),sep='.'))
-  rownames(result) <- paste(prefix, "pso.portf", index(tmp), sep=".")
+  rownames(result) <- paste(prefix, "pso.portf", index(tmpout), sep=".")
   return(result)
 }
 

Added: pkg/PortfolioAnalytics/man/chart.Scatter.pso.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/chart.Scatter.pso.Rd	                        (rev 0)
+++ pkg/PortfolioAnalytics/man/chart.Scatter.pso.Rd	2013-08-06 21:47:01 UTC (rev 2733)
@@ -0,0 +1,43 @@
+\name{chart.Scatter.pso}
+\alias{chart.Scatter.pso}
+\title{classic risk return scatter of random portfolios}
+\usage{
+  chart.Scatter.pso(pso, R, return.col = "mean",
+    risk.col = "StdDev", ..., element.color = "darkgray",
+    cex.axis = 0.8, main = "")
+}
+\arguments{
+  \item{pso}{object created by
+  \code{\link{optimize.portfolio}}}
+
+  \item{R}{an xts, vector, matrix, data frame, timeSeries
+  or zoo object of asset returns, used to recalulate the
+  risk and return metric}
+
+  \item{return.col}{string matching the objective of a
+  'return' objective, on vertical axis}
+
+  \item{risk.col}{string matching the objective of a 'risk'
+  objective, on horizontal axis}
+
+  \item{...}{any other passthru parameters}
+
+  \item{cex.axis}{The magnification to be used for axis
+  annotation relative to the current setting of \code{cex}}
+
+  \item{element.color}{color for the default plot scatter
+  points}
+}
+\description{
+  \code{return.col} must be the name of a function used to
+  compute the return metric on the portfolio weights
+  \code{risk.col} must be the name of a function used to
+  compute the risk metric on the portfolio weights
+}
+\author{
+  Ross Bennett
+}
+\seealso{
+  \code{\link{optimize.portfolio}}
+}
+

Added: pkg/PortfolioAnalytics/man/chart.Weights.pso.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/chart.Weights.pso.Rd	                        (rev 0)
+++ pkg/PortfolioAnalytics/man/chart.Weights.pso.Rd	2013-08-06 21:47:01 UTC (rev 2733)
@@ -0,0 +1,47 @@
+\name{chart.Weights.pso}
+\alias{chart.Weights.pso}
+\title{boxplot of the weights in the portfolio}
+\usage{
+  chart.Weights.pso(pso, neighbors = NULL, ...,
+    main = "Weights", las = 3, xlab = NULL, cex.lab = 1,
+    element.color = "darkgray", cex.axis = 0.8)
+}
+\arguments{
+  \item{pso}{object created by
+  \code{\link{optimize.portfolio}}}
+
+  \item{neighbors}{set of 'neighbor' portfolios to
+  overplot}
+
+  \item{las}{numeric in \{0,1,2,3\}; the style of axis
+  labels \describe{ \item{0:}{always parallel to the axis
+  [\emph{default}],} \item{1:}{always horizontal,}
+  \item{2:}{always perpendicular to the axis,}
+  \item{3:}{always vertical.} }}
+
+  \item{xlab}{a title for the x axis: see
+  \code{\link{title}}}
+
+  \item{cex.lab}{The magnification to be used for x and y
+  labels relative to the current setting of \code{cex}}
+
+  \item{cex.axis}{The magnification to be used for axis
+  annotation relative to the current setting of \code{cex}}
+
+  \item{element.color}{color for the default plot lines}
+
+  \item{...}{any other passthru parameters}
+
+  \item{main}{an overall title for the plot: see
+  \code{\link{title}}}
+}
+\description{
+  boxplot of the weights in the portfolio
+}
+\author{
+  Ross Bennett
+}
+\seealso{
+  \code{\link{optimize.portfolio}}
+}
+

Added: pkg/PortfolioAnalytics/man/charts.pso.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/charts.pso.Rd	                        (rev 0)
+++ pkg/PortfolioAnalytics/man/charts.pso.Rd	2013-08-06 21:47:01 UTC (rev 2733)
@@ -0,0 +1,50 @@
+\name{charts.pso}
+\alias{charts.pso}
+\title{scatter and weights chart for portfolios}
+\usage{
+  charts.pso(pso, R, return.col = "mean",
+    risk.col = "StdDev", cex.axis = 0.8,
+    element.color = "darkgray", neighbors = NULL,
+    main = "PSO.Portfolios", ...)
+}
+\arguments{
+  \item{pso}{object created by
+  \code{\link{optimize.portfolio}}}
+
+  \item{R}{an xts, vector, matrix, data frame, timeSeries
+  or zoo object of asset returns, used to recalulate the
+  risk and return metric}
+
+  \item{return.col}{string matching the objective of a
+  'return' objective, on vertical axis}
+
+  \item{risk.col}{string matching the objective of a 'risk'
+  objective, on horizontal axis}
+
+  \item{...}{any other passthru parameters}
+
+  \item{cex.axis}{The magnification to be used for axis
+  annotation relative to the current setting of \code{cex}}
+
+  \item{element.color}{color for the default plot scatter
+  points}
+
+  \item{neighbors}{set of 'neighbor' portfolios to
+  overplot}
+
+  \item{main}{an overall title for the plot: see
+  \code{\link{title}}}
+}
+\description{
+  \code{return.col} must be the name of a function used to
+  compute the return metric on the random portfolio weights
+  \code{risk.col} must be the name of a function used to
+  compute the risk metric on the random portfolio weights
+}
+\author{
+  Ross Bennett
+}
+\seealso{
+  \code{\link{optimize.portfolio}}
+}
+

Added: pkg/PortfolioAnalytics/man/plot.optimize.portfolio.pso.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/plot.optimize.portfolio.pso.Rd	                        (rev 0)
+++ pkg/PortfolioAnalytics/man/plot.optimize.portfolio.pso.Rd	2013-08-06 21:47:01 UTC (rev 2733)
@@ -0,0 +1,50 @@
+\name{plot.optimize.portfolio.pso}
+\alias{plot.optimize.portfolio.pso}
+\title{scatter and weights chart for portfolios}
+\usage{
+  plot.optimize.portfolio.pso(pso, R, return.col = "mean",
+    risk.col = "StdDev", cex.axis = 0.8,
+    element.color = "darkgray", neighbors = NULL,
+    main = "PSO.Portfolios", ...)
+}
+\arguments{
+  \item{pso}{object created by
+  \code{\link{optimize.portfolio}}}
+
+  \item{R}{an xts, vector, matrix, data frame, timeSeries
+  or zoo object of asset returns, used to recalulate the
+  risk and return metric}
+
+  \item{return.col}{string matching the objective of a
+  'return' objective, on vertical axis}
+
+  \item{risk.col}{string matching the objective of a 'risk'
+  objective, on horizontal axis}
+
+  \item{...}{any other passthru parameters}
+
+  \item{cex.axis}{The magnification to be used for axis
+  annotation relative to the current setting of \code{cex}}
+
+  \item{element.color}{color for the default plot scatter
+  points}
+
+  \item{neighbors}{set of 'neighbor' portfolios to
+  overplot}
+
+  \item{main}{an overall title for the plot: see
+  \code{\link{title}}}
+}
+\description{
+  \code{return.col} must be the name of a function used to
+  compute the return metric on the random portfolio weights
+  \code{risk.col} must be the name of a function used to
+  compute the risk metric on the random portfolio weights
+}
+\author{
+  Ross Bennett
+}
+\seealso{
+  \code{\link{optimize.portfolio}}
+}
+



More information about the Returnanalytics-commits mailing list