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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Aug 20 17:36:34 CEST 2013


Author: rossbennett34
Date: 2013-08-20 17:36:33 +0200 (Tue, 20 Aug 2013)
New Revision: 2836

Added:
   pkg/PortfolioAnalytics/man/chart.Weights.Rd
Modified:
   pkg/PortfolioAnalytics/DESCRIPTION
   pkg/PortfolioAnalytics/NAMESPACE
   pkg/PortfolioAnalytics/R/charts.DE.R
   pkg/PortfolioAnalytics/R/charts.GenSA.R
   pkg/PortfolioAnalytics/R/charts.PSO.R
   pkg/PortfolioAnalytics/R/charts.ROI.R
   pkg/PortfolioAnalytics/R/charts.RP.R
Log:
adding generic method for chart.Weights

Modified: pkg/PortfolioAnalytics/DESCRIPTION
===================================================================
--- pkg/PortfolioAnalytics/DESCRIPTION	2013-08-20 11:56:03 UTC (rev 2835)
+++ pkg/PortfolioAnalytics/DESCRIPTION	2013-08-20 15:36:33 UTC (rev 2836)
@@ -50,3 +50,4 @@
     'applyFUN.R'
     'charts.PSO.R'
     'charts.GenSA.R'
+    'chart.Weights.R'

Modified: pkg/PortfolioAnalytics/NAMESPACE
===================================================================
--- pkg/PortfolioAnalytics/NAMESPACE	2013-08-20 11:56:03 UTC (rev 2835)
+++ pkg/PortfolioAnalytics/NAMESPACE	2013-08-20 15:36:33 UTC (rev 2836)
@@ -10,9 +10,15 @@
 export(chart.Scatter.RP)
 export(chart.Weights.DE)
 export(chart.Weights.GenSA)
+export(chart.Weights.optimize.portfolio.DEoptim)
+export(chart.Weights.optimize.portfolio.GenSA)
+export(chart.Weights.optimize.portfolio.pso)
+export(chart.Weights.optimize.portfolio.random)
+export(chart.Weights.optimize.portfolio.ROI)
 export(chart.Weights.pso)
 export(chart.Weights.ROI)
 export(chart.Weights.RP)
+export(chart.Weights)
 export(charts.DE)
 export(charts.GenSA)
 export(charts.pso)

Modified: pkg/PortfolioAnalytics/R/charts.DE.R
===================================================================
--- pkg/PortfolioAnalytics/R/charts.DE.R	2013-08-20 11:56:03 UTC (rev 2835)
+++ pkg/PortfolioAnalytics/R/charts.DE.R	2013-08-20 15:36:33 UTC (rev 2836)
@@ -10,35 +10,16 @@
 #
 ###############################################################################
 
-#' boxplot of the weights of the optimal portfolios
-#' 
-#' Chart the optimal weights and upper and lower bounds on weights of a portfolio run via \code{\link{optimize.portfolio}}
-#' 
-#' @param DE optimal portfolio object created by \code{\link{optimize.portfolio}}
-#' @param neighbors set of 'neighbor' portfolios to overplot
-#' @param 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.}
-#'       }
-#' @param xlab a title for the x axis: see \code{\link{title}}
-#' @param cex.lab The magnification to be used for x and y labels relative to the current setting of \code{cex}
-#' @param cex.axis The magnification to be used for axis annotation relative to the current setting of \code{cex}
-#' @param element.color color for the default plot lines
-#' @param ... any other passthru parameters 
-#' @param main an overall title for the plot: see \code{\link{title}}
-#' @seealso \code{\link{optimize.portfolio}}
+#' @rdname chart.Weights
 #' @export
