diff --git a/data/ADA.csv b/data/ADA.csv index a149e47..62e4eb4 100644 --- a/data/ADA.csv +++ b/data/ADA.csv @@ -1,9 +1,4 @@ time,high,low,open,close -2017-10-02,0.03063,0.01972,0.02519,0.02588 -2017-10-03,0.02683,0.02066,0.02588,0.02084 -2017-10-04,0.02308,0.02033,0.02084,0.02189 -2017-10-05,0.02269,0.02096,0.02189,0.02152 -2017-10-06,0.02186,0.01814,0.02152,0.01849 2017-10-07,0.02182,0.01774,0.01849,0.0208 2017-10-08,0.0244,0.02015,0.0208,0.02052 2017-10-09,0.0237,0.02107,0.02052,0.02207 @@ -1499,4 +1494,9 @@ time,high,low,open,close 2021-11-07,2.036,1.977,2.005,2.02 2021-11-08,2.139,2.011,2.02,2.126 2021-11-09,2.378,2.108,2.126,2.268 -2021-11-10,2.327,2.152,2.268,2.217 +2021-11-10,2.327,1.945,2.268,2.101 +2021-11-11,2.151,2.062,2.101,2.081 +2021-11-12,2.097,1.992,2.081,2.049 +2021-11-13,2.079,2.023,2.049,2.052 +2021-11-14,2.069,2.012,2.052,2.04 +2021-11-15,2.093,2.019,2.04,2.028 diff --git a/data/BNB.csv b/data/BNB.csv index d6f2026..80ad23e 100644 --- a/data/BNB.csv +++ b/data/BNB.csv @@ -1,9 +1,4 @@ time,high,low,open,close -2017-10-02,2.004,1.478,1.522,1.973 -2017-10-03,1.995,1.685,1.973,1.837 -2017-10-04,1.849,1.503,1.837,1.622 -2017-10-05,1.743,1.443,1.622,1.674 -2017-10-06,1.801,1.556,1.674,1.556 2017-10-07,1.633,1.504,1.556,1.566 2017-10-08,1.609,1.216,1.566,1.216 2017-10-09,147.52,1.167,1.216,1.427 @@ -1499,4 +1494,9 @@ time,high,low,open,close 2021-11-07,669.67,631.19,637.58,649.78 2021-11-08,693.73,645.5,650.12,653.81 2021-11-09,656.98,632.25,654.05,635.14 -2021-11-10,655.44,624.16,635.14,651.36 +2021-11-10,662.89,575.33,635.14,614.68 +2021-11-11,635.32,605.99,614.68,628.89 +2021-11-12,634.58,603.67,628.89,627.0 +2021-11-13,655.11,620.04,627.0,649.81 +2021-11-14,660.66,635.16,649.81,650.98 +2021-11-15,659.86,632.59,650.98,634.86 diff --git a/data/BTC.csv b/data/BTC.csv index b81ec3e..a239752 100644 --- a/data/BTC.csv +++ b/data/BTC.csv @@ -1,9 +1,4 @@ time,high,low,open,close -2017-10-02,4477.38,4364.67,4403.09,4401.32 -2017-10-03,4435.99,4230.73,4401.32,4314.18 -2017-10-04,4355.29,4183.57,4314.18,4218.66 -2017-10-05,4365.76,4143.35,4218.66,4321.44 -2017-10-06,4422.15,4296.93,4321.44,4371.94 2017-10-07,4472.92,4319.48,4371.94,4435.81 2017-10-08,4622.87,4419.36,4435.81,4611.7 2017-10-09,4875.38,4556.15,4611.7,4777.49 @@ -1499,4 +1494,9 @@ time,high,low,open,close 2021-11-07,63309.57,61406.56,61529.76,63302.78 2021-11-08,67755.46,63302.78,63302.78,67549.14 2021-11-09,68514.26,66312.42,67549.14,66939.24 -2021-11-10,67378.35,66254.94,66939.24,66432.45 +2021-11-10,68978.64,63196.25,66939.24,64926.06 +2021-11-11,65585.68,64130.37,64926.06,64820.8 +2021-11-12,65466.0,62315.02,64820.8,64156.3 +2021-11-13,64967.34,63406.98,64156.3,64409.56 +2021-11-14,65509.06,63616.33,64409.56,65509.06 +2021-11-15,66335.42,63651.94,65509.06,64013.74 diff --git a/data/DOT.csv b/data/DOT.csv index 4586dbb..8a4204f 100644 --- a/data/DOT.csv +++ b/data/DOT.csv @@ -1,9 +1,4 @@ time,high,low,open,close -2017-10-02,0.0,0.0,0.0,0.0 -2017-10-03,0.0,0.0,0.0,0.0 -2017-10-04,0.0,0.0,0.0,0.0 -2017-10-05,0.0,0.0,0.0,0.0 -2017-10-06,0.0,0.0,0.0,0.0 2017-10-07,0.0,0.0,0.0,0.0 2017-10-08,0.0,0.0,0.0,0.0 2017-10-09,0.0,0.0,0.0,0.0 @@ -1053,450 +1048,455 @@ time,high,low,open,close 2020-08-18,0.0,0.0,0.0,0.0 2020-08-19,0.0,0.0,0.0,0.0 2020-08-20,0.0,0.0,0.0,0.0 -2020-08-21,3.011,2.82,2.913,2.957 -2020-08-22,4.49,2.96,2.957,4.49 -2020-08-23,4.511,3.717,4.49,3.981 -2020-08-24,4.78,3.806,3.981,4.574 -2020-08-25,5.758,4.485,4.574,5.559 -2020-08-26,6.581,5.108,5.559,6.089 -2020-08-27,6.809,5.249,6.089,5.658 -2020-08-28,6.352,5.502,5.658,6.183 -2020-08-29,6.563,6.021,6.183,6.146 -2020-08-30,6.227,5.721,6.146,5.897 -2020-08-31,6.464,5.765,5.897,6.28 -2020-09-01,6.849,6.141,6.28,6.25 -2020-09-02,6.445,5.65,6.25,6.145 -2020-09-03,6.329,5.643,6.145,5.721 -2020-09-04,5.991,4.553,5.721,5.114 -2020-09-05,5.317,3.596,5.114,4.152 -2020-09-06,4.914,3.741,4.152,4.787 -2020-09-07,4.838,4.015,4.787,4.598 -2020-09-08,4.628,4.115,4.598,4.272 -2020-09-09,4.785,4.142,4.272,4.699 -2020-09-10,4.883,4.423,4.699,4.571 -2020-09-11,4.727,4.319,4.571,4.641 -2020-09-12,5.281,4.496,4.641,5.128 -2020-09-13,5.459,4.776,5.128,5.318 -2020-09-14,5.565,5.098,5.318,5.358 -2020-09-15,5.443,5.046,5.358,5.057 -2020-09-16,5.276,4.97,5.057,5.07 -2020-09-17,5.407,5.04,5.07,5.321 -2020-09-18,5.422,5.07,5.321,5.227 -2020-09-19,5.242,4.778,5.227,4.894 -2020-09-20,4.956,4.426,4.894,4.645 -2020-09-21,4.688,3.927,4.645,4.069 -2020-09-22,4.204,3.904,4.069,4.16 -2020-09-23,4.309,3.939,4.16,4.01 -2020-09-24,4.454,3.966,4.01,4.374 -2020-09-25,4.517,4.233,4.374,4.401 -2020-09-26,4.477,4.23,4.401,4.322 -2020-09-27,4.36,4.124,4.322,4.282 -2020-09-28,4.569,4.227,4.282,4.412 -2020-09-29,4.59,4.342,4.412,4.484 -2020-09-30,4.486,4.222,4.484,4.322 -2020-10-01,4.549,4.23,4.322,4.325 -2020-10-02,4.346,3.897,4.325,4.12 -2020-10-03,4.122,4.024,4.12,4.047 -2020-10-04,4.172,3.998,4.047,4.155 -2020-10-05,4.221,4.092,4.155,4.152 -2020-10-06,4.165,3.624,4.152,3.753 -2020-10-07,3.888,3.61,3.753,3.852 -2020-10-08,4.15,3.645,3.852,4.107 -2020-10-09,4.339,4.008,4.107,4.246 -2020-10-10,4.468,4.222,4.246,4.247 -2020-10-11,4.318,4.162,4.247,4.228 -2020-10-12,4.431,4.189,4.228,4.304 -2020-10-13,4.337,4.139,4.304,4.232 -2020-10-14,4.353,4.082,4.232,4.172 -2020-10-15,4.183,4.014,4.172,4.099 -2020-10-16,4.149,3.812,4.099,3.907 -2020-10-17,3.955,3.857,3.907,3.946 -2020-10-18,4.1,3.933,3.946,4.093 -2020-10-19,4.102,3.946,4.093,3.985 -2020-10-20,4.145,3.869,3.985,3.907 -2020-10-21,4.257,3.898,3.907,4.142 -2020-10-22,4.34,4.127,4.142,4.272 -2020-10-23,4.483,4.195,4.272,4.263 -2020-10-24,4.428,4.241,4.263,4.358 -2020-10-25,4.449,4.264,4.358,4.334 -2020-10-26,4.746,4.295,4.334,4.708 -2020-10-27,4.936,4.645,4.708,4.678 -2020-10-28,4.772,4.257,4.678,4.359 -2020-10-29,4.405,3.884,4.359,4.059 -2020-10-30,4.161,3.927,4.059,4.085 -2020-10-31,4.274,4.061,4.085,4.178 -2020-11-01,4.218,4.103,4.178,4.214 -2020-11-02,4.256,3.961,4.214,4.028 -2020-11-03,4.065,3.886,4.028,4.029 -2020-11-04,4.148,3.893,4.029,4.093 -2020-11-05,4.291,4.015,4.093,4.221 -2020-11-06,4.637,4.201,4.221,4.581 -2020-11-07,4.861,4.101,4.581,4.24 -2020-11-08,4.426,4.134,4.24,4.374 -2020-11-09,4.454,4.238,4.374,4.338 -2020-11-10,4.502,4.305,4.338,4.42 -2020-11-11,4.623,4.42,4.42,4.446 -2020-11-12,4.467,4.309,4.446,4.397 -2020-11-13,4.581,4.364,4.397,4.533 -2020-11-14,4.544,4.35,4.533,4.451 -2020-11-15,4.497,4.304,4.451,4.362 -2020-11-16,4.59,4.33,4.362,4.487 -2020-11-17,4.923,4.484,4.487,4.855 -2020-11-18,4.936,4.512,4.855,4.674 -2020-11-19,4.852,4.543,4.674,4.758 -2020-11-20,5.468,4.744,4.758,5.221 -2020-11-21,5.802,5.122,5.221,5.766 -2020-11-22,5.828,5.184,5.766,5.512 -2020-11-23,5.953,5.416,5.512,5.905 -2020-11-24,6.075,5.609,5.905,5.723 -2020-11-25,5.824,5.133,5.723,5.302 -2020-11-26,5.385,4.455,5.302,4.814 -2020-11-27,5.072,4.519,4.814,4.816 -2020-11-28,4.956,4.675,4.816,4.897 -2020-11-29,5.208,4.808,4.897,5.195 -2020-11-30,5.488,5.138,5.195,5.378 -2020-12-01,5.549,5.001,5.378,5.088 -2020-12-02,5.549,5.01,5.088,5.47 -2020-12-03,5.57,5.329,5.47,5.406 -2020-12-04,5.432,4.959,5.406,5.001 -2020-12-05,5.197,4.883,5.001,5.187 -2020-12-06,5.209,5.009,5.187,5.134 -2020-12-07,5.16,5.016,5.134,5.061 -2020-12-08,5.067,4.701,5.061,4.739 -2020-12-09,4.938,4.621,4.739,4.871 -2020-12-10,4.916,4.737,4.871,4.799 -2020-12-11,4.815,4.542,4.799,4.612 -2020-12-12,4.803,4.613,4.612,4.743 -2020-12-13,4.997,4.726,4.743,4.895 -2020-12-14,5.004,4.831,4.895,4.897 -2020-12-15,5.293,4.851,4.897,5.241 -2020-12-16,5.374,5.116,5.241,5.366 -2020-12-17,5.737,5.275,5.366,5.345 -2020-12-18,5.514,5.252,5.345,5.363 -2020-12-19,5.574,5.279,5.363,5.337 -2020-12-20,5.433,5.08,5.337,5.186 -2020-12-21,5.445,4.782,5.186,4.87 -2020-12-22,5.178,4.801,4.87,5.153 -2020-12-23,5.185,4.605,5.153,4.715 -2020-12-24,5.198,4.634,4.715,5.114 -2020-12-25,5.286,5.042,5.114,5.211 -2020-12-26,5.284,5.074,5.211,5.184 -2020-12-27,5.417,4.931,5.184,5.139 -2020-12-28,6.683,5.105,5.139,6.584 -2020-12-29,7.659,6.156,6.584,7.533 -2020-12-30,7.673,7.069,7.533,7.232 -2020-12-31,9.502,7.159,7.232,9.267 -2021-01-01,9.438,8.104,9.267,8.294 -2021-01-02,9.801,7.895,8.294,9.206 -2021-01-03,10.5,8.853,9.206,10.14 -2021-01-04,10.52,8.861,10.14,9.511 -2021-01-05,10.06,9.052,9.511,9.732 -2021-01-06,10.43,9.473,9.732,10.08 -2021-01-07,10.64,9.474,10.08,9.645 -2021-01-08,9.808,8.882,9.645,9.297 -2021-01-09,9.835,9.068,9.297,9.765 -2021-01-10,9.985,8.705,9.765,9.291 -2021-01-11,9.325,7.319,9.291,8.286 -2021-01-12,8.704,7.944,8.286,8.316 -2021-01-13,11.38,7.985,8.316,10.94 -2021-01-14,14.66,10.88,10.94,14.58 -2021-01-15,14.96,11.93,14.58,13.18 -2021-01-16,19.37,13.16,13.18,17.99 -2021-01-17,18.23,16.33,17.99,17.09 -2021-01-18,18.19,15.77,17.09,16.6 -2021-01-19,17.49,15.91,16.6,16.41 -2021-01-20,18.19,14.81,16.41,18.0 -2021-01-21,18.13,14.99,18.0,15.97 -2021-01-22,18.03,14.79,15.97,17.15 -2021-01-23,18.81,16.83,17.15,18.77 -2021-01-24,18.79,17.27,18.77,18.02 -2021-01-25,19.1,17.08,18.02,17.21 -2021-01-26,17.8,16.02,17.21,17.13 -2021-01-27,17.15,15.08,17.13,15.48 -2021-01-28,17.52,15.3,15.48,16.9 -2021-01-29,17.73,15.98,16.9,16.79 -2021-01-30,17.09,16.16,16.79,16.56 -2021-01-31,17.52,15.68,16.56,16.14 -2021-02-01,16.56,15.69,16.14,16.46 -2021-02-02,17.69,16.07,16.46,17.21 -2021-02-03,20.95,16.83,17.21,20.92 -2021-02-04,21.72,18.99,20.92,19.71 -2021-02-05,21.38,19.35,19.71,20.83 -2021-02-06,21.41,19.88,20.83,20.38 -2021-02-07,20.81,18.63,20.38,19.76 -2021-02-08,23.7,19.21,19.76,23.02 -2021-02-09,24.12,22.32,23.02,23.09 -2021-02-10,24.83,22.1,23.09,23.6 -2021-02-11,25.69,23.24,23.6,25.01 -2021-02-12,29.78,24.56,25.01,28.7 -2021-02-13,30.22,27.47,28.7,27.98 -2021-02-14,29.42,26.45,27.98,26.93 -2021-02-15,29.45,23.74,26.93,27.79 -2021-02-16,31.02,26.88,27.79,30.09 -2021-02-17,32.4,29.63,30.09,31.98 -2021-02-18,32.57,30.55,31.98,31.09 -2021-02-19,35.0,29.6,31.09,34.8 -2021-02-20,42.27,34.73,34.8,38.94 -2021-02-21,40.55,38.05,38.94,39.58 -2021-02-22,39.71,31.11,39.58,37.64 -2021-02-23,37.79,27.13,37.64,34.57 -2021-02-24,36.84,31.81,34.57,33.68 -2021-02-25,35.26,30.93,33.68,31.23 -2021-02-26,33.51,28.01,31.23,31.44 -2021-02-27,35.69,31.4,31.44,33.48 -2021-02-28,34.62,29.83,33.48,33.87 -2021-03-01,35.66,33.04,33.87,35.64 -2021-03-02,37.91,34.48,35.64,36.18 -2021-03-03,38.67,36.12,36.18,37.06 -2021-03-04,38.37,34.37,37.06,35.23 -2021-03-05,35.28,31.59,35.23,33.63 -2021-03-06,34.19,32.08,33.63,33.36 -2021-03-07,35.28,33.36,33.36,35.1 -2021-03-08,35.55,33.44,35.1,34.95 -2021-03-09,38.91,34.58,34.95,38.22 -2021-03-10,39.61,36.42,38.22,37.59 -2021-03-11,38.06,35.99,37.59,36.94 -2021-03-12,37.49,34.61,36.94,35.98 -2021-03-13,38.26,34.72,35.98,37.15 -2021-03-14,37.99,36.27,37.15,36.52 -2021-03-15,38.53,34.16,36.52,34.29 -2021-03-16,35.54,32.18,34.29,35.41 -2021-03-17,36.42,34.4,35.41,36.09 -2021-03-18,37.0,35.29,36.09,35.34 -2021-03-19,38.86,34.61,35.34,38.17 -2021-03-20,40.05,37.17,38.17,37.24 -2021-03-21,38.09,36.11,37.24,36.69 -2021-03-22,37.76,35.11,36.69,35.24 -2021-03-23,36.27,34.04,35.24,34.21 -2021-03-24,36.13,28.41,34.21,30.23 -2021-03-25,31.24,28.39,30.23,29.8 -2021-03-26,33.37,29.79,29.8,33.16 -2021-03-27,33.48,31.13,33.16,32.59 -2021-03-28,33.21,31.24,32.59,32.23 -2021-03-29,34.7,31.76,32.23,34.35 -2021-03-30,34.83,33.54,34.35,34.02 -2021-03-31,38.26,33.44,34.02,37.06 -2021-04-01,38.91,36.01,37.06,37.45 -2021-04-02,41.38,36.63,37.45,41.03 -2021-04-03,46.77,40.93,41.03,41.36 -2021-04-04,45.07,40.7,41.36,44.29 -2021-04-05,45.84,41.85,44.29,45.81 -2021-04-06,46.23,41.78,45.81,43.32 -2021-04-07,43.48,37.9,43.32,39.53 -2021-04-08,41.57,39.24,39.53,41.33 -2021-04-09,42.07,40.13,41.33,40.8 -2021-04-10,42.73,40.01,40.8,41.59 -2021-04-11,41.87,40.01,41.59,41.31 -2021-04-12,41.74,39.43,41.31,40.47 -2021-04-13,43.34,39.8,40.47,42.92 -2021-04-14,44.54,40.44,42.92,42.49 -2021-04-15,44.32,41.47,42.49,43.45 -2021-04-16,43.76,40.21,43.45,41.44 -2021-04-17,47.99,41.38,41.44,42.06 -2021-04-18,42.7,33.21,42.06,37.41 -2021-04-19,38.73,34.32,37.41,34.76 -2021-04-20,35.77,31.63,34.76,35.48 -2021-04-21,36.27,33.07,35.48,33.78 -2021-04-22,36.59,32.93,33.78,32.97 -2021-04-23,33.51,26.81,32.97,32.26 -2021-04-24,32.42,28.58,32.26,29.0 -2021-04-25,31.31,28.24,29.0,29.85 -2021-04-26,33.49,29.8,29.85,33.43 -2021-04-27,34.95,33.2,33.43,34.86 -2021-04-28,35.4,32.65,34.86,33.98 -2021-04-29,35.98,32.98,33.98,35.98 -2021-04-30,36.8,35.11,35.98,36.52 -2021-05-01,37.37,35.88,36.52,36.9 -2021-05-02,37.17,35.64,36.9,36.63 -2021-05-03,38.28,36.6,36.63,37.24 -2021-05-04,37.95,34.43,37.24,34.8 -2021-05-05,40.78,34.61,34.8,40.48 -2021-05-06,43.43,38.15,40.48,41.59 -2021-05-07,42.77,38.49,41.59,39.9 -2021-05-08,40.67,38.74,39.9,39.94 -2021-05-09,40.58,38.26,39.94,40.34 -2021-05-10,41.87,33.72,40.34,36.51 -2021-05-11,38.7,35.57,36.51,38.68 -2021-05-12,42.15,35.06,38.68,35.42 -2021-05-13,41.81,33.64,35.42,40.02 -2021-05-14,48.03,39.47,40.02,48.02 -2021-05-15,49.75,42.91,48.02,43.63 -2021-05-16,46.76,39.54,43.63,42.27 -2021-05-17,42.2,35.94,42.27,38.67 -2021-05-18,42.61,37.73,38.67,40.67 -2021-05-19,41.41,20.48,40.67,25.26 -2021-05-20,31.27,21.63,25.26,29.03 -2021-05-21,31.04,20.07,29.03,24.47 -2021-05-22,24.63,20.5,24.47,22.09 -2021-05-23,23.5,14.08,22.09,17.97 -2021-05-24,23.49,17.16,17.97,23.22 -2021-05-25,24.22,19.74,23.22,22.18 -2021-05-26,24.75,21.64,22.18,24.53 -2021-05-27,24.93,21.82,24.53,23.97 -2021-05-28,26.01,20.07,23.97,21.34 -2021-05-29,22.28,18.81,21.34,19.88 -2021-05-30,21.32,18.52,19.88,20.48 -2021-05-31,23.44,19.08,20.48,23.29 -2021-06-01,23.52,21.68,23.29,22.84 -2021-06-02,26.86,22.66,22.84,25.92 -2021-06-03,28.6,25.68,25.92,26.99 -2021-06-04,27.05,23.69,26.99,25.01 -2021-06-05,26.39,22.98,25.01,23.77 -2021-06-06,24.46,23.56,23.77,24.18 -2021-06-07,25.28,21.32,24.18,21.7 -2021-06-08,22.31,19.74,21.7,21.67 -2021-06-09,23.33,20.37,21.67,23.21 -2021-06-10,24.56,22.05,23.21,22.68 -2021-06-11,23.2,20.5,22.68,20.95 -2021-06-12,21.26,19.52,20.95,20.74 -2021-06-13,22.4,19.93,20.74,22.04 -2021-06-14,26.03,21.24,22.04,25.85 -2021-06-15,26.0,23.57,25.85,23.95 -2021-06-16,24.58,22.5,23.95,23.03 -2021-06-17,23.99,22.0,23.03,22.53 -2021-06-18,22.58,20.24,22.53,21.45 -2021-06-19,21.64,20.24,21.45,20.24 -2021-06-20,21.02,18.91,20.24,20.63 -2021-06-21,20.81,15.38,20.63,15.74 -2021-06-22,16.95,13.02,15.74,14.68 -2021-06-23,16.81,13.98,14.68,15.8 -2021-06-24,16.6,14.73,15.8,16.22 -2021-06-25,16.74,14.42,16.22,14.42 -2021-06-26,14.98,13.64,14.42,14.51 -2021-06-27,15.03,14.04,14.51,15.01 -2021-06-28,16.01,14.6,15.01,15.79 -2021-06-29,17.01,15.72,15.79,16.3 -2021-06-30,16.62,15.09,16.3,16.4 -2021-07-01,16.41,14.85,16.4,15.17 -2021-07-02,15.45,14.63,15.17,15.29 -2021-07-03,15.75,15.02,15.29,15.52 -2021-07-04,16.57,15.17,15.52,15.98 -2021-07-05,15.98,14.71,15.98,15.23 -2021-07-06,16.18,15.2,15.23,16.14 -2021-07-07,17.67,16.09,16.14,16.87 -2021-07-08,16.88,14.99,16.87,15.3 -2021-07-09,15.9,14.81,15.3,15.67 -2021-07-10,15.99,15.04,15.67,15.28 -2021-07-11,15.7,15.14,15.28,15.49 -2021-07-12,15.65,14.41,15.49,14.85 -2021-07-13,15.1,14.02,14.85,14.2 -2021-07-14,14.22,13.17,14.2,13.81 -2021-07-15,14.1,12.75,13.81,13.09 -2021-07-16,13.32,12.01,13.09,12.04 -2021-07-17,12.75,11.73,12.04,12.31 -2021-07-18,12.94,12.27,12.31,12.66 -2021-07-19,12.73,11.36,12.66,11.46 -2021-07-20,11.56,10.38,11.46,10.96 -2021-07-21,12.86,10.68,10.96,12.33 -2021-07-22,13.37,11.81,12.33,13.16 -2021-07-23,13.51,12.33,13.16,13.4 -2021-07-24,14.06,13.14,13.4,13.76 -2021-07-25,13.83,13.1,13.76,13.75 -2021-07-26,15.29,13.64,13.75,13.92 -2021-07-27,14.53,13.36,13.92,14.37 -2021-07-28,14.75,13.95,14.37,14.55 -2021-07-29,15.39,14.26,14.55,15.25 -2021-07-30,15.85,14.41,15.25,15.79 -2021-07-31,17.01,15.58,15.79,16.75 -2021-08-01,19.91,16.59,16.75,18.44 -2021-08-02,18.93,17.56,18.44,17.99 -2021-08-03,18.54,16.84,17.99,17.42 -2021-08-04,19.58,17.1,17.42,19.15 -2021-08-05,19.45,17.88,19.15,19.12 -2021-08-06,20.79,18.53,19.12,20.42 -2021-08-07,21.68,20.13,20.42,20.97 -2021-08-08,21.19,19.2,20.97,19.65 -2021-08-09,21.25,18.71,19.65,20.57 -2021-08-10,21.41,20.1,20.57,20.61 -2021-08-11,22.44,20.54,20.61,21.36 -2021-08-12,21.32,19.93,21.32,20.76 -2021-08-13,22.73,20.51,20.76,22.72 -2021-08-14,23.49,21.8,22.72,22.86 -2021-08-15,23.35,21.86,22.86,23.17 -2021-08-16,25.7,22.85,23.17,24.42 -2021-08-17,27.41,23.06,24.42,23.53 -2021-08-18,25.17,22.69,23.53,23.86 -2021-08-19,26.83,23.47,23.86,26.57 -2021-08-20,28.47,26.08,26.57,28.14 -2021-08-21,29.38,27.52,28.14,27.88 -2021-08-22,28.55,26.59,27.88,27.71 -2021-08-23,28.62,27.34,27.71,27.89 -2021-08-24,28.17,24.8,27.89,25.08 -2021-08-25,26.55,24.48,25.08,25.99 -2021-08-26,26.4,23.52,25.99,23.93 -2021-08-27,26.81,23.48,23.93,26.56 -2021-08-28,26.78,25.45,26.56,25.99 -2021-08-29,26.49,25.3,25.99,25.73 -2021-08-30,27.58,24.33,25.73,26.03 -2021-08-31,31.94,25.63,26.03,31.34 -2021-09-01,33.83,29.61,31.34,33.18 -2021-09-02,33.19,31.3,33.18,31.78 -2021-09-03,34.01,30.96,31.78,33.57 -2021-09-04,34.12,32.04,33.57,32.4 -2021-09-05,34.77,31.98,32.4,34.43 -2021-09-06,35.03,32.88,34.43,34.34 -2021-09-07,35.67,23.41,34.34,27.92 -2021-09-08,28.87,25.27,27.92,27.76 -2021-09-09,31.86,27.02,27.76,29.85 -2021-09-10,32.64,28.01,29.85,29.2 -2021-09-11,32.09,28.27,29.2,31.57 -2021-09-12,36.44,30.68,31.57,35.86 -2021-09-13,37.9,31.59,35.86,34.84 -2021-09-14,38.75,34.09,34.84,37.38 -2021-09-15,37.99,35.57,37.38,36.47 -2021-09-16,36.97,34.1,36.47,35.51 -2021-09-17,36.93,32.21,35.51,33.02 -2021-09-18,35.89,32.52,33.02,34.87 -2021-09-19,34.9,33.05,34.87,33.85 -2021-09-20,33.91,26.82,33.85,28.3 -2021-09-21,30.36,25.61,28.3,26.36 -2021-09-22,32.0,25.93,26.36,31.6 -2021-09-23,33.62,30.41,31.6,33.44 -2021-09-24,33.57,27.95,33.44,30.83 -2021-09-25,32.24,29.5,30.83,29.85 -2021-09-26,30.04,26.8,29.85,28.88 -2021-09-27,30.25,27.58,28.88,27.73 -2021-09-28,28.37,26.15,27.73,26.32 -2021-09-29,28.58,26.12,26.32,27.28 -2021-09-30,28.96,27.14,27.28,28.61 -2021-10-01,32.33,28.51,28.61,31.95 -2021-10-02,33.39,31.53,31.95,32.02 -2021-10-03,32.72,31.37,32.02,32.14 -2021-10-04,32.11,30.17,32.14,31.15 -2021-10-05,32.18,30.68,31.15,31.42 -2021-10-06,33.06,29.15,31.42,32.19 -2021-10-07,35.31,30.93,32.19,33.99 -2021-10-08,34.49,33.14,33.97,33.36 -2021-10-09,36.89,33.0,33.36,36.33 -2021-10-10,37.42,34.16,36.33,34.44 -2021-10-11,36.08,33.26,34.44,34.11 -2021-10-12,35.42,32.08,34.11,35.17 -2021-10-13,43.15,33.77,35.17,41.69 -2021-10-14,42.49,39.34,41.69,40.69 -2021-10-15,44.2,39.51,40.69,43.29 -2021-10-16,44.77,41.32,43.29,41.74 -2021-10-17,42.86,39.83,41.74,42.11 -2021-10-18,43.25,40.26,42.11,41.17 -2021-10-19,41.63,40.08,41.17,41.35 -2021-10-20,45.21,41.08,41.35,44.41 -2021-10-21,45.53,41.99,44.41,42.84 -2021-10-22,46.38,42.7,42.84,43.51 -2021-10-23,44.78,43.08,43.51,43.96 -2021-10-24,44.16,41.32,43.96,42.3 -2021-10-25,44.79,42.12,42.3,44.55 -2021-10-26,46.0,43.45,44.55,44.91 -2021-10-27,45.82,39.26,44.91,40.45 -2021-10-28,43.11,39.85,40.45,41.82 -2021-10-29,44.34,41.57,41.82,44.1 -2021-10-30,44.3,42.2,44.1,42.74 -2021-10-31,43.4,41.09,42.74,42.78 -2021-11-01,51.43,41.78,42.78,50.04 -2021-11-02,53.29,48.1,50.04,51.7 -2021-11-03,54.53,49.16,51.7,53.32 -2021-11-04,55.07,52.22,53.32,53.89 -2021-11-05,53.97,50.64,53.89,51.83 -2021-11-06,52.45,49.07,51.83,52.03 -2021-11-07,53.56,51.38,52.03,52.26 -2021-11-08,53.85,51.64,52.26,53.36 -2021-11-09,53.37,50.55,53.36,50.76 -2021-11-10,52.01,50.02,50.77,50.38 +2020-08-21,3.218,2.848,2.869,2.848 +2020-08-22,4.524,2.8,2.848,4.512 +2020-08-23,4.512,3.73,4.512,4.053 +2020-08-24,4.807,3.85,4.053,4.562 +2020-08-25,5.775,4.533,4.562,5.566 +2020-08-26,6.553,5.125,5.566,6.093 +2020-08-27,6.797,5.245,6.093,5.656 +2020-08-28,6.35,5.52,5.656,6.17 +2020-08-29,6.566,6.02,6.17,6.148 +2020-08-30,6.218,5.269,6.148,5.86 +2020-08-31,6.477,5.759,5.86,6.293 +2020-09-01,6.861,6.144,6.293,6.255 +2020-09-02,6.44,5.599,6.255,6.128 +2020-09-03,6.366,5.605,6.128,5.717 +2020-09-04,5.984,4.571,5.717,5.127 +2020-09-05,5.304,3.576,5.127,4.136 +2020-09-06,4.91,3.742,4.136,4.784 +2020-09-07,4.825,4.022,4.784,4.59 +2020-09-08,4.623,4.119,4.59,4.272 +2020-09-09,4.791,4.139,4.272,4.697 +2020-09-10,4.892,4.447,4.697,4.582 +2020-09-11,4.732,4.323,4.582,4.653 +2020-09-12,5.299,4.506,4.653,5.157 +2020-09-13,5.479,4.788,5.157,5.311 +2020-09-14,5.609,5.089,5.311,5.362 +2020-09-15,5.445,5.056,5.362,5.059 +2020-09-16,5.281,4.969,5.059,5.074 +2020-09-17,5.421,5.054,5.074,5.348 +2020-09-18,5.453,5.104,5.348,5.254 +2020-09-19,5.255,4.81,5.254,4.932 +2020-09-20,4.975,4.413,4.932,4.679 +2020-09-21,4.702,3.937,4.679,4.062 +2020-09-22,4.213,3.903,4.062,4.171 +2020-09-23,4.323,3.946,4.171,4.003 +2020-09-24,4.473,3.969,4.003,4.391 +2020-09-25,4.536,4.249,4.391,4.424 +2020-09-26,4.468,4.225,4.424,4.334 +2020-09-27,4.365,4.127,4.334,4.301 +2020-09-28,4.585,4.256,4.301,4.405 +2020-09-29,4.6,4.354,4.405,4.495 +2020-09-30,4.495,4.25,4.495,4.35 +2020-10-01,4.582,4.239,4.35,4.35 +2020-10-02,4.359,3.907,4.35,4.121 +2020-10-03,4.13,4.036,4.121,4.07 +2020-10-04,4.194,4.021,4.07,4.18 +2020-10-05,4.242,4.111,4.18,4.166 +2020-10-06,4.182,3.605,4.166,3.753 +2020-10-07,3.884,3.601,3.753,3.859 +2020-10-08,4.171,3.648,3.859,4.122 +2020-10-09,4.349,4.015,4.122,4.263 +2020-10-10,4.483,4.236,4.263,4.246 +2020-10-11,4.331,4.171,4.246,4.249 +2020-10-12,4.448,4.188,4.249,4.31 +2020-10-13,4.346,4.13,4.31,4.256 +2020-10-14,4.372,4.077,4.256,4.197 +2020-10-15,4.197,4.022,4.197,4.097 +2020-10-16,4.152,3.824,4.097,3.914 +2020-10-17,3.984,3.869,3.914,3.969 +2020-10-18,4.122,3.959,3.969,4.111 +2020-10-19,4.117,3.96,4.111,3.989 +2020-10-20,4.145,3.869,3.989,3.914 +2020-10-21,4.249,3.901,3.914,4.143 +2020-10-22,4.337,4.128,4.143,4.27 +2020-10-23,4.478,4.192,4.27,4.266 +2020-10-24,4.432,4.24,4.266,4.36 +2020-10-25,4.446,4.261,4.36,4.332 +2020-10-26,4.749,4.293,4.332,4.707 +2020-10-27,4.937,4.655,4.707,4.68 +2020-10-28,4.768,4.258,4.68,4.367 +2020-10-29,4.398,3.899,4.367,4.057 +2020-10-30,4.158,3.921,4.057,4.086 +2020-10-31,4.272,4.067,4.086,4.183 +2020-11-01,4.222,4.113,4.183,4.222 +2020-11-02,4.264,3.97,4.222,4.037 +2020-11-03,4.066,3.898,4.037,4.029 +2020-11-04,4.15,3.9,4.029,4.102 +2020-11-05,4.301,4.027,4.102,4.23 +2020-11-06,4.644,4.213,4.23,4.584 +2020-11-07,4.858,4.103,4.584,4.239 +2020-11-08,4.431,4.143,4.239,4.375 +2020-11-09,4.456,4.253,4.375,4.34 +2020-11-10,4.499,4.307,4.34,4.42 +2020-11-11,4.627,4.42,4.42,4.454 +2020-11-12,4.472,4.326,4.454,4.409 +2020-11-13,4.59,4.383,4.409,4.545 +2020-11-14,4.547,4.364,4.545,4.47 +2020-11-15,4.499,4.312,4.47,4.371 +2020-11-16,4.591,4.348,4.371,4.489 +2020-11-17,4.933,4.489,4.489,4.855 +2020-11-18,4.947,4.525,4.855,4.688 +2020-11-19,4.85,4.548,4.688,4.757 +2020-11-20,5.476,4.753,4.757,5.238 +2020-11-21,5.82,5.139,5.238,5.781 +2020-11-22,5.838,5.211,5.781,5.515 +2020-11-23,5.949,5.425,5.515,5.914 +2020-11-24,6.086,5.605,5.914,5.734 +2020-11-25,5.838,5.125,5.734,5.31 +2020-11-26,5.378,4.452,5.31,4.808 +2020-11-27,5.073,4.516,4.808,4.815 +2020-11-28,4.954,4.678,4.815,4.903 +2020-11-29,5.204,4.814,4.903,5.191 +2020-11-30,5.447,5.142,5.191,5.377 +2020-12-01,5.539,4.994,5.377,5.091 +2020-12-02,5.55,5.011,5.091,5.465 +2020-12-03,5.574,5.333,5.465,5.407 +2020-12-04,5.433,4.965,5.407,5.025 +2020-12-05,5.191,4.885,5.025,5.188 +2020-12-06,5.201,5.011,5.188,5.135 +2020-12-07,5.152,5.015,5.135,5.059 +2020-12-08,5.069,4.704,5.059,4.734 +2020-12-09,4.939,4.623,4.734,4.876 +2020-12-10,4.911,4.751,4.876,4.802 +2020-12-11,4.802,4.547,4.802,4.617 +2020-12-12,4.797,4.617,4.617,4.735 +2020-12-13,5.842,4.735,4.735,4.885 +2020-12-14,5.011,4.836,4.885,4.897 +2020-12-15,5.293,4.849,4.897,5.25 +2020-12-16,5.373,5.127,5.25,5.369 +2020-12-17,5.738,5.271,5.369,5.346 +2020-12-18,5.577,5.253,5.346,5.363 +2020-12-19,5.573,5.29,5.363,5.343 +2020-12-20,5.437,5.074,5.343,5.19 +2020-12-21,5.439,4.781,5.19,4.879 +2020-12-22,5.171,4.802,4.879,5.155 +2020-12-23,5.187,4.595,5.155,4.72 +2020-12-24,5.197,4.642,4.72,5.131 +2020-12-25,5.272,5.045,5.131,5.217 +2020-12-26,5.282,5.087,5.217,5.187 +2020-12-27,5.41,4.925,5.187,5.143 +2020-12-28,6.677,5.112,5.143,6.586 +2020-12-29,7.678,6.177,6.586,7.534 +2020-12-30,7.661,7.054,7.534,7.236 +2020-12-31,9.517,7.154,7.236,9.268 +2021-01-01,9.435,8.103,9.268,8.294 +2021-01-02,9.831,7.918,8.294,9.218 +2021-01-03,10.5,8.854,9.218,10.15 +2021-01-04,10.53,8.722,10.15,9.513 +2021-01-05,10.08,9.04,9.513,9.743 +2021-01-06,10.45,9.478,9.743,10.1 +2021-01-07,10.69,9.433,10.1,9.657 +2021-01-08,9.821,8.809,9.657,9.309 +2021-01-09,9.84,8.924,9.309,9.774 +2021-01-10,10.0,8.631,9.774,9.307 +2021-01-11,9.32,7.194,9.307,8.295 +2021-01-12,8.716,7.927,8.295,8.303 +2021-01-13,11.61,7.974,8.303,10.94 +2021-01-14,14.65,10.89,10.94,14.47 +2021-01-15,14.92,11.78,14.47,13.2 +2021-01-16,19.43,13.18,13.2,18.0 +2021-01-17,18.39,16.32,18.0,17.1 +2021-01-18,18.19,12.59,17.1,16.58 +2021-01-19,17.5,15.93,16.58,16.42 +2021-01-20,18.21,14.77,16.42,18.0 +2021-01-21,18.14,14.98,18.0,15.95 +2021-01-22,18.04,14.79,15.95,17.22 +2021-01-23,18.79,16.84,17.22,18.75 +2021-01-24,18.75,17.31,18.75,17.99 +2021-01-25,19.11,17.08,17.99,17.23 +2021-01-26,17.79,16.03,17.23,17.13 +2021-01-27,17.13,15.06,17.13,15.51 +2021-01-28,17.49,15.29,15.51,16.9 +2021-01-29,17.78,16.01,16.9,16.82 +2021-01-30,17.08,16.15,16.82,16.56 +2021-01-31,17.51,15.68,16.56,16.13 +2021-02-01,16.56,15.68,16.13,16.46 +2021-02-02,17.61,16.06,16.46,17.18 +2021-02-03,20.96,16.78,17.18,20.89 +2021-02-04,21.72,19.0,20.89,19.72 +2021-02-05,21.4,19.39,19.72,20.87 +2021-02-06,21.4,19.87,20.87,20.4 +2021-02-07,20.82,18.34,20.4,19.8 +2021-02-08,23.71,19.22,19.8,23.02 +2021-02-09,24.13,22.28,23.02,23.12 +2021-02-10,24.84,22.06,23.12,23.6 +2021-02-11,25.72,23.27,23.6,25.02 +2021-02-12,29.76,24.54,25.02,28.69 +2021-02-13,30.23,27.29,28.69,27.98 +2021-02-14,29.4,26.47,27.98,26.93 +2021-02-15,29.55,23.42,26.93,27.84 +2021-02-16,30.98,26.85,27.84,30.06 +2021-02-17,32.4,29.65,30.06,32.0 +2021-02-18,32.61,30.6,32.0,31.05 +2021-02-19,35.0,29.56,31.05,34.81 +2021-02-20,42.2,34.71,34.81,38.99 +2021-02-21,40.54,38.07,38.99,39.58 +2021-02-22,39.75,19.81,39.58,37.64 +2021-02-23,37.76,26.54,37.64,34.59 +2021-02-24,36.88,31.91,34.59,33.7 +2021-02-25,35.27,30.9,33.7,31.19 +2021-02-26,33.58,28.01,31.19,31.44 +2021-02-27,35.65,31.37,31.44,33.49 +2021-02-28,34.65,29.78,33.49,33.82 +2021-03-01,35.69,33.11,33.82,35.68 +2021-03-02,37.9,34.43,35.68,36.2 +2021-03-03,38.69,36.19,36.2,37.06 +2021-03-04,38.41,34.35,37.06,35.29 +2021-03-05,35.29,31.44,35.29,33.63 +2021-03-06,34.19,32.07,33.63,33.38 +2021-03-07,35.32,33.38,33.38,35.11 +2021-03-08,35.56,33.5,35.11,34.99 +2021-03-09,38.9,34.56,34.99,38.23 +2021-03-10,39.53,36.32,38.23,37.6 +2021-03-11,38.07,35.93,37.6,36.91 +2021-03-12,37.47,34.46,36.91,35.99 +2021-03-13,38.23,34.73,35.99,37.15 +2021-03-14,37.96,36.29,37.15,36.49 +2021-03-15,35.65,33.89,36.47,34.3 +2021-03-16,36.04,34.27,34.3,35.41 +2021-03-17,38.52,35.96,35.41,36.13 +2021-03-18,36.15,35.19,36.13,35.34 +2021-03-19,38.87,34.62,35.35,38.18 +2021-03-20,40.03,37.19,38.18,37.25 +2021-03-21,37.84,36.41,37.24,36.7 +2021-03-22,35.73,34.23,36.7,35.24 +2021-03-23,36.25,33.79,35.26,34.22 +2021-03-24,36.1,28.42,34.22,30.27 +2021-03-25,31.23,28.39,30.27,29.84 +2021-03-26,33.37,29.83,29.84,33.18 +2021-03-27,33.49,31.13,33.18,32.64 +2021-03-28,33.2,31.24,32.64,32.24 +2021-03-29,34.92,31.71,32.24,34.37 +2021-03-30,35.12,33.69,34.35,34.02 +2021-03-31,38.23,33.31,33.97,37.06 +2021-04-01,38.96,36.05,37.06,37.44 +2021-04-02,41.33,36.64,37.44,40.99 +2021-04-03,46.7,40.91,40.99,41.35 +2021-04-04,45.07,40.7,41.35,44.31 +2021-04-05,45.84,41.85,44.31,45.82 +2021-04-06,46.24,41.65,45.82,43.31 +2021-04-07,43.46,37.79,43.31,39.56 +2021-04-08,41.6,39.26,39.56,41.35 +2021-04-09,41.95,40.23,41.35,40.77 +2021-04-10,42.32,40.57,40.77,41.6 +2021-04-11,41.85,40.01,41.59,41.32 +2021-04-12,41.27,39.52,41.3,40.47 +2021-04-13,43.46,40.91,40.47,42.95 +2021-04-14,43.98,40.47,42.95,42.5 +2021-04-15,44.37,41.37,42.49,43.48 +2021-04-16,43.08,40.86,43.47,41.46 +2021-04-17,48.3,41.42,41.43,42.15 +2021-04-18,42.66,32.19,42.15,37.41 +2021-04-19,38.73,34.02,37.41,34.8 +2021-04-20,35.77,31.6,34.8,35.48 +2021-04-21,36.33,33.1,35.48,33.79 +2021-04-22,36.74,32.42,33.79,32.98 +2021-04-23,33.45,26.59,32.98,32.26 +2021-04-24,32.39,28.59,32.26,29.06 +2021-04-25,31.26,28.14,29.06,29.83 +2021-04-26,33.49,29.81,29.83,33.43 +2021-04-27,34.98,33.22,33.43,34.84 +2021-04-28,35.37,32.59,34.84,34.0 +2021-04-29,35.97,33.02,34.0,35.97 +2021-04-30,36.8,35.11,35.97,36.54 +2021-05-01,37.37,35.84,36.54,36.93 +2021-05-02,37.18,35.55,36.93,36.66 +2021-05-03,38.3,36.64,36.66,37.27 +2021-05-04,37.93,34.51,37.27,34.8 +2021-05-05,40.76,34.58,34.8,40.45 +2021-05-06,43.88,38.09,40.45,41.57 +2021-05-07,42.67,38.42,41.57,39.91 +2021-05-08,41.36,38.76,39.91,39.96 +2021-05-09,40.54,38.2,39.91,40.35 +2021-05-10,41.85,32.61,40.35,36.54 +2021-05-11,38.73,35.61,36.54,38.72 +2021-05-12,42.44,33.97,38.72,34.52 +2021-05-13,41.89,33.09,34.52,40.04 +2021-05-14,48.08,39.51,40.04,48.06 +2021-05-15,49.72,42.84,48.06,43.55 +2021-05-16,46.68,39.34,43.55,42.5 +2021-05-17,39.85,36.98,42.54,38.7 +2021-05-18,42.29,37.61,38.7,40.62 +2021-05-19,41.37,20.01,40.64,25.08 +2021-05-20,31.3,21.22,25.08,29.03 +2021-05-21,31.01,20.05,29.03,24.46 +2021-05-22,24.63,20.42,24.46,22.08 +2021-05-23,23.46,13.88,22.08,17.94 +2021-05-24,23.49,17.15,17.94,23.25 +2021-05-25,24.21,19.67,23.25,22.18 +2021-05-26,24.76,21.68,22.18,24.55 +2021-05-27,24.94,21.82,24.55,23.9 +2021-05-28,26.19,20.11,23.9,21.38 +2021-05-29,22.27,18.81,21.38,19.85 +2021-05-30,21.29,18.48,19.85,20.46 +2021-05-31,23.43,19.12,20.46,23.33 +2021-06-01,23.53,21.73,23.33,22.82 +2021-06-02,26.84,22.68,22.82,25.95 +2021-06-03,28.62,25.7,25.95,26.97 +2021-06-04,27.0,23.64,26.97,25.03 +2021-06-05,26.39,22.97,25.03,23.79 +2021-06-06,24.47,23.59,23.79,24.14 +2021-06-07,25.28,21.29,24.14,21.69 +2021-06-08,22.28,19.63,21.69,21.69 +2021-06-09,23.43,20.41,21.69,23.2 +2021-06-10,24.56,22.1,23.2,22.67 +2021-06-11,23.19,20.52,22.67,20.96 +2021-06-12,21.24,19.57,20.96,20.76 +2021-06-13,22.39,19.94,20.76,22.07 +2021-06-14,26.04,21.25,22.07,25.87 +2021-06-15,25.99,23.56,25.87,23.97 +2021-06-16,24.55,22.53,23.97,23.02 +2021-06-17,23.98,22.01,23.02,22.48 +2021-06-18,22.56,20.24,22.48,21.38 +2021-06-19,21.62,20.23,21.38,20.25 +2021-06-20,20.99,18.92,20.25,20.63 +2021-06-21,20.78,15.3,20.63,15.74 +2021-06-22,16.95,13.04,15.74,14.65 +2021-06-23,16.8,14.31,14.65,15.8 +2021-06-24,16.65,14.75,15.8,16.22 +2021-06-25,16.71,14.42,16.22,14.44 +2021-06-26,14.96,13.65,14.44,14.52 +2021-06-27,15.01,14.07,14.52,15.0 +2021-06-28,16.01,14.63,15.0,15.77 +2021-06-29,17.05,15.75,15.77,16.26 +2021-06-30,16.61,15.11,16.26,16.38 +2021-07-01,16.4,14.87,16.38,15.21 +2021-07-02,15.45,14.65,15.21,15.31 +2021-07-03,15.74,15.04,15.31,15.52 +2021-07-04,16.57,15.18,15.52,15.99 +2021-07-05,15.99,14.77,15.99,15.24 +2021-07-06,16.18,15.2,15.24,16.13 +2021-07-07,17.66,16.11,16.13,16.86 +2021-07-08,16.88,15.01,16.86,15.32 +2021-07-09,15.89,14.84,15.32,15.68 +2021-07-10,15.99,15.05,15.68,15.29 +2021-07-11,15.7,15.16,15.29,15.48 +2021-07-12,15.64,14.43,15.48,14.88 +2021-07-13,15.08,14.03,14.88,14.18 +2021-07-14,14.21,13.19,14.18,13.8 +2021-07-15,14.1,12.75,13.8,13.09 +2021-07-16,13.3,12.02,13.09,12.04 +2021-07-17,12.73,11.74,12.04,12.29 +2021-07-18,12.93,12.29,12.29,12.65 +2021-07-19,12.73,11.36,12.65,11.43 +2021-07-20,11.54,10.38,11.43,10.97 +2021-07-21,12.85,10.68,10.97,12.32 +2021-07-22,13.33,11.81,12.32,13.16 +2021-07-23,13.52,12.33,13.16,13.4 +2021-07-24,14.07,13.14,13.4,13.78 +2021-07-25,13.83,13.1,13.78,13.73 +2021-07-26,15.27,13.66,13.73,13.93 +2021-07-27,14.54,13.38,13.93,14.39 +2021-07-28,14.76,13.95,14.39,14.54 +2021-07-29,15.38,14.28,14.54,15.26 +2021-07-30,15.85,14.44,15.26,15.81 +2021-07-31,17.02,15.53,15.81,16.79 +2021-08-01,19.88,16.58,16.79,18.42 +2021-08-02,18.86,17.57,18.42,18.01 +2021-08-03,18.53,16.83,18.01,17.38 +2021-08-04,19.57,17.11,17.38,19.15 +2021-08-05,19.44,17.88,19.15,19.13 +2021-08-06,20.81,18.45,19.13,20.43 +2021-08-07,21.68,20.04,20.43,20.98 +2021-08-08,21.2,19.22,20.98,19.67 +2021-08-09,21.27,18.74,19.67,20.58 +2021-08-10,21.41,20.1,20.58,20.62 +2021-08-11,22.46,20.57,20.62,21.4 +2021-08-12,21.33,19.96,21.33,20.76 +2021-08-13,22.75,20.54,20.76,22.74 +2021-08-14,23.47,21.8,22.74,22.87 +2021-08-15,23.35,21.87,22.87,23.17 +2021-08-16,25.69,22.85,23.17,24.49 +2021-08-17,27.36,23.11,24.49,23.56 +2021-08-18,25.17,22.61,23.56,23.9 +2021-08-19,26.81,23.23,23.9,26.58 +2021-08-20,28.46,26.13,26.58,28.14 +2021-08-21,29.35,27.54,28.14,27.89 +2021-08-22,28.51,26.58,27.89,27.72 +2021-08-23,28.63,27.35,27.72,27.87 +2021-08-24,28.17,24.45,27.87,25.11 +2021-08-25,26.55,24.53,25.11,25.98 +2021-08-26,26.38,23.28,25.98,23.95 +2021-08-27,26.75,23.48,23.95,26.53 +2021-08-28,26.73,25.46,26.53,25.97 +2021-08-29,26.47,25.3,25.97,25.73 +2021-08-30,27.55,24.37,25.73,26.03 +2021-08-31,31.93,25.68,26.03,31.36 +2021-09-01,33.81,29.67,31.36,33.2 +2021-09-02,33.2,31.37,33.2,31.82 +2021-09-03,33.98,31.04,31.82,33.59 +2021-09-04,34.14,32.06,33.59,32.38 +2021-09-05,34.76,32.03,32.38,34.43 +2021-09-06,35.02,32.53,34.43,34.35 +2021-09-07,35.66,23.63,34.35,27.9 +2021-09-08,28.85,25.27,27.9,27.74 +2021-09-09,31.84,27.02,27.74,29.83 +2021-09-10,32.65,28.02,29.83,29.19 +2021-09-11,32.08,28.29,29.19,31.57 +2021-09-12,36.48,30.67,31.57,35.82 +2021-09-13,38.01,31.7,35.82,34.85 +2021-09-14,38.77,34.09,34.85,37.37 +2021-09-15,38.04,35.59,37.37,36.47 +2021-09-16,36.95,34.09,36.47,35.54 +2021-09-17,36.94,32.23,35.54,33.02 +2021-09-18,35.89,32.54,33.02,34.88 +2021-09-19,34.88,33.06,34.88,33.84 +2021-09-20,33.91,26.71,33.84,28.15 +2021-09-21,30.35,25.52,28.15,26.38 +2021-09-22,31.99,25.94,26.38,31.61 +2021-09-23,33.61,30.4,31.61,33.46 +2021-09-24,33.53,28.0,33.46,30.85 +2021-09-25,32.22,29.47,30.85,29.85 +2021-09-26,30.01,26.78,29.85,28.86 +2021-09-27,30.24,27.62,28.86,27.73 +2021-09-28,28.37,26.16,27.73,26.33 +2021-09-29,28.57,26.12,26.33,27.26 +2021-09-30,28.97,27.13,27.26,28.6 +2021-10-01,32.32,28.5,28.6,31.96 +2021-10-02,33.4,31.55,31.96,32.04 +2021-10-03,32.69,31.32,32.04,32.11 +2021-10-04,32.12,30.08,32.11,31.17 +2021-10-05,32.14,30.57,31.17,31.4 +2021-10-06,33.07,29.14,31.4,32.24 +2021-10-07,35.33,30.96,32.21,33.98 +2021-10-08,34.49,33.05,33.98,33.32 +2021-10-09,36.91,33.0,33.32,36.33 +2021-10-10,37.46,34.13,36.33,34.44 +2021-10-11,36.08,33.27,34.44,34.14 +2021-10-12,35.42,32.09,34.14,35.16 +2021-10-13,43.26,33.63,35.16,41.69 +2021-10-14,42.48,39.33,41.69,40.74 +2021-10-15,44.19,39.47,40.74,43.31 +2021-10-16,44.74,41.28,43.31,41.69 +2021-10-17,42.84,39.6,41.69,42.1 +2021-10-18,43.26,40.28,42.1,41.18 +2021-10-19,41.63,40.05,41.18,41.36 +2021-10-20,45.2,41.1,41.36,44.41 +2021-10-21,45.51,41.96,44.41,42.84 +2021-10-22,46.36,42.74,42.84,43.48 +2021-10-23,44.76,43.08,43.48,43.95 +2021-10-24,44.16,41.33,43.95,42.3 +2021-10-25,44.77,42.12,42.3,44.51 +2021-10-26,46.13,43.37,44.51,44.87 +2021-10-27,45.74,39.07,44.87,40.38 +2021-10-28,43.11,39.89,40.38,41.83 +2021-10-29,44.38,41.6,41.83,44.11 +2021-10-30,44.32,42.14,44.11,42.73 +2021-10-31,43.38,41.07,42.73,42.77 +2021-11-01,51.62,41.79,42.77,50.03 +2021-11-02,53.36,48.1,50.03,51.68 +2021-11-03,54.59,49.13,51.68,53.36 +2021-11-04,55.09,52.22,53.36,53.91 +2021-11-05,53.95,50.63,53.91,51.85 +2021-11-06,52.44,49.04,51.85,52.04 +2021-11-07,53.5,51.38,52.04,52.23 +2021-11-08,53.88,51.7,52.23,53.39 +2021-11-09,53.4,50.53,53.39,50.77 +2021-11-10,52.01,42.54,50.77,46.82 +2021-11-11,49.45,45.6,46.82,47.49 +2021-11-12,47.73,44.08,47.49,45.93 +2021-11-13,47.54,44.9,45.93,47.1 +2021-11-14,47.82,45.05,47.1,46.39 +2021-11-15,47.47,45.06,46.39,45.25 diff --git a/data/ETH.csv b/data/ETH.csv index c7e044f..321d4c9 100644 --- a/data/ETH.csv +++ b/data/ETH.csv @@ -1,9 +1,4 @@ time,high,low,open,close -2017-10-02,304.13,293.34,303.95,296.81 -2017-10-03,299.92,286.86,296.81,291.81 -2017-10-04,295.57,288.56,291.81,291.68 -2017-10-05,297.47,286.73,291.68,294.99 -2017-10-06,309.0,293.75,294.99,308.33 2017-10-07,314.12,304.63,308.33,311.26 2017-10-08,313.52,308.13,311.26,309.49 2017-10-09,310.14,286.52,309.49,296.95 @@ -1499,4 +1494,9 @@ time,high,low,open,close 2021-11-07,4638.45,4507.27,4521.41,4617.13 2021-11-08,4823.95,4616.63,4617.13,4810.97 2021-11-09,4841.12,4710.0,4810.97,4732.07 -2021-11-10,4756.45,4668.94,4732.07,4723.18 +2021-11-10,4865.94,4488.21,4732.07,4632.98 +2021-11-11,4781.36,4579.28,4632.98,4722.68 +2021-11-12,4807.7,4510.48,4722.68,4668.7 +2021-11-13,4705.5,4587.56,4668.7,4645.64 +2021-11-14,4694.35,4517.53,4645.64,4627.5 +2021-11-15,4769.78,4557.28,4627.5,4570.27 diff --git a/data/FIL.csv b/data/FIL.csv index 2ca29e6..bc958ff 100644 --- a/data/FIL.csv +++ b/data/FIL.csv @@ -1,9 +1,4 @@ time,high,low,open,close -2017-10-02,0.0,0.0,0.0,0.0 -2017-10-03,0.0,0.0,0.0,0.0 -2017-10-04,0.0,0.0,0.0,0.0 -2017-10-05,0.0,0.0,0.0,0.0 -2017-10-06,0.0,0.0,0.0,0.0 2017-10-07,0.0,0.0,0.0,0.0 2017-10-08,0.0,0.0,0.0,0.0 2017-10-09,0.0,0.0,0.0,0.0 @@ -1499,4 +1494,9 @@ time,high,low,open,close 2021-11-07,62.66,61.16,61.85,62.59 2021-11-08,64.95,62.26,62.59,64.27 2021-11-09,69.43,63.55,64.27,66.68 -2021-11-10,69.62,66.28,66.68,67.24 +2021-11-10,69.62,58.65,66.68,63.64 +2021-11-11,64.48,61.74,63.64,62.81 +2021-11-12,65.48,61.14,62.81,62.9 +2021-11-13,63.66,62.24,62.9,62.93 +2021-11-14,63.46,61.04,62.93,62.57 +2021-11-15,63.42,60.25,62.57,60.67 diff --git a/data/GLD.csv b/data/GLD.csv index cb3ad11..5fe0a10 100644 --- a/data/GLD.csv +++ b/data/GLD.csv @@ -1,4 +1,4 @@ -,open,high,low,close,volume +time,open,high,low,close,volume 2017-11-10,121.99,122.11,120.935,121.13,7116200.0 2017-11-13,121.43,121.55,121.27,121.31,6249206.0 2017-11-14,120.9,121.91,120.77,121.56,6188992.0 @@ -1005,3 +1005,6 @@ 2021-11-05,168.42,169.94,167.85,169.84,9368948.0 2021-11-08,170.43,170.7,170.06,170.45,4966135.0 2021-11-09,170.73,171.31,170.12,171.29,5686157.0 +2021-11-10,173.67,174.65,172.11,173.15,11461779.0 +2021-11-11,173.98,174.27,173.74,174.12,5959640.0 +2021-11-12,173.51,174.67,173.4,174.45,7638200.0 diff --git a/data/IEF.csv b/data/IEF.csv index 4857265..41b367d 100644 --- a/data/IEF.csv +++ b/data/IEF.csv @@ -1,4 +1,4 @@ -,open,high,low,close,volume +time,open,high,low,close,volume 2017-11-10,106.0,106.0307,105.79,99.2266847614,1861954.0 2017-11-13,105.91,105.96,105.77,99.1798045361,868580.0 2017-11-14,105.81,106.0,105.79,99.3204452119,1629226.0 @@ -1005,3 +1005,6 @@ 2021-11-05,115.335,115.81,115.22,115.71,12955126.0 2021-11-08,115.52,115.52,115.16,115.21,7404312.0 2021-11-09,115.695,115.98,115.65,115.74,12276897.0 +2021-11-10,115.54,115.57,114.54,114.75,19425106.0 +2021-11-11,114.75,114.8,114.38,114.38,3746050.0 +2021-11-12,114.8,114.94,114.52,114.62,10443929.0 diff --git a/data/LTC.csv b/data/LTC.csv index d1649b1..bff68b7 100644 --- a/data/LTC.csv +++ b/data/LTC.csv @@ -1,9 +1,4 @@ time,high,low,open,close -2017-10-02,54.97,52.93,54.8,53.29 -2017-10-03,53.54,51.34,53.29,52.15 -2017-10-04,52.98,50.53,52.15,51.22 -2017-10-05,51.87,50.17,51.22,51.64 -2017-10-06,52.75,51.34,51.64,52.08 2017-10-07,52.9,51.61,52.08,52.57 2017-10-08,54.79,52.32,52.57,53.3 2017-10-09,53.44,48.12,53.3,50.08 @@ -1499,4 +1494,9 @@ time,high,low,open,close 2021-11-07,202.25,197.24,197.79,202.13 2021-11-08,229.64,202.13,202.13,228.91 2021-11-09,274.51,226.81,228.91,262.1 -2021-11-10,294.32,254.43,262.1,281.63 +2021-11-10,296.85,252.37,262.1,260.38 +2021-11-11,274.08,250.9,260.38,262.5 +2021-11-12,282.63,244.16,262.5,251.24 +2021-11-13,264.0,245.49,251.24,257.84 +2021-11-14,279.5,248.61,257.84,279.22 +2021-11-15,281.36,261.33,279.22,262.98 diff --git a/data/QQQ.csv b/data/QQQ.csv index b837e4e..8ab910f 100644 --- a/data/QQQ.csv +++ b/data/QQQ.csv @@ -1,4 +1,4 @@ -,open,high,low,close,volume +time,open,high,low,close,volume 2017-11-10,153.36,153.8,153.06,149.226193273,20150762.0 2017-11-13,153.12,154.0693,153.1,149.410686875,12468169.0 2017-11-14,153.31,153.5,152.57,148.866916259,25050308.0 @@ -1005,3 +1005,6 @@ 2021-11-05,400.04,400.99,397.16,398.6,43383802.0 2021-11-08,398.57,399.62,397.4,398.06,29256270.0 2021-11-09,399.16,399.57,393.92,395.32,50119363.0 +2021-11-10,392.47,395.36,387.53,389.51,54937385.0 +2021-11-11,392.57,392.75,390.24,390.59,32242983.0 +2021-11-12,391.77,395.25,390.13,394.7,32532903.0 diff --git a/data/SOL.csv b/data/SOL.csv index 171defe..297ff6d 100644 --- a/data/SOL.csv +++ b/data/SOL.csv @@ -1,9 +1,4 @@ time,high,low,open,close -2017-10-02,0.0,0.0,0.0,0.0 -2017-10-03,0.0,0.0,0.0,0.0 -2017-10-04,0.0,0.0,0.0,0.0 -2017-10-05,0.0,0.0,0.0,0.0 -2017-10-06,0.0,0.0,0.0,0.0 2017-10-07,0.0,0.0,0.0,0.0 2017-10-08,0.0,0.0,0.0,0.0 2017-10-09,0.0,0.0,0.0,0.0 @@ -1499,4 +1494,9 @@ time,high,low,open,close 2021-11-07,258.81,245.9,258.63,249.76 2021-11-08,253.3,240.76,249.76,248.35 2021-11-09,253.17,237.5,248.35,239.03 -2021-11-10,243.91,235.37,239.03,237.71 +2021-11-10,248.09,218.64,239.03,233.62 +2021-11-11,246.46,229.6,233.62,233.51 +2021-11-12,239.0,220.98,233.51,228.64 +2021-11-13,241.92,224.99,228.64,241.66 +2021-11-14,241.94,230.47,241.66,238.71 +2021-11-15,246.33,236.99,238.71,237.82 diff --git a/data/SPY.csv b/data/SPY.csv index 5f9ebfb..b6b26d8 100644 --- a/data/SPY.csv +++ b/data/SPY.csv @@ -1,4 +1,4 @@ -,open,high,low,close,volume +time,open,high,low,close,volume 2017-11-10,257.73,258.29,257.37,240.302006209,59984662.0 2017-11-13,257.31,258.59,257.27,240.525465008,50228648.0 2017-11-14,257.41,257.85,256.52,239.96681801,61315152.0 @@ -1005,3 +1005,6 @@ 2021-11-05,469.28,470.65,466.92,468.53,66390563.0 2021-11-08,469.7,470.23,468.2031,468.93,50405194.0 2021-11-09,469.32,469.57,465.88,467.38,50232447.0 +2021-11-10,465.58,467.38,462.04,463.62,69429653.0 +2021-11-11,465.21,465.29,463.75,463.77,34848495.0 +2021-11-12,465.12,467.86,464.11,467.27,51018081.0 diff --git a/data/TLT.csv b/data/TLT.csv index 1debe28..4bfe75e 100644 --- a/data/TLT.csv +++ b/data/TLT.csv @@ -1,4 +1,4 @@ -,open,high,low,close,volume +time,open,high,low,close,volume 2017-11-10,124.71,124.84,123.96,114.337577745,11980950.0 2017-11-13,124.8,124.81,124.31,114.577124645,5880784.0 2017-11-14,124.77,125.24,124.77,115.351045397,6195891.0 @@ -1005,3 +1005,6 @@ 2021-11-05,148.52,149.58,148.13,149.3,21513029.0 2021-11-08,148.96,149.28,148.51,149.02,12083905.0 2021-11-09,150.8,151.767,150.64,150.96,23086406.0 +2021-11-10,150.83,150.93,147.03,148.2,28170644.0 +2021-11-11,148.508,148.655,147.89,147.98,5552818.0 +2021-11-12,148.0,148.51,146.76,147.33,12609431.0 diff --git a/data/TRX.csv b/data/TRX.csv index e452bd8..6441649 100644 --- a/data/TRX.csv +++ b/data/TRX.csv @@ -1,9 +1,4 @@ time,high,low,open,close -2017-10-02,0.003117,0.001707,0.001884,0.00282 -2017-10-03,1316316.97,0.002116,0.00282,0.002442 -2017-10-04,0.003494,0.002188,0.002442,0.003351 -2017-10-05,0.003652,0.002906,0.003351,0.003103 -2017-10-06,13.92,0.002741,0.003103,0.003009 2017-10-07,5217704.29,0.002275,0.003009,0.0024 2017-10-08,0.002807,0.002253,0.0024,0.002689 2017-10-09,0.003154,0.001419,0.002689,0.002126 @@ -1499,4 +1494,9 @@ time,high,low,open,close 2021-11-07,0.1049,0.1022,0.1026,0.1045 2021-11-08,0.11,0.1045,0.1045,0.11 2021-11-09,0.1153,0.1087,0.11,0.1144 -2021-11-10,0.1174,0.112,0.1144,0.1144 +2021-11-10,0.1174,0.1036,0.1144,0.1067 +2021-11-11,0.1104,0.1051,0.1067,0.109 +2021-11-12,0.1108,0.1048,0.109,0.108 +2021-11-13,0.114,0.1076,0.108,0.1126 +2021-11-14,0.1174,0.1106,0.1126,0.1171 +2021-11-15,0.129,0.1159,0.1171,0.1228 diff --git a/data/UNI.csv b/data/UNI.csv index fa9bb38..9a81bee 100644 --- a/data/UNI.csv +++ b/data/UNI.csv @@ -1,9 +1,4 @@ time,high,low,open,close -2017-10-02,0.0,0.0,0.0,0.0 -2017-10-03,0.0,0.0,0.0,0.0 -2017-10-04,0.0,0.0,0.0,0.0 -2017-10-05,0.0,0.0,0.0,0.0 -2017-10-06,0.0,0.0,0.0,0.0 2017-10-07,0.0,0.0,0.0,0.0 2017-10-08,0.0,0.0,0.0,0.0 2017-10-09,0.0,0.0,0.0,0.0 @@ -1499,4 +1494,9 @@ time,high,low,open,close 2021-11-07,25.52,24.99,25.18,25.34 2021-11-08,26.36,25.21,25.34,26.25 2021-11-09,27.73,26.13,26.25,26.36 -2021-11-10,26.98,26.14,26.35,26.58 +2021-11-10,28.47,24.24,26.36,25.28 +2021-11-11,26.11,24.92,25.28,25.39 +2021-11-12,25.69,23.92,25.39,24.57 +2021-11-13,24.81,24.17,24.57,24.65 +2021-11-14,24.98,24.02,24.65,24.56 +2021-11-15,24.98,23.92,24.56,24.13 diff --git a/data/XRP.csv b/data/XRP.csv index 7f75e59..56c5f3c 100644 --- a/data/XRP.csv +++ b/data/XRP.csv @@ -1,9 +1,4 @@ time,high,low,open,close -2017-10-02,0.2092,0.2001,0.2083,0.2031 -2017-10-03,0.2062,0.198,0.2031,0.2033 -2017-10-04,0.217,0.2012,0.2033,0.2135 -2017-10-05,0.2442,0.2134,0.2135,0.238 -2017-10-06,0.2444,0.2332,0.238,0.2334 2017-10-07,0.2411,0.2324,0.2334,0.2397 2017-10-08,0.2811,0.2385,0.2397,0.2799 2017-10-09,0.2802,0.234,0.2799,0.2501 @@ -1499,4 +1494,9 @@ time,high,low,open,close 2021-11-07,1.237,1.147,1.152,1.22 2021-11-08,1.295,1.22,1.22,1.283 2021-11-09,1.288,1.226,1.283,1.257 -2021-11-10,1.301,1.221,1.257,1.291 +2021-11-10,1.348,1.126,1.257,1.192 +2021-11-11,1.253,1.178,1.192,1.215 +2021-11-12,1.233,1.156,1.215,1.189 +2021-11-13,1.203,1.168,1.189,1.189 +2021-11-14,1.199,1.169,1.189,1.188 +2021-11-15,1.22,1.174,1.188,1.179 diff --git a/lightning/forecasting.py b/lightning/forecasting.py new file mode 100644 index 0000000..88b5910 --- /dev/null +++ b/lightning/forecasting.py @@ -0,0 +1,114 @@ +#%% +import pytorch_lightning as pl +from pytorch_lightning.callbacks import EarlyStopping, LearningRateMonitor + +from pytorch_forecasting import TimeSeriesDataSet, TemporalFusionTransformer +from pytorch_forecasting.data import GroupNormalizer +from pytorch_forecasting.metrics import QuantileLoss + +import sys +sys.path.insert(0, '..') + +from load_data import load_files + +print("success") + +#%% +# load data +data = load_files('data/', add_features=True, log_returns=False, narrow_format=True) +# need to treat time as an independent column +data = data.reset_index().rename({'index':'time'}, axis = 'columns') +# we need a `time_idx` column for pytorch-forecasting, so we convert the time column to a time index by encoding the dates as consecutive days from the first date. +data['time_idx'] = (data['time']-data['time'].min()).astype('timedelta64[D]').astype(int)+1 +# volume needs some love before we can use it +data.drop(columns=['volume'], inplace=True) + +data['month'] = data['month'].astype(str) +data['day_month'] = data['day_month'].astype(str) +data['day_week'] = data['day_week'].astype(str) + + + +#%% +# define dataset +max_encoder_length = 36 # this is the look-back window, see https://github.com/jdb78/pytorch-forecasting/issues/448 +max_prediction_length = 6 +# training_cutoff = "YYYY-MM-DD" # day for cutoff + +# training_cutoff = data["time_idx"].max() - max_prediction_length + +training = TimeSeriesDataSet( + data, # data[lambda x: x.date < training_cutoff], + time_idx= 'time_idx', + target= 'returns', + # weight="weight", + group_ids=[ 'ticker' ], + min_encoder_length = max_encoder_length,##max_encoder_length//2, + max_encoder_length = max_encoder_length, + min_prediction_length = 1, + max_prediction_length = 1,#max_prediction_length, + static_categoricals=[ ], + static_reals=[ ], + time_varying_known_categoricals=[ 'day_month', 'day_week', 'month' ], + time_varying_known_reals=[ 'vol_10', 'vol_20', 'vol_30', 'vol_60', 'mom_10', 'mom_20', 'mom_30', 'mom_60', 'mom_90'], + time_varying_unknown_categoricals=[ ], + time_varying_unknown_reals=[ 'returns' ], + allow_missing_timesteps=True, + # target_normalizer=GroupNormalizer( + # groups=['ADA_returns', 'BTC_returns'], transformation="softplus") +) + +#%% +print(training.index.time) +print(training.index.time.max()) + +#%% +# create validation and training dataset + +validation = TimeSeriesDataSet.from_dataset(training, data, predict=True, stop_randomization=True) +batch_size = 128 +train_dataloader = training.to_dataloader(train=True, batch_size=batch_size, num_workers=2) +val_dataloader = validation.to_dataloader(train=False, batch_size=batch_size, num_workers=2) + +# define trainer with early stopping +early_stop_callback = EarlyStopping(monitor="val_loss", min_delta=1e-4, patience=1, verbose=False, mode="min") +lr_logger = LearningRateMonitor() +trainer = pl.Trainer( + max_epochs=100, + gpus=0, + gradient_clip_val=0.1, + limit_train_batches=30, + callbacks=[lr_logger, early_stop_callback], +) + +# create the model +tft = TemporalFusionTransformer.from_dataset( + training, + learning_rate=0.03, + hidden_size=32, + attention_head_size=1, + dropout=0.1, + hidden_continuous_size=16, + output_size=7, + loss=QuantileLoss(), + log_interval=2, + reduce_on_plateau_patience=4 +) +print(f"Number of parameters in network: {tft.size()/1e3:.1f}k") + +# find optimal learning rate (set limit_train_batches to 1.0 and log_interval = -1) +res = trainer.tuner.lr_find( + tft, train_dataloader=train_dataloader, val_dataloaders=val_dataloader, early_stop_threshold=1000.0, max_lr=0.3, +) + +print(f"suggested learning rate: {res.suggestion()}") +fig = res.plot(show=True, suggest=True) +fig.show() + +# fit the model +trainer.fit( + tft, train_dataloader=train_dataloader, val_dataloaders=val_dataloader, +) + + +# %% diff --git a/lightning/model_lightning.py b/lightning/model_lightning.py new file mode 100644 index 0000000..608e230 --- /dev/null +++ b/lightning/model_lightning.py @@ -0,0 +1,60 @@ + +import torch +from torch import nn +from torch.nn import functional as F +from torch.utils.data import DataLoader, random_split +import pytorch_lightning as pl + + +class LitManualAutoEncoder(pl.LightningModule): + + def __init__(self): + super().__init__() + self.encoder = nn.Sequential(nn.Linear(28 * 28, 128), nn.ReLU(), nn.Linear(128, 3)) + self.decoder = nn.Sequential(nn.Linear(3, 128), nn.ReLU(), nn.Linear(128, 28 * 28)) + print("success") + + def training_step(self, batch, batch_idx): + # -------------------------- + # REPLACE WITH YOUR OWN + opt_a = self.optimizers() + + x, y = batch + x = x.view(x.size(0), -1) + z = self.encoder(x) + x_hat = self.decoder(z) + loss = F.mse_loss(x_hat, x) + + # backward acts like normal backward + self.manual_backward(loss, opt_a, retain_graph=True) + self.manual_backward(loss, opt_a) + opt_a.step() + opt_a.zero_grad() + + # -------------------------- + + def validation_step(self, batch, batch_idx): + # -------------------------- + # REPLACE WITH YOUR OWN + x, y = batch + x = x.view(x.size(0), -1) + z = self.encoder(x) + x_hat = self.decoder(z) + loss = F.mse_loss(x_hat, x) + self.log('val_loss', loss) + # -------------------------- + + def test_step(self, batch, batch_idx): + # -------------------------- + # REPLACE WITH YOUR OWN + x, y = batch + x = x.view(x.size(0), -1) + z = self.encoder(x) + x_hat = self.decoder(z) + loss = F.mse_loss(x_hat, x) + self.log('test_loss', loss) + # -------------------------- + + def configure_optimizers(self): + optimizer = torch.optim.Adam(self.parameters(), lr=1e-3) + return optimizer \ No newline at end of file diff --git a/lightning/run_lightning.py b/lightning/run_lightning.py new file mode 100644 index 0000000..c568ac2 --- /dev/null +++ b/lightning/run_lightning.py @@ -0,0 +1,48 @@ +from load_data import load_files +import pandas as pd +# from tensorflow import keras +from utils.normalize import normalize +# import tensorflow as tf +from utils.visualize import visualize_loss + +from torch.utils.data import DataLoader, random_split +from model_lightning import LitManualAutoEncoder +import pytorch_lightning as pl + +#%% +data = load_files('data/', False) +data.reset_index(drop=True, inplace=True) +data = data[[column for column in data.columns if not column.endswith('volume')]] + +data.head() + +#%% +ticker_to_predict = 'ETH_returns' + +learning_rate = 0.002 +batch_size = 64 +epochs = 100 + +split_fraction = 0.715 +train_split = int(split_fraction * int(data.shape[0])) + +past = 10 +future = 1 + +start = past + future +end = start + train_split + + +# train = DataLoader(train, batch_size=32) +# test = DataLoader(test, batch_size=32) +# val = DataLoader(val, batch_size=32) + + +# init model +ae = LitManualAutoEncoder() + +# Initialize a trainer +trainer = pl.Trainer(gpus=1, max_epochs=3, progress_bar_refresh_rate=20) + +# Train the model ⚡ +# trainer.fit(ae, train, val) \ No newline at end of file diff --git a/lightning/timeseries_dataset.py b/lightning/timeseries_dataset.py new file mode 100644 index 0000000..e0d72c8 --- /dev/null +++ b/lightning/timeseries_dataset.py @@ -0,0 +1,18 @@ +import os +import pandas as pd + +import torch +from torch.utils.data import Dataset + + +class TimeSeriesDataset(Dataset): + def __init__(self, file_loader_hook): + + df = file_loader_hook() + + def __len__(self): + return len(self.img_labels) + + def __getitem__(self, idx): + pass + # return image, label \ No newline at end of file diff --git a/load_data.py b/load_data.py index c9a5709..dc38ef8 100644 --- a/load_data.py +++ b/load_data.py @@ -5,9 +5,12 @@ import numpy as np #%% -def load_files(path: str, add_features: bool, log_returns: bool) -> pd.DataFrame: - dfs = [__load_df(os.path.join(path,f), f.split('.')[0], add_features, log_returns) for f in os.listdir(path) if os.path.isfile(os.path.join(path,f))] - dfs = pd.concat(dfs, axis=1).fillna(0.) +def load_files(path: str, add_features: bool, log_returns: bool, narrow_format: bool = False) -> pd.DataFrame: + dfs = [__load_df(os.path.join(path,f), f.split('.')[0], add_features, log_returns, narrow_format) for f in os.listdir(path) if os.path.isfile(os.path.join(path,f))] + if narrow_format: + dfs = pd.concat(dfs, axis=0).fillna(0.) + else: + dfs = pd.concat(dfs, axis=1).fillna(0.) dfs.index = pd.DatetimeIndex(dfs.index) @@ -16,9 +19,12 @@ def load_files(path: str, add_features: bool, log_returns: bool) -> pd.DataFrame dfs['day_week'] = dfs.index.dayofweek dfs['month'] = dfs.index.month - return dfs.drop(index=dfs.index[0], axis=0) + if narrow_format: + return dfs + else: + return dfs.drop(index=dfs.index[0], axis=0) -def __load_df(path: str, prefix: str, add_features: bool, log_returns: bool) -> pd.DataFrame: +def __load_df(path: str, prefix: str, add_features: bool, log_returns: bool, narrow_format: bool = False) -> pd.DataFrame: df = pd.read_csv(path, header=0, index_col=0).fillna(0) if log_returns: @@ -49,7 +55,10 @@ def __load_df(path: str, prefix: str, add_features: bool, log_returns: bool) -> df = df.replace([np.inf, -np.inf], 0.) df = df.drop(columns=['open', 'high', 'low', 'close']) - df.columns = [prefix + "_" + c for c in df.columns] + if narrow_format: + df["ticker"] = np.repeat(prefix, df.shape[0]) + else: + df.columns = [prefix + "_" + c for c in df.columns] return df # %% diff --git a/utils/get_prices.py b/utils/get_prices.py index 6054777..837b51c 100644 --- a/utils/get_prices.py +++ b/utils/get_prices.py @@ -46,6 +46,7 @@ def get_stock_price_av(symbol: str, start_date: str = None) -> pd.DataFrame: if start_date: df = df[df.index >= start_date] df.sort_index(inplace = True, ascending= True) + df = df.rename_axis('time') return df