histPlot               package:fAssets               R Documentation

_H_i_s_t_o_g_r_a_m _P_l_o_t_s _o_f _A_s_s_e_t_s

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

     Displays density of assets returns as a histogram and/or  as log
     density plot.

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

     assetsHistPlot(x, col = "steelblue", skipZeros = FALSE, ...)

     assetsLogDensityPlot(x, estimator = c("hubers", "sample", "both"), 
         labels = TRUE, ...)

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

       x: any rectangular time series object which can be converted by
          the  function 'as.matrix()' into a matrix object, e.g. like
          an  object of class 'timeSeries', 'data.frame', or 'mts'.  

skipZeros: a logical,  should zeros be skipped in the histogram plot of
          the return series ? 

     col: a character string, defining the color to fill the boxes. 

estimator: a character string naming the type of estimator to fit the
          mean  and variance of the normal density. This may be either
          '"huber"',  '"sample"', or '"both"'. 

  labels: a logical flag, if 'TRUE' then default labels will be used,
          otherwise the plots will be displayed without labels and the
          user can add his own labels. 

     ...: optional arguments to be passed. 

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

     Diethelm Wuertz for the Rmetrics port.

_R_e_f_e_r_e_n_c_e_s:

     Wuertz, D., Chalabi, Y., Chen W., Ellis A. (2009); _Portfolio
     Optimization with R/Rmetrics_,  Rmetrics eBook, Rmetrics
     Association and Finance Online, Zurich.

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

     ## LPP2005REC -
        x = as.timeSeries(data(LPP2005REC))
        
       
     ## assetsHistPlot -
        # par(mfrow = c(2, 2))
        assetsHistPlot(x[, 1:4])
        
     ## assetsLogDensityPlot -
        # par(mfrow = c(1, 1))
        assetsLogDensityPlot(x[, "ALT"], estimator = "both")