-chart.Weights.DE <- function(DE, neighbors = NULL, ..., main="Weights", las = 3, xlab=NULL, cex.lab = 1, element.color = "darkgray", cex.axis=0.8){
+chart.Weights.DE <- function(object, neighbors = NULL, ..., main="Weights", las = 3, xlab=NULL, cex.lab = 1, element.color = "darkgray", cex.axis=0.8){
   # Specific to the output of optimize.portfolio with optimize_method="DEoptim"
-  if(!inherits(DE, "optimize.portfolio.DEoptim")) stop("DE must be of class 'optimize.portfolio.DEoptim'")
+  if(!inherits(object, "optimize.portfolio.DEoptim")) stop("object must be of class 'optimize.portfolio.DEoptim'")
   
-  columnnames = names(DE$weights)
+  columnnames = names(object$weights)
   numassets = length(columnnames)
   
-  constraints <- get_constraints(DE$portfolio)
+  constraints <- get_constraints(object$portfolio)
   
   if(is.null(xlab))
     minmargin = 3
@@ -57,12 +38,12 @@
     bottommargin = minmargin
   }
   par(mar = c(bottommargin, 4, topmargin, 2) +.1)
-  plot(DE$weights, type="b", col="blue", axes=FALSE, xlab='', ylim=c(0,max(constraints$max)), ylab="Weights", main=main, pch=16, ...)
+  plot(object$weights, type="b", col="blue", axes=FALSE, xlab='', ylim=c(0,max(constraints$max)), ylab="Weights", main=main, pch=16, ...)
   points(constraints$min, type="b", col="darkgray", lty="solid", lwd=2, pch=24)
   points(constraints$max, type="b", col="darkgray", lty="solid", lwd=2, pch=25)
   #     if(!is.null(neighbors)){ 
   #         if(is.vector(neighbors)){
-  #             xtract=extractStats(DE)
+  #             xtract=extractStats(object)
   #             weightcols<-grep('w\\.',colnames(xtract)) #need \\. to get the dot 
   #             if(length(neighbors)==1){
   #                 # overplot nearby portfolios defined by 'out'
@@ -84,12 +65,16 @@
   #         }
   #     }
   
-  #     points(DE$weights, type="b", col="blue", pch=16)
+  #     points(object$weights, type="b", col="blue", pch=16)
   axis(2, cex.axis = cex.axis, col = element.color)
   axis(1, labels=columnnames, at=1:numassets, las=las, cex.axis = cex.axis, col = element.color)
   box(col = element.color)
 }
 
+#' @rdname chart.Weights
+#' @export
+chart.Weights.optimize.portfolio.DEoptim <- chart.Weights.DE
+
 #' classic risk return scatter of DEoptim results
 #' 
 #' @param DE set of portfolios created by \code{\link{optimize.portfolio}}

Modified: pkg/PortfolioAnalytics/R/charts.GenSA.R
===================================================================
--- pkg/PortfolioAnalytics/R/charts.GenSA.R	2013-08-20 11:56:03 UTC (rev 2835)
+++ pkg/PortfolioAnalytics/R/charts.GenSA.R	2013-08-20 15:36:33 UTC (rev 2836)
@@ -1,34 +1,14 @@
 
-#' boxplot of the weights of the optimal portfolios
-#' 
-#' Chart the optimal weights and upper and lower bounds on weights of a portfolio run via \code{\link{optimize.portfolio}}
-#' 
-#' @param GenSA optimal portfolio object created by \code{\link{optimize.portfolio}}
-#' @param neighbors set of 'neighbor' portfolios to overplot
-#' @param 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.}
-#'       }
-#' @param xlab a title for the x axis: see \code{\link{title}}
-#' @param cex.lab The magnification to be used for x and y labels relative to the current setting of \code{cex}
-#' @param cex.axis The magnification to be used for axis annotation relative to the current setting of \code{cex}
-#' @param element.color color for the default plot lines
-#' @param ... any other passthru parameters 
-#' @param main an overall title for the plot: see \code{\link{title}}
-#' @seealso \code{\link{optimize.portfolio}}
-#' @author Ross Bennett
+#' @rdname chart.Weights
 #' @export
