O modelo será realizado com as séries temporais das ações
preferenciais da Petrobrás (PETR4), Ibovespa, Taxa Selic e dos preços
internacionais dos barris de petróleo. O horizonte temporal vai ser dos
últimos 10 anos com dados mensais. O objetivo é analisar a relação risco
e retorno das ações da Petrobrás durante o Período.
Será utilizado o modelo CAPM (Capital Asset Pricing Model) para avaliar
o risco e retorno das ações a Petrobras ao longo do tempo.
library(tidyverse) # organizacao dos dados
## -- Attaching packages --------------------------------------- tidyverse 1.3.1 --
## v ggplot2 3.3.5 v purrr 0.3.4
## v tibble 3.1.5 v dplyr 1.0.7
## v tidyr 1.1.4 v stringr 1.4.0
## v readr 2.0.2 v forcats 0.5.1
## -- Conflicts ------------------------------------------ tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
library(tidyquant) # organizacao dos dados financeiros
## Carregando pacotes exigidos: lubridate
##
## Attaching package: 'lubridate'
## The following objects are masked from 'package:base':
##
## date, intersect, setdiff, union
## Carregando pacotes exigidos: PerformanceAnalytics
## Carregando pacotes exigidos: xts
## Carregando pacotes exigidos: zoo
##
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
##
## as.Date, as.Date.numeric
##
## Attaching package: 'xts'
## The following objects are masked from 'package:dplyr':
##
## first, last
##
## Attaching package: 'PerformanceAnalytics'
## The following object is masked from 'package:graphics':
##
## legend
## Carregando pacotes exigidos: quantmod
## Carregando pacotes exigidos: TTR
## Registered S3 method overwritten by 'quantmod':
## method from
## as.zoo.data.frame zoo
## == Need to Learn tidyquant? ====================================================
## Business Science offers a 1-hour course - Learning Lab #9: Performance Analysis & Portfolio Optimization with tidyquant!
## </> Learn more at: https://university.business-science.io/p/learning-labs-pro </>
library(timetk) # para baixar as series
library(AER) # testes dos modelos
## Carregando pacotes exigidos: car
## Carregando pacotes exigidos: carData
##
## Attaching package: 'car'
## The following object is masked from 'package:dplyr':
##
## recode
## The following object is masked from 'package:purrr':
##
## some
## Carregando pacotes exigidos: lmtest
## Carregando pacotes exigidos: sandwich
## Carregando pacotes exigidos: survival
library(car) # testes dos modelos
library(psych) # analise descritiva dos dados
##
## Attaching package: 'psych'
## The following object is masked from 'package:car':
##
## logit
## The following objects are masked from 'package:ggplot2':
##
## %+%, alpha
library(quantmod) # cotações das ações e do Ibov
library(Quandl) # Selic BACEN
library(ggplot2) # para gerar os gráficos
library(gridExtra) # para vaios graficos juntos
##
## Attaching package: 'gridExtra'
## The following object is masked from 'package:dplyr':
##
## combine
library(lmtest) # testes: breusch-godfrey, breuch-pagan
library(tseries) # jarque-bera test
library(urca) # teste de estacionaridade
library(normtest) # teste de normalidade
library(forecast)
# 2. Baixando as series de precos da PETRO, Ibovesta e Petroleo:
getSymbols(c("PETR4.SA", "^BVSP", "CL=F"),
periodicity = "monthly",
from = "2012-01-02",
to = "2022-12-28")
## [1] "PETR4.SA" "^BVSP" "CL=F"
CL <- `CL=F`
rm(`CL=F`)
# pegando a taxa selic mensal
Quandl.api_key('TC1ow5j6G7s4SFHTzgDz') # set your API key = Comando necessário
# pra acessar o Quandl
selic <- Quandl("BCB/4390",type = 'xts',
start_date="2012-01-01",
end = "2022-12-28") # importando a serie do selic do Bacen
# 2.1. Checando a periodicidade das series:
periodicity(PETR4.SA)
## Monthly periodicity from 2012-01-01 to 2022-12-01
periodicity(BVSP)
## Monthly periodicity from 2012-01-01 to 2022-12-01
periodicity(CL)
## Monthly periodicity from 2012-02-01 to 2022-12-01
periodicity(selic)
## Monthly periodicity from jan 2012 to dez 2022
# 3. Graficos das das series:
# Petro:
g1 <- ggplot(PETR4.SA, aes(time(PETR4.SA), PETR4.SA$PETR4.SA.Adjusted)) + geom_line() +
scale_x_date(date_labels = "%m/%Y", date_breaks = "1 year",
limits=c(min(time(PETR4.SA)),max(time(PETR4.SA)))) +
xlab("") + ylab("PETR4") +
theme(axis.text.x = element_text(angle = 90, hjust = 1))
# ibov
g2 <- ggplot(BVSP, aes(time(BVSP), BVSP$BVSP.Adjusted)) + geom_line() +
scale_x_date(date_labels = "%m/%Y", date_breaks = "1 year",
limits=c(min(time(BVSP)),max(time(BVSP)))) +
xlab("") + ylab("BVSP") +
theme(axis.text.x = element_text(angle = 90, hjust = 1))
# Petroleo
g3 <- ggplot(CL, aes(time(CL), CL$`CL=F.Adjusted`)) + geom_line() +
scale_x_date(date_labels = "%m/%Y", date_breaks = "1 year",
limits=c(min(time(CL)),max(time(CL)))) +
xlab("") + ylab("Barris de Petroleo") +
theme(axis.text.x = element_text(angle = 90, hjust = 1))
# Selic:
ggtsdisplay(selic, ylab = "Selic", xlab = "anos")
# os 3 graficos de cotacoes juntos
grid.arrange(g1, g2, g3, nrow = 3)
## Don't know how to automatically pick scale for object of type xts/zoo. Defaulting to continuous.
## Don't know how to automatically pick scale for object of type xts/zoo. Defaulting to continuous.
## Don't know how to automatically pick scale for object of type xts/zoo. Defaulting to continuous.
Pelos gráficos as cotações das ações da Petrobras e o Índice Ibovespa
apresentaram uma tendenência de crescimento, enquanto os preços
internacionais dos barris de petróleo tiveram no primeiro terço da
década uma tendência de decrescimento, depois de crescimento no segundo
terço e no último terço houve uma forte tendência de decrescimento.
Para se trabalhar com o modelo CAPM é necessário que as séries sejam
estacionárias, isto é, que tenham média e variâncias constantes ao longo
do tempo. Caso não sejam, precisam ser ajustadas para que se tornem
estacionárias.
Foram realizados os retornos das séries da Petrobrás, Ibovespa e dos
barris de petróleo foram diferenciadas para calcular os seus retornos.
Será realizado o teste de Dickey-Fuller aumentado (Said e Dickey, 1984)
para a estacionaridade. Seguem abaixo os testes.
spetro <- ts(data = PETR4.SA$PETR4.SA.Close,
start = c(2011, 1), frequency = 12)
sibov <- ts(data = BVSP$BVSP.Close,
start = c(2011, 1), frequency = 12)
scl <- ts(data = CL$`CL=F.Close`,
start = c(2011, 1), frequency = 12)
sselic <- ts(data = selic,
start = c(2011, 1), frequency = 12)
##
adf_petro <- ur.df(spetro, lags = 12, type = "drift",
selectlags = "AIC")
summary(adf_petro) # nao foi detectada presença de raiz unitária.
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression drift
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -11.1023 -1.4544 -0.1195 1.4754 6.7441
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.04690 0.66009 1.586 0.115
## z.lag.1 -0.04980 0.03168 -1.572 0.119
## z.diff.lag1 0.10142 0.09196 1.103 0.272
## z.diff.lag2 -0.16347 0.09318 -1.754 0.082 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.422 on 115 degrees of freedom
## Multiple R-squared: 0.06119, Adjusted R-squared: 0.0367
## F-statistic: 2.499 on 3 and 115 DF, p-value: 0.06313
##
##
## Value of test-statistic is: -1.5717 1.2848
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau2 -3.46 -2.88 -2.57
## phi1 6.52 4.63 3.81
##
adf_ibov <- ur.df(sibov, lags = 12, type = "drift",
selectlags = "AIC")
summary(adf_ibov) # nao foi detectada presença de raiz unitária.
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression drift
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -29615 -2564 -175 2571 14428
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.308e+03 1.621e+03 0.807 0.4213
## z.lag.1 -9.003e-03 2.001e-02 -0.450 0.6536
## z.diff.lag1 5.600e-02 9.409e-02 0.595 0.5529
## z.diff.lag2 -1.129e-01 9.231e-02 -1.223 0.2238
## z.diff.lag3 -1.938e-01 9.235e-02 -2.098 0.0381 *
## z.diff.lag4 -1.455e-01 9.405e-02 -1.547 0.1246
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 5385 on 113 degrees of freedom
## Multiple R-squared: 0.09041, Adjusted R-squared: 0.05017
## F-statistic: 2.246 on 5 and 113 DF, p-value: 0.05446
##
##
## Value of test-statistic is: -0.45 0.8542
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau2 -3.46 -2.88 -2.57
## phi1 6.52 4.63 3.81
##
adf_cl <- ur.df(scl, lags = 12, type = "drift",
selectlags = "AIC")
summary(adf_cl) # nao foi detectada presença de raiz unitária.
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression drift
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -26.2426 -3.9882 0.6135 4.0471 17.0063
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.02314 2.20684 1.823 0.0714 .
## z.lag.1 -0.06408 0.03237 -1.980 0.0506 .
## z.diff.lag 0.12238 0.10036 1.219 0.2257
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 6.813 on 96 degrees of freedom
## Multiple R-squared: 0.04807, Adjusted R-squared: 0.02824
## F-statistic: 2.424 on 2 and 96 DF, p-value: 0.09397
##
##
## Value of test-statistic is: -1.9799 1.978
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau2 -3.46 -2.88 -2.57
## phi1 6.52 4.63 3.81
##
##
adf_selic <- ur.df(sselic, lags = 3, type = "drift",
selectlags = "AIC")
summary(adf_selic) # nao foi detectada presença de raiz unitária.
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression drift
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.233027 -0.043586 0.001318 0.038083 0.199335
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.02529 0.01506 1.679 0.09571 .
## z.lag.1 -0.03543 0.02011 -1.762 0.08058 .
## z.diff.lag1 -0.40917 0.07952 -5.145 1.02e-06 ***
## z.diff.lag2 0.24054 0.08655 2.779 0.00631 **
## z.diff.lag3 0.51670 0.07785 6.637 9.12e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06511 on 123 degrees of freedom
## Multiple R-squared: 0.4056, Adjusted R-squared: 0.3863
## F-statistic: 20.98 on 4 and 123 DF, p-value: 3.315e-13
##
##
## Value of test-statistic is: -1.7619 1.561
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau2 -3.46 -2.88 -2.57
## phi1 6.52 4.63 3.81
##
As séries foram não estacionárias e por precisão ser diferenciadas, isto é, retiradas as taxas de variação que são dadas pela seguinte expressão:
\[ \Delta_x = [(t_1/t_0)-1]*100 \]
Ou seja, vai ser a divisão do preço presente pelo preço passado, subtraindo uma unidade e multiplicado por 100 (para dar a avaliação em percentual). Seguem abaixo os testes com as séries diferenciadas.
##
adf_petro <- ur.df(diff(spetro), lags = 12, type = "drift",
selectlags = "AIC")
summary(adf_petro) # nao foi detectada presença de raiz unitária.
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression drift
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -11.533 -1.438 -0.123 1.644 6.254
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.08078 0.22534 0.358 0.7206
## z.lag.1 -1.11814 0.12611 -8.866 1.13e-14 ***
## z.diff.lag 0.19187 0.09212 2.083 0.0395 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.445 on 115 degrees of freedom
## Multiple R-squared: 0.4875, Adjusted R-squared: 0.4786
## F-statistic: 54.69 on 2 and 115 DF, p-value: < 2.2e-16
##
##
## Value of test-statistic is: -8.8662 39.3052
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau2 -3.46 -2.88 -2.57
## phi1 6.52 4.63 3.81
##
adf_ibov <- ur.df(diff(sibov), lags = 12, type = "drift",
selectlags = "AIC")
summary(adf_ibov) # nao foi detectada presença de raiz unitária.
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression drift
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -29928.1 -2423.3 -36.1 2617.3 14266.1
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 638.60926 503.00787 1.270 0.20684
## z.lag.1 -1.42116 0.19109 -7.437 2.15e-11 ***
## z.diff.lag1 0.46844 0.15438 3.034 0.00299 **
## z.diff.lag2 0.35163 0.12519 2.809 0.00586 **
## z.diff.lag3 0.15269 0.09345 1.634 0.10508
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 5384 on 113 degrees of freedom
## Multiple R-squared: 0.4974, Adjusted R-squared: 0.4796
## F-statistic: 27.96 on 4 and 113 DF, p-value: 3.829e-16
##
##
## Value of test-statistic is: -7.4371 27.6549
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau2 -3.46 -2.88 -2.57
## phi1 6.52 4.63 3.81
##
adf_cl <- ur.df(diff(scl), lags = 12, type = "drift",
selectlags = "AIC")
summary(adf_cl) # nao foi detectada presença de raiz unitária.
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression drift
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -25.1983 -3.5329 0.9269 4.1955 19.1674
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.1217 0.7058 -0.172 0.863
## z.lag.1 -0.9191 0.1382 -6.650 1.85e-09 ***
## z.diff.lag 0.0156 0.1028 0.152 0.880
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 6.985 on 95 degrees of freedom
## Multiple R-squared: 0.4526, Adjusted R-squared: 0.4411
## F-statistic: 39.27 on 2 and 95 DF, p-value: 3.713e-13
##
##
## Value of test-statistic is: -6.6501 22.1121
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau2 -3.46 -2.88 -2.57
## phi1 6.52 4.63 3.81
##
##
adf_selic <- ur.df(diff(sselic), lags = 3, type = "drift",
selectlags = "AIC")
summary(adf_selic) # nao foi detectada presença de raiz unitária.
##
## ###############################################
## # Augmented Dickey-Fuller Test Unit Root Test #
## ###############################################
##
## Test regression drift
##
##
## Call:
## lm(formula = z.diff ~ z.lag.1 + 1 + z.diff.lag)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.235802 -0.039970 0.006291 0.040434 0.204631
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.0001825 0.0058167 0.031 0.97502
## z.lag.1 -0.5925263 0.1895453 -3.126 0.00221 **
## z.diff.lag1 -0.9110663 0.1783927 -5.107 1.22e-06 ***
## z.diff.lag2 -0.7219986 0.1525350 -4.733 6.01e-06 ***
## z.diff.lag3 -0.1478685 0.0898492 -1.646 0.10239
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.06539 on 122 degrees of freedom
## Multiple R-squared: 0.7896, Adjusted R-squared: 0.7827
## F-statistic: 114.5 on 4 and 122 DF, p-value: < 2.2e-16
##
##
## Value of test-statistic is: -3.126 4.9036
##
## Critical values for test statistics:
## 1pct 5pct 10pct
## tau2 -3.46 -2.88 -2.57
## phi1 6.52 4.63 3.81
##
Pelos resultados dos testes, todas as séries são estacionárias e
podemos aplicar o modelo CAPM.
As equações populacionais a serem estimadas são dadas por:
\[ (petro - selic)_{it} = \beta_0 + \beta_1 * (ibov - selic)_{it} + u_{it} (1) \]
\[ (petro - selic)_{it} = \beta_0 + \beta_1 * (ibov - selic - barris)_{it} + u_{it} (2) \]
Agrupando a base de dados:
##
# 5. Calculando retornos mensais petr4, ibov e CL com base no preço ajustado
dados <- merge(monthlyReturn(PETR4.SA[,4],type='arithmetic')[-1,],
monthlyReturn(BVSP[,4],type="arithmetic")[-1,],
monthlyReturn(CL[,4],type="arithmetic")[-1,])
# 5. Juntando os dados petr4, ibov e selic
dados <- merge(dados, as.xts(diff(selic, 1)),join="inner")
# 5.1 Renomeando as colunas
names(dados) <- c("petr4","ibov","barris", "selic")
Modelo da equação (1):
# 6. Estimando o modelo de regressão do CAPM sem os barris
mod1 <- lm(I(petr4 - selic) ~ I(ibov - selic), data = dados)
# Mostrando os resultados
summary(mod1)
##
## Call:
## lm(formula = I(petr4 - selic) ~ I(ibov - selic), data = dados)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.21904 -0.06150 -0.00593 0.04882 0.44340
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.001208 0.007659 0.158 0.875
## I(ibov - selic) 1.253393 0.070297 17.830 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.0875 on 129 degrees of freedom
## Multiple R-squared: 0.7114, Adjusted R-squared: 0.7091
## F-statistic: 317.9 on 1 and 129 DF, p-value: < 2.2e-16
AIC(mod1)
## [1] -262.5261
BIC(mod1)
## [1] -253.9005
# 6.1. Teste de normalidade e hetero nos residuos:
jb.norm.test(mod1$residuals)
##
## Jarque-Bera test for normality
##
## data: mod1$residuals
## JB = 115.5, p-value < 2.2e-16
bptest(mod1)
##
## studentized Breusch-Pagan test
##
## data: mod1
## BP = 1.0209, df = 1, p-value = 0.3123
durbinWatsonTest(mod1)
## lag Autocorrelation D-W Statistic p-value
## 1 0.2006709 1.580792 0.01
## Alternative hypothesis: rho != 0
bgtest(mod1)
##
## Breusch-Godfrey test for serial correlation of order up to 1
##
## data: mod1
## LM test = 5.3149, df = 1, p-value = 0.02114
A estatística F do modelo foi alta no valor de 317,9 e
estatisticamente significante em 1%. O R-quadrado ajustado foi de 0,71
indicando de 72% da variação da variável dependente é explicada pela
variação da variável explicativa. A hipótese nula de normalidade nos
resíduos foi rejeitada, mas amostra foi de 132 podendo se trabalhar com
a hipótese de normalidade assintótica. Os critérios de Akaike (AIC) e
Schwarz (BIC) foram muito baixos, indicando boa assertividade do modelo.
A hipótese nula de homoscedasticidade não foi rejeitada, ou seja, a
variância nos resíduos é constante. A hipótese nula do teste de
Durbin-Watson de não autocorrelação nos resíduos foi rejeitada em 5%,
mas não em 1%, mas o valor-p foi próximo de 0,05. Dessa forma, o modelo
está bem ajustado.
O beta de 1,25, estatisticamente significativo a 1%, indica que uma
variação de 1% no retorno em excesso do Ibovespa, seria acompanhado por
uma variação de 1,26% no retorno (esperado) em excesso da Petrobrás. Ou
seja, as ações da Petrobrás têm alta covariância com o Ibovespa.
O Alfa de Jensen (intercepto) deu positivo mas não estatisticamente
significativo, de acordo com o esperado, segundo a EMH (Hipótese de
Mercado Eficiente)
Modelo da equação (2)
# 7. Estimando o modelo de regressão do CAPM com os barris
dados2 <- na.omit(dados)
mod2 <- lm(I(petr4 - selic - barris) ~ I(ibov - selic - barris),
data = dados2)
# Mostrando os resultados
summary(mod2)
##
## Call:
## lm(formula = I(petr4 - selic - barris) ~ I(ibov - selic - barris),
## data = dados2)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.21437 -0.05594 -0.01843 0.04928 0.44529
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.003229 0.009010 0.358 0.721
## I(ibov - selic - barris) 1.011569 0.056010 18.060 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.09493 on 109 degrees of freedom
## Multiple R-squared: 0.7495, Adjusted R-squared: 0.7472
## F-statistic: 326.2 on 1 and 109 DF, p-value: < 2.2e-16
AIC(mod2)
## [1] -203.741
BIC(mod2)
## [1] -195.6124
# 7.1. Teste de normalidade e hetero nos residuos:
jb.norm.test(mod2$residuals)
##
## Jarque-Bera test for normality
##
## data: mod2$residuals
## JB = 81.717, p-value < 2.2e-16
bptest(mod2)
##
## studentized Breusch-Pagan test
##
## data: mod2
## BP = 0.90594, df = 1, p-value = 0.3412
durbinWatsonTest(mod2)
## lag Autocorrelation D-W Statistic p-value
## 1 0.2217204 1.552864 0.018
## Alternative hypothesis: rho != 0
bgtest(mod2)
##
## Breusch-Godfrey test for serial correlation of order up to 1
##
## data: mod2
## LM test = 5.6442, df = 1, p-value = 0.01751
A análise foi similar ao primeiro modelo, a diferença foi nos valores
das estatísticas dos testes, mas com mesma interpretação.
A diferença importante aqui foi no valor do beta, que foi de 1,012 e
estatisticamente significativo a 1%. Nesse caso, variação de 1% no
retorno em excesso do Ibovespa, seria acompanhado por uma variação de
1,012% no retorno (esperado) em excesso da Petrobrás, ou seja, uma
variação quase constante. Os preços internacionais dos barris de
petróleo têm forte influência sobre os preços das ações preferenciais da
petrolífera brasileira.
SAID, S.E., e DICKEY, D.A. “Testing for Unit Roots in Autoregressive Moving Average Models of Unknown Order”. Biometrika, 71, 599-607, 1984.