# Category: Code

R-code

## R vs MATLAB (Round 3)

At least for me, R by faR. MATLAB has its own way of doing things, which to be honest can probably be defended from many angles. Here are few examples for not so subtle differences between R and MATLAB:

## R vs MATLAB – round 2

R takes it. I prefer coding in R over MATLAB. I feel R understands that I do not like to type too much. A few examples:

## R and Dropbox

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.

## 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 |
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 |
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 |