Learn R Programming

fPortfolio (version 280.73)

weightsLinePlot: Portfolio Weights Line Plots

Description

Displays line plots of weights, weighted returns, covariance and tail risk budgets.

Usage

weightsLinePlot(object, labels = TRUE, col = NULL, title = TRUE, 
    box = TRUE, legend = TRUE, ...)
    
weightedReturnsLinePlot(object, labels = TRUE, col = NULL, title = TRUE, 
    box = TRUE, legend = TRUE, ...)
    
covRiskBudgetsLinePlot(object, labels = TRUE, col = NULL, title = TRUE, 
    box = TRUE, legend = TRUE, ...)

Arguments

object
an S4 object of class fPORTFOLIO, as returned by one of the portfolio functions, e.g. efficientPortfolio or portfolioFrontier.
labels
a logical flag, determining if the the graph should be labeled automatically, which is the default case labels=TRUE. If set to FALSE then the graph will be displayed undecorated and the user can it decora
col
a character string vector, defined from a color palette. The default setting uses the "Blues" seqPalette palette.
title
a logical flag. Should automatically a title and axis labels be added to the plot.
box
a logical flag, determining whether a boxed frame should be plotted around the pie, by default the value is set to TRUE.
legend
a logical value, determining if the the graph should be labeled automatically, shich is the default case labels=TRUE. If set to FALSE then the graph will be displayed undecorated and the user can it decor
...
additional arguments passed to the function barplot. Only active if labels=FALSE.

Details

These line plots allow for different views on the results obtained from a feasible or an optimized portfolio. The function weightsPlot displays the weights composition along the frontier of a portfolio. The function weightedReturnsPlot displays the investment composition, i.e. the weighted returns along the frontier of a portfolio. The function covRiskBudgetsPlot displays the covariance risk budgets composition along the frontier of a portfolio.

See Also

weightsPie, weightsSlider.

Examples

Run this code
## data -
   # Load Data:
   Data = as.timeSeries(data(smallcap.ts))
   Data = Data[, c("BKE", "GG", "GYMB", "KRON")]

## portfolioFrontier -
   # Compute Long Only Efficient Frontier
   frontier = portfolioFrontier(Data)
   
## weightsLinePlot -
   # View Weights Line Plot:
   # weightsLinePlot(frontier)

Run the code above in your browser using DataLab