When you woRk, you probably have a set of useful functions/packages you constantly use. For example, I often use the excellent quantmod package, and the nice multi.sapply function. You want your tools loaded when R session fires.

# Category: Code

R-code

## Multivariate summary function in R

Some time ago, I wrote a Better summary function in R . Here is its multivariate extension:

## Intraday volatility measures

In the last few decades there has been tremendous progress in the realm of volatility estimation. A major step is the additional use of intraday price path. It has been shown that estimates which consider intraday information are more accurate. Which is to say they converge faster to the real unobserved value of the true volatility.

## Better summary function in R

The summary function in R returns:

1 2 3 4 5 |
summary(x) Min. 1st Qu. Median Mean 3rd Qu. Max. 9.14 10.70 11.10 11.30 12.10 13.60 |

For the univariate case I wrote what I consider to be a better summary function which returns:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
usum(x) # For univariate Summary Summary Statistics: min med mean max sd skew kurt 1 9.14 11.13 11.35 13.65 1.057 0.3028 -0.6389 ------ NA's?: No NA's in the series ------ Head Tail 13.65 13.55 13.08 13.13 ------ Length Class 207 numeric |