PortfolioPlots          package:fPortfolio          R Documentation

_P_o_r_t_f_o_l_i_o _P_l_o_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     A collection and description of plot functions.  Included are
     weights, frontier, and related plots, as well as covariance
     ellipses plots. 

     The functions are:

       'frontierPlot'         Plots efficient frontier,
       'weightsPlot'          Plots staggered weights,
       'attributesPlot'       Plots weighted means,
       'covRiskBudgetsPlot'   Plots covariance risk budgets,
       'tailRiskBudgetsPlot'  Plots tail risk budgets,
       'weightsPie'           Plots staggered weights,
       'attributesPie'        Plots weighted means,
       'covRiskBudgetPie'     Plots weighted risks,
       'tailRiskBudgetPie'    Plots weighted risks,
       'covEllipsesPlot'      Plots covariance ellipses.

_U_s_a_g_e:

     frontierPlot(object, frontier = c("both", "lower", "upper"),
         col = c("black", "grey"), add = FALSE, ...)
         
     weightsPlot(object, col = NULL, legend = TRUE)
     attributesPlot(object, col = NULL, legend = TRUE)
     covRiskBudgetsPlot(object, col = NULL, legend = TRUE)
     tailRiskBudgetsPlot(object, col = NULL, legend = TRUE)

     weightsPie(object, pos = NULL, col = NULL, box = TRUE, legend = TRUE)
     attributesPie(object, pos = NULL, col = NULL, box = TRUE, legend = TRUE)
     covRiskBudgetsPie(object, pos = NULL, col = NULL, box = TRUE, legend = TRUE)
     tailRiskBudgetsPie(object, pos = NULL, col = NULL, box = TRUE, legend = TRUE)

     covEllipsesPlot(x = list(), ...)

_A_r_g_u_m_e_n_t_s:

     add: [frontierPlot] - 
           a logical value, determining whether the frontier should be
          added to  an existing plot, by default FALSE. 

     box: [weightsPie] - 
           a logical value, determining whether a frame (box) should be
          plotted around the pie, by default TRUE. 

     col: a character string vector, setting the color. For
          'frontierPlot'  it is a two dimensional a vector; first entry
          is the upper part of the frontier,
           second entry the lower, by default "black" and "grey".
           For the other functions the argument defines the color
          representation, by default sets the default color is the
          rainbow palette. 

frontier: [frontierPlot] - 
           a character string, determining which part of the frontier
          should be extracted. '"both"' stands for the full hyperbola,
          '"lower"' for all points below the minimum variance return
          and '"upper"' for the actual efficient frontier, by default
          "both". 

  legend: [*Pie][*Plot] - 
           a numeric value, determining the position on the efficient
          frontier  plotting the pie, by default NULL, i.e. expecting a
          object having  only one set of weights like the tangency
          portfolio. 

     pos: [*Pie] - 
           a logical value, determining whether a legend with the names
          of the assets should be plotted, by default TRUE. 

  object: an S4 object of class 'fPORTFOLIO', containing slots call,
          data, specification, constraints, portfolio, title,
          description. 

       x: [covEllipsesPlot] - 
           a list of at least two covariance matrices. 

     ...: [covEllipsesPlot] - 
           optional arguments to be passed.


_D_e_t_a_i_l_s:

     *Frontier Plot:* 

      The frontier plot provides plotting three parts of the efficient
     frontier. The part superior to the minimum variance portfolio is
     plotted with argument frontier = "upper". The part below is
     plotted with "lower". Both parts are plotted with "both", which is
     default. The ranges of plots are determined  by maximum of the
     ranges of the assets or the minimum and maximum of the efficient
     frontier. Adding an efficient frontier to an existing plot is
     possible with the argument add. The argument col determines the
     color of  the upper and lower part of the efficient frontier. 

     *Weights, Attributes, and Risk Budgets Plots:* 

      These plotds give a view on three different views related to the
     weights  of the frontier. This concern the constitution of the
     weights, the  weights attributes and of the risk budgets. A
     vertical line indicates  the minimum variance portfolio. The
     weights plot displays staggered  weights, while the attributes
     plot shows the mean return weighted weights  of the portfolio,
     i.e. the real return. The risk budget plot shows the  risk
     weighted weights. 

     *Covariance Ellipses Plot:* 

      This plot visualizes the difference between two or more
     covariance matrices. It is meant to compare different methods of
     covariance estimation.

_A_u_t_h_o_r(_s):

     Diethelm Wuertz and Oliver Greshake for the Rmetrics port.

_S_e_e _A_l_s_o:

     'PortfolioData', 'PortfolioSpec', 'PortfolioConstraints',
     'fPORTFOLIO'.

_E_x_a_m_p_l_e_s:

     ## portfolioFrontier -
        # Load Data:
        Data = as.timeSeries(data(smallcap.ts))
        Data = Data[, c("BKE", "GG", "GYMB", "KRON")]
        Data
        # Compute Long Only Efficient Frontier
        frontier = portfolioFrontier(Data)
        frontier
        
     ## frontierPlot -  
        # Plot Upper Part of Frontier:
        # frontierPlot(frontier, frontier = "upper")
        # Adding Lower Part to Plot
        # frontierPlot(frontier, frontier = "lower", add = TRUE)
         
     ## weightsPlot -
        # View Weights Plot:
        # weightsPlot(frontier)
         
     ## attributesPlot -
        # View Attributes Plot:
        # attributesPlot(frontier, legend = TRUE)

