2019年6月2日日曜日

S&P 500 performance comparison between CLI 1 month delta is positive and negative.




The period when OECD Composite Leading Inditacor 1 month delta is positive and negative come one after another. Here to calculate S&P 500 return during those each period.

The parameter "minus" indicates this is period when CLI delta is negative. The result is they came 25 times since 1970/1/1. The average length is approx. 11.35 month and the average return is -1.41%.

On the other hand, positive have come 25 times. The average length is 11.8 month and the average return is 19.85%.

> func("minus","1970-01-01")
0111 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
[1] 11.34615
[1] 0.9858096
            result period_length          rate  open_p close_p
Sep 1970 0.9157072             9 -0.0097365802   92.06   84.30
Jan 1975 0.6634491            24 -0.0169506551  116.03   76.98
Jul 1977 0.9867239            14 -0.0009541901  100.18   98.85
Jun 1980 1.2136407            20  0.0097282501   94.13  114.24
Aug 1982 0.8803035            20 -0.0063541523  135.76  119.51
Nov 1984 1.0010403            10  0.0001039829  163.41  163.58
Jul 1986 1.3032344            17  0.0157013530  181.18  236.12
Mar 1988 0.7849672             7 -0.0339963144  329.81  258.89
Oct 1989 1.2255509            10  0.0205472899  277.72  340.36
Jan 1991 1.0362770            11  0.0032447523  331.89  343.93
Dec 1991 1.0547758             4  0.0134213316  395.43  417.09
Nov 1992 1.0395228             7  0.0055527568  414.95  431.35
Jun 1995 1.1773542             9  0.0183066251  462.69  544.75
Jan 1996 1.0937576             3  0.0303236982  581.50  636.02
Oct 1998 1.1598155            13  0.0114699680  947.28 1098.67
Sep 2001 0.6946176            18 -0.0200405678 1498.58 1040.94
Mar 2003 0.7875979            11 -0.0214722593 1076.92  848.18
May 2005 1.0579732            14  0.0040334726 1126.21 1191.50
Jun 2006 1.0001180             1  0.0001180284 1270.05 1270.20
Feb 2009 0.4885423            20 -0.0351826442 1504.66  735.09
Jun 2010 0.9479536             1 -0.0520464319 1087.30 1030.71
Nov 2011 0.9385236             9 -0.0070249109 1328.64 1246.96
Sep 2012 1.0547405             7  0.0076425915 1365.90 1440.67
Aug 2014 1.0690570             5  0.0134449700 1873.96 2003.37
Apr 2016 1.0031085            16  0.0001940004 2058.90 2065.30
Mar 2019 1.0599561            15  0.0034295890 2645.10 2784.49



> func("plus","1970-01-01")
0111 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
[1] 11.8
[1] 1.198459
            result period_length         rate  open_p close_p
Jan 1973 1.3763938            28  0.011474868   84.30  116.03
May 1976 1.3013769            16  0.016600207   76.98  100.18
Oct 1978 0.9423369            15 -0.003951666   98.85   93.15
Dec 1980 1.1883753             6  0.029182211  114.24  135.76
Jan 1984 1.3672189            17  0.018569047  119.52  163.41
Feb 1985 1.1075926             3  0.034649717  163.58  181.18
Aug 1987 1.3967474            13  0.026036742  236.12  329.80
Dec 1988 1.0727335             9  0.007831630  258.89  277.72
Feb 1990 0.9751147             4 -0.006280247  340.36  331.89
Aug 1991 1.1498066             7  0.020142134  343.91  395.43
Apr 1992 0.9950124             4 -0.001249244  417.03  414.95
Sep 1994 1.0727019            22  0.003195123  431.35  462.71
Oct 1995 1.0674621             4  0.016454915  544.75  581.50
Sep 1997 1.4893871            20  0.020117927  636.02  947.28
Mar 2000 1.3639946            17  0.018427587 1098.67 1498.58
Apr 2002 1.0345650             7  0.004866239 1040.94 1076.92
Mar 2004 1.3277960            12  0.023908021  848.18 1126.21
May 2006 1.0659588            12  0.005337085 1191.50 1270.09
Jun 2007 1.1836842            12  0.014151848 1270.06 1503.35
May 2010 1.4932221            15  0.027089509  729.57 1089.41
Feb 2011 1.2871884             8  0.032060761 1031.10 1327.22
Feb 2012 1.0952515             3  0.030792577 1246.91 1365.68
Mar 2014 1.2994239            18  0.014657552 1440.90 1872.34
Dec 2014 1.0273593             4  0.006770750 2004.07 2058.90
Nov 2017 1.2807753            19  0.013109691 2067.17 2647.58

their results are tested by "t.test()". p-value is 7.391e-05. Therefore they should be distiguised each other with the probability of 99.99261%

> t.test(func("plus","1970-01-01")[,1],func("minus","1970-01-01")[,1])
<skip>
Welch Two Sample t-test

data:  func("plus", "1970-01-01")[, 1] and func("minus", "1970-01-01")[, 1]
t = 4.3306, df = 48.714, p-value = 7.391e-05
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 0.1138069 0.3109339
sample estimates:
mean of x mean of y
1.1984592 0.9860888

There is a histogram in the next entry for the better comparison.

see source code github. commit id is d20207a

0 件のコメント: