March 2019
Beginner to intermediate
448 pages
13h 14m
English
In the following recipe, we will work with the returns for the Pampa Energia S.A. ADR stock prices:
library('depmixS4')datas = read.csv("./hist_PAM20190304.csv")[5]returns = diff(datas$cierre)/datas$cierre[-length(datas$cierre)]plot(returns,type="l")returns = data.frame(returns =returns)hist(returns$returns,main="Histogram of returns")
The following screenshot is the Histogram of returns: the data seems reasonably Gaussian:

Read now
Unlock full access