-chart.Weights.GenSA <- function(GenSA, neighbors = NULL, ..., main="Weights", las = 3, xlab=NULL, cex.lab = 1, element.color = "darkgray", cex.axis=0.8){
+chart.Weights.GenSA <- function(object, neighbors = NULL, ..., main="Weights", las = 3, xlab=NULL, cex.lab = 1, element.color = "darkgray", cex.axis=0.8){
   
-  if(!inherits(GenSA, "optimize.portfolio.GenSA")) stop("GenSA must be of class 'optimize.portfolio.GenSA'")
+  if(!inherits(object, "optimize.portfolio.GenSA")) stop("object must be of class 'optimize.portfolio.GenSA'")
   
-  columnnames = names(GenSA$weights)
+  columnnames = names(object$weights)
   numassets = length(columnnames)
   
-  constraints <- get_constraints(GenSA$portfolio)
+  constraints <- get_constraints(object$portfolio)
   
   if(is.null(xlab))
     minmargin = 3
@@ -47,7 +27,7 @@
     bottommargin = minmargin
   }
   par(mar = c(bottommargin, 4, topmargin, 2) +.1)
-  plot(GenSA$weights, type="b", col="blue", axes=FALSE, xlab='', ylim=c(0,max(constraints$max)), ylab="Weights", main=main, pch=16, ...)
+  plot(object$weights, type="b", col="blue", axes=FALSE, xlab='', ylim=c(0,max(constraints$max)), ylab="Weights", main=main, pch=16, ...)
   points(constraints$min, type="b", col="darkgray", lty="solid", lwd=2, pch=24)
   points(constraints$max, type="b", col="darkgray", lty="solid", lwd=2, pch=25)
   #     if(!is.null(neighbors)){ 
@@ -79,6 +59,10 @@
   box(col = element.color)
 }
 
+#' @rdname chart.Weights
+#' @export
+chart.Weights.optimize.portfolio.GenSA <- chart.Weights.GenSA
+
 #' classic risk return scatter of random portfolios
 #' 
 #' The GenSA optimizer does not store the portfolio weights like DEoptim or random

Modified: pkg/PortfolioAnalytics/R/charts.PSO.R
===================================================================
--- pkg/PortfolioAnalytics/R/charts.PSO.R	2013-08-20 11:56:03 UTC (rev 2835)
+++ pkg/PortfolioAnalytics/R/charts.PSO.R	2013-08-20 15:36:33 UTC (rev 2836)
@@ -1,31 +1,14 @@
-#' boxplot of the weights in the portfolio
-#' 
-#' @param pso object created by \code{\link{optimize.portfolio}}
-#' @param neighbors set of 'neighbor' portfolios to overplot
-#' @param 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.}
-#'       }
-#' @param xlab a title for the x axis: see \code{\link{title}}
-#' @param cex.lab The magnification to be used for x and y labels relative to the current setting of \code{cex}
-#' @param cex.axis The magnification to be used for axis annotation relative to the current setting of \code{cex}
-#' @param element.color color for the default plot lines
-#' @param ... any other passthru parameters 
-#' @param main an overall title for the plot: see \code{\link{title}}
-#' @seealso \code{\link{optimize.portfolio}}
-#' @author Ross Bennett
+
+#' @rdname chart.Weights
 #' @export
-chart.Weights.pso <- function(pso, neighbors = NULL, ..., main="Weights", las = 3, xlab=NULL, cex.lab = 1, element.color = "darkgray", cex.axis=0.8){
+chart.Weights.pso <- function(object, neighbors = NULL, ..., main="Weights", las = 3, xlab=NULL, cex.lab = 1, element.color = "darkgray", cex.axis=0.8){
   
-  if(!inherits(pso, "optimize.portfolio.pso")) stop("pso must be of class 'optimize.portfolio.pso'")
+  if(!inherits(object, "optimize.portfolio.pso")) stop("object must be of class 'optimize.portfolio.pso'")
   
-  columnnames = names(pso$weights)
+  columnnames = names(object$weights)
   numassets = length(columnnames)
   
-  constraints <- get_constraints(pso$portfolio)
+  constraints <- get_constraints(object$portfolio)
   
   if(is.null(xlab))
     minmargin = 3
@@ -44,7 +27,7 @@
     bottommargin = minmargin
   }
   par(mar = c(bottommargin, 4, topmargin, 2) +.1)
-  plot(pso$weights, type="b", col="blue", axes=FALSE, xlab='', ylim=c(0,max(constraints$max)), ylab="Weights", main=main, pch=16, ...)
+  plot(object$weights, type="b", col="blue", axes=FALSE, xlab='', ylim=c(0,max(constraints$max)), ylab="Weights", main=main, pch=16, ...)
   points(constraints$min, type="b", col="darkgray", lty="solid", lwd=2, pch=24)
   points(constraints$max, type="b", col="darkgray", lty="solid", lwd=2, pch=25)
   #     if(!is.null(neighbors)){ 
@@ -76,6 +59,9 @@
   box(col = element.color)
 }
 
