Analysis

2019年5月24日の結果
日経平均株価の終値対始値比(\(x\))と東京市場ドル円レートの終値対始値比(\(y\))との線形モデル、その回帰係数が\(a\)であった場合(\(y=ax\)、切片は0)、15時時点(大引け時点)の日経平均株価が始値比で仮に1%上昇(下落)したとすると、その2時間後17時点のドル円レートは9時時点のドル円レートより\(a\)%上昇(下落)することを意味します。*終値対始値比:%。分母が始値、分子は終値。

時系列チャート 単位根検定 共和分検定 最小二乗法 一般化最小二乗法 散布図・QQプロット・残差の時系列推移

時系列チャート
[1] "USDJPY"
          Date   Open   High    Low  Close Center  Index CloseToOpen HighToLow    MA:25 DeviationRate Close:Diff(lag=1) Close:Ratio(lag=1)
791 2019-04-26 111.55 111.79 111.45 111.68 111.70 100.65       0.117     0.305 111.3760          0.27             -0.16             -0.143
792 2019-05-07 110.81 110.85 110.59 110.66 110.72 102.17      -0.135     0.235 111.4000         -0.66             -1.02             -0.913
793 2019-05-08 110.27 110.29 109.91 110.14 110.01 102.34      -0.118     0.346 111.3976         -1.13             -0.52             -0.470
794 2019-05-09 110.03 110.08 109.60 109.63 109.95 102.92      -0.364     0.438 111.3552         -1.55             -0.51             -0.463
795 2019-05-10 109.83 110.05 109.63 109.77 109.85 102.58      -0.055     0.383 111.3428         -1.41              0.14              0.128
796 2019-05-13 109.65 109.82 109.60 109.65 109.75 103.69       0.000     0.201 111.2988         -1.48             -0.12             -0.109
797 2019-05-14 109.16 109.77 109.15 109.68 109.58 103.36       0.476     0.568 111.2440         -1.41              0.03              0.027
798 2019-05-15 109.68 109.70 109.49 109.51 109.65 103.36      -0.155     0.192 111.1692         -1.49             -0.17             -0.155
799 2019-05-16 109.47 109.59 109.34 109.46 109.46 103.31      -0.009     0.229 111.0868         -1.46             -0.05             -0.046
800 2019-05-17 109.88 110.03 109.55 109.73 109.94 103.43      -0.137     0.438 111.0212         -1.16              0.27              0.247
801 2019-05-20 110.18 110.32 110.02 110.12 110.17 103.34      -0.054     0.273 110.9588         -0.76              0.39              0.355
802 2019-05-21 110.09 110.26 110.03 110.13 110.15 102.90       0.036     0.209 110.9060         -0.70              0.01              0.009
803 2019-05-22 110.57 110.62 110.36 110.37 110.51 103.06      -0.181     0.236 110.8684         -0.45              0.24              0.218
804 2019-05-23 110.23 110.36 110.13 110.30 110.22 103.77       0.064     0.209 110.8328         -0.48             -0.07             -0.063
805 2019-05-24 109.56 109.74 109.46 109.54 109.71     NA      -0.018     0.256 110.7704         -1.11             -0.76             -0.689
[1] "NIKKEI"
          Date     Open     High      Low    Close CloseToOpen HighToLow    MA:25 DeviationRate Close:Diff(lag=1) Close:Ratio(lag=1)
791 2019-04-26 22167.48 22270.29 22073.10 22258.73       0.412     0.893 21812.84          2.04            -48.85             -0.219
792 2019-05-07 22184.40 22190.49 21875.11 21923.72      -1.175     1.442 21850.70          0.33           -335.01             -1.505
793 2019-05-08 21628.04 21639.12 21514.85 21602.59      -0.118     0.578 21857.67         -1.17           -321.13             -1.465
794 2019-05-09 21492.91 21559.76 21315.07 21402.13      -0.422     1.148 21858.61         -2.09           -200.46             -0.928
795 2019-05-10 21431.81 21584.09 21175.33 21344.92      -0.405     1.930 21871.05         -2.41            -57.21             -0.267
796 2019-05-13 21180.74 21277.66 21127.93 21191.28       0.050     0.709 21870.47         -3.11           -153.64             -0.720
797 2019-05-14 20870.77 21077.48 20751.45 21067.23       0.941     1.571 21852.80         -3.59           -124.05             -0.585
798 2019-05-15 21112.85 21191.53 20968.08 21188.56       0.359     1.066 21840.13         -2.98            121.33              0.576
799 2019-05-16 21153.20 21153.20 20951.67 21062.98      -0.427     0.962 21814.12         -3.44           -125.58             -0.593
800 2019-05-17 21246.86 21398.85 21199.98 21250.09       0.015     0.938 21795.12         -2.50            187.11              0.888
801 2019-05-20 21305.97 21430.06 21282.65 21301.73      -0.020     0.693 21774.89         -2.17             51.64              0.243
802 2019-05-21 21211.26 21318.80 21160.43 21272.45       0.288     0.748 21755.33         -2.22            -29.28             -0.137
803 2019-05-22 21373.52 21404.54 21266.98 21283.37      -0.422     0.647 21734.56         -2.08             10.92              0.051
804 2019-05-23 21180.24 21209.56 21072.72 21151.14      -0.137     0.649 21713.10         -2.59           -132.23             -0.621
805 2019-05-24 20980.79 21117.22 20922.00 21117.22       0.650     0.933 21689.33         -2.64            -33.92             -0.160
単位根検定
  • CADFtest {CADFtest}
