Learn R Programming

fPortfolio (version 280.73)

weightsPie: Portfolio Pie Plots

Description

Displays pie plots of weights, weighted Returns, covariance and tail risk budgets for a portfolio.

Usage

weightsPie(object, pos = NULL, labels = TRUE, col = NULL, 
    box = TRUE, legend = TRUE, radius = 0.8, ...)
    
weightedReturnsPie(object, pos = NULL, labels = TRUE, col = NULL, 
    box = TRUE, legend = TRUE, radius = 0.8, ...)
    
covRiskBudgetsPie(object, pos = NULL, labels = TRUE, col = NULL, 
    box = TRUE, legend = TRUE, radius = 0.8, ...)
    
tailRiskBudgetsPie(object, pos = NULL, labels = TRUE, col = NULL, 
    box = TRUE, legend = TRUE, radius = 0.8, ...)

Arguments

object
an S4 object of class fPORTFOLIO, as returned by one of the portfolio functions, e.g. efficientPortfolio or portfolioFrontier.
pos
NULL or an integer value. If NULL it is assumend that we consider a single portfolio like for example a tengency portfolio. However, if the object describes a whole frontier then pos has to be the number o
labels
a logical flag, determining if 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 decorate b
col
a character string vector, defined from a color palette. The default setting uses the "Blues" seqPalette palette.
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 flag, determining if a legend should be added to the plot. The default setting shows the legend.
radius
a numeric value, determining the radius of the pie. The default value is 0.8.
...
arguments to be passed.

Details

The pie plots allow for different views on the results obtained from a feasible or an optimized portfolio. The function weightsPie displays the weights composition of a portfolio. The function weightedReturnsPie displays the investment, i.e. the weighted returns of a portfolio. The function covRiskBudgetsPie displays the covariance risk budgets of a portfolio.

The function taikRiskBudgetsPie displays the copulae tail risk budgets of a portfolio. Note, this is only possible if in the portfolio specificsation a copulae tail risk is defined.

See Also

weightsPlot, link{weightsSlider}.

Examples

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

## tangencyPortfolio - 
   portfolio = tangencyPortfolio(Data)
    
## weightsPie -
   weightsPie(portfolio)

## portfolioFrontier - 
   frontier = portfolioFrontier(Data)
   
## weightsPie -
   weightsPie(frontier, pos = 40)

Run the code above in your browser using DataLab