+#' @rdname chart.Weights
+#' @export
+chart.Weights.optimize.portfolio.pso <- chart.Weights.pso
 
 #' classic risk return scatter of random portfolios
 #' 

Modified: pkg/PortfolioAnalytics/R/charts.ROI.R
===================================================================
--- pkg/PortfolioAnalytics/R/charts.ROI.R	2013-08-20 11:56:03 UTC (rev 2835)
+++ pkg/PortfolioAnalytics/R/charts.ROI.R	2013-08-20 15:36:33 UTC (rev 2836)
@@ -1,32 +1,14 @@
 
-#' boxplot of the weights in the portfolio
-#' 
-#' @param ROI object created by \code{\link{optimize.portfolio}}
-#' @param neighbors set of 'neighbor' portfolios to overplot
-#' @param 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.}
-#'       }
-#' @param xlab a title for the x axis: see \code{\link{title}}
-#' @param cex.lab The magnification to be used for x and y labels relative to the current setting of \code{cex}
-#' @param cex.axis The magnification to be used for axis annotation relative to the current setting of \code{cex}
-#' @param element.color color for the default plot lines
-#' @param ... any other passthru parameters 
-#' @param main an overall title for the plot: see \code{\link{title}}
-#' @seealso \code{\link{optimize.portfolio}}
-#' @author Ross Bennett
+#' @rdname chart.Weights
 #' @export
-chart.Weights.ROI <- function(ROI, neighbors = NULL, ..., main="Weights", las = 3, xlab=NULL, cex.lab = 1, element.color = "darkgray", cex.axis=0.8){
+chart.Weights.ROI <- function(object, neighbors = NULL, ..., main="Weights", las = 3, xlab=NULL, cex.lab = 1, element.color = "darkgray", cex.axis=0.8){
 
-  if(!inherits(ROI, "optimize.portfolio.ROI")) stop("ROI must be of class 'optimize.portfolio.ROI'")
+  if(!inherits(object, "optimize.portfolio.ROI")) stop("object must be of class 'optimize.portfolio.ROI'")
   
-  columnnames = names(ROI$weights)
+  columnnames = names(object$weights)
   numassets = length(columnnames)
   
-  constraints <- get_constraints(ROI$portfolio)
+  constraints <- get_constraints(object$portfolio)
   
   if(is.null(xlab))
     minmargin = 3
@@ -45,12 +27,12 @@
     bottommargin = minmargin
   }
   par(mar = c(bottommargin, 4, topmargin, 2) +.1)
-  plot(ROI$weights, type="b", col="blue", axes=FALSE, xlab='', ylim=c(0,max(constraints$max)), ylab="Weights", main=main, pch=16, ...)
+  plot(object$weights, type="b", col="blue", axes=FALSE, xlab='', ylim=c(0,max(constraints$max)), ylab="Weights", main=main, pch=16, ...)
   points(constraints$min, type="b", col="darkgray", lty="solid", lwd=2, pch=24)
   points(constraints$max, type="b", col="darkgray", lty="solid", lwd=2, pch=25)
   #     if(!is.null(neighbors)){ 
   #         if(is.vector(neighbors)){
-  #             xtract=extractStats(ROI)
+  #             xtract=extractStats(object)
   #             weightcols<-grep('w\\.',colnames(xtract)) #need \\. to get the dot 
   #             if(length(neighbors)==1){
   #                 # overplot nearby portfolios defined by 'out'
@@ -71,12 +53,16 @@
   #             # also note the need for as.numeric.  points() doesn't like matrix inputs
   #         }
   #     }
-  #     points(ROI$weights, type="b", col="blue", pch=16)
+  #     points(object$weights, type="b", col="blue", pch=16)
   axis(2, cex.axis = cex.axis, col = element.color)
   axis(1, labels=columnnames, at=1:numassets, las=las, cex.axis = cex.axis, col = element.color)
   box(col = element.color)
 }
 
