inst/BookEx/C10R5.R

## Loading of packages
library(FRAPO)
library(PerformanceAnalytics)
library(quadprog)
library(rrcov)
library(zoo)
## Loading data, calculate returns
data(StockIndex)
pzoo <- zoo(StockIndex, order.by = rownames(StockIndex))
rzoo <- (pzoo / lag(pzoo, k = -1) - 1) * 100
## boxplot and descriptive statistics
boxplot(coredata(rzoo))
rstats <- rbind(apply(rzoo, 2, summary),
                 skewness(rzoo),
                 kurtosis(rzoo)
                 )

Try the FRAPO package in your browser

Any scripts or data that you put into this service are public.

FRAPO documentation built on May 2, 2019, 5:24 p.m.