Analysis period: 2019-02-21 ~ 2019-05-24,60days

$USDJPY_CloseToOpen

    ADF test

data:  x
ADF(0) = -9.0173, p-value = 0.000000002124
alternative hypothesis: true delta is less than 0
sample estimates:
    delta 
-1.196978 


$NIKKEI_CloseToOpen

    ADF test

data:  x
ADF(1) = -7.9733, p-value = 0.0000000431
alternative hypothesis: true delta is less than 0
sample estimates:
    delta 
-1.599733 
共和分検定
  • ca.po {urca}
Analysis period: 2019-02-21 ~ 2019-05-24,60days


######################################## 
# Phillips and Ouliaris Unit Root Test # 
######################################## 

Test of type Pu 
detrending of series none 


Call:
lm(formula = z[, 1] ~ z[, -1] - 1)

Residuals:
     Min       1Q   Median       3Q      Max 
-0.35235 -0.11295 -0.02049  0.06207  0.49273 

Coefficients:
        Estimate Std. Error t value  Pr(>|t|)    
z[, -1]  0.16235    0.03601   4.509 0.0000315 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.1518 on 59 degrees of freedom
Multiple R-squared:  0.2563,    Adjusted R-squared:  0.2436 
F-statistic: 20.33 on 1 and 59 DF,  p-value: 0.00003152


Value of test-statistic is: 49.5587 

Critical values of Pu are:
                  10pct    5pct    1pct
critical values 20.3933 25.9711 38.3413
最小二乗法
  • lm {stats}
  • dwtest {lmtest}
  • ks.test {stats}
  • confint {stats}
  • Box.test {stats}
Analysis period: 2019-02-21 ~ 2019-05-24,60days


Call:
lm(formula = USDJPY_CloseToOpen ~ NIKKEI_CloseToOpen, data = USDJPY_NIKKEI)

Residuals:
     Min       1Q   Median       3Q      Max 
-0.34041 -0.09824 -0.00482  0.07716  0.50609 

Coefficients:
                   Estimate Std. Error t value Pr(>|t|)    
(Intercept)        -0.01544    0.01973  -0.782    0.437    
NIKKEI_CloseToOpen  0.15996    0.03625   4.412 0.000045 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.1523 on 58 degrees of freedom
Multiple R-squared:  0.2513,    Adjusted R-squared:  0.2384 
F-statistic: 19.47 on 1 and 58 DF,  p-value: 0.00004505


-----------------------------------------------------------------------------

    Durbin-Watson test

data:  OLS_Model
DW = 2.3665, p-value = 0.9268
alternative hypothesis: true autocorrelation is greater than 0


-----------------------------------------------------------------------------

    One-sample Kolmogorov-Smirnov test

data:  ResidualsOLS
D = 0.086223, p-value = 0.7311
alternative hypothesis: two-sided


-----------------------------------------------------------------------------
                         2.5 %     97.5 %
(Intercept)        -0.05493815 0.02406425
NIKKEI_CloseToOpen  0.08739319 0.23253617

-----------------------------------------------------------------------------

    Box-Ljung test

data:  ResidualsOLS
X-squared = 2.216, df = 1, p-value = 0.1366
一般化最小二乗法
Analysis period: 2019-02-21 ~ 2019-05-24,60days

Generalized least squares fit by REML
  Model: USDJPY_CloseToOpen ~ NIKKEI_CloseToOpen 
  Data: USDJPY_NIKKEI 
        AIC       BIC   logLik
  -40.72648 -34.54516 23.36324

Coefficients:
                         Value  Std.Error   t-value p-value
(Intercept)        -0.01543695 0.01973365 -0.782265  0.4372
NIKKEI_CloseToOpen  0.15996468 0.03625461  4.412258  0.0000

 Correlation: 
                   (Intr)
NIKKEI_CloseToOpen 0.084 

Standardized residuals:
        Min          Q1         Med          Q3         Max 
-2.23492429 -0.64499998 -0.03164191  0.50658966  3.32260403 

Residual standard error: 0.1523161 
Degrees of freedom: 60 total; 58 residual

-----------------------------------------------------------------------------

    One-sample Kolmogorov-Smirnov test

data:  ResidualsGLS
D = 0.086223, p-value = 0.7311
alternative hypothesis: two-sided


-----------------------------------------------------------------------------
                         2.5 %    97.5 %
(Intercept)        -0.05411420 0.0232403
NIKKEI_CloseToOpen  0.08890695 0.2310224

-----------------------------------------------------------------------------

    Box-Ljung test

data:  ResidualsGLS
X-squared = 2.216, df = 1, p-value = 0.1366
散布図・QQプロット・残差の時系列推移
  • (注意)線形回帰の傾き(\(a\))、切片(\(b\))それぞれの検定統計量、p値に関わらず\(y=ax+b\)として回帰直線を散布図中にプロットしています。