+#' @rdname chart.Weights
+#' @export
+chart.Weights.optimize.portfolio.ROI <- chart.Weights.ROI
+
 #' classic risk return scatter of random portfolios
 #' 
 #' The ROI optimizers do not store the portfolio weights like DEoptim or random

Modified: pkg/PortfolioAnalytics/R/charts.RP.R
===================================================================
--- pkg/PortfolioAnalytics/R/charts.RP.R	2013-08-20 11:56:03 UTC (rev 2835)
+++ pkg/PortfolioAnalytics/R/charts.RP.R	2013-08-20 15:36:33 UTC (rev 2836)
@@ -10,35 +10,19 @@
 #
 ###############################################################################
 
-#' boxplot of the weight distributions in the random portfolios 
-#' @param RP set of random portfolios created by \code{\link{optimize.portfolio}}
-#' @param neighbors set of 'neighbor' portfolios to overplot
-#' @param 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.}
-#'       }
-#' @param xlab a title for the x axis: see \code{\link{title}}
-#' @param cex.lab The magnification to be used for x and y labels relative to the current setting of \code{cex}
-#' @param cex.axis The magnification to be used for axis annotation relative to the current setting of \code{cex}
-#' @param element.color color for the default plot lines
-#' @param ... any other passthru parameters 
-#' @param main an overall title for the plot: see \code{\link{title}}
-#' @seealso \code{\link{optimize.portfolio}}
+#' @rdname chart.Weights
 #' @export
