Departamento de Economía
2024-03-19
Cartera comercial de bancos
Agradecimientos
Esta sesión se construye a partir de los elementos de los paquetes de tseries
y (Krispin 2019), quien desarrolló el paquete TSstudio
respectivamente
###############################################
# Augmented Dickey-Fuller Test Unit Root Test #
###############################################
Test regression none
Call:
lm(formula = z.diff ~ z.lag.1 - 1)
Residuals:
Min 1Q Median 3Q Max
-8178.3 -2346.7 -61.7 1996.2 15252.0
Coefficients:
Estimate Std. Error t value Pr(>|t|)
z.lag.1 0.0059658 0.0007548 7.904 4.79e-12 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 3662 on 95 degrees of freedom
Multiple R-squared: 0.3967, Adjusted R-squared: 0.3904
F-statistic: 62.48 on 1 and 95 DF, p-value: 4.79e-12
Value of test-statistic is: 7.9042
Critical values for test statistics:
1pct 5pct 10pct
tau1 -2.6 -1.95 -1.61
###############################################
# Augmented Dickey-Fuller Test Unit Root Test #
###############################################
Test regression drift
Call:
lm(formula = z.diff ~ z.lag.1 + 1)
Residuals:
Min 1Q Median 3Q Max
-8177.7 -2364.0 -51.6 2005.6 15255.0
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -6.100e+01 2.117e+03 -0.029 0.977
z.lag.1 6.087e-03 4.275e-03 1.424 0.158
Residual standard error: 3681 on 94 degrees of freedom
Multiple R-squared: 0.02111, Adjusted R-squared: 0.0107
F-statistic: 2.028 on 1 and 94 DF, p-value: 0.1578
Value of test-statistic is: 1.4239 30.9097
Critical values for test statistics:
1pct 5pct 10pct
tau2 -3.51 -2.89 -2.58
phi1 6.70 4.71 3.86
###############################################
# Augmented Dickey-Fuller Test Unit Root Test #
###############################################
Test regression trend
Call:
lm(formula = z.diff ~ z.lag.1 + 1 + tt)
Residuals:
Min 1Q Median 3Q Max
-8473.6 -1890.1 75.1 1723.4 14870.7
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 8918.21856 5878.88458 1.517 0.133
z.lag.1 -0.02124 0.01724 -1.232 0.221
tt 89.40563 54.68086 1.635 0.105
Residual standard error: 3649 on 93 degrees of freedom
Multiple R-squared: 0.04847, Adjusted R-squared: 0.028
F-statistic: 2.368 on 2 and 93 DF, p-value: 0.09925
Value of test-statistic is: -1.2318 21.8644 2.3685
Critical values for test statistics:
1pct 5pct 10pct
tau3 -4.04 -3.45 -3.15
phi2 6.50 4.88 4.16
phi3 8.73 6.49 5.47
###############################################
# Augmented Dickey-Fuller Test Unit Root Test #
###############################################
Test regression trend
Call:
lm(formula = z.diff ~ z.lag.1 + 1 + tt)
Residuals:
Min 1Q Median 3Q Max
-7972.0 -1896.3 30.4 1817.9 13792.0
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 943.03465 701.55496 1.344 0.182
z.lag.1 -0.55233 0.09511 -5.807 8.99e-08 ***
tt 12.96238 12.68604 1.022 0.310
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 3312 on 92 degrees of freedom
Multiple R-squared: 0.2685, Adjusted R-squared: 0.2526
F-statistic: 16.89 on 2 and 92 DF, p-value: 5.66e-07
Value of test-statistic is: -5.8072 11.2731 16.8877
Critical values for test statistics:
1pct 5pct 10pct
tau3 -4.04 -3.45 -3.15
phi2 6.50 4.88 4.16
phi3 8.73 6.49 5.47
Ljung-Box test
data: Residuals from ARIMA(3,1,0)
Q* = 33.151, df = 16, p-value = 0.007056
Model df: 3. Total lags used: 19
Ljung-Box test
data: Residuals from ARIMA(1,1,0)
Q* = 42.759, df = 18, p-value = 0.0008655
Model df: 1. Total lags used: 19
La prueba de correlación serial de nuestros modelos no esta pasando el test. Se requiere que esta siempre no rechace la hipotesis nula.
Este paso es vital. Si nuestro modelo no aprueba el ruido blanco vamos a tener problemas en el futuro.
Debe existir un modelo que nos ayude a establecer que realmente es ruido blanco
Point Forecast Lo 80 Hi 80 Lo 95 Hi 95
Feb 2024 645793.1 641600.1 649986.1 639380.4 652205.8
Mar 2024 644824.7 637493.7 652155.8 633612.9 656036.6
Apr 2024 643703.1 633268.3 654138.0 627744.4 659661.9
May 2024 642869.4 628940.9 656797.9 621567.6 664171.2
Jun 2024 642129.3 624616.9 659641.7 615346.4 668912.2
Jul 2024 641439.0 620325.4 662552.6 609148.5 673729.5
Aug 2024 640847.2 616101.6 665592.8 603002.1 678692.3
Sep 2024 640326.0 611959.8 668692.2 596943.7 683708.3
Oct 2024 639861.0 607908.8 671813.1 590994.4 688727.6
Nov 2024 639452.4 603957.6 674947.1 585167.9 693736.8
Dec 2024 639092.0 600109.0 678075.0 579472.7 698711.3
Jan 2025 638773.2 596363.7 681182.7 573913.5 703632.9
Universidad del Norte