-chart.Weights.RP <- function(RP, neighbors = NULL, ..., main="Weights", las = 3, xlab=NULL, cex.lab = 1, element.color = "darkgray", cex.axis=0.8){
+chart.Weights.RP <- function(object, neighbors = NULL, ..., main="Weights", las = 3, xlab=NULL, cex.lab = 1, element.color = "darkgray", cex.axis=0.8){
   # Specific to the output of the random portfolio code with constraints
-  # @TODO: check that RP is of the correct class
+  # @TODO: check that object is of the correct class
   # FIXED
-  if(!inherits(RP, "optimize.portfolio.random")){
-    stop("RP must be of class 'optimize.portfolio.random'")
+  if(!inherits(object, "optimize.portfolio.random")){
+    stop("object must be of class 'optimize.portfolio.random'")
   }
-  columnnames = names(RP$weights)
+  columnnames = names(object$weights)
   numassets = length(columnnames)
   
-  constraints <- get_constraints(RP$portfolio)
+  constraints <- get_constraints(object$portfolio)
   
   if(is.null(xlab))
     minmargin = 3
@@ -57,12 +41,12 @@
     bottommargin = minmargin
   }
   par(mar = c(bottommargin, 4, topmargin, 2) +.1)
-  plot(RP$random_portfolios[1,], type="b", col="orange", axes=FALSE, xlab='', ylim=c(0,max(constraints$max)), ylab="Weights", main=main, ...)
+  plot(object$random_portfolios[1,], type="b", col="orange", axes=FALSE, xlab='', ylim=c(0,max(constraints$max)), ylab="Weights", main=main, ...)
   points(constraints$min, type="b", col="darkgray", lty="solid", lwd=2, pch=24)
   points(constraints$max, type="b", col="darkgray", lty="solid", lwd=2, pch=25)
   if(!is.null(neighbors)){ 
     if(is.vector(neighbors)){
-      xtract=extractStats(RP)
+      xtract=extractStats(object)
       weightcols<-grep('w\\.',colnames(xtract)) #need \\. to get the dot 
       if(length(neighbors)==1){
         # overplot nearby portfolios defined by 'out'
@@ -84,13 +68,17 @@
     }
   }
   
-  points(RP$random_portfolios[1,], type="b", col="orange", pch=16) # to overprint neighbors
-  points(RP$weights, type="b", col="blue", pch=16)
+  points(object$random_portfolios[1,], type="b", col="orange", pch=16) # to overprint neighbors
+  points(object$weights, type="b", col="blue", pch=16)
   axis(2, cex.axis = cex.axis, col = element.color)
   axis(1, labels=columnnames, at=1:numassets, las=las, cex.axis = cex.axis, col = element.color)
   box(col = element.color)
 }
 
+#' @rdname chart.Weights
+#' @export
+chart.Weights.optimize.portfolio.random <- chart.Weights.RP
+
 #' classic risk return scatter of random portfolios
 #' 
 #' @param RP set of portfolios created by \code{\link{optimize.portfolio}}

Added: pkg/PortfolioAnalytics/man/chart.Weights.Rd
===================================================================
--- pkg/PortfolioAnalytics/man/chart.Weights.Rd	                        (rev 0)
+++ pkg/PortfolioAnalytics/man/chart.Weights.Rd	2013-08-20 15:36:33 UTC (rev 2836)
@@ -0,0 +1,101 @@
+\name{chart.Weights.DE}
+\alias{chart.Weights}
+\alias{chart.Weights.DE}
+\alias{chart.Weights.GenSA}
+\alias{chart.Weights.optimize.portfolio.DEoptim}
+\alias{chart.Weights.optimize.portfolio.GenSA}
+\alias{chart.Weights.optimize.portfolio.pso}
+\alias{chart.Weights.optimize.portfolio.random}
+\alias{chart.Weights.optimize.portfolio.ROI}
+\alias{chart.Weights.pso}
+\alias{chart.Weights.ROI}
+\alias{chart.Weights.RP}
+\title{boxplot of the weights of the optimal portfolios}
+\usage{
+  chart.Weights.DE(object, neighbors = NULL, ...,
+    main = "Weights", las = 3, xlab = NULL, cex.lab = 1,
+    element.color = "darkgray", cex.axis = 0.8)
+
+  chart.Weights.optimize.portfolio.DEoptim(object,
+    neighbors = NULL, ..., main = "Weights", las = 3,
+    xlab = NULL, cex.lab = 1, element.color = "darkgray",
+    cex.axis = 0.8)
+
+  chart.Weights.RP(object, neighbors = NULL, ...,
+    main = "Weights", las = 3, xlab = NULL, cex.lab = 1,
+    element.color = "darkgray", cex.axis = 0.8)
+
+  chart.Weights.optimize.portfolio.random(object,
+    neighbors = NULL, ..., main = "Weights", las = 3,
+    xlab = NULL, cex.lab = 1, element.color = "darkgray",
+    cex.axis = 0.8)
+
+  chart.Weights.ROI(object, neighbors = NULL, ...,
+    main = "Weights", las = 3, xlab = NULL, cex.lab = 1,
+    element.color = "darkgray", cex.axis = 0.8)
+
+  chart.Weights.optimize.portfolio.ROI(object,
+    neighbors = NULL, ..., main = "Weights", las = 3,
+    xlab = NULL, cex.lab = 1, element.color = "darkgray",
+    cex.axis = 0.8)
+
+  chart.Weights.pso(object, neighbors = NULL, ...,
+    main = "Weights", las = 3, xlab = NULL, cex.lab = 1,
+    element.color = "darkgray", cex.axis = 0.8)
+
+  chart.Weights.optimize.portfolio.pso(object,
+    neighbors = NULL, ..., main = "Weights", las = 3,
+    xlab = NULL, cex.lab = 1, element.color = "darkgray",
+    cex.axis = 0.8)
+
+  chart.Weights.GenSA(object, neighbors = NULL, ...,
+    main = "Weights", las = 3, xlab = NULL, cex.lab = 1,
+    element.color = "darkgray", cex.axis = 0.8)
+
+  chart.Weights.optimize.portfolio.GenSA(object,
+    neighbors = NULL, ..., main = "Weights", las = 3,
+    xlab = NULL, cex.lab = 1, element.color = "darkgray",
+    cex.axis = 0.8)
+
+  chart.Weights(object, neighbors = NULL, ...,
+    main = "Weights", las = 3, xlab = NULL, cex.lab = 1,
+    element.color = "darkgray", cex.axis = 0.8)
+}
+\arguments{
+  \item{object}{optimal portfolio 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{
+  Chart the optimal weights and upper and lower bounds on
+  weights of a portfolio run via
+  \code{\link{optimize.portfolio}}
+}
+\seealso{
+  \code{\link{optimize.portfolio}}
+}
+



More information about the Returnanalytics-commits mailing list