├── Chapter02 ├── A.csv ├── B.csv ├── C.csv └── eda.ipynb ├── Chapter03 ├── arr.csv ├── arr.npy └── numpy.ipynb ├── Chapter04 ├── df.csv ├── df.json └── pandas.ipynb ├── Chapter05 ├── fig.png └── matplotlib.ipynb ├── Chapter06 ├── sklearn.ipynb └── statsmodels_pmdarima_fbprophet.ipynb ├── Chapter07 ├── cache.sqlite └── marketdata.ipynb ├── Chapter08 ├── A.csv ├── quandl_eod.py ├── risk_management.ipynb └── zipline_bundles-master.zip ├── Chapter09 └── signals_and_strategies.ipynb ├── LICENSE ├── README.md └── environment.yml /Chapter02/C.csv: -------------------------------------------------------------------------------- 1 | Date,Open,High,Low,Close,Adj Close,Volume 2 | 2015-05-15,12.46,13.09,12.35,12.38,12.38,0 3 | 2015-05-18,13.08,13.22,,12.73,12.73,0 4 | 2015-05-19,12.95,13.13,12.55,12.85,12.85,0 5 | 2015-05-20,12.9,13.27,12.62,12.88,12.88,0 6 | 2015-05-21,13.03,13.09,12.09,12.11,12.11,0 7 | 2015-05-22,12.37,12.37,11.82,12.13,12.13,0 8 | 2015-05-26,13.45,14.63,13.34,14.06,14.06,0 9 | 2015-05-27,14.16,14.41,13.05,13.27,13.27,0 10 | 2015-05-28,13.49,13.99,13.31,13.31,13.31,0 11 | 2015-05-29,13.59,14.43,13.4,13.84,13.84,0 12 | 2015-06-01,13.92,14.86,13.47,13.97,13.97,0 13 | 2015-06-02,14.72,15.05,13.59,14.24,14.24,0 14 | 2015-06-03,13.73,14.2,13.4,13.66,13.66,0 15 | 2015-06-04,14.57,15.49,13.99,14.71,14.71,0 16 | 2015-06-05,15.01,15.65,14.21,14.21,14.21,0 17 | 2015-06-08,14.84,15.5,14.67,15.29,15.29,0 18 | 2015-06-09,15.18,15.74,14.47,14.47,14.47,0 19 | 2015-06-10,14.24,14.37,12.96,13.22,13.22,0 20 | 2015-06-11,13.04,13.22,12.56,12.85,12.85,0 21 | 2015-06-12,13.31,14.02,,13.78,13.78,0 22 | 2015-06-15,15.48,15.57,14.91,15.39,15.39,0 23 | 2015-06-16,15.62,15.62,14.81,14.81,14.81,0 24 | 2015-06-17,14.66,15.49,14.07,14.5,14.5,0 25 | 2015-06-18,14.03,14.03,12.54,13.19,13.19,0 26 | 2015-06-19,13.35,14.0,12.96,13.96,13.96,0 27 | 2015-06-22,13.42,13.46,12.43,12.74,12.74,0 28 | 2015-06-23,12.5,12.68,11.93,12.11,12.11,0 29 | 2015-06-24,12.57,13.33,,13.26,13.26,0 30 | 2015-06-25,12.96,14.16,12.92,14.01,14.01,0 31 | 2015-06-26,14.13,14.91,13.64,14.02,14.02,0 32 | 2015-06-29,16.700001,19.5,15.82,18.85,18.85,0 33 | 2015-06-30,17.6,19.799999,17.49,18.23,18.23,0 34 | 2015-07-01,16.629998999999998,17.26,15.65,16.09,16.09,0 35 | 2015-07-02,15.43,17.48,15.39,16.790001,16.790001,0 36 | 2015-07-07,17.219998999999998,19.200001,,16.09,16.09,0 37 | 2015-07-08,17.379998999999998,19.76,16.940001000000002,19.66,19.66,0 38 | 2015-07-09,17.459999,20.049999,17.200001,19.969998999999998,19.969998999999998,0 39 | 2015-07-10,17.450001,18.17,330.0,16.83,16.83,0 40 | 2015-07-13,15.29,15.36,13.82,13.9,13.9,0 41 | 2015-07-14,13.91,13.95,12.9,13.37,13.37,0 42 | 2015-07-15,13.35,13.97,12.81,13.23,13.23,0 43 | 2015-07-16,12.59,12.61,11.87,12.11,12.11,0 44 | 2015-07-17,11.77,12.22,11.77,11.95,11.95,0 45 | 2015-07-20,12.25,12.37,11.71,12.25,12.25,0 46 | 2015-07-21,12.42,12.79,12.21,12.22,12.22,0 47 | 2015-07-22,12.77,12.83,12.05,12.12,12.12,0 48 | 2015-07-23,12.06,13.08,11.73,12.64,12.64,0 49 | 2015-07-24,12.87,14.73,12.86,13.74,13.74,0 50 | 2015-07-27,15.6,16.27,15.03,15.6,15.6,0 51 | 2015-07-28,14.87,15.62,13.32,13.44,13.44,0 52 | 2015-07-29,13.57,13.59,11.85,12.5,12.5,0 53 | 2015-07-30,12.72,13.42,,12.13,12.13,0 54 | 2015-07-31,12.03,12.63,11.82,12.12,12.12,0 55 | 2015-08-03,12.85,13.55,12.32,12.56,12.56,0 56 | 2015-08-04,12.66,13.22,12.29,13.0,13.0,0 57 | 2015-08-05,12.02,12.72,10.88,12.51,12.51,0 58 | 2015-08-06,12.2,14.25,12.16,13.77,13.77,0 59 | 2015-08-07,13.57,14.58,13.29,13.39,13.39,0 60 | 2015-08-10,12.73,12.78,12.18,12.23,12.23,0 61 | 2015-08-11,13.24,14.33,13.02,13.71,13.71,0 62 | 2015-08-12,15.19,16.280001000000002,13.45,13.61,13.61,0 63 | 2015-08-13,13.87,14.33,13.06,13.49,13.49,0 64 | 2015-08-14,13.69,13.87,12.8,12.83,12.83,0 65 | 2015-08-17,14.32,14.52,13.01,13.02,13.02,0 66 | 2015-08-18,13.41,13.94,13.17,13.79,13.79,0 67 | 2015-08-19,14.84,15.96,13.73,15.25,15.25,0 68 | 2015-08-20,16.549999,19.24,16.129998999999998,19.139999,19.139999,0 69 | 2015-08-21,22.549999,28.379998999999998,20.799999,28.030001000000002,28.030001000000002,0 70 | 2015-08-24,28.030001000000002,53.290001000000004,28.030001000000002,40.740002000000004,40.740002000000004,0 71 | 2015-08-25,31.129998999999998,38.060001,28.08,36.02,36.02,0 72 | 2015-08-26,31.129998999999998,35.619999,28.67,30.32,30.32,0 73 | 2015-08-27,27.110001,29.9,24.49,26.1,26.1,0 74 | 2015-08-28,26.690001000000002,29.200001,25.77,26.049999,26.049999,0 75 | 2015-08-31,27.030001000000002,29.370001000000002,26.629998999999998,28.43,28.43,0 76 | 2015-09-01,31.91,33.82,29.91,31.4,31.4,0 77 | 2015-09-02,29.139999,30.450001,,26.09,26.09,0 78 | 2015-09-03,25.209999,26.309998999999998,23.450001,25.610001,25.610001,0 79 | 2015-09-04,27.43,29.469998999999998,25.68,27.799999,27.799999,0 80 | 2015-09-08,25.049999,26.25,24.129998999999998,24.9,24.9,0 81 | 2015-09-09,22.389999,26.82,21.51,26.23,26.23,0 82 | 2015-09-10,26.870001000000002,27.219998999999998,23.530001000000002,24.370001000000002,24.370001000000002,0 83 | 2015-09-11,25.379998999999998,25.809998999999998,23.15,23.200001,23.200001,0 84 | 2015-09-14,24.030001000000002,25.32,23.639999,24.25,24.25,0 85 | 2015-09-15,23.280001000000002,23.77,22.129998999999998,22.540001,22.540001,0 86 | 2015-09-16,22.57,22.940001000000002,21.09,21.35,21.35,0 87 | 2015-09-17,21.540001,23.33,,21.139999,21.139999,0 88 | 2015-09-18,23.07,23.99,20.98,22.280001000000002,22.280001000000002,0 89 | 2015-09-21,21.969998999999998,22.48,20.049999,20.139999,20.139999,0 90 | 2015-09-22,22.969998999999998,26.290001,22.25,22.440001000000002,22.440001000000002,0 91 | 2015-09-23,22.09,23.200001,21.139999,22.129998999999998,22.129998999999998,0 92 | 2015-09-25,21.120001000000002,24.290001,20.809998999999998,23.620001000000002,23.620001000000002,0 93 | 2015-09-28,25.02,28.33,24.940001000000002,27.629998999999998,27.629998999999998,0 94 | 2015-09-30,24.639999,25.879998999999998,23.25,24.5,24.5,0 95 | 2015-10-01,23.139999,25.23,22.549999,22.549999,22.549999,0 96 | 2015-10-02,23.99,24.469998999999998,20.35,20.940001000000002,20.940001000000002,0 97 | 2015-10-05,20.309998999999998,20.42,19.139999,19.540001,19.540001,0 98 | 2015-10-06,19.540001,20.32,18.82,19.4,19.4,0 99 | 2015-10-07,18.959999,19.73,18.33,18.4,18.4,0 100 | 2015-10-08,18.620001000000002,19.02,16.34,17.42,17.42,0 101 | 2015-10-09,17.15,18.200001,16.889999,17.08,17.08,0 102 | 2015-10-12,17.68,17.809998999999994,16.15,16.17,16.17,0 103 | 2015-10-13,17.08,17.700001,16.139999,17.67,17.67,0 104 | 2015-10-14,17.67,18.780001000000002,17.299999,18.030001000000002,18.030001000000002,0 105 | 2015-10-15,17.620001000000006,17.85,16.040001,16.049999,16.049999,0 106 | 2015-10-16,15.64,16.860001,15.05,15.05,15.05,0 107 | 2015-10-19,15.68,16.23,14.82,14.98,14.98,0 108 | 2015-10-20,15.17,16.34,,15.75,15.75,0 109 | 2015-10-21,14.98,16.700001,14.41,16.700001,16.700001,0 110 | 2015-10-22,15.02,15.92,14.45,14.45,14.45,0 111 | 2015-10-23,13.46,15.12,13.24,14.46,14.46,0 112 | 2015-10-26,14.76,15.43,14.68,15.29,15.29,0 113 | 2015-10-27,15.75,15.99,14.78,15.43,15.43,0 114 | 2015-10-28,15.14,15.73,12.8,14.33,14.33,0 115 | 2015-10-29,14.8,15.46,14.33,14.61,14.61,0 116 | 2015-10-30,14.6,15.39,14.0,15.07,15.07,0 117 | 2015-11-02,15.41,15.51,13.67,14.15,14.15,0 118 | 2015-11-03,14.33,14.73,13.81,14.54,14.54,0 119 | 2015-11-04,14.04,15.88,13.96,15.51,15.51,0 120 | 2015-11-05,15.39,16.389999,15.0,15.05,15.05,0 121 | 2015-11-06,14.91,16.0,14.32,14.33,14.33,0 122 | 2015-11-09,15.34,17.09,15.14,16.52,16.52,0 123 | 2015-11-10,16.690001000000002,16.959999,15.24,15.29,15.29,0 124 | 2015-11-11,15.07,16.15,15.02,16.059998999999998,16.059998999999998,0 125 | 2015-11-12,17.059998999999998,18.5,16.65,18.370001000000002,18.370001000000002,0 126 | 2015-11-13,18.68,20.67,,20.08,20.08,0 127 | 2015-11-16,20.51,20.549999,17.25,18.16,18.16,0 128 | 2015-11-17,17.82,19.59,16.860001,18.84,18.84,0 129 | 2015-11-18,19.01,19.450001,16.799999,16.85,16.85,0 130 | 2015-11-19,16.25,18.26,16.0,16.99,16.99,0 131 | 2015-11-23,16.15,16.74,15.38,15.62,15.62,0 132 | 2015-11-24,16.530001000000002,17.209999,15.48,15.93,15.93,0 133 | 2015-11-25,15.55,15.89,15.05,15.19,15.19,0 134 | 2015-11-27,15.31,16.09,15.12,15.12,15.12,0 135 | 2015-11-30,15.55,16.57,15.52,16.129998999999998,16.129998999999998,0 136 | 2015-12-01,15.61,16.34,14.63,14.67,14.67,0 137 | 2015-12-02,15.04,16.49,14.71,15.91,15.91,0 138 | 2015-12-03,15.87,19.35,15.86,18.110001,18.110001,0 139 | 2015-12-04,17.43,17.65,14.69,14.81,14.81,0 140 | 2015-12-07,15.65,17.18,15.58,15.84,15.84,0 141 | 2015-12-08,17.690001000000006,18.33,16.52,17.6,17.6,0 142 | 2015-12-10,19.25,19.719998999999998,18.129998999999998,19.34,19.34,0 143 | 2015-12-11,21.360001,25.27,20.879998999999998,24.389999,24.389999,0 144 | 2015-12-14,24.700001,26.809998999999998,21.469998999999998,22.73,22.73,0 145 | 2015-12-15,20.76,21.620001000000002,20.02,20.950001,20.950001,0 146 | 2015-12-16,19.25,20.24,17.120001000000002,17.860001,17.860001,0 147 | 2015-12-17,16.18,19.049999,16.129998999999998,18.940001000000002,18.940001000000002,0 148 | 2015-12-21,19.639999,20.209999,18.700001,18.700001,18.700001,0 149 | 2015-12-22,17.610001,18.219998999999998,,16.6,16.6,0 150 | 2015-12-23,15.86,16.25,15.33,15.57,15.57,0 151 | 2015-12-24,15.44,15.88,14.45,15.74,15.74,0 152 | 2015-12-28,17.65,18.129998999999998,16.879998999999998,16.91,16.91,0 153 | 2015-12-29,15.91,16.48,15.63,16.08,16.08,0 154 | 2015-12-30,16.5,17.42,16.5,17.290001,17.290001,0 155 | 2015-12-31,17.969998999999994,20.389999,17.51,18.209999,18.209999,0 156 | 2016-01-04,22.48,23.360001,20.67,20.700001,20.700001,0 157 | 2016-01-05,20.75,21.059998999999998,19.25,19.34,19.34,0 158 | 2016-01-06,21.67,21.860001,19.799999,20.59,20.59,0 159 | 2016-01-07,23.219998999999998,25.860001,22.4,24.99,24.99,0 160 | 2016-01-08,22.959999,27.08,22.48,27.01,27.01,0 161 | 2016-01-11,25.58,27.389999,23.83,24.299999,24.299999,0 162 | 2016-01-12,22.969998999999998,23.93,21.91,22.469998999999998,22.469998999999998,0 163 | 2016-01-13,21.719998999999998,26.110001,21.440001000000002,25.219998999999998,25.219998999999998,0 164 | 2016-01-14,24.75,26.280001000000002,23.07,23.950001,23.950001,0 165 | 2016-01-15,28.959999,30.950001,26.67,27.02,27.02,0 166 | 2016-01-19,25.4,27.59,,26.049999,26.049999,0 167 | 2016-01-20,27.780001000000002,32.09,26.59,27.59,27.59,0 168 | 2016-01-21,27.790001,28.43,25.01,26.690001000000002,26.690001000000002,0 169 | 2016-01-22,24.209999,24.549999,22.219998999999998,22.34,22.34,0 170 | 2016-01-25,23.299999,24.309998999999998,22.379998999999998,24.15,24.15,0 171 | 2016-01-26,23.75,24.02,22.33,22.5,22.5,0 172 | 2016-01-27,22.879998999999998,27.219998999999998,20.42,23.110001,23.110001,0 173 | 2016-01-28,22.15,23.809998999999998,21.9,22.42,22.42,0 174 | 2016-01-29,21.59,21.74,19.5,20.200001,20.200001,0 175 | 2016-02-01,21.32,23.66,19.610001,19.98,19.98,0 176 | 2016-02-02,21.34,22.42,21.059998999999998,21.98,21.98,0 177 | 2016-02-03,21.49,27.700001,21.42,21.65,21.65,0 178 | 2016-02-04,22.290001,23.139999,21.24,21.84,21.84,0 179 | 2016-02-05,22.09,24.110001,21.91,23.379998999999998,23.379998999999998,0 180 | 2016-02-08,25.889999,27.719998999999998,25.559998999999998,26.0,26.0,0 181 | 2016-02-09,28.299999,28.309998999999998,25.99,26.540001,26.540001,0 182 | 2016-02-10,25.75,26.6,24.469998999999998,26.290001,26.290001,0 183 | 2016-02-11,29.01,30.9,26.67,28.139999,28.139999,0 184 | 2016-02-12,27.16,27.57,24.92,25.4,25.4,0 185 | 2016-02-16,24.959999,25.52,23.32,24.110001,24.110001,0 186 | 2016-02-17,23.4,24.16,21.83,22.309998999999998,22.309998999999998,0 187 | 2016-02-19,22.389999,23.440001000000002,20.52,20.530001000000002,20.530001000000002,0 188 | 2016-02-22,20.139999,20.35,19.02,19.379998999999998,19.379998999999998,0 189 | 2016-02-23,19.75,21.16,19.540001,20.98,20.98,0 190 | 2016-02-24,22.280001000000002,22.870001000000002,20.26,20.719998999999998,20.719998999999998,0 191 | 2016-02-25,20.540001,21.26,19.1,19.110001,19.110001,0 192 | 2016-02-26,-400.0,20.129998999999998,18.459999,19.809998999999998,19.809998999999998,0 193 | 2016-02-29,20.49,20.809998999999998,18.379998999999998,20.549999,20.549999,0 194 | 2016-03-01,19.84,20.17,,17.700001,17.700001,0 195 | 2016-03-02,17.98,18.41,16.780001000000002,17.09,17.09,0 196 | 2016-03-03,17.25,17.559998999999998,16.32,16.700001,16.700001,0 197 | 2016-03-04,16.48,17.35,16.049999,16.860001,16.860001,0 198 | 2016-03-07,17.98,18.040001,16.870001000000002,17.35,17.35,0 199 | 2016-03-08,18.379998999999998,18.889999,17.82,18.67,18.67,0 200 | 2016-03-09,18.559998999999998,19.110001,18.309998999999998,18.34,18.34,0 201 | 2016-03-10,18.17,19.59,17.059998999999998,18.049999,18.049999,0 202 | 2016-03-11,17.09,17.27,16.280001000000002,16.5,16.5,0 203 | 2016-03-14,17.01,17.67,16.690001000000002,16.92,16.92,0 204 | 2016-03-15,17.6,17.85,16.84,16.84,16.84,0 205 | 2016-03-16,15.96,16.33,14.89,14.99,14.99,0 206 | 2016-03-17,15.34,15.38,13.82,14.44,14.44,0 207 | 2016-03-18,14.05,14.36,13.75,14.02,14.02,0 208 | 2016-03-21,14.57,14.73,13.79,13.79,13.79,0 209 | 2016-03-22,14.57,14.76,13.75,14.17,14.17,0 210 | 2016-03-24,16.299999,16.440001000000002,330.0,14.74,14.74,0 211 | 2016-03-28,15.65,16.040001,14.89,15.24,15.24,0 212 | 2016-03-29,15.74,15.89,,13.82,13.82,0 213 | 2016-03-30,13.69,13.89,13.06,13.56,13.56,0 214 | 2016-03-31,13.73,14.28,13.49,13.95,13.95,0 215 | 2016-04-01,15.23,15.28,,13.1,13.1,0 216 | 2016-04-04,13.88,14.24,13.66,14.12,14.12,0 217 | 2016-04-05,15.39,15.72,14.93,15.42,15.42,0 218 | 2016-04-06,15.61,15.98,14.0,14.09,14.09,0 219 | 2016-04-07,15.14,16.77,14.68,16.16,16.16,0 220 | 2016-04-08,15.34,15.93,14.84,15.36,15.36,0 221 | 2016-04-11,15.34,16.26,14.83,16.26,16.26,0 222 | 2016-04-12,15.98,16.57,14.84,14.85,14.85,0 223 | 2016-04-13,14.49,14.53,13.6,13.84,13.84,0 224 | 2016-04-14,13.9,14.12,13.38,13.72,13.72,0 225 | 2016-04-15,13.77,14.19,13.58,13.62,13.62,0 226 | 2016-04-18,14.87,14.94,13.23,13.35,13.35,0 227 | 2016-04-19,13.18,13.88,12.98,13.24,13.24,0 228 | 2016-04-20,13.39,13.5,12.5,13.28,13.28,0 229 | 2016-04-21,13.2,14.14,13.16,13.95,13.95,0 230 | 2016-04-22,13.7,14.19,13.15,13.22,13.22,0 231 | 2016-04-25,14.07,14.76,13.86,14.08,14.08,0 232 | 2016-04-26,14.01,14.43,13.66,13.96,13.96,0 233 | 2016-04-27,14.15,14.95,13.5,13.77,13.77,0 234 | 2016-04-28,14.53,15.61,13.3,15.22,15.22,0 235 | 2016-04-29,15.21,17.09,,15.7,15.7,0 236 | 2016-05-02,16.33,16.5,14.48,14.68,14.68,0 237 | 2016-05-03,14.92,16.42,14.91,15.6,15.6,0 238 | 2016-05-04,15.47,16.85,15.39,16.049999,16.049999,0 239 | 2016-05-05,15.54,16.450001,15.22,15.91,15.91,0 240 | 2016-05-06,16.200001,16.58,14.71,14.72,14.72,0 241 | 2016-05-09,15.2,15.39,14.17,14.57,14.57,0 242 | 2016-05-10,13.98,14.35,13.55,13.63,13.63,0 243 | 2016-05-11,13.92,14.69,13.29,14.69,14.69,0 244 | 2016-05-12,14.55,15.42,13.95,14.41,14.41,0 245 | 2016-05-13,15.15,15.47,13.97,15.04,15.04,0 246 | 2016-05-16,15.72,15.98,14.28,14.68,14.68,0 247 | 2016-05-17,14.57,16.120001000000002,14.48,15.57,15.57,0 248 | 2016-05-18,15.72,16.469998999999998,14.86,15.95,15.95,0 249 | 2016-05-19,16.370001000000002,17.65,16.280001000000002,16.33,16.33,0 250 | 2016-05-20,16.129998999999998,16.299999,15.11,15.2,15.2,0 251 | 2016-05-23,16.33,16.469998999999998,15.4,15.82,15.82,0 252 | 2016-05-24,16.030001000000002,16.059998999999998,14.36,14.42,14.42,0 253 | 2016-05-26,13.8,14.11,13.43,13.43,13.43,0 254 | 2016-05-27,13.49,13.76,13.04,13.12,13.12,0 255 | 2016-05-31,13.94,15.0,13.45,14.19,14.19,0 256 | 2016-06-01,14.45,15.25,14.18,14.2,14.2,0 257 | 2016-06-02,14.42,14.92,13.62,13.63,13.63,0 258 | 2016-06-03,13.78,14.66,12.9,13.47,13.47,0 259 | 2016-06-06,13.84,14.27,13.42,13.65,13.65,0 260 | 2016-06-07,12.77,14.05,12.72,14.05,14.05,0 261 | 2016-06-08,13.84,14.27,13.7,14.08,14.08,0 262 | 2016-06-09,14.01,14.85,13.99,14.64,14.64,0 263 | 2016-06-10,14.89,17.33,14.85,17.030001000000002,17.030001000000002,0 264 | 2016-06-13,18.24,21.01,17.889999,20.969998999999998,20.969998999999998,0 265 | 2016-06-14,21.280001000000002,22.16,20.27,20.5,20.5,0 266 | 2016-06-15,20.25,20.450001,18.629998999999998,20.139999,20.139999,0 267 | 2016-06-16,20.799999,22.889999,19.24,19.370001000000002,19.370001000000002,0 268 | 2016-06-17,19.42,20.030001000000002,18.709999,19.41,19.41,0 269 | 2016-06-20,17.42,18.549999,16.59,18.370001000000002,18.370001000000002,0 270 | 2016-06-21,17.67,18.959999,16.91,18.48,18.48,0 271 | 2016-06-22,18.26,21.219998999999998,17.83,21.17,21.17,0 272 | 2016-06-23,19.540001,19.790001,17.25,17.25,17.25,0 273 | 2016-06-24,26.059998999999998,26.24,,25.76,25.76,0 274 | 2016-06-27,24.379998999999998,26.719998999999998,22.93,23.85,23.85,0 275 | 2016-06-28,21.76,22.07,18.75,18.75,18.75,0 276 | 2016-06-29,18.120001000000002,18.27,16.48,16.639999,16.639999,0 277 | 2016-07-01,15.59,15.86,14.61,14.77,14.77,0 278 | 2016-07-05,16.049999,16.620001000000002,15.49,15.58,15.58,0 279 | 2016-07-06,15.87,17.040001,14.96,14.96,14.96,0 280 | 2016-07-07,14.8,15.98,14.33,14.76,14.76,0 281 | 2016-07-11,13.25,13.67,13.0,13.54,13.54,0 282 | 2016-07-12,12.93,13.93,,13.55,13.55,0 283 | 2016-07-13,13.32,13.79,12.92,13.04,13.04,0 284 | 2016-07-14,12.5,13.37,12.14,12.82,12.82,0 285 | 2016-07-15,13.12,13.22,12.27,12.67,12.67,0 286 | 2016-07-18,12.75,13.12,12.33,12.44,12.44,0 287 | 2016-07-19,12.53,12.83,11.94,11.97,11.97,0 288 | 2016-07-21,11.8,13.06,11.69,12.74,12.74,0 289 | 2016-07-22,12.8,12.88,11.97,12.02,12.02,0 290 | 2016-07-25,12.64,13.72,12.39,12.87,12.87,0 291 | 2016-07-26,12.88,13.5,12.8,13.05,13.05,0 292 | 2016-07-27,12.61,13.74,12.5,12.83,12.83,0 293 | 2016-07-28,12.51,13.52,12.36,12.72,12.72,0 294 | 2016-07-29,12.85,12.9,11.77,11.87,11.87,0 295 | 2016-08-01,11.89,12.98,11.86,12.44,12.44,0 296 | 2016-08-02,12.39,14.24,12.35,13.37,13.37,0 297 | 2016-08-03,13.53,13.91,12.73,12.86,12.86,0 298 | 2016-08-04,12.73,12.98,11.79,12.42,12.42,0 299 | 2016-08-05,12.08,12.26,11.18,11.39,11.39,0 300 | 2016-08-08,11.66,11.78,11.41,11.5,11.5,0 301 | 2016-08-09,11.4,11.92,,11.66,11.66,0 302 | 2016-08-10,11.55,12.5,11.37,12.05,12.05,0 303 | 2016-08-11,11.93,12.11,11.38,11.68,11.68,0 304 | 2016-08-16,12.04,12.78,11.87,12.64,12.64,0 305 | 2016-08-17,12.57,13.71,12.14,12.19,12.19,0 306 | 2016-08-18,12.2,12.53,11.42,11.43,11.43,0 307 | 2016-08-22,12.53,13.02,11.94,12.27,12.27,0 308 | 2016-08-23,12.15,12.44,,12.38,12.38,0 309 | 2016-08-24,12.7,14.01,12.3,13.45,13.45,0 310 | 2016-08-25,13.62,14.09,13.29,13.63,13.63,0 311 | 2016-08-26,13.54,14.93,12.13,13.65,13.65,0 312 | 2016-08-29,14.09,14.43,330.0,12.94,12.94,0 313 | 2016-08-30,12.94,13.6,12.7,13.12,13.12,0 314 | 2016-08-31,13.14,14.34,12.97,13.42,13.42,0 315 | 2016-09-01,13.07,14.61,12.99,13.48,13.48,0 316 | 2016-09-02,13.47,13.9,11.9,11.98,11.98,0 317 | 2016-09-06,12.42,12.93,11.85,12.02,12.02,0 318 | 2016-09-07,11.89,12.45,11.77,11.94,11.94,0 319 | 2016-09-08,11.74,12.6,11.65,12.51,12.51,0 320 | 2016-09-09,12.52,17.540001,12.52,17.5,17.5,0 321 | 2016-09-12,20.129998999999998,20.51,14.76,15.16,15.16,0 322 | 2016-09-13,15.98,18.969998999999998,15.83,17.85,17.85,0 323 | 2016-09-14,17.629998999999994,18.139999,16.34,18.139999,18.139999,0 324 | 2016-09-15,17.969998999999994,18.07,15.74,16.299999,16.299999,0 325 | 2016-09-16,16.41,17.1,15.28,15.37,15.37,0 326 | 2016-09-19,15.14,15.96,14.6,15.53,15.53,0 327 | 2016-09-20,14.98,16.09,14.69,15.92,15.92,0 328 | 2016-09-21,15.07,15.65,12.98,13.3,13.3,0 329 | 2016-09-22,13.39,13.39,11.76,12.02,12.02,0 330 | 2016-09-23,12.0,12.58,11.93,12.29,12.29,0 331 | 2016-09-26,13.26,14.63,13.26,14.5,14.5,0 332 | 2016-09-27,13.36,14.76,12.97,13.1,13.1,0 333 | 2016-09-28,12.9,13.57,12.24,12.39,12.39,0 334 | 2016-09-29,12.53,15.69,12.14,14.02,14.02,0 335 | 2016-09-30,14.91,15.2,12.53,13.29,13.29,0 336 | 2016-10-03,13.75,14.42,13.42,13.57,13.57,0 337 | 2016-10-05,13.56,13.68,12.7,12.99,12.99,0 338 | 2016-10-06,13.11,13.84,12.8,12.84,12.84,0 339 | 2016-10-10,14.19,14.36,13.29,13.38,13.38,0 340 | 2016-10-11,13.71,16.469998999999998,13.69,15.36,15.36,0 341 | 2016-10-12,15.53,16.34,15.26,15.91,15.91,0 342 | 2016-10-13,16.879998999999998,17.950001,16.139999,16.690001000000002,16.690001000000002,0 343 | 2016-10-14,16.49,16.5,15.25,16.120001000000002,16.120001000000002,0 344 | 2016-10-17,17.01,17.110001,16.129998999999998,16.209999,16.209999,0 345 | 2016-10-18,15.82,15.85,15.03,15.28,15.28,0 346 | 2016-10-19,15.45,15.68,13.87,14.41,14.41,0 347 | 2016-10-20,14.43,14.72,13.74,13.75,13.75,0 348 | 2016-10-21,14.04,14.53,13.27,13.34,13.34,0 349 | 2016-10-24,13.19,13.26,12.83,13.02,13.02,0 350 | 2016-10-25,12.91,13.86,12.73,13.46,13.46,0 351 | 2016-10-26,13.66,14.8,13.66,14.24,14.24,0 352 | 2016-10-27,14.37,15.43,13.6,15.36,15.36,0 353 | 2016-10-28,15.67,17.35,14.65,16.190001000000002,16.190001000000002,0 354 | 2016-10-31,16.309998999999998,17.629998999999994,16.25,17.059998999999998,17.059998999999998,0 355 | 2016-11-01,16.540001,20.43,16.51,18.559998999999998,18.559998999999998,0 356 | 2016-11-02,19.09,19.82,18.559998999999998,19.32,19.32,0 357 | 2016-11-03,19.85,22.57,18.84,22.08,22.08,0 358 | 2016-11-04,21.860001,23.01,19.200001,22.51,22.51,0 359 | 2016-11-07,19.780001000000002,19.860001,18.389999,18.709999,18.709999,0 360 | 2016-11-08,18.92,19.91,17.700001,18.74,18.74,0 361 | 2016-11-09,20.700001,21.48,14.33,14.38,14.38,0 362 | 2016-11-10,14.01,16.299999,13.26,14.74,14.74,0 363 | 2016-11-11,14.83,16.0,14.15,14.17,14.17,0 364 | 2016-11-14,14.69,15.56,14.39,14.48,14.48,0 365 | 2016-11-15,14.16,14.65,13.3,13.37,13.37,0 366 | 2016-11-16,13.51,14.49,13.51,13.72,13.72,0 367 | 2016-11-17,13.37,13.55,12.97,13.35,13.35,0 368 | 2016-11-18,13.56,13.74,12.85,12.85,12.85,0 369 | 2016-11-21,13.27,13.44,12.16,12.42,12.42,0 370 | 2016-11-22,12.26,12.83,12.2,12.41,12.41,0 371 | 2016-11-23,12.34,13.01,12.19,12.43,12.43,0 372 | 2016-11-25,12.52,12.74,12.31,12.34,12.34,0 373 | 2016-11-28,13.4,13.5,12.74,13.15,13.15,0 374 | 2016-11-29,13.07,13.55,12.62,12.9,12.9,0 375 | 2016-11-30,12.6,13.42,12.23,13.33,13.33,0 376 | 2016-12-01,13.4,14.72,13.05,14.07,14.07,0 377 | 2016-12-02,14.16,14.48,12.39,14.12,14.12,0 378 | 2016-12-05,13.75,13.77,12.14,12.14,12.14,0 379 | 2016-12-06,12.19,12.3,,11.79,11.79,0 380 | 2016-12-07,11.59,12.24,11.33,12.22,12.22,0 381 | 2016-12-08,12.1,13.4,11.3,12.64,12.64,0 382 | 2016-12-09,12.59,12.72,11.67,11.75,11.75,0 383 | 2016-12-12,12.23,12.78,12.07,12.64,12.64,0 384 | 2016-12-13,12.46,13.42,12.34,12.72,12.72,0 385 | 2016-12-14,12.88,13.39,12.48,13.19,13.19,0 386 | 2016-12-15,13.07,13.24,12.46,12.79,12.79,0 387 | 2016-12-16,12.88,12.95,12.15,12.2,12.2,0 388 | 2016-12-19,12.5,12.52,11.67,11.71,11.71,0 389 | 2016-12-20,11.65,11.75,11.38,11.45,11.45,0 390 | 2016-12-21,11.44,11.49,10.93,11.27,11.27,0 391 | 2016-12-22,11.32,11.67,11.14,11.43,11.43,0 392 | 2016-12-23,11.38,11.81,11.35,11.44,11.44,0 393 | 2016-12-27,12.26,12.33,11.84,11.99,11.99,0 394 | 2016-12-28,11.89,13.04,11.85,12.95,12.95,0 395 | 2016-12-29,13.15,13.71,12.95,13.37,13.37,0 396 | 2016-12-30,13.2,14.68,13.05,14.04,14.04,0 397 | 2017-01-03,14.07,14.07,12.85,12.85,12.85,0 398 | 2017-01-04,12.78,12.8,11.63,11.85,11.85,0 399 | 2017-01-05,11.96,12.09,11.4,11.67,11.67,0 400 | 2017-01-06,11.7,11.74,10.98,11.32,11.32,0 401 | 2017-01-09,11.71,12.08,,11.56,11.56,0 402 | 2017-01-10,11.59,11.79,11.31,11.49,11.49,0 403 | 2017-01-11,11.56,12.23,11.21,11.26,11.26,0 404 | 2017-01-12,11.48,12.6,11.32,11.54,11.54,0 405 | 2017-01-13,11.45,11.62,10.94,11.23,11.23,0 406 | 2017-01-17,12.2,12.75,11.79,11.87,11.87,0 407 | 2017-01-18,11.79,12.81,11.69,12.48,12.48,0 408 | 2017-01-19,12.58,13.28,12.17,12.78,12.78,0 409 | 2017-01-23,12.3,12.62,11.59,11.77,11.77,0 410 | 2017-01-25,10.79,11.05,10.51,10.81,10.81,0 411 | 2017-01-26,10.61,11.01,10.6,10.63,10.63,0 412 | 2017-01-27,10.57,10.82,10.3,10.58,10.58,0 413 | 2017-01-30,11.1,12.9,11.1,11.88,11.88,0 414 | 2017-01-31,12.29,12.99,11.79,11.99,11.99,0 415 | 2017-02-01,11.79,12.05,9.97,11.81,11.81,0 416 | 2017-02-02,12.37,12.47,11.62,11.93,11.93,0 417 | 2017-02-03,11.84,11.84,10.72,10.97,10.97,0 418 | 2017-02-06,11.37,11.84,11.09,11.37,11.37,0 419 | 2017-02-07,11.39,11.67,11.06,11.29,11.29,0 420 | 2017-02-08,11.19,11.82,11.15,11.45,11.45,0 421 | 2017-02-09,11.44,11.53,,10.88,10.88,0 422 | 2017-02-10,10.85,10.95,10.55,10.85,10.85,0 423 | 2017-02-13,11.36,11.4,11.07,11.07,11.07,0 424 | 2017-02-14,11.17,11.34,10.73,10.74,10.74,0 425 | 2017-02-15,10.84,12.01,10.8,11.97,11.97,0 426 | 2017-02-16,12.02,12.86,11.69,11.76,11.76,0 427 | 2017-02-17,11.84,12.26,11.37,11.49,11.49,0 428 | 2017-02-21,12.05,12.09,11.5,11.57,11.57,0 429 | 2017-02-22,11.48,12.07,11.44,11.74,11.74,0 430 | 2017-02-23,11.66,12.46,11.54,11.71,11.71,0 431 | 2017-02-24,11.81,12.59,11.34,11.47,11.47,0 432 | 2017-02-27,11.78,12.14,11.53,12.09,12.09,0 433 | 2017-02-28,12.19,12.96,12.13,12.92,12.92,0 434 | 2017-03-01,12.31,12.58,11.78,12.54,12.54,0 435 | 2017-03-02,12.43,12.71,11.32,11.81,11.81,0 436 | 2017-03-03,11.96,11.97,10.94,10.96,10.96,0 437 | 2017-03-06,11.59,11.72,11.06,11.24,11.24,0 438 | 2017-03-07,11.27,11.58,11.04,11.45,11.45,0 439 | 2017-03-08,11.49,11.86,,11.86,11.86,0 440 | 2017-03-09,11.75,12.43,11.62,12.3,12.3,0 441 | 2017-03-10,11.97,12.09,11.46,11.66,11.66,0 442 | 2017-03-14,11.39,12.54,11.28,12.3,12.3,0 443 | 2017-03-15,12.12,12.25,10.6,11.63,11.63,0 444 | 2017-03-16,11.29,11.55,11.16,11.21,11.21,0 445 | 2017-03-17,11.38,11.38,10.78,11.28,11.28,0 446 | 2017-03-20,-400.0,11.72,11.03,11.34,11.34,0 447 | 2017-03-21,11.15,12.85,10.92,12.47,12.47,0 448 | 2017-03-22,12.95,13.16,11.99,12.81,12.81,0 449 | 2017-03-23,12.65,13.17,12.18,13.12,13.12,0 450 | 2017-03-24,12.86,14.16,12.27,12.96,12.96,0 451 | 2017-03-27,14.78,15.11,12.48,12.5,12.5,0 452 | 2017-03-28,12.44,12.67,11.34,11.53,11.53,0 453 | 2017-03-29,11.54,11.7,11.03,11.42,11.42,0 454 | 2017-03-30,11.37,11.64,11.12,11.54,11.54,0 455 | 2017-03-31,11.61,12.54,11.5,12.37,12.37,0 456 | 2017-04-03,12.59,13.59,12.27,12.38,12.38,0 457 | 2017-04-04,12.71,13.07,11.7,11.79,11.79,0 458 | 2017-04-05,11.89,12.89,10.9,12.89,12.89,0 459 | 2017-04-06,13.11,13.22,,12.39,12.39,0 460 | 2017-04-07,13.17,13.43,12.23,12.87,12.87,0 461 | 2017-04-10,13.24,14.11,12.94,14.05,14.05,0 462 | 2017-04-11,14.32,15.88,14.17,15.07,15.07,0 463 | 2017-04-12,15.16,16.16,14.84,15.77,15.77,0 464 | 2017-04-13,15.89,16.219998999999998,14.97,15.96,15.96,0 465 | 2017-04-17,16.190001000000002,16.280001000000002,14.6,14.66,14.66,0 466 | 2017-04-18,14.5,15.5,14.29,14.42,14.42,0 467 | 2017-04-19,14.0,15.15,13.46,14.93,14.93,0 468 | 2017-04-20,14.59,14.81,13.83,14.15,14.15,0 469 | 2017-04-21,13.85,15.33,13.85,14.63,14.63,0 470 | 2017-04-24,11.56,12.01,10.82,10.84,10.84,0 471 | 2017-04-25,10.81,11.15,10.22,10.76,10.76,0 472 | 2017-04-26,10.61,10.89,,10.85,10.85,0 473 | 2017-04-27,10.72,11.08,10.33,10.36,10.36,0 474 | 2017-04-28,10.39,11.16,10.29,10.82,10.82,0 475 | 2017-05-01,10.92,11.04,9.9,10.11,10.11,0 476 | 2017-05-02,10.15,10.59,10.04,10.59,10.59,0 477 | 2017-05-03,10.56,11.15,10.4,10.68,10.68,0 478 | 2017-05-04,10.71,11.24,10.27,10.46,10.46,0 479 | 2017-05-05,10.51,10.98,9.99,10.57,10.57,0 480 | 2017-05-08,10.53,10.55,9.67,9.77,9.77,0 481 | 2017-05-09,9.87,10.14,9.56,9.96,9.96,0 482 | 2017-05-10,9.75,10.24,9.62,10.21,10.21,0 483 | 2017-05-11,10.34,11.23,10.32,10.6,10.6,0 484 | 2017-05-12,10.72,10.87,10.28,10.4,10.4,0 485 | 2017-05-15,10.54,10.88,10.25,10.42,10.42,0 486 | 2017-05-16,10.46,10.67,10.18,10.65,10.65,0 487 | 2017-05-17,11.89,15.59,11.53,15.59,15.59,0 488 | 2017-05-18,14.06,16.299999,14.03,14.66,14.66,0 489 | 2017-05-19,14.23,14.23,11.72,12.04,12.04,0 490 | 2017-05-22,12.29,12.52,10.89,10.93,10.93,0 491 | 2017-05-23,11.0,11.0,10.56,10.72,10.72,0 492 | 2017-05-24,10.61,10.9,9.88,10.02,10.02,0 493 | 2017-05-25,9.82,10.29,9.72,9.99,9.99,0 494 | 2017-05-26,9.93,10.48,9.65,9.81,9.81,0 495 | 2017-05-30,10.61,10.84,10.14,10.38,10.38,0 496 | 2017-05-31,10.1,11.3,9.93,10.41,10.41,0 497 | 2017-06-01,10.42,10.54,9.69,9.89,9.89,0 498 | 2017-06-02,10.08,10.3,9.58,9.75,9.75,0 499 | 2017-06-05,10.08,10.28,9.6,10.07,10.07,0 500 | 2017-06-06,10.19,10.77,9.86,10.45,10.45,0 501 | 2017-06-07,10.48,10.93,10.12,10.39,10.39,0 502 | 2017-06-08,10.27,10.53,9.73,10.16,10.16,0 503 | 2017-06-09,9.93,12.11,9.37,10.7,10.7,0 504 | 2017-06-12,11.19,12.37,11.19,11.46,11.46,0 505 | 2017-06-13,11.12,11.14,10.26,10.42,10.42,0 506 | 2017-06-14,10.33,11.26,10.01,10.64,10.64,0 507 | 2017-06-15,11.06,12.01,10.74,10.9,10.9,0 508 | 2017-06-16,10.63,11.35,10.26,10.38,10.38,0 509 | 2017-06-19,10.57,10.6,10.01,10.37,10.37,0 510 | 2017-06-20,10.28,11.15,10.24,10.86,10.86,0 511 | 2017-06-21,11.03,11.4,10.4,10.75,10.75,0 512 | 2017-06-22,10.81,11.01,10.24,10.48,10.48,0 513 | 2017-06-23,10.25,10.69,9.85,10.02,10.02,0 514 | 2017-06-26,10.13,10.44,9.68,9.9,9.9,0 515 | 2017-06-27,10.04,11.31,9.8,11.06,11.06,0 516 | 2017-06-28,11.17,11.49,9.76,10.03,10.03,0 517 | 2017-06-29,9.79,15.16,9.73,11.44,11.44,0 518 | 2017-06-30,11.74,11.85,10.4,11.18,11.18,0 519 | 2017-07-03,11.07,11.45,10.28,11.22,11.22,0 520 | 2017-07-05,11.2,12.03,10.79,11.07,11.07,0 521 | 2017-07-06,11.2,13.05,11.18,12.54,12.54,0 522 | 2017-07-07,12.48,12.57,10.98,11.19,11.19,0 523 | 2017-07-10,11.26,11.73,10.61,11.11,11.11,0 524 | 2017-07-11,10.79,12.14,10.68,10.89,10.89,0 525 | 2017-07-12,10.85,10.85,10.08,10.3,10.3,0 526 | 2017-07-13,10.07,10.4,9.9,9.9,9.9,0 527 | 2017-07-14,10.09,10.14,9.5,9.51,9.51,0 528 | 2017-07-18,9.86,10.35,9.66,9.89,9.89,0 529 | 2017-07-19,9.69,9.94,9.58,9.79,9.79,0 530 | 2017-07-20,9.66,10.28,9.5,9.58,9.58,0 531 | 2017-07-21,9.52,9.98,9.3,9.36,9.36,0 532 | 2017-07-24,9.94,9.97,9.26,9.43,9.43,0 533 | 2017-07-25,9.4,9.52,9.04,9.43,9.43,0 534 | 2017-07-26,9.25,9.66,8.84,9.6,9.6,0 535 | 2017-07-27,9.33,11.5,9.16,10.11,10.11,0 536 | 2017-07-28,10.62,11.3,10.26,10.29,10.29,0 537 | 2017-08-01,10.19,10.56,9.95,10.09,10.09,0 538 | 2017-08-02,10.08,10.81,9.8,10.28,10.28,0 539 | 2017-08-03,10.47,10.6,9.9,10.44,10.44,0 540 | 2017-08-04,10.48,10.5,9.68,10.03,10.03,0 541 | 2017-08-07,10.19,10.32,9.76,9.93,9.93,0 542 | 2017-08-08,10.04,11.52,9.52,10.96,10.96,0 543 | 2017-08-09,11.49,12.63,11.11,11.11,11.11,0 544 | 2017-08-10,11.57,16.17,,16.040001,16.040001,0 545 | 2017-08-11,16.17,17.280001000000002,14.5,15.51,15.51,0 546 | 2017-08-14,14.05,14.05,12.06,12.33,12.33,0 547 | 2017-08-15,11.78,12.37,11.45,12.04,12.04,0 548 | 2017-08-16,11.59,12.54,11.25,11.74,11.74,0 549 | 2017-08-17,11.81,15.77,11.54,15.55,15.55,0 550 | 2017-08-18,15.38,16.040001,13.32,14.26,14.26,0 551 | 2017-08-21,14.59,14.74,13.07,13.19,13.19,0 552 | 2017-08-22,12.6,12.94,11.35,11.35,11.35,0 553 | 2017-08-23,11.51,12.59,11.39,12.25,12.25,0 554 | 2017-08-24,12.06,12.83,11.55,12.23,12.23,0 555 | 2017-08-25,12.2,12.45,11.1,11.28,11.28,0 556 | 2017-08-28,12.09,12.11,11.23,11.32,11.32,0 557 | 2017-08-29,13.33,14.34,11.48,11.7,11.7,0 558 | 2017-08-30,11.4,11.98,10.96,11.22,11.22,0 559 | 2017-08-31,11.07,11.22,10.34,10.59,10.59,0 560 | 2017-09-01,10.33,10.46,10.02,10.13,10.13,0 561 | 2017-09-05,11.75,14.06,11.41,12.23,12.23,0 562 | 2017-09-06,12.27,12.59,11.35,11.63,11.63,0 563 | 2017-09-07,11.93,12.07,11.32,11.55,11.55,0 564 | 2017-09-08,11.87,12.6,11.84,12.12,12.12,0 565 | 2017-09-11,11.38,11.39,10.51,10.73,10.73,0 566 | 2017-09-12,10.66,10.95,10.29,10.58,10.58,0 567 | 2017-09-13,10.72,10.86,10.33,10.5,10.5,0 568 | 2017-09-14,10.57,11.04,10.28,10.44,10.44,0 569 | 2017-09-15,10.51,10.74,10.0,10.17,10.17,0 570 | 2017-09-19,10.16,10.3,9.85,10.18,10.18,0 571 | 2017-09-20,10.04,10.67,9.67,9.78,9.78,0 572 | 2017-09-22,9.9,10.2,9.5,9.59,9.59,0 573 | 2017-09-25,10.08,11.21,9.79,10.21,10.21,0 574 | 2017-09-26,10.42,10.68,9.94,10.17,10.17,0 575 | 2017-09-27,9.9,10.42,9.63,9.87,9.87,0 576 | 2017-09-28,9.74,10.13,9.55,9.55,9.55,0 577 | 2017-09-29,9.59,9.83,,9.51,9.51,0 578 | 2017-10-02,9.59,10.04,9.37,9.45,9.45,0 579 | 2017-10-03,9.3,9.75,9.3,9.51,9.51,0 580 | 2017-10-04,9.53,9.88,9.53,9.63,9.63,0 581 | 2017-10-05,9.48,9.62,9.13,9.19,9.19,0 582 | 2017-10-06,9.23,10.27,9.11,9.65,9.65,0 583 | 2017-10-09,9.92,10.53,9.88,10.33,10.33,0 584 | 2017-10-10,10.15,10.66,9.94,10.08,10.08,0 585 | 2017-10-11,9.95,10.38,9.72,9.85,9.85,0 586 | 2017-10-13,9.95,9.98,9.44,9.61,9.61,0 587 | 2017-10-16,9.95,10.02,9.75,9.91,9.91,0 588 | 2017-10-17,9.85,10.46,9.78,10.31,10.31,0 589 | 2017-10-18,10.34,10.41,9.87,10.07,10.07,0 590 | 2017-10-19,10.22,11.77,9.99,10.05,10.05,0 591 | 2017-10-20,9.92,10.04,9.29,9.97,9.97,0 592 | 2017-10-23,10.25,11.08,9.94,11.07,11.07,0 593 | 2017-10-24,10.89,11.16,10.39,11.16,11.16,0 594 | 2017-10-25,11.34,13.2,10.99,11.23,11.23,0 595 | 2017-10-27,11.12,11.12,9.74,9.8,9.8,0 596 | 2017-10-30,10.28,10.89,10.1,10.5,10.5,0 597 | 2017-10-31,10.34,10.37,9.9,10.18,10.18,0 598 | 2017-11-02,10.44,10.89,9.67,9.93,9.93,0 599 | 2017-11-03,9.83,9.91,8.99,9.14,9.14,0 600 | 2017-11-06,9.63,9.74,,9.4,9.4,0 601 | 2017-11-07,9.31,10.31,9.29,9.89,9.89,0 602 | 2017-11-08,9.79,10.27,9.5,9.78,9.78,0 603 | 2017-11-09,9.94,12.19,9.79,10.5,10.5,0 604 | 2017-11-10,10.78,11.58,10.5,11.29,11.29,0 605 | 2017-11-13,11.43,12.18,11.0,11.5,11.5,0 606 | 2017-11-14,11.53,12.61,11.45,11.59,11.59,0 607 | 2017-11-15,12.52,14.51,12.33,13.13,13.13,0 608 | 2017-11-16,12.47,12.52,11.38,11.76,11.76,0 609 | 2017-11-17,11.75,12.01,11.16,11.43,11.43,0 610 | 2017-11-20,11.96,12.08,10.44,10.65,10.65,0 611 | 2017-11-22,9.6,9.88,9.32,9.88,9.88,0 612 | 2017-11-24,9.82,9.96,8.56,9.67,9.67,0 613 | 2017-11-27,10.07,10.26,9.79,9.87,9.87,0 614 | 2017-11-28,9.72,10.31,9.53,10.03,10.03,0 615 | 2017-11-29,9.91,10.93,9.81,10.7,10.7,0 616 | 2017-11-30,10.49,12.05,10.25,11.28,11.28,0 617 | 2017-12-01,11.19,14.58,10.54,11.43,11.43,0 618 | 2017-12-04,11.05,11.86,10.26,11.68,11.68,0 619 | 2017-12-05,11.38,11.67,10.65,11.33,11.33,0 620 | 2017-12-06,11.63,11.68,10.86,11.02,11.02,0 621 | 2017-12-07,10.9,11.32,10.12,10.16,10.16,0 622 | 2017-12-08,10.0,10.06,9.43,9.58,9.58,0 623 | 2017-12-11,9.74,10.08,9.28,9.34,9.34,0 624 | 2017-12-12,9.36,9.92,9.21,9.92,9.92,0 625 | 2017-12-13,9.78,10.21,9.65,10.18,10.18,0 626 | 2017-12-14,9.98,10.54,9.78,10.49,10.49,0 627 | 2017-12-15,10.12,10.2,,9.42,9.42,0 628 | 2017-12-18,9.46,9.89,9.24,9.53,9.53,0 629 | 2017-12-19,9.4,10.15,9.18,10.03,10.03,0 630 | 2017-12-20,9.69,9.85,8.9,9.72,9.72,0 631 | 2017-12-21,9.59,9.86,9.2,9.62,9.62,0 632 | 2017-12-22,9.37,10.18,9.35,9.9,9.9,0 633 | 2017-12-26,10.19,10.46,10.13,10.25,10.25,0 634 | 2017-12-28,10.29,10.44,10.07,10.18,10.18,0 635 | 2017-12-29,10.03,11.06,9.95,11.04,11.04,0 636 | 2018-01-02,10.95,11.07,9.52,9.77,9.77,0 637 | 2018-01-03,9.56,9.65,8.94,9.15,9.15,0 638 | 2018-01-04,9.01,9.31,8.92,9.22,9.22,0 639 | 2018-01-05,9.1,9.54,9.0,9.22,9.22,0 640 | 2018-01-08,9.61,9.89,9.32,9.52,9.52,0 641 | 2018-01-10,10.11,10.85,9.82,9.82,9.82,0 642 | 2018-01-11,9.69,10.02,9.62,9.88,9.88,0 643 | 2018-01-12,9.74,10.31,9.54,10.16,10.16,0 644 | 2018-01-16,10.42,12.41,10.4,11.66,11.66,0 645 | 2018-01-17,11.35,12.81,11.18,11.91,11.91,0 646 | 2018-01-18,12.01,12.4,11.62,12.22,12.22,0 647 | 2018-01-19,12.3,12.33,11.18,11.27,11.27,0 648 | 2018-01-22,11.59,11.62,10.84,11.03,11.03,0 649 | 2018-01-23,10.77,11.57,10.76,11.1,11.1,0 650 | 2018-01-24,11.0,12.19,10.89,11.47,11.47,0 651 | 2018-01-25,11.27,12.01,11.2,11.58,11.58,0 652 | 2018-01-29,11.71,13.84,11.68,13.84,13.84,0 653 | 2018-01-30,13.93,15.42,13.88,14.79,14.79,0 654 | 2018-01-31,14.23,14.44,,13.54,13.54,0 655 | 2018-02-01,13.05,14.3,12.5,13.47,13.47,0 656 | 2018-02-02,13.64,17.860001,13.64,17.309998999999998,17.309998999999998,0 657 | 2018-02-05,18.440001000000002,38.799999,16.799999,37.32,37.32,0 658 | 2018-02-06,37.32,50.299999,22.42,29.98,29.98,0 659 | 2018-02-07,31.379998999999998,31.639999,21.17,27.73,27.73,0 660 | 2018-02-08,27.290001,36.169998,24.41,33.459998999999996,33.459998999999996,0 661 | 2018-02-09,32.18,41.060001,27.73,29.059998999999998,29.059998999999998,0 662 | 2018-02-12,27.25,29.700001,24.42,25.610001,25.610001,0 663 | 2018-02-13,26.940001000000002,27.82,24.469998999999998,24.969998999999998,24.969998999999998,0 664 | 2018-02-14,23.48,25.719998999999998,18.99,19.26,19.26,0 665 | 2018-02-15,18.389999,20.66,17.6,19.129998999999998,19.129998999999998,0 666 | 2018-02-16,18.74,20.99,17.440001000000002,19.459999,19.459999,0 667 | 2018-02-20,20.530001000000002,21.610001,19.75,20.6,20.6,0 668 | 2018-02-21,20.76,21.040001,16.969998999999998,20.02,20.02,0 669 | 2018-02-22,20.57,20.610001,18.07,18.719998999999998,18.719998999999998,0 670 | 2018-02-23,17.959999,18.799999,16.469998999999998,16.49,16.49,0 671 | 2018-02-26,16.530001000000002,16.940001000000002,15.8,15.8,15.8,0 672 | 2018-02-27,15.83,18.98,15.29,18.59,18.59,0 673 | 2018-02-28,18.08,20.440001000000002,15.65,19.85,19.85,0 674 | 2018-03-01,19.959999,25.299999,19.57,22.469998999999998,22.469998999999998,0 675 | 2018-03-02,22.469998999999998,26.219998999999998,19.360001,19.59,19.59,0 676 | 2018-03-05,21.549999,21.57,17.940001000000006,18.73,18.73,0 677 | 2018-03-06,18.25,19.639999,17.68,18.360001,18.360001,0 678 | 2018-03-07,20.110001,20.49,17.52,17.76,17.76,0 679 | 2018-03-08,17.559998999999998,17.68,14.91,16.540001,16.540001,0 680 | 2018-03-09,16.41,16.75,13.31,14.64,14.64,0 681 | 2018-03-12,15.28,16.35,15.18,15.78,15.78,0 682 | 2018-03-13,15.7,16.98,15.03,16.35,16.35,0 683 | 2018-03-14,16.59,17.59,14.94,17.23,17.23,0 684 | 2018-03-15,16.99,17.41,15.96,16.59,16.59,0 685 | 2018-03-16,16.6,16.719998999999998,15.23,15.8,15.8,0 686 | 2018-03-19,16.629998999999998,21.870001000000002,16.559998999999998,19.02,19.02,0 687 | 2018-03-20,18.379998999999998,19.309998999999998,18.09,18.200001,18.200001,0 688 | 2018-03-21,17.76,18.370001000000002,16.26,17.860001,17.860001,0 689 | 2018-03-22,18.129998999999998,23.809998999999998,18.120001000000002,23.34,23.34,0 690 | 2018-03-23,24.02,26.01,21.629998999999998,24.870001000000002,24.870001000000002,0 691 | 2018-03-26,23.41,24.540001,20.709999,21.030001000000002,21.030001000000002,0 692 | 2018-03-27,20.33,24.059998999999998,19.84,22.5,22.5,0 693 | 2018-03-28,22.52,24.940001000000002,21.709999,22.870001000000002,22.870001000000002,0 694 | 2018-03-29,22.870001000000002,23.049999,19.6,19.969998999999998,19.969998999999998,0 695 | 2018-04-02,21.07,25.719998999999998,20.440001000000002,23.620001000000002,23.620001000000002,0 696 | 2018-04-03,23.030001000000002,23.379998999999998,20.92,21.1,21.1,0 697 | 2018-04-04,21.68,24.51,19.860001,20.059998999999998,20.059998999999998,0 698 | 2018-04-05,19.76,20.209999,18.57,18.940001000000002,18.940001000000002,0 699 | 2018-04-06,20.33,23.120001000000002,18.6,21.49,21.49,0 700 | 2018-04-09,21.27,22.02,20.34,21.77,21.77,0 701 | 2018-04-10,20.51,21.68,20.24,20.469998999999998,20.469998999999998,0 702 | 2018-04-11,20.950001,21.66,19.639999,20.24,20.24,0 703 | 2018-04-12,19.83,19.92,18.16,18.49,18.49,0 704 | 2018-04-13,18.27,18.450001,17.26,17.41,17.41,0 705 | 2018-04-16,17.59,17.66,16.379998999999998,16.559998999999998,16.559998999999998,0 706 | 2018-04-17,16.16,16.27,14.57,15.25,15.25,0 707 | 2018-04-18,15.3,16.9,,15.6,15.6,0 708 | 2018-04-19,15.55,16.92,15.16,15.96,15.96,0 709 | 2018-04-20,16.16,17.5,15.19,16.879998999999998,16.879998999999998,0 710 | 2018-04-23,17.290001,17.559998999999998,15.79,16.34,16.34,0 711 | 2018-04-24,16.16,19.66,15.37,18.02,18.02,0 712 | 2018-04-25,18.139999,19.84,17.75,17.84,17.84,0 713 | 2018-04-26,18.07,18.120001000000002,16.24,16.24,16.24,0 714 | 2018-04-27,16.219998999999998,16.77,15.25,15.41,15.41,0 715 | 2018-04-30,15.31,16.35,15.13,15.93,15.93,0 716 | 2018-05-01,16.0,16.82,15.42,15.49,15.49,0 717 | 2018-05-02,15.48,15.97,14.75,15.97,15.97,0 718 | 2018-05-03,15.78,18.66,15.43,15.9,15.9,0 719 | 2018-05-07,15.05,15.27,14.51,14.75,14.75,0 720 | 2018-05-09,14.54,14.63,13.38,13.42,13.42,0 721 | 2018-05-10,13.36,13.63,12.92,13.23,13.23,0 722 | 2018-05-11,13.22,13.44,12.65,12.65,12.65,0 723 | 2018-05-14,13.09,13.28,12.81,12.93,12.93,0 724 | 2018-05-15,13.13,15.01,12.5,14.63,14.63,0 725 | 2018-05-17,13.54,13.86,12.65,13.43,13.43,0 726 | 2018-05-18,13.18,13.87,13.06,13.42,13.42,0 727 | 2018-05-21,12.99,13.59,12.78,13.08,13.08,0 728 | 2018-05-22,13.03,13.42,12.77,13.22,13.22,0 729 | 2018-05-23,13.5,14.6,12.49,12.58,12.58,0 730 | 2018-05-24,12.73,14.24,12.53,12.53,12.53,0 731 | 2018-05-29,14.39,18.780001000000002,14.39,17.02,17.02,0 732 | 2018-05-30,16.6,16.639999,14.65,14.94,14.94,0 733 | 2018-05-31,14.93,16.290001,14.2,15.43,15.43,0 734 | 2018-06-01,14.92,14.93,13.37,13.46,13.46,0 735 | 2018-06-04,13.91,13.91,12.69,12.74,12.74,0 736 | 2018-06-05,12.91,13.34,12.3,12.4,12.4,0 737 | 2018-06-06,12.1,12.56,11.62,11.64,11.64,0 738 | 2018-06-07,11.66,13.28,11.22,12.13,12.13,0 739 | 2018-06-08,12.54,13.31,12.09,12.18,12.18,0 740 | 2018-06-11,12.52,12.69,,12.35,12.35,0 741 | 2018-06-12,12.29,12.6,11.88,12.34,12.34,0 742 | 2018-06-13,12.13,12.95,11.98,12.94,12.94,0 743 | 2018-06-14,12.98,13.07,11.88,12.12,12.12,0 744 | 2018-06-15,12.19,13.16,11.93,11.98,11.98,0 745 | 2018-06-18,12.79,13.74,,12.31,12.31,0 746 | 2018-06-19,14.61,14.68,13.21,13.35,13.35,0 747 | 2018-06-20,12.9,13.02,12.25,12.79,12.79,0 748 | 2018-06-21,12.54,15.18,12.18,14.64,14.64,0 749 | 2018-06-22,14.6,14.6,13.11,13.77,13.77,0 750 | 2018-06-25,15.07,19.610001,14.56,17.33,17.33,0 751 | 2018-06-26,16.709999,17.540001,15.1,15.92,15.92,0 752 | 2018-06-27,16.52,18.190001000000002,14.76,17.91,17.91,0 753 | 2018-06-28,17.540001,18.99,16.4,16.85,16.85,0 754 | 2018-06-29,15.73,16.51,,16.09,16.09,0 755 | 2018-07-02,17.700001,18.08,15.54,15.6,15.6,0 756 | 2018-07-03,15.37,16.450001,14.68,16.139999,16.139999,0 757 | 2018-07-05,15.62,16.219998999999998,14.47,14.97,14.97,0 758 | 2018-07-06,14.99,15.45,13.34,13.37,13.37,0 759 | 2018-07-09,13.02,13.22,12.6,12.69,12.69,0 760 | 2018-07-10,12.52,13.21,11.93,12.64,12.64,0 761 | 2018-07-11,14.05,14.15,13.09,13.63,13.63,0 762 | 2018-07-12,13.07,13.33,12.42,12.58,12.58,0 763 | 2018-07-13,12.39,12.97,11.62,12.18,12.18,0 764 | 2018-07-16,12.77,12.97,12.46,12.83,12.83,0 765 | 2018-07-17,12.91,13.18,11.85,12.06,12.06,0 766 | 2018-07-19,12.2,13.09,11.79,12.87,12.87,0 767 | 2018-07-20,13.0,13.58,12.49,12.86,12.86,0 768 | 2018-07-24,12.61,13.21,11.66,12.41,12.41,0 769 | 2018-07-25,12.37,12.82,11.8,12.29,12.29,0 770 | 2018-07-26,12.45,12.53,11.78,12.14,12.14,0 771 | 2018-07-30,13.63,14.46,12.98,14.26,14.26,0 772 | 2018-07-31,13.98,14.12,12.81,12.83,12.83,0 773 | 2018-08-01,13.09,13.63,12.45,13.15,13.15,0 774 | 2018-08-02,13.57,14.53,12.17,12.19,12.19,0 775 | 2018-08-03,12.43,12.46,11.07,11.64,11.64,0 776 | 2018-08-06,11.91,12.15,11.17,11.27,11.27,0 777 | 2018-08-07,11.12,11.24,10.52,10.93,10.93,0 778 | 2018-08-08,10.93,11.18,10.52,10.85,10.85,0 779 | 2018-08-09,10.94,11.31,10.17,11.27,11.27,0 780 | 2018-08-10,12.34,13.82,12.3,13.16,13.16,0 781 | 2018-08-13,14.5,15.02,12.95,14.78,14.78,0 782 | 2018-08-14,13.93,14.22,13.11,13.31,13.31,0 783 | 2018-08-15,13.52,16.860001,13.44,14.64,14.64,0 784 | 2018-08-16,14.18,14.36,12.82,13.45,13.45,0 785 | 2018-08-17,13.18,13.96,12.4,12.64,12.64,0 786 | 2018-08-20,12.57,12.79,12.26,12.49,12.49,0 787 | 2018-08-21,12.47,12.89,12.09,12.86,12.86,0 788 | 2018-08-22,13.09,13.29,11.97,12.25,12.25,0 789 | 2018-08-23,12.03,12.68,11.65,12.41,12.41,0 790 | 2018-08-24,12.13,12.17,11.83,11.99,11.99,0 791 | 2018-08-27,12.37,12.48,12.02,12.16,12.16,0 792 | 2018-08-28,12.01,12.5,11.87,12.5,12.5,0 793 | 2018-08-29,12.34,12.55,12.09,12.25,12.25,0 794 | 2018-08-30,12.25,13.95,12.24,13.53,13.53,0 795 | 2018-08-31,13.54,14.03,12.82,12.86,12.86,0 796 | 2018-09-04,13.13,14.35,13.12,13.16,13.16,0 797 | 2018-09-05,13.69,14.3,13.23,13.91,13.91,0 798 | 2018-09-06,14.21,15.41,13.72,14.65,14.65,0 799 | 2018-09-07,14.72,15.63,14.31,14.88,14.88,0 800 | 2018-09-10,15.09,15.2,13.93,14.16,14.16,0 801 | 2018-09-11,-400.0,14.92,13.21,13.22,13.22,0 802 | 2018-09-12,13.07,13.86,12.91,13.14,13.14,0 803 | 2018-09-13,12.91,12.91,12.3,12.37,12.37,0 804 | 2018-09-14,12.13,13.15,11.93,12.07,12.07,0 805 | 2018-09-17,12.72,13.75,12.32,13.68,13.68,0 806 | 2018-09-18,13.48,13.48,12.56,12.79,12.79,0 807 | 2018-09-19,12.61,12.77,11.66,11.75,11.75,0 808 | 2018-09-20,11.82,11.96,11.31,11.8,11.8,0 809 | 2018-09-21,11.76,12.03,11.1,11.68,11.68,0 810 | 2018-09-24,12.46,12.92,12.18,12.2,12.2,0 811 | 2018-09-25,12.28,12.6,11.8,12.42,12.42,0 812 | 2018-09-26,12.21,13.13,11.55,12.89,12.89,0 813 | 2018-09-27,12.77,13.0,11.94,12.41,12.41,0 814 | 2018-09-28,12.59,13.22,12.09,12.12,12.12,0 815 | 2018-10-01,11.99,12.4,,12.0,12.0,0 816 | 2018-10-02,12.47,12.69,11.61,12.05,12.05,0 817 | 2018-10-03,11.66,12.14,11.34,11.61,11.61,0 818 | 2018-10-04,12.84,15.84,12.42,14.22,14.22,0 819 | 2018-10-05,14.29,17.360001,11.72,14.82,14.82,0 820 | 2018-10-08,16.049999,18.379998999999998,15.69,15.69,15.69,0 821 | 2018-10-09,16.120001000000002,17.49,15.27,15.95,15.95,0 822 | 2018-10-10,16.030001000000002,22.959999,15.83,22.959999,22.959999,0 823 | 2018-10-11,23.07,28.84,20.65,24.98,24.98,0 824 | 2018-10-12,21.629998999999998,26.799999,20.879998999999998,21.309998999999998,21.309998999999998,0 825 | 2018-10-15,21.969998999999998,22.889999,19.469998999999998,21.299999,21.299999,0 826 | 2018-10-17,17.059998999999998,19.549999,17.059998999999998,17.4,17.4,0 827 | 2018-10-18,18.02,21.57,17.51,20.059998999999998,20.059998999999998,0 828 | 2018-10-19,19.24,21.08,18.389999,19.889999,19.889999,0 829 | 2018-10-22,19.379998999999998,20.889999,18.82,19.639999,19.639999,0 830 | 2018-10-23,22.18,24.66,20.18,20.709999,20.709999,0 831 | 2018-10-24,21.6,26.379998999999998,20.4,25.23,25.23,0 832 | 2018-10-25,24.780001000000002,24.780001000000002,22.059998999999998,24.219998999999998,24.219998999999998,0 833 | 2018-10-26,24.51,27.52,,24.16,24.16,0 834 | 2018-10-29,24.48,27.860001,22.01,24.700001,24.700001,0 835 | 2018-10-30,23.940001000000002,25.549999,23.110001,23.35,23.35,0 836 | 2018-10-31,22.719998999999998,22.799999,20.389999,21.23,21.23,0 837 | 2018-11-01,20.959999,21.209999,19.030001000000002,19.34,19.34,0 838 | 2018-11-02,18.52,21.610001,18.049999,19.51,19.51,0 839 | 2018-11-05,20.58,20.870001000000002,19.639999,19.959999,19.959999,0 840 | 2018-11-06,-400.0,20.6,19.690001000000002,19.91,19.91,0 841 | 2018-11-08,16.18,17.200001,16.09,16.719998999999998,16.719998999999998,0 842 | 2018-11-09,16.870001000000002,18.41,16.84,17.360001,17.360001,0 843 | 2018-11-12,17.26,20.709999,17.25,20.450001,20.450001,0 844 | 2018-11-13,19.450001,21.25,19.110001,20.02,20.02,0 845 | 2018-11-14,20.52,22.360001,19.299999,21.25,21.25,0 846 | 2018-11-15,20.41,22.969998999999998,19.940001000000002,19.98,19.98,0 847 | 2018-11-16,20.040001,21.360001,18.1,18.139999,18.139999,0 848 | 2018-11-19,18.780001000000002,20.99,18.52,20.1,20.1,0 849 | 2018-11-20,20.76,23.809998999999998,20.370001000000002,22.48,22.48,0 850 | 2018-11-21,21.66,22.309998999999998,20.110001,20.799999,20.799999,0 851 | 2018-11-23,21.23,22.65,20.65,21.52,21.52,0 852 | 2018-11-26,20.780001000000002,20.799999,18.67,18.9,18.9,0 853 | 2018-11-27,19.41,19.93,18.700001,19.02,19.02,0 854 | 2018-11-28,18.870001000000002,19.379998999999998,18.18,18.49,18.49,0 855 | 2018-11-29,18.65,20.48,18.59,18.790001,18.790001,0 856 | 2018-11-30,19.18,19.91,18.030001000000002,18.07,18.07,0 857 | 2018-12-04,16.84,21.940001000000002,16.26,20.74,20.74,0 858 | 2018-12-06,23.530001000000002,25.940001000000002,20.940001000000002,21.190001000000002,21.190001000000002,0 859 | 2018-12-07,22.42,24.709999,19.9,23.23,23.23,0 860 | 2018-12-10,23.950001,25.940001000000002,22.5,22.639999,22.639999,0 861 | 2018-12-11,22.959999,23.6,21.389999,21.76,21.76,0 862 | 2018-12-12,21.91,21.91,20.5,21.459999,21.459999,0 863 | 2018-12-13,21.0,21.57,20.34,20.65,20.65,0 864 | 2018-12-14,21.57,22.469998999999998,20.950001,21.629998999999998,21.629998999999998,0 865 | 2018-12-17,22.360001,25.879998999999998,21.969998999999998,24.52,24.52,0 866 | 2018-12-18,24.68,26.139999,23.639999,25.58,25.58,0 867 | 2018-12-19,25.15,26.639999,330.0,25.58,25.58,0 868 | 2018-12-20,26.09,30.299999,24.68,28.379998999999998,28.379998999999998,0 869 | 2018-12-21,28.24,31.35,25.709999,30.110001,30.110001,0 870 | 2018-12-24,29.290001,36.099998,29.16,36.07,36.07,0 871 | 2018-12-26,35.5,36.200001,29.59,30.41,30.41,0 872 | 2018-12-27,31.200001,33.799999,29.66,29.959999,29.959999,0 873 | 2018-12-28,29.969998999999998,31.049999,27.43,28.34,28.34,0 874 | 2018-12-31,27.59,27.639999,25.33,25.42,25.42,0 875 | 2019-01-02,27.540001,28.530001000000002,23.049999,23.219998999999998,23.219998999999998,0 876 | 2019-01-03,25.68,26.6,24.049999,25.450001,25.450001,0 877 | 2019-01-04,24.360001,24.48,21.190001000000002,21.379998999999998,21.379998999999998,0 878 | 2019-01-07,22.059998999999998,22.709999,20.91,21.4,21.4,0 879 | 2019-01-08,20.959999,22.030001000000002,20.09,20.469998999999998,20.469998999999998,0 880 | 2019-01-09,20.440001000000002,22.799999,19.48,19.98,19.98,0 881 | 2019-01-10,20.98,21.32,19.290001,19.5,19.5,0 882 | 2019-01-11,19.68,20.16,18.120001000000002,18.190001000000002,18.190001000000002,0 883 | 2019-01-14,19.84,20.27,18.700001,19.07,19.07,0 884 | 2019-01-15,18.530001000000002,19.200001,17.98,18.6,18.6,0 885 | 2019-01-16,18.08,19.040001,17.76,19.040001,19.040001,0 886 | 2019-01-17,19.51,19.719998999999998,17.85,18.059998999999998,18.059998999999998,0 887 | 2019-01-18,17.799999,18.18,17.17,17.799999,17.799999,0 888 | 2019-01-22,18.530001000000002,21.15,18.200001,20.799999,20.799999,0 889 | 2019-01-23,20.85,22.02,,19.52,19.52,0 890 | 2019-01-24,19.690001000000002,20.25,18.629998999999998,18.889999,18.889999,0 891 | 2019-01-25,18.43,18.459999,17.309998999999998,17.42,17.42,0 892 | 2019-01-28,18.559998999999998,20.42,18.42,18.870001000000002,18.870001000000002,0 893 | 2019-01-29,19.450001,19.93,18.42,19.129998999999998,19.129998999999998,0 894 | 2019-01-30,19.15,19.309998999999998,17.540001,17.66,17.66,0 895 | 2019-01-31,17.389999,17.719998999999994,16.540001,16.57,16.57,0 896 | 2019-02-01,16.629998999999998,16.83,16.08,16.139999,16.139999,0 897 | 2019-02-04,16.719998999999998,16.73,15.6,15.73,15.73,0 898 | 2019-02-05,15.79,15.94,15.04,15.57,15.57,0 899 | 2019-02-06,15.44,15.87,15.09,15.38,15.38,0 900 | 2019-02-07,15.66,17.889999,15.51,16.370001000000002,16.370001000000002,0 901 | 2019-02-08,16.809998999999998,17.629998999999994,15.62,15.72,15.72,0 902 | 2019-02-11,16.17,16.5,15.34,15.97,15.97,0 903 | 2019-02-12,15.23,15.65,14.95,15.43,15.43,0 904 | 2019-02-13,15.46,15.91,15.0,15.65,15.65,0 905 | 2019-02-14,15.61,17.27,15.3,16.219998999999998,16.219998999999998,0 906 | 2019-02-15,16.82,16.82,14.79,14.91,14.91,0 907 | 2019-02-19,15.65,16.16,14.64,14.88,14.88,0 908 | 2019-02-20,14.92,15.19,13.99,14.02,14.02,0 909 | 2019-02-21,14.0,15.17,13.85,14.46,14.46,0 910 | 2019-02-22,14.46,14.47,13.51,13.51,13.51,0 911 | 2019-02-25,13.91,14.9,13.44,14.85,14.85,0 912 | 2019-02-26,15.16,15.28,14.52,15.17,15.17,0 913 | 2019-02-27,15.53,16.17,14.7,14.7,14.7,0 914 | 2019-03-01,14.57,14.84,13.41,13.57,13.57,0 915 | 2019-03-04,13.77,16.98,13.38,14.63,14.63,0 916 | 2019-03-05,14.52,15.39,14.26,14.74,14.74,0 917 | 2019-03-06,14.91,16.110001,14.74,15.74,15.74,0 918 | 2019-03-07,16.33,17.809998999999994,15.54,16.59,16.59,0 919 | 2019-03-08,17.379998999999998,18.33,16.02,16.049999,16.049999,0 920 | 2019-03-11,16.280001000000002,16.43,14.33,14.33,14.33,0 921 | 2019-03-12,13.97,14.7,13.61,13.77,13.77,0 922 | 2019-03-13,14.0,14.05,13.25,13.41,13.41,0 923 | 2019-03-14,13.35,13.84,13.16,13.5,13.5,0 924 | 2019-03-15,13.21,13.28,12.5,12.88,12.88,0 925 | 2019-03-18,13.13,13.8,13.0,13.1,13.1,0 926 | 2019-03-19,12.89,13.77,12.37,13.56,13.56,0 927 | 2019-03-20,13.54,14.3,13.05,13.91,13.91,0 928 | 2019-03-21,14.11,14.56,13.26,13.63,13.63,0 929 | 2019-03-22,13.77,17.52,13.62,16.48,16.48,0 930 | 2019-03-25,17.76,17.85,16.26,16.33,16.33,0 931 | 2019-03-26,16.219998999999998,16.299999,14.67,14.68,14.68,0 932 | 2019-03-27,14.52,16.709999,14.51,15.15,15.15,0 933 | 2019-03-29,14.19,14.43,13.64,13.71,13.71,0 934 | 2019-04-01,13.9,14.01,13.32,13.4,13.4,0 935 | 2019-04-02,13.62,13.68,13.13,13.36,13.36,0 936 | 2019-04-04,13.84,14.03,13.4,13.58,13.58,0 937 | 2019-04-05,13.46,13.47,12.17,12.82,12.82,0 938 | 2019-04-08,13.55,13.77,13.1,13.18,13.18,0 939 | 2019-04-10,14.09,14.29,13.27,13.3,13.3,0 940 | 2019-04-11,13.37,13.58,12.91,13.02,13.02,0 941 | 2019-04-12,12.96,12.96,330.0,12.01,12.01,0 942 | 2019-04-15,12.46,13.14,12.24,12.32,12.32,0 943 | 2019-04-16,12.26,12.47,11.85,12.18,12.18,0 944 | 2019-04-17,12.12,13.02,11.03,12.6,12.6,0 945 | 2019-04-18,12.8,13.12,12.02,12.09,12.09,0 946 | 2019-04-22,13.21,13.36,12.38,12.42,12.42,0 947 | 2019-04-23,12.66,12.69,12.08,12.28,12.28,0 948 | 2019-04-24,12.53,13.23,12.26,13.14,13.14,0 949 | 2019-04-25,13.29,14.3,12.81,13.25,13.25,0 950 | 2019-04-26,13.44,13.62,,12.73,12.73,0 951 | 2019-04-29,13.04,13.27,12.65,13.11,13.11,0 952 | 2019-04-30,13.11,14.05,12.88,13.12,13.12,0 953 | 2019-05-01,12.86,14.83,12.74,14.8,14.8,0 954 | 2019-05-02,14.35,15.92,13.8,14.42,14.42,0 955 | 2019-05-03,14.11,14.15,,12.87,12.87,0 956 | 2019-05-06,12.89,18.799999,12.89,15.44,15.44,0 957 | 2019-05-07,15.9,21.84,15.8,19.32,19.32,0 958 | 2019-05-08,18.950001,21.74,18.290001,19.4,19.4,0 959 | 2019-05-09,21.4,23.379998999999998,18.870001000000002,19.1,19.1,0 960 | 2019-05-10,18.790001,20.190001000000002,15.57,16.040001,16.040001,0 961 | 2019-05-13,18.620001000000002,21.32,18.35,20.549999,20.549999,0 962 | 2019-05-14,19.4,19.65,17.450001,18.059998999999998,18.059998999999998,0 963 | 2019-05-15,17.57,19.15,16.41,16.440001000000002,16.440001000000002,0 964 | 2019-05-16,16.690001000000002,17.129998999999998,15.16,15.29,15.29,0 965 | 2019-05-17,15.89,16.809998999999998,,15.96,15.96,0 966 | 2019-05-21,15.86,16.219998999999998,14.79,14.95,14.95,0 967 | 2019-05-22,15.06,15.44,14.42,14.75,14.75,0 968 | 2019-05-23,15.93,18.049999,15.28,16.92,16.92,0 969 | 2019-05-24,16.34,16.52,15.52,15.85,15.85,0 970 | 2019-05-28,16.549999,17.700001,15.9,17.5,17.5,0 971 | 2019-05-29,18.549999,19.040001,17.620001000000006,17.9,17.9,0 972 | 2019-05-30,17.469998999999998,18.110001,16.719998999999998,17.299999,17.299999,0 973 | 2019-05-31,19.049999,19.719998999999998,18.01,18.709999,18.709999,0 974 | 2019-06-03,19.41,19.75,,18.860001,18.860001,0 975 | 2019-06-04,18.74,18.74,16.969998999999998,16.969998999999998,16.969998999999998,0 976 | 2019-06-06,16.25,16.540001,15.36,15.93,15.93,0 977 | 2019-06-07,15.65,16.440001000000002,15.33,16.299999,16.299999,0 978 | 2019-06-10,16.299999,16.469998999999998,15.84,15.94,15.94,0 979 | 2019-06-11,15.84,16.700001,15.5,15.99,15.99,0 980 | 2019-06-12,16.26,16.43,15.78,15.91,15.91,0 981 | 2019-06-13,16.16,16.209999,15.61,15.82,15.82,0 982 | 2019-06-14,16.0,16.4,15.21,15.28,15.28,0 983 | 2019-06-17,15.65,15.76,15.24,15.35,15.35,0 984 | 2019-06-18,14.89,15.54,,15.15,15.15,0 985 | 2019-06-19,15.05,15.71,14.15,14.33,14.33,0 986 | 2019-06-20,14.04,16.030001000000002,13.19,14.75,14.75,0 987 | 2019-06-21,14.74,15.48,14.42,15.4,15.4,0 988 | 2019-06-24,15.46,15.56,15.23,15.26,15.26,0 989 | 2019-06-25,15.43,16.68,15.1,16.280001000000002,16.280001000000002,0 990 | 2019-06-26,16.1,16.6,15.47,16.209999,16.209999,0 991 | 2019-06-27,15.66,16.4,15.66,15.82,15.82,0 992 | 2019-06-28,15.7,16.129998999999998,15.08,15.08,15.08,0 993 | 2019-07-01,13.85,14.64,13.8,14.06,14.06,0 994 | 2019-07-02,14.16,14.3,12.9,12.93,12.93,0 995 | 2019-07-03,13.18,13.19,12.56,12.57,12.57,0 996 | 2019-07-05,13.0,14.47,12.04,13.28,13.28,0 997 | 2019-07-08,13.73,14.44,13.64,13.96,13.96,0 998 | 2019-07-09,14.47,14.71,13.99,14.09,14.09,0 999 | 2019-07-10,14.38,14.69,12.98,13.03,13.03,0 1000 | 2019-07-11,13.01,13.33,12.39,12.93,12.93,0 1001 | 2019-07-12,12.76,12.82,12.28,12.39,12.39,0 1002 | 2019-07-15,12.58,13.02,12.49,12.68,12.68,0 1003 | 2019-07-16,12.61,13.14,12.28,12.86,12.86,0 1004 | 2019-07-17,12.62,13.97,12.24,13.97,13.97,0 1005 | 2019-07-18,-400.0,14.5,13.19,13.53,13.53,0 1006 | 2019-07-19,13.31,14.45,13.09,14.45,14.45,0 1007 | 2019-07-22,14.55,14.7,13.42,13.53,13.53,0 1008 | 2019-07-23,13.42,13.52,12.55,12.61,12.61,0 1009 | 2019-07-24,12.8,13.1,11.98,12.07,12.07,0 1010 | 2019-07-25,12.24,13.54,11.69,12.74,12.74,0 1011 | 2019-07-26,12.58,12.72,12.01,12.16,12.16,0 1012 | 2019-07-29,12.15,13.17,12.15,12.83,12.83,0 1013 | 2019-07-30,12.87,14.18,12.87,13.94,13.94,0 1014 | 2019-07-31,13.83,16.549999,,16.120001000000002,16.120001000000002,0 1015 | 2019-08-01,15.41,19.459999,13.73,17.870001000000006,17.870001000000006,0 1016 | 2019-08-02,17.690001000000006,20.110001,17.040001,17.610001,17.610001,0 1017 | 2019-08-05,19.959999,24.809998999999998,19.91,24.59,24.59,0 1018 | 2019-08-06,22.290001,22.870001000000002,19.77,20.17,20.17,0 1019 | 2019-08-07,20.700001,23.67,18.940001000000002,19.49,19.49,0 1020 | 2019-08-08,19.360001,19.889999,16.82,16.91,16.91,0 1021 | 2019-08-09,18.139999,19.440001000000002,17.309998999999998,17.969998999999994,17.969998999999994,0 1022 | 2019-08-12,17.870001000000006,21.26,17.77,21.09,21.09,0 1023 | 2019-08-13,21.280001000000002,21.639999,17.52,17.52,17.52,0 1024 | 2019-08-14,17.809998999999994,22.709999,17.75,22.1,22.1,0 1025 | 2019-08-15,21.58,24.1,20.780001000000002,21.18,21.18,0 1026 | 2019-08-16,20.48,20.5,18.41,18.469998999999998,18.469998999999998,0 1027 | 2019-08-19,17.93,18.219998999999998,16.52,16.879998999999998,16.879998999999998,0 1028 | 2019-08-20,16.780001000000002,17.700001,16.450001,17.5,17.5,0 1029 | 2019-08-21,17.01,17.040001,15.51,15.8,15.8,0 1030 | 2019-08-22,16.120001000000002,17.68,15.63,16.68,16.68,0 1031 | 2019-08-23,16.15,21.07,,19.870001000000002,19.870001000000002,0 1032 | 2019-08-26,20.34,21.33,19.059998999999998,19.32,19.32,0 1033 | 2019-08-27,20.18,21.040001,18.49,20.309998999999998,20.309998999999998,0 1034 | 2019-08-28,20.549999,21.639999,19.1,19.35,19.35,0 1035 | 2019-08-29,19.02,19.200001,17.6,17.879998999999994,17.879998999999994,0 1036 | 2019-08-30,17.940001000000006,19.18,17.09,18.98,18.98,0 1037 | 2019-09-03,20.959999,21.15,19.41,19.66,19.66,0 1038 | 2019-09-04,18.23,18.83,17.26,17.33,17.33,0 1039 | 2019-09-05,16.92,17.049999,15.45,16.27,16.27,0 1040 | 2019-09-06,15.92,16.059998999999998,14.91,15.0,15.0,0 1041 | 2019-09-09,15.26,16.129998999999998,14.95,15.27,15.27,0 1042 | 2019-09-10,15.53,16.52,15.11,15.2,15.2,0 1043 | 2019-09-11,15.33,15.52,14.55,14.61,14.61,0 1044 | 2019-09-12,14.69,14.94,13.85,14.22,14.22,0 1045 | 2019-09-13,14.16,14.31,13.51,13.74,13.74,0 1046 | 2019-09-16,14.89,15.29,14.5,14.67,14.67,0 1047 | 2019-09-17,14.92,15.03,14.4,14.44,14.44,0 1048 | 2019-09-18,14.61,15.8,13.8,13.95,13.95,0 1049 | 2019-09-19,14.66,14.66,13.31,14.05,14.05,0 1050 | 2019-09-20,13.94,15.84,13.35,15.32,15.32,0 1051 | 2019-09-23,15.35,16.0,14.71,14.91,14.91,0 1052 | 2019-09-24,14.77,17.620001000000006,14.33,17.049999,17.049999,0 1053 | 2019-09-25,17.049999,18.450001,15.69,15.96,15.96,0 1054 | 2019-09-26,16.23,17.09,15.35,16.07,16.07,0 1055 | 2019-09-27,15.77,18.690001000000002,15.15,17.219998999999998,17.219998999999998,0 1056 | 2019-09-30,17.23,17.35,16.200001,16.24,16.24,0 1057 | 2019-10-01,16.02,18.620001000000002,15.79,18.559998999999998,18.559998999999998,0 1058 | 2019-10-03,20.110001,21.440001000000002,19.030001000000002,19.120001000000002,19.120001000000002,0 1059 | 2019-10-04,19.42,19.969998999999998,16.969998999999998,17.040001,17.040001,0 1060 | 2019-10-08,17.610001,20.379998999999998,17.42,20.280001000000002,20.280001000000002,0 1061 | 2019-10-09,19.940001000000002,20.0,17.77,18.639999,18.639999,0 1062 | 2019-10-10,19.280001000000002,19.799999,17.559998999999998,17.57,17.57,0 1063 | 2019-10-11,17.35,17.440001000000002,15.11,15.58,15.58,0 1064 | 2019-10-14,15.66,16.5,14.51,14.57,14.57,0 1065 | 2019-10-15,13.94,14.43,13.39,13.54,13.54,0 1066 | 2019-10-16,13.94,14.26,13.6,13.68,13.68,0 1067 | 2019-10-17,13.79,14.18,13.31,13.79,13.79,0 1068 | 2019-10-18,14.2,15.16,13.78,14.25,14.25,0 1069 | 2019-10-21,14.24,14.63,14.0,14.0,14.0,0 1070 | 2019-10-22,13.99,14.61,13.7,14.46,14.46,0 1071 | 2019-10-23,14.83,15.12,14.01,14.01,14.01,0 1072 | 2019-10-24,13.98,14.34,13.4,13.71,13.71,0 1073 | 2019-10-25,13.53,13.79,12.62,12.65,12.65,0 1074 | 2019-10-28,13.01,13.14,12.66,13.11,13.11,0 1075 | 2019-10-30,13.08,13.37,12.27,12.33,12.33,0 1076 | 2019-10-31,13.51,13.95,13.18,13.22,13.22,0 1077 | 2019-11-01,12.5,12.6,12.26,12.3,12.3,0 1078 | 2019-11-04,12.68,13.13,12.44,12.83,12.83,0 1079 | 2019-11-05,12.85,13.28,12.25,13.1,13.1,0 1080 | 2019-11-06,13.18,13.39,12.6,12.62,12.62,0 1081 | 2019-11-07,12.59,12.89,12.26,12.73,12.73,0 1082 | 2019-11-08,12.98,13.05,12.0,12.07,12.07,0 1083 | 2019-11-11,13.15,13.49,12.66,12.69,12.69,0 1084 | 2019-11-12,12.64,13.1,12.36,12.68,12.68,0 1085 | 2019-11-13,12.91,13.9,12.88,13.0,13.0,0 1086 | 2019-11-14,13.16,13.81,12.93,13.05,13.05,0 1087 | 2019-11-15,12.95,12.97,11.92,12.05,12.05,0 1088 | 2019-11-18,12.39,13.1,12.32,12.46,12.46,0 1089 | 2019-11-19,12.33,13.01,12.16,12.86,12.86,0 1090 | 2019-11-20,13.42,14.17,12.61,12.78,12.78,0 1091 | 2019-11-21,13.35,13.86,12.49,13.13,13.13,0 1092 | 2019-11-22,12.82,13.25,12.33,12.34,12.34,0 1093 | 2019-11-25,12.51,12.59,11.73,11.87,11.87,0 1094 | 2019-11-26,11.88,12.04,11.42,11.54,11.54,0 1095 | 2019-11-27,11.55,11.79,11.44,11.75,11.75,0 1096 | 2019-11-29,12.5,12.83,12.12,12.62,12.62,0 1097 | 2019-12-02,12.69,15.27,12.55,14.91,14.91,0 1098 | 2019-12-03,14.68,17.99,14.61,15.96,15.96,0 1099 | 2019-12-04,16.379998999999998,16.4,14.12,14.8,14.8,0 1100 | 2019-12-05,14.46,15.37,14.17,14.52,14.52,0 1101 | 2019-12-06,14.37,14.47,13.19,13.62,13.62,0 1102 | 2019-12-09,14.25,16.07,12.25,15.86,15.86,0 1103 | 2019-12-10,15.8,16.9,14.93,15.68,15.68,0 1104 | 2019-12-11,15.57,15.97,14.98,14.99,14.99,0 1105 | 2019-12-12,14.94,15.55,13.6,13.94,13.94,0 1106 | 2019-12-13,13.18,14.35,12.54,12.63,12.63,0 1107 | 2019-12-16,12.47,12.53,11.71,12.14,12.14,0 1108 | 2019-12-17,12.23,12.47,11.9,12.29,12.29,0 1109 | 2019-12-18,12.24,12.7,11.93,12.58,12.58,0 1110 | 2019-12-19,12.55,12.78,12.43,12.5,12.5,0 1111 | 2019-12-20,12.55,12.61,12.04,12.51,12.51,0 1112 | 2019-12-23,12.81,12.9,,12.61,12.61,0 1113 | 2019-12-24,12.65,12.84,12.56,12.67,12.67,0 1114 | 2019-12-26,12.74,12.75,11.72,12.65,12.65,0 1115 | 2019-12-27,12.61,13.72,,13.43,13.43,0 1116 | 2019-12-30,13.74,15.14,13.44,14.82,14.82,0 1117 | 2019-12-31,14.84,15.39,13.75,13.78,13.78,0 1118 | 2020-01-02,13.46,13.72,,12.47,12.47,0 1119 | 2020-01-03,15.01,16.200001,13.13,14.02,14.02,0 1120 | 2020-01-06,15.45,16.389999,13.54,13.85,13.85,0 1121 | 2020-01-07,13.84,14.46,13.39,13.79,13.79,0 1122 | 2020-01-08,15.16,15.24,12.83,13.45,13.45,0 1123 | 2020-01-09,12.95,13.24,12.53,12.54,12.54,0 1124 | 2020-01-10,12.42,12.87,12.09,12.56,12.56,0 1125 | 2020-01-13,12.84,13.09,12.32,12.32,12.32,0 1126 | 2020-01-14,12.72,13.82,12.05,12.39,12.39,0 1127 | 2020-01-15,12.79,12.83,11.95,12.42,12.42,0 1128 | 2020-01-16,12.2,12.42,11.78,12.32,12.32,0 1129 | 2020-01-17,12.21,12.48,11.75,12.1,12.1,0 1130 | 2020-01-21,13.23,13.33,12.32,12.85,12.85,0 1131 | 2020-01-22,12.45,13.01,12.31,12.91,12.91,0 1132 | 2020-01-23,13.26,14.15,12.94,12.98,12.98,0 1133 | 2020-01-24,12.75,15.98,12.62,14.56,14.56,0 1134 | 2020-01-27,17.42,19.02,16.82,18.23,18.23,0 1135 | 2020-01-29,15.68,16.65,14.94,16.389999,16.389999,0 1136 | 2020-01-30,17.82,18.389999,15.3,15.49,15.49,0 1137 | 2020-01-31,16.25,19.99,16.18,18.84,18.84,0 1138 | 2020-02-03,18.639999,18.879998999999998,17.1,17.969998999999994,17.969998999999994,0 1139 | 2020-02-04,16.450001,16.459999,15.63,16.049999,16.049999,0 1140 | 2020-02-05,16.290001,16.32,15.02,15.15,15.15,0 1141 | 2020-02-06,15.13,15.66,14.7,14.96,14.96,0 1142 | 2020-02-07,15.07,16.16,14.81,15.47,15.47,0 1143 | 2020-02-10,15.88,16.43,15.01,15.04,15.04,0 1144 | 2020-02-11,14.91,15.27,14.38,15.18,15.18,0 1145 | 2020-02-12,14.86,14.88,,13.74,13.74,0 1146 | 2020-02-13,14.43,15.44,14.0,14.15,14.15,0 1147 | 2020-02-14,14.12,14.54,13.38,13.68,13.68,0 1148 | 2020-02-18,14.98,15.49,14.53,14.83,14.83,0 1149 | 2020-02-19,14.66,14.74,14.21,14.38,14.38,0 1150 | 2020-02-20,14.54,17.209999,14.49,15.56,15.56,0 1151 | 2020-02-21,17.33,18.209999,16.190001000000002,17.08,17.08,0 1152 | 2020-02-24,22.25,26.35,22.0,25.030001000000002,25.030001000000002,0 1153 | 2020-02-25,23.280001000000002,30.25,22.620001000000002,27.85,27.85,0 1154 | 2020-02-26,26.629998999999998,29.57,24.76,27.559998999999998,27.559998999999998,0 1155 | 2020-02-27,32.139998999999996,39.310001,29.370001000000002,39.16,39.16,0 1156 | 2020-02-28,42.02,49.48,39.369999,40.110001000000004,40.110001000000004,0 1157 | 2020-03-02,38.540001000000004,40.41,31.5,33.419998,33.419998,0 1158 | 2020-03-03,33.650002,41.060001,24.93,36.82,36.82,0 1159 | 2020-03-04,34.439999,35.580002,30.299999,31.99,31.99,0 1160 | 2020-03-05,33.610001000000004,42.84,33.540001000000004,39.619999,39.619999,0 1161 | 2020-03-06,48.93,54.389998999999996,40.84,41.939999,41.939999,0 1162 | 2020-03-09,41.939999,62.119999,41.939999,54.459998999999996,54.459998999999996,0 1163 | 2020-03-10,49.68,55.66,43.560001,47.299999,47.299999,0 1164 | 2020-03-11,52.240002000000004,55.82,49.98,53.900002,53.900002,0 1165 | 2020-03-12,61.459998999999996,76.83000200000002,59.91,75.470001,75.470001,0 1166 | 2020-03-13,65.07,77.57,55.169998,57.830002,57.830002,0 1167 | 2020-03-16,57.830002,83.559998,57.830002,82.690002,82.690002,0 1168 | 2020-03-17,82.690002,84.83000200000002,70.370003,75.910004,75.910004,0 1169 | 2020-03-18,69.370003,85.470001,69.370003,76.449997,76.449997,0 1170 | 2020-03-19,80.620003,84.260002,68.57,72.0,72.0,0 1171 | 2020-03-20,67.860001,69.510002,57.419998,66.040001,66.040001,0 1172 | 2020-03-23,74.08000200000002,76.739998,60.459998999999996,61.59,61.59,0 1173 | 2020-03-24,58.759997999999996,61.880001,36.240002000000004,61.669998,61.669998,0 1174 | 2020-03-25,61.439999,68.860001,58.029999,63.950001,63.950001,0 1175 | 2020-03-26,65.66999799999999,67.059998,57.66,61.0,61.0,0 1176 | 2020-03-30,66.300003,67.690002,56.599998,57.080002,57.080002,0 1177 | 2020-03-31,56.689999,58.75,50.880001,53.540001000000004,53.540001000000004,0 1178 | 2020-04-01,57.380001,60.59,52.759997999999996,57.060001,57.060001,0 1179 | 2020-04-02,54.459998999999996,57.240002000000004,,50.91,50.91,0 1180 | 2020-04-06,44.169998,45.73,43.450001,45.240002000000004,45.240002000000004,0 1181 | 2020-04-07,44.830002,47.509997999999996,43.509997999999996,46.700001,46.700001,0 1182 | 2020-04-08,45.900002,47.279999,42.529999,43.349998,43.349998,0 1183 | 2020-04-09,43.0,45.73,41.389998999999996,41.669998,41.669998,0 1184 | 2020-04-13,44.599998,45.040001000000004,41.169998,41.169998,41.169998,0 1185 | 2020-04-14,40.240002000000004,40.57,37.310001,37.759997999999996,37.759997999999996,0 1186 | 2020-04-15,42.57,43.23,40.049999,40.84,40.84,0 1187 | 2020-04-16,41.919998,43.02,39.869999,40.110001000000004,40.110001000000004,0 1188 | 2020-04-17,39.5,40.259997999999996,37.630001,38.150002,38.150002,0 1189 | 2020-04-20,40.68,43.830002,39.880001,43.830002,43.830002,0 1190 | 2020-04-21,44.279999,47.77,43.77,45.41,45.41,0 1191 | 2020-04-22,44.91,45.07,41.41,41.98,41.98,0 1192 | 2020-04-23,41.299999,42.470001,39.060001,41.380001,41.380001,0 1193 | 2020-04-24,38.799999,40.169998,35.599998,35.93,35.93,0 1194 | 2020-04-27,36.290001000000004,36.439999,32.509997999999996,33.290001000000004,33.290001000000004,0 1195 | 2020-04-28,33.209998999999996,35.389998999999996,30.540001,33.57,33.57,0 1196 | 2020-04-29,32.48,33.189999,30.709999,31.23,31.23,0 1197 | 2020-04-30,30.99,35.939999,30.93,34.150002,34.150002,0 1198 | 2020-05-01,38.169998,39.57,36.59,37.189999,37.189999,0 1199 | 2020-05-04,39.130001,40.32,35.529999,35.970001,35.970001,0 1200 | 2020-05-05,34.82,36.220001,31.950001,33.610001000000004,33.610001000000004,0 1201 | 2020-05-06,32.689999,35.689999,31.68,34.119999,34.119999,0 1202 | 2020-05-07,32.119999,32.279999,30.370001000000002,31.440001000000002,31.440001000000002,0 1203 | 2020-05-08,30.139999,30.389999,27.889999,27.98,27.98,0 1204 | 2020-05-11,28.459999,31.459999,26.969998999999998,27.57,27.57,0 1205 | 2020-05-12,28.469998999999998,33.040001000000004,26.0,33.040001000000004,33.040001000000004,0 1206 | 2020-05-13,32.740002000000004,37.419998,30.77,35.279999,35.279999,0 1207 | 2020-05-14,35.16,39.279999,32.330002,32.610001000000004,32.610001000000004,0 1208 | -------------------------------------------------------------------------------- /Chapter03/arr.csv: -------------------------------------------------------------------------------- 1 | 0.86,-0.74,2.27 2 | nan,nan,nan 3 | 1.53,1.47,0.15 4 | -------------------------------------------------------------------------------- /Chapter03/arr.npy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Hands-On-Financial-Trading-with-Python/57d12a947b6bb1bcce8af5ddcf95c9775602a9fb/Chapter03/arr.npy -------------------------------------------------------------------------------- /Chapter03/numpy.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 1, 6 | "metadata": {}, 7 | "outputs": [], 8 | "source": [ 9 | "import numpy as np\n", 10 | "np.random.seed(0)" 11 | ] 12 | }, 13 | { 14 | "cell_type": "markdown", 15 | "metadata": {}, 16 | "source": [ 17 | "# Working with Numpy ndarrays" 18 | ] 19 | }, 20 | { 21 | "cell_type": "markdown", 22 | "metadata": {}, 23 | "source": [ 24 | "## Creating 1D ndarrays" 25 | ] 26 | }, 27 | { 28 | "cell_type": "code", 29 | "execution_count": 2, 30 | "metadata": {}, 31 | "outputs": [ 32 | { 33 | "data": { 34 | "text/plain": [ 35 | "array([1.1, 2.2, 3.3, 4.4, 5.5])" 36 | ] 37 | }, 38 | "execution_count": 2, 39 | "metadata": {}, 40 | "output_type": "execute_result" 41 | } 42 | ], 43 | "source": [ 44 | "arr1D = np.array([1.1, 2.2, 3.3, 4.4, 5.5])\n", 45 | "arr1D" 46 | ] 47 | }, 48 | { 49 | "cell_type": "code", 50 | "execution_count": 3, 51 | "metadata": {}, 52 | "outputs": [ 53 | { 54 | "data": { 55 | "text/plain": [ 56 | "numpy.ndarray" 57 | ] 58 | }, 59 | "execution_count": 3, 60 | "metadata": {}, 61 | "output_type": "execute_result" 62 | } 63 | ], 64 | "source": [ 65 | "type(arr1D)" 66 | ] 67 | }, 68 | { 69 | "cell_type": "markdown", 70 | "metadata": {}, 71 | "source": [ 72 | "## Creating 2D ndarrays" 73 | ] 74 | }, 75 | { 76 | "cell_type": "code", 77 | "execution_count": 4, 78 | "metadata": {}, 79 | "outputs": [ 80 | { 81 | "data": { 82 | "text/plain": [ 83 | "array([[1, 2],\n", 84 | " [3, 4]])" 85 | ] 86 | }, 87 | "execution_count": 4, 88 | "metadata": {}, 89 | "output_type": "execute_result" 90 | } 91 | ], 92 | "source": [ 93 | "arr2D = np.array([[1, 2], [3, 4]])\n", 94 | "arr2D" 95 | ] 96 | }, 97 | { 98 | "cell_type": "markdown", 99 | "metadata": {}, 100 | "source": [ 101 | "## Creating any dimension ndarrays" 102 | ] 103 | }, 104 | { 105 | "cell_type": "code", 106 | "execution_count": 5, 107 | "metadata": {}, 108 | "outputs": [ 109 | { 110 | "data": { 111 | "text/plain": [ 112 | "array([[[[ 0, 1],\n", 113 | " [ 2, 3]],\n", 114 | "\n", 115 | " [[ 4, 5],\n", 116 | " [ 6, 7]]],\n", 117 | "\n", 118 | "\n", 119 | " [[[ 8, 9],\n", 120 | " [10, 11]],\n", 121 | "\n", 122 | " [[12, 13],\n", 123 | " [14, 15]]]])" 124 | ] 125 | }, 126 | "execution_count": 5, 127 | "metadata": {}, 128 | "output_type": "execute_result" 129 | } 130 | ], 131 | "source": [ 132 | "arr4D = np.array(range(16)).reshape((2, 2, 2, 2)); \n", 133 | "arr4D" 134 | ] 135 | }, 136 | { 137 | "cell_type": "code", 138 | "execution_count": 6, 139 | "metadata": {}, 140 | "outputs": [ 141 | { 142 | "data": { 143 | "text/plain": [ 144 | "(5,)" 145 | ] 146 | }, 147 | "execution_count": 6, 148 | "metadata": {}, 149 | "output_type": "execute_result" 150 | } 151 | ], 152 | "source": [ 153 | "arr1D.shape" 154 | ] 155 | }, 156 | { 157 | "cell_type": "code", 158 | "execution_count": 7, 159 | "metadata": {}, 160 | "outputs": [ 161 | { 162 | "data": { 163 | "text/plain": [ 164 | "(2, 2)" 165 | ] 166 | }, 167 | "execution_count": 7, 168 | "metadata": {}, 169 | "output_type": "execute_result" 170 | } 171 | ], 172 | "source": [ 173 | "arr2D.shape" 174 | ] 175 | }, 176 | { 177 | "cell_type": "code", 178 | "execution_count": 8, 179 | "metadata": {}, 180 | "outputs": [ 181 | { 182 | "data": { 183 | "text/plain": [ 184 | "(2, 2, 2, 2)" 185 | ] 186 | }, 187 | "execution_count": 8, 188 | "metadata": {}, 189 | "output_type": "execute_result" 190 | } 191 | ], 192 | "source": [ 193 | "arr4D.shape" 194 | ] 195 | }, 196 | { 197 | "cell_type": "markdown", 198 | "metadata": {}, 199 | "source": [ 200 | "## numpy.zeros(...)" 201 | ] 202 | }, 203 | { 204 | "cell_type": "code", 205 | "execution_count": 9, 206 | "metadata": {}, 207 | "outputs": [ 208 | { 209 | "data": { 210 | "text/plain": [ 211 | "array([[0., 0., 0., 0., 0.],\n", 212 | " [0., 0., 0., 0., 0.]])" 213 | ] 214 | }, 215 | "execution_count": 9, 216 | "metadata": {}, 217 | "output_type": "execute_result" 218 | } 219 | ], 220 | "source": [ 221 | "np.zeros(shape=(2,5))" 222 | ] 223 | }, 224 | { 225 | "cell_type": "markdown", 226 | "metadata": {}, 227 | "source": [ 228 | "## numpy.ones(...)" 229 | ] 230 | }, 231 | { 232 | "cell_type": "code", 233 | "execution_count": 10, 234 | "metadata": {}, 235 | "outputs": [ 236 | { 237 | "data": { 238 | "text/plain": [ 239 | "array([[1., 1.],\n", 240 | " [1., 1.]])" 241 | ] 242 | }, 243 | "execution_count": 10, 244 | "metadata": {}, 245 | "output_type": "execute_result" 246 | } 247 | ], 248 | "source": [ 249 | "np.ones(shape=(2,2))" 250 | ] 251 | }, 252 | { 253 | "cell_type": "markdown", 254 | "metadata": {}, 255 | "source": [ 256 | "## numpy.identity(...)" 257 | ] 258 | }, 259 | { 260 | "cell_type": "code", 261 | "execution_count": 11, 262 | "metadata": {}, 263 | "outputs": [ 264 | { 265 | "data": { 266 | "text/plain": [ 267 | "array([[1., 0., 0.],\n", 268 | " [0., 1., 0.],\n", 269 | " [0., 0., 1.]])" 270 | ] 271 | }, 272 | "execution_count": 11, 273 | "metadata": {}, 274 | "output_type": "execute_result" 275 | } 276 | ], 277 | "source": [ 278 | "np.identity(3)" 279 | ] 280 | }, 281 | { 282 | "cell_type": "markdown", 283 | "metadata": {}, 284 | "source": [ 285 | "## numpy.arange(...)" 286 | ] 287 | }, 288 | { 289 | "cell_type": "code", 290 | "execution_count": 12, 291 | "metadata": {}, 292 | "outputs": [ 293 | { 294 | "data": { 295 | "text/plain": [ 296 | "array([0, 1, 2, 3, 4])" 297 | ] 298 | }, 299 | "execution_count": 12, 300 | "metadata": {}, 301 | "output_type": "execute_result" 302 | } 303 | ], 304 | "source": [ 305 | "np.arange(5)" 306 | ] 307 | }, 308 | { 309 | "cell_type": "markdown", 310 | "metadata": {}, 311 | "source": [ 312 | "## numpy.random.randn(…)" 313 | ] 314 | }, 315 | { 316 | "cell_type": "code", 317 | "execution_count": 13, 318 | "metadata": {}, 319 | "outputs": [ 320 | { 321 | "data": { 322 | "text/plain": [ 323 | "array([[1.76405235, 0.40015721],\n", 324 | " [0.97873798, 2.2408932 ]])" 325 | ] 326 | }, 327 | "execution_count": 13, 328 | "metadata": {}, 329 | "output_type": "execute_result" 330 | } 331 | ], 332 | "source": [ 333 | "np.random.randn(2,2)" 334 | ] 335 | }, 336 | { 337 | "cell_type": "markdown", 338 | "metadata": {}, 339 | "source": [ 340 | "# Data types used with Numpy ndarrays" 341 | ] 342 | }, 343 | { 344 | "cell_type": "markdown", 345 | "metadata": {}, 346 | "source": [ 347 | "## Creation of numpy.float64 array" 348 | ] 349 | }, 350 | { 351 | "cell_type": "code", 352 | "execution_count": 14, 353 | "metadata": {}, 354 | "outputs": [ 355 | { 356 | "data": { 357 | "text/plain": [ 358 | "array([-1., 0., 1.])" 359 | ] 360 | }, 361 | "execution_count": 14, 362 | "metadata": {}, 363 | "output_type": "execute_result" 364 | } 365 | ], 366 | "source": [ 367 | "np.array([-1, 0, 1], dtype=np.float64)" 368 | ] 369 | }, 370 | { 371 | "cell_type": "markdown", 372 | "metadata": {}, 373 | "source": [ 374 | "## Creation of numpy.bool array" 375 | ] 376 | }, 377 | { 378 | "cell_type": "code", 379 | "execution_count": 15, 380 | "metadata": {}, 381 | "outputs": [ 382 | { 383 | "data": { 384 | "text/plain": [ 385 | "array([ True, False, True])" 386 | ] 387 | }, 388 | "execution_count": 15, 389 | "metadata": {}, 390 | "output_type": "execute_result" 391 | } 392 | ], 393 | "source": [ 394 | "np.array([-1, 0, 1], dtype=np.bool)" 395 | ] 396 | }, 397 | { 398 | "cell_type": "markdown", 399 | "metadata": {}, 400 | "source": [ 401 | "## ndarrays' dtype attribute" 402 | ] 403 | }, 404 | { 405 | "cell_type": "code", 406 | "execution_count": 16, 407 | "metadata": {}, 408 | "outputs": [ 409 | { 410 | "data": { 411 | "text/plain": [ 412 | "dtype('float64')" 413 | ] 414 | }, 415 | "execution_count": 16, 416 | "metadata": {}, 417 | "output_type": "execute_result" 418 | } 419 | ], 420 | "source": [ 421 | "arr1D.dtype" 422 | ] 423 | }, 424 | { 425 | "cell_type": "markdown", 426 | "metadata": {}, 427 | "source": [ 428 | "## Conversion of underlying types of ndarray with numpy.ndarrays.astype(...)" 429 | ] 430 | }, 431 | { 432 | "cell_type": "code", 433 | "execution_count": 17, 434 | "metadata": {}, 435 | "outputs": [ 436 | { 437 | "data": { 438 | "text/plain": [ 439 | "dtype('int64')" 440 | ] 441 | }, 442 | "execution_count": 17, 443 | "metadata": {}, 444 | "output_type": "execute_result" 445 | } 446 | ], 447 | "source": [ 448 | "arr1D.astype(np.int64).dtype" 449 | ] 450 | }, 451 | { 452 | "cell_type": "code", 453 | "execution_count": 18, 454 | "metadata": {}, 455 | "outputs": [ 456 | { 457 | "data": { 458 | "text/plain": [ 459 | "array([1, 2, 3, 4, 5], dtype=int64)" 460 | ] 461 | }, 462 | "execution_count": 18, 463 | "metadata": {}, 464 | "output_type": "execute_result" 465 | } 466 | ], 467 | "source": [ 468 | "arr1D.astype(np.int64)" 469 | ] 470 | }, 471 | { 472 | "cell_type": "markdown", 473 | "metadata": {}, 474 | "source": [ 475 | "# Indexing and slicing in Numpy arrays" 476 | ] 477 | }, 478 | { 479 | "cell_type": "markdown", 480 | "metadata": {}, 481 | "source": [ 482 | "## Direct Access to an ndarray's Element" 483 | ] 484 | }, 485 | { 486 | "cell_type": "code", 487 | "execution_count": 19, 488 | "metadata": {}, 489 | "outputs": [ 490 | { 491 | "data": { 492 | "text/plain": [ 493 | "array([[ 1.86755799, -0.97727788, 0.95008842],\n", 494 | " [-0.15135721, -0.10321885, 0.4105985 ],\n", 495 | " [ 0.14404357, 1.45427351, 0.76103773]])" 496 | ] 497 | }, 498 | "execution_count": 19, 499 | "metadata": {}, 500 | "output_type": "execute_result" 501 | } 502 | ], 503 | "source": [ 504 | "arr = np.random.randn(3,3)\n", 505 | "arr" 506 | ] 507 | }, 508 | { 509 | "cell_type": "code", 510 | "execution_count": 20, 511 | "metadata": {}, 512 | "outputs": [ 513 | { 514 | "data": { 515 | "text/plain": [ 516 | "array([ 1.86755799, -0.97727788, 0.95008842])" 517 | ] 518 | }, 519 | "execution_count": 20, 520 | "metadata": {}, 521 | "output_type": "execute_result" 522 | } 523 | ], 524 | "source": [ 525 | "arr[0]" 526 | ] 527 | }, 528 | { 529 | "cell_type": "code", 530 | "execution_count": 21, 531 | "metadata": {}, 532 | "outputs": [ 533 | { 534 | "data": { 535 | "text/plain": [ 536 | "-0.977277879876411" 537 | ] 538 | }, 539 | "execution_count": 21, 540 | "metadata": {}, 541 | "output_type": "execute_result" 542 | } 543 | ], 544 | "source": [ 545 | "arr[0][1]" 546 | ] 547 | }, 548 | { 549 | "cell_type": "code", 550 | "execution_count": 22, 551 | "metadata": {}, 552 | "outputs": [ 553 | { 554 | "data": { 555 | "text/plain": [ 556 | "-0.977277879876411" 557 | ] 558 | }, 559 | "execution_count": 22, 560 | "metadata": {}, 561 | "output_type": "execute_result" 562 | } 563 | ], 564 | "source": [ 565 | "arr[0, 1]" 566 | ] 567 | }, 568 | { 569 | "cell_type": "code", 570 | "execution_count": 23, 571 | "metadata": {}, 572 | "outputs": [ 573 | { 574 | "data": { 575 | "text/plain": [ 576 | "array([0.14404357, 1.45427351, 0.76103773])" 577 | ] 578 | }, 579 | "execution_count": 23, 580 | "metadata": {}, 581 | "output_type": "execute_result" 582 | } 583 | ], 584 | "source": [ 585 | "arr[-1]" 586 | ] 587 | }, 588 | { 589 | "cell_type": "markdown", 590 | "metadata": {}, 591 | "source": [ 592 | "## ndarray's Slicing" 593 | ] 594 | }, 595 | { 596 | "cell_type": "code", 597 | "execution_count": 24, 598 | "metadata": {}, 599 | "outputs": [ 600 | { 601 | "data": { 602 | "text/plain": [ 603 | "array([[-0.15135721, -0.10321885, 0.4105985 ],\n", 604 | " [ 0.14404357, 1.45427351, 0.76103773]])" 605 | ] 606 | }, 607 | "execution_count": 24, 608 | "metadata": {}, 609 | "output_type": "execute_result" 610 | } 611 | ], 612 | "source": [ 613 | "arr[1:]" 614 | ] 615 | }, 616 | { 617 | "cell_type": "markdown", 618 | "metadata": {}, 619 | "source": [ 620 | "### Accessing all ndarray elements after the first one" 621 | ] 622 | }, 623 | { 624 | "cell_type": "code", 625 | "execution_count": 25, 626 | "metadata": {}, 627 | "outputs": [ 628 | { 629 | "data": { 630 | "text/plain": [ 631 | "array([[-0.15135721, -0.10321885],\n", 632 | " [ 0.14404357, 1.45427351]])" 633 | ] 634 | }, 635 | "execution_count": 25, 636 | "metadata": {}, 637 | "output_type": "execute_result" 638 | } 639 | ], 640 | "source": [ 641 | "arr[1:, :2]" 642 | ] 643 | }, 644 | { 645 | "cell_type": "markdown", 646 | "metadata": {}, 647 | "source": [ 648 | "### Fetching all rows starting from teh 2nd and columns 1 and 2" 649 | ] 650 | }, 651 | { 652 | "cell_type": "code", 653 | "execution_count": 26, 654 | "metadata": {}, 655 | "outputs": [ 656 | { 657 | "data": { 658 | "text/plain": [ 659 | "array([[-0.10321885]])" 660 | ] 661 | }, 662 | "execution_count": 26, 663 | "metadata": {}, 664 | "output_type": "execute_result" 665 | } 666 | ], 667 | "source": [ 668 | "arr[1:2, -2:-1]" 669 | ] 670 | }, 671 | { 672 | "cell_type": "markdown", 673 | "metadata": {}, 674 | "source": [ 675 | "### Slicing with no indices" 676 | ] 677 | }, 678 | { 679 | "cell_type": "code", 680 | "execution_count": 27, 681 | "metadata": {}, 682 | "outputs": [ 683 | { 684 | "data": { 685 | "text/plain": [ 686 | "array([0.14404357, 1.45427351, 0.76103773])" 687 | ] 688 | }, 689 | "execution_count": 27, 690 | "metadata": {}, 691 | "output_type": "execute_result" 692 | } 693 | ], 694 | "source": [ 695 | "arr[:][2]" 696 | ] 697 | }, 698 | { 699 | "cell_type": "code", 700 | "execution_count": 28, 701 | "metadata": {}, 702 | "outputs": [ 703 | { 704 | "data": { 705 | "text/plain": [ 706 | "array([[ 1.86755799, -0.97727788, 0.95008842],\n", 707 | " [-0.15135721, -0.10321885, 0.4105985 ],\n", 708 | " [ 0.14404357, 1.45427351, 0.76103773]])" 709 | ] 710 | }, 711 | "execution_count": 28, 712 | "metadata": {}, 713 | "output_type": "execute_result" 714 | } 715 | ], 716 | "source": [ 717 | "arr[:][:]" 718 | ] 719 | }, 720 | { 721 | "cell_type": "markdown", 722 | "metadata": {}, 723 | "source": [ 724 | "### Setting values of a slice to zero" 725 | ] 726 | }, 727 | { 728 | "cell_type": "code", 729 | "execution_count": 29, 730 | "metadata": {}, 731 | "outputs": [ 732 | { 733 | "data": { 734 | "text/plain": [ 735 | "array([[-0.15135721, -0.10321885, 0.4105985 ]])" 736 | ] 737 | }, 738 | "execution_count": 29, 739 | "metadata": {}, 740 | "output_type": "execute_result" 741 | } 742 | ], 743 | "source": [ 744 | "arr1 = arr[1:2]\n", 745 | "arr1" 746 | ] 747 | }, 748 | { 749 | "cell_type": "code", 750 | "execution_count": 30, 751 | "metadata": {}, 752 | "outputs": [ 753 | { 754 | "data": { 755 | "text/plain": [ 756 | "array([[0., 0., 0.]])" 757 | ] 758 | }, 759 | "execution_count": 30, 760 | "metadata": {}, 761 | "output_type": "execute_result" 762 | } 763 | ], 764 | "source": [ 765 | "arr1[:] = 0\n", 766 | "arr1" 767 | ] 768 | }, 769 | { 770 | "cell_type": "code", 771 | "execution_count": 31, 772 | "metadata": {}, 773 | "outputs": [ 774 | { 775 | "data": { 776 | "text/plain": [ 777 | "array([[ 1.86755799, -0.97727788, 0.95008842],\n", 778 | " [ 0. , 0. , 0. ],\n", 779 | " [ 0.14404357, 1.45427351, 0.76103773]])" 780 | ] 781 | }, 782 | "execution_count": 31, 783 | "metadata": {}, 784 | "output_type": "execute_result" 785 | } 786 | ], 787 | "source": [ 788 | "arr" 789 | ] 790 | }, 791 | { 792 | "cell_type": "code", 793 | "execution_count": 32, 794 | "metadata": {}, 795 | "outputs": [], 796 | "source": [ 797 | "arr_copy = arr.copy()" 798 | ] 799 | }, 800 | { 801 | "cell_type": "code", 802 | "execution_count": 33, 803 | "metadata": {}, 804 | "outputs": [ 805 | { 806 | "data": { 807 | "text/plain": [ 808 | "array([[ 1.86755799, -0.97727788, 0.95008842],\n", 809 | " [ 1. , 1. , 1. ],\n", 810 | " [ 0.14404357, 1.45427351, 0.76103773]])" 811 | ] 812 | }, 813 | "execution_count": 33, 814 | "metadata": {}, 815 | "output_type": "execute_result" 816 | } 817 | ], 818 | "source": [ 819 | "arr_copy[1:2] = 1\n", 820 | "arr_copy" 821 | ] 822 | }, 823 | { 824 | "cell_type": "code", 825 | "execution_count": 34, 826 | "metadata": {}, 827 | "outputs": [ 828 | { 829 | "data": { 830 | "text/plain": [ 831 | "array([[ 1.86755799, -0.97727788, 0.95008842],\n", 832 | " [ 0. , 0. , 0. ],\n", 833 | " [ 0.14404357, 1.45427351, 0.76103773]])" 834 | ] 835 | }, 836 | "execution_count": 34, 837 | "metadata": {}, 838 | "output_type": "execute_result" 839 | } 840 | ], 841 | "source": [ 842 | "arr" 843 | ] 844 | }, 845 | { 846 | "cell_type": "code", 847 | "execution_count": 35, 848 | "metadata": {}, 849 | "outputs": [ 850 | { 851 | "data": { 852 | "text/plain": [ 853 | "array([[nan, nan, nan],\n", 854 | " [nan, nan, nan],\n", 855 | " [nan, nan, nan]])" 856 | ] 857 | }, 858 | "execution_count": 35, 859 | "metadata": {}, 860 | "output_type": "execute_result" 861 | } 862 | ], 863 | "source": [ 864 | "arr[:] = np.nan\n", 865 | "arr" 866 | ] 867 | }, 868 | { 869 | "cell_type": "markdown", 870 | "metadata": {}, 871 | "source": [ 872 | "## Boolean Indexing" 873 | ] 874 | }, 875 | { 876 | "cell_type": "code", 877 | "execution_count": 36, 878 | "metadata": {}, 879 | "outputs": [ 880 | { 881 | "data": { 882 | "text/plain": [ 883 | "array([[ 0.12167502, 0.44386323, 0.33367433],\n", 884 | " [ 1.49407907, -0.20515826, 0.3130677 ],\n", 885 | " [-0.85409574, -2.55298982, 0.6536186 ]])" 886 | ] 887 | }, 888 | "execution_count": 36, 889 | "metadata": {}, 890 | "output_type": "execute_result" 891 | } 892 | ], 893 | "source": [ 894 | "arr = np.random.randn(3,3)\n", 895 | "arr" 896 | ] 897 | }, 898 | { 899 | "cell_type": "code", 900 | "execution_count": 37, 901 | "metadata": {}, 902 | "outputs": [ 903 | { 904 | "data": { 905 | "text/plain": [ 906 | "array([[False, False, False],\n", 907 | " [False, True, False],\n", 908 | " [ True, True, False]])" 909 | ] 910 | }, 911 | "execution_count": 37, 912 | "metadata": {}, 913 | "output_type": "execute_result" 914 | } 915 | ], 916 | "source": [ 917 | "arr < 0" 918 | ] 919 | }, 920 | { 921 | "cell_type": "code", 922 | "execution_count": 38, 923 | "metadata": {}, 924 | "outputs": [ 925 | { 926 | "data": { 927 | "text/plain": [ 928 | "array([-0.20515826, -0.85409574, -2.55298982])" 929 | ] 930 | }, 931 | "execution_count": 38, 932 | "metadata": {}, 933 | "output_type": "execute_result" 934 | } 935 | ], 936 | "source": [ 937 | "arr[(arr < 0)]" 938 | ] 939 | }, 940 | { 941 | "cell_type": "code", 942 | "execution_count": 39, 943 | "metadata": {}, 944 | "outputs": [ 945 | { 946 | "data": { 947 | "text/plain": [ 948 | "array([[ True, True, True],\n", 949 | " [False, True, True],\n", 950 | " [ True, False, True]])" 951 | ] 952 | }, 953 | "execution_count": 39, 954 | "metadata": {}, 955 | "output_type": "execute_result" 956 | } 957 | ], 958 | "source": [ 959 | "(arr > -1) & (arr < 1)" 960 | ] 961 | }, 962 | { 963 | "cell_type": "code", 964 | "execution_count": 40, 965 | "metadata": {}, 966 | "outputs": [ 967 | { 968 | "data": { 969 | "text/plain": [ 970 | "array([ 0.12167502, 0.44386323, 0.33367433, -0.20515826, 0.3130677 ,\n", 971 | " -0.85409574, 0.6536186 ])" 972 | ] 973 | }, 974 | "execution_count": 40, 975 | "metadata": {}, 976 | "output_type": "execute_result" 977 | } 978 | ], 979 | "source": [ 980 | "arr[((arr > -1) & (arr < 1))]" 981 | ] 982 | }, 983 | { 984 | "cell_type": "code", 985 | "execution_count": 41, 986 | "metadata": {}, 987 | "outputs": [ 988 | { 989 | "data": { 990 | "text/plain": [ 991 | "array([ 1.49407907, -2.55298982])" 992 | ] 993 | }, 994 | "execution_count": 41, 995 | "metadata": {}, 996 | "output_type": "execute_result" 997 | } 998 | ], 999 | "source": [ 1000 | "arr[(arr < -1) | (arr > 1)]" 1001 | ] 1002 | }, 1003 | { 1004 | "cell_type": "markdown", 1005 | "metadata": {}, 1006 | "source": [ 1007 | "## Indexing with arrays" 1008 | ] 1009 | }, 1010 | { 1011 | "cell_type": "code", 1012 | "execution_count": 42, 1013 | "metadata": {}, 1014 | "outputs": [ 1015 | { 1016 | "data": { 1017 | "text/plain": [ 1018 | "array([[ 0.12167502, 0.44386323, 0.33367433],\n", 1019 | " [ 1.49407907, -0.20515826, 0.3130677 ],\n", 1020 | " [-0.85409574, -2.55298982, 0.6536186 ]])" 1021 | ] 1022 | }, 1023 | "execution_count": 42, 1024 | "metadata": {}, 1025 | "output_type": "execute_result" 1026 | } 1027 | ], 1028 | "source": [ 1029 | "arr" 1030 | ] 1031 | }, 1032 | { 1033 | "cell_type": "code", 1034 | "execution_count": 43, 1035 | "metadata": {}, 1036 | "outputs": [ 1037 | { 1038 | "data": { 1039 | "text/plain": [ 1040 | "array([[ 0.12167502, 0.44386323, 0.33367433],\n", 1041 | " [-0.85409574, -2.55298982, 0.6536186 ]])" 1042 | ] 1043 | }, 1044 | "execution_count": 43, 1045 | "metadata": {}, 1046 | "output_type": "execute_result" 1047 | } 1048 | ], 1049 | "source": [ 1050 | "arr[[0, 2]]" 1051 | ] 1052 | }, 1053 | { 1054 | "cell_type": "code", 1055 | "execution_count": 44, 1056 | "metadata": {}, 1057 | "outputs": [ 1058 | { 1059 | "data": { 1060 | "text/plain": [ 1061 | "array([ 0.44386323, -2.55298982])" 1062 | ] 1063 | }, 1064 | "execution_count": 44, 1065 | "metadata": {}, 1066 | "output_type": "execute_result" 1067 | } 1068 | ], 1069 | "source": [ 1070 | "arr[[0, 2], [1]]" 1071 | ] 1072 | }, 1073 | { 1074 | "cell_type": "code", 1075 | "execution_count": 45, 1076 | "metadata": { 1077 | "scrolled": true 1078 | }, 1079 | "outputs": [ 1080 | { 1081 | "data": { 1082 | "text/plain": [ 1083 | "array([[-0.85409574, -2.55298982, 0.6536186 ],\n", 1084 | " [ 0.12167502, 0.44386323, 0.33367433]])" 1085 | ] 1086 | }, 1087 | "execution_count": 45, 1088 | "metadata": {}, 1089 | "output_type": "execute_result" 1090 | } 1091 | ], 1092 | "source": [ 1093 | "arr[[2, 0]]" 1094 | ] 1095 | }, 1096 | { 1097 | "cell_type": "markdown", 1098 | "metadata": {}, 1099 | "source": [ 1100 | "# Basic ndarray operations with Numpy Universal Functions" 1101 | ] 1102 | }, 1103 | { 1104 | "cell_type": "code", 1105 | "execution_count": 46, 1106 | "metadata": {}, 1107 | "outputs": [ 1108 | { 1109 | "data": { 1110 | "text/plain": [ 1111 | "array([[1, 2],\n", 1112 | " [3, 4]])" 1113 | ] 1114 | }, 1115 | "execution_count": 46, 1116 | "metadata": {}, 1117 | "output_type": "execute_result" 1118 | } 1119 | ], 1120 | "source": [ 1121 | "arr2D" 1122 | ] 1123 | }, 1124 | { 1125 | "cell_type": "markdown", 1126 | "metadata": {}, 1127 | "source": [ 1128 | "## Scalar multiplication with an ndarray" 1129 | ] 1130 | }, 1131 | { 1132 | "cell_type": "code", 1133 | "execution_count": 47, 1134 | "metadata": {}, 1135 | "outputs": [ 1136 | { 1137 | "data": { 1138 | "text/plain": [ 1139 | "array([[ 4, 8],\n", 1140 | " [12, 16]])" 1141 | ] 1142 | }, 1143 | "execution_count": 47, 1144 | "metadata": {}, 1145 | "output_type": "execute_result" 1146 | } 1147 | ], 1148 | "source": [ 1149 | "arr2D * 4" 1150 | ] 1151 | }, 1152 | { 1153 | "cell_type": "markdown", 1154 | "metadata": {}, 1155 | "source": [ 1156 | "## Linear Combinations of ndarrays" 1157 | ] 1158 | }, 1159 | { 1160 | "cell_type": "code", 1161 | "execution_count": 48, 1162 | "metadata": {}, 1163 | "outputs": [ 1164 | { 1165 | "data": { 1166 | "text/plain": [ 1167 | "array([[ 5, 10],\n", 1168 | " [15, 20]])" 1169 | ] 1170 | }, 1171 | "execution_count": 48, 1172 | "metadata": {}, 1173 | "output_type": "execute_result" 1174 | } 1175 | ], 1176 | "source": [ 1177 | "2*arr2D + 3*arr2D" 1178 | ] 1179 | }, 1180 | { 1181 | "cell_type": "markdown", 1182 | "metadata": {}, 1183 | "source": [ 1184 | "## Exponentiation of ndarrays" 1185 | ] 1186 | }, 1187 | { 1188 | "cell_type": "code", 1189 | "execution_count": 49, 1190 | "metadata": {}, 1191 | "outputs": [ 1192 | { 1193 | "data": { 1194 | "text/plain": [ 1195 | "array([[ 1, 4],\n", 1196 | " [ 9, 16]], dtype=int32)" 1197 | ] 1198 | }, 1199 | "execution_count": 49, 1200 | "metadata": {}, 1201 | "output_type": "execute_result" 1202 | } 1203 | ], 1204 | "source": [ 1205 | "arr2D ** 2" 1206 | ] 1207 | }, 1208 | { 1209 | "cell_type": "markdown", 1210 | "metadata": {}, 1211 | "source": [ 1212 | "## Addition of an ndarray with a scalar" 1213 | ] 1214 | }, 1215 | { 1216 | "cell_type": "code", 1217 | "execution_count": 50, 1218 | "metadata": {}, 1219 | "outputs": [ 1220 | { 1221 | "data": { 1222 | "text/plain": [ 1223 | "array([[11, 12],\n", 1224 | " [13, 14]])" 1225 | ] 1226 | }, 1227 | "execution_count": 50, 1228 | "metadata": {}, 1229 | "output_type": "execute_result" 1230 | } 1231 | ], 1232 | "source": [ 1233 | "arr2D + 10" 1234 | ] 1235 | }, 1236 | { 1237 | "cell_type": "markdown", 1238 | "metadata": {}, 1239 | "source": [ 1240 | "## Transposing a matrix" 1241 | ] 1242 | }, 1243 | { 1244 | "cell_type": "code", 1245 | "execution_count": 51, 1246 | "metadata": {}, 1247 | "outputs": [ 1248 | { 1249 | "data": { 1250 | "text/plain": [ 1251 | "array([[1, 3],\n", 1252 | " [2, 4]])" 1253 | ] 1254 | }, 1255 | "execution_count": 51, 1256 | "metadata": {}, 1257 | "output_type": "execute_result" 1258 | } 1259 | ], 1260 | "source": [ 1261 | "arr2D.transpose()" 1262 | ] 1263 | }, 1264 | { 1265 | "cell_type": "markdown", 1266 | "metadata": {}, 1267 | "source": [ 1268 | "## Changing layout of an ndarray" 1269 | ] 1270 | }, 1271 | { 1272 | "cell_type": "code", 1273 | "execution_count": 52, 1274 | "metadata": {}, 1275 | "outputs": [ 1276 | { 1277 | "data": { 1278 | "text/plain": [ 1279 | "array([[1],\n", 1280 | " [2],\n", 1281 | " [3],\n", 1282 | " [4]])" 1283 | ] 1284 | }, 1285 | "execution_count": 52, 1286 | "metadata": {}, 1287 | "output_type": "execute_result" 1288 | } 1289 | ], 1290 | "source": [ 1291 | "arr2D.reshape((4, 1))" 1292 | ] 1293 | }, 1294 | { 1295 | "cell_type": "code", 1296 | "execution_count": 53, 1297 | "metadata": {}, 1298 | "outputs": [ 1299 | { 1300 | "data": { 1301 | "text/plain": [ 1302 | "array([[ 0.8644362 , -0.74216502, 2.26975462],\n", 1303 | " [-1.45436567, 0.04575852, -0.18718385],\n", 1304 | " [ 1.53277921, 1.46935877, 0.15494743]])" 1305 | ] 1306 | }, 1307 | "execution_count": 53, 1308 | "metadata": {}, 1309 | "output_type": "execute_result" 1310 | } 1311 | ], 1312 | "source": [ 1313 | "arr = np.random.randn(9).reshape((3,3))\n", 1314 | "arr" 1315 | ] 1316 | }, 1317 | { 1318 | "cell_type": "markdown", 1319 | "metadata": {}, 1320 | "source": [ 1321 | "## Finding the minimum value in an ndarray" 1322 | ] 1323 | }, 1324 | { 1325 | "cell_type": "code", 1326 | "execution_count": 54, 1327 | "metadata": {}, 1328 | "outputs": [ 1329 | { 1330 | "data": { 1331 | "text/plain": [ 1332 | "-1.4543656745987648" 1333 | ] 1334 | }, 1335 | "execution_count": 54, 1336 | "metadata": {}, 1337 | "output_type": "execute_result" 1338 | } 1339 | ], 1340 | "source": [ 1341 | "np.min(arr)" 1342 | ] 1343 | }, 1344 | { 1345 | "cell_type": "markdown", 1346 | "metadata": {}, 1347 | "source": [ 1348 | "## Calculating the absolute value" 1349 | ] 1350 | }, 1351 | { 1352 | "cell_type": "code", 1353 | "execution_count": 55, 1354 | "metadata": {}, 1355 | "outputs": [ 1356 | { 1357 | "data": { 1358 | "text/plain": [ 1359 | "array([[0.8644362 , 0.74216502, 2.26975462],\n", 1360 | " [1.45436567, 0.04575852, 0.18718385],\n", 1361 | " [1.53277921, 1.46935877, 0.15494743]])" 1362 | ] 1363 | }, 1364 | "execution_count": 55, 1365 | "metadata": {}, 1366 | "output_type": "execute_result" 1367 | } 1368 | ], 1369 | "source": [ 1370 | "np.abs(arr)" 1371 | ] 1372 | }, 1373 | { 1374 | "cell_type": "markdown", 1375 | "metadata": {}, 1376 | "source": [ 1377 | "## Calculating the mean of an ndarray" 1378 | ] 1379 | }, 1380 | { 1381 | "cell_type": "code", 1382 | "execution_count": 56, 1383 | "metadata": {}, 1384 | "outputs": [ 1385 | { 1386 | "data": { 1387 | "text/plain": [ 1388 | "0.4392578005636864" 1389 | ] 1390 | }, 1391 | "execution_count": 56, 1392 | "metadata": {}, 1393 | "output_type": "execute_result" 1394 | } 1395 | ], 1396 | "source": [ 1397 | "np.mean(arr)" 1398 | ] 1399 | }, 1400 | { 1401 | "cell_type": "code", 1402 | "execution_count": 57, 1403 | "metadata": { 1404 | "scrolled": true 1405 | }, 1406 | "outputs": [ 1407 | { 1408 | "data": { 1409 | "text/plain": [ 1410 | "array([0.31428325, 0.25765076, 0.7458394 ])" 1411 | ] 1412 | }, 1413 | "execution_count": 57, 1414 | "metadata": {}, 1415 | "output_type": "execute_result" 1416 | } 1417 | ], 1418 | "source": [ 1419 | "np.mean(arr, axis=0)" 1420 | ] 1421 | }, 1422 | { 1423 | "cell_type": "code", 1424 | "execution_count": 58, 1425 | "metadata": {}, 1426 | "outputs": [ 1427 | { 1428 | "data": { 1429 | "text/plain": [ 1430 | "array([ 0.79734193, -0.53193034, 1.0523618 ])" 1431 | ] 1432 | }, 1433 | "execution_count": 58, 1434 | "metadata": {}, 1435 | "output_type": "execute_result" 1436 | } 1437 | ], 1438 | "source": [ 1439 | "np.mean(arr, axis=1)" 1440 | ] 1441 | }, 1442 | { 1443 | "cell_type": "markdown", 1444 | "metadata": {}, 1445 | "source": [ 1446 | "## Finding the index of the maximum value in an ndarray" 1447 | ] 1448 | }, 1449 | { 1450 | "cell_type": "code", 1451 | "execution_count": 59, 1452 | "metadata": {}, 1453 | "outputs": [ 1454 | { 1455 | "data": { 1456 | "text/plain": [ 1457 | "2" 1458 | ] 1459 | }, 1460 | "execution_count": 59, 1461 | "metadata": {}, 1462 | "output_type": "execute_result" 1463 | } 1464 | ], 1465 | "source": [ 1466 | "np.argmax(arr)" 1467 | ] 1468 | }, 1469 | { 1470 | "cell_type": "code", 1471 | "execution_count": 60, 1472 | "metadata": {}, 1473 | "outputs": [ 1474 | { 1475 | "data": { 1476 | "text/plain": [ 1477 | "array([2, 1, 0], dtype=int64)" 1478 | ] 1479 | }, 1480 | "execution_count": 60, 1481 | "metadata": {}, 1482 | "output_type": "execute_result" 1483 | } 1484 | ], 1485 | "source": [ 1486 | "np.argmax(arr, axis=1)" 1487 | ] 1488 | }, 1489 | { 1490 | "cell_type": "markdown", 1491 | "metadata": {}, 1492 | "source": [ 1493 | "## Calculating the cumulative sum of elements of an ndarray" 1494 | ] 1495 | }, 1496 | { 1497 | "cell_type": "code", 1498 | "execution_count": 61, 1499 | "metadata": { 1500 | "scrolled": true 1501 | }, 1502 | "outputs": [ 1503 | { 1504 | "data": { 1505 | "text/plain": [ 1506 | "array([0.8644362 , 0.12227118, 2.3920258 , 0.93766013, 0.98341865,\n", 1507 | " 0.7962348 , 2.32901401, 3.79837278, 3.95332021])" 1508 | ] 1509 | }, 1510 | "execution_count": 61, 1511 | "metadata": {}, 1512 | "output_type": "execute_result" 1513 | } 1514 | ], 1515 | "source": [ 1516 | "np.cumsum(arr)" 1517 | ] 1518 | }, 1519 | { 1520 | "cell_type": "code", 1521 | "execution_count": 62, 1522 | "metadata": {}, 1523 | "outputs": [ 1524 | { 1525 | "data": { 1526 | "text/plain": [ 1527 | "array([[ 0.8644362 , 0.12227118, 2.3920258 ],\n", 1528 | " [-1.45436567, -1.40860716, -1.59579101],\n", 1529 | " [ 1.53277921, 3.00213798, 3.15708541]])" 1530 | ] 1531 | }, 1532 | "execution_count": 62, 1533 | "metadata": {}, 1534 | "output_type": "execute_result" 1535 | } 1536 | ], 1537 | "source": [ 1538 | "np.cumsum(arr, axis=1)" 1539 | ] 1540 | }, 1541 | { 1542 | "cell_type": "markdown", 1543 | "metadata": {}, 1544 | "source": [ 1545 | "## Finding NaNs in an ndarray" 1546 | ] 1547 | }, 1548 | { 1549 | "cell_type": "code", 1550 | "execution_count": 63, 1551 | "metadata": {}, 1552 | "outputs": [ 1553 | { 1554 | "data": { 1555 | "text/plain": [ 1556 | "array([[ 0.8644362 , -0.74216502, 2.26975462],\n", 1557 | " [ nan, nan, nan],\n", 1558 | " [ 1.53277921, 1.46935877, 0.15494743]])" 1559 | ] 1560 | }, 1561 | "execution_count": 63, 1562 | "metadata": {}, 1563 | "output_type": "execute_result" 1564 | } 1565 | ], 1566 | "source": [ 1567 | "arr[1, :] = np.nan\n", 1568 | "arr" 1569 | ] 1570 | }, 1571 | { 1572 | "cell_type": "code", 1573 | "execution_count": 64, 1574 | "metadata": {}, 1575 | "outputs": [ 1576 | { 1577 | "data": { 1578 | "text/plain": [ 1579 | "array([[False, False, False],\n", 1580 | " [ True, True, True],\n", 1581 | " [False, False, False]])" 1582 | ] 1583 | }, 1584 | "execution_count": 64, 1585 | "metadata": {}, 1586 | "output_type": "execute_result" 1587 | } 1588 | ], 1589 | "source": [ 1590 | "np.isnan(arr)" 1591 | ] 1592 | }, 1593 | { 1594 | "cell_type": "markdown", 1595 | "metadata": {}, 1596 | "source": [ 1597 | "## Finding the truth values of x1>x2 of two ndarrays" 1598 | ] 1599 | }, 1600 | { 1601 | "cell_type": "code", 1602 | "execution_count": 65, 1603 | "metadata": {}, 1604 | "outputs": [ 1605 | { 1606 | "data": { 1607 | "text/plain": [ 1608 | "array([[ 0.37816252, -0.88778575, -1.98079647],\n", 1609 | " [-0.34791215, 0.15634897, 1.23029068],\n", 1610 | " [ 1.20237985, -0.38732682, -0.30230275]])" 1611 | ] 1612 | }, 1613 | "execution_count": 65, 1614 | "metadata": {}, 1615 | "output_type": "execute_result" 1616 | } 1617 | ], 1618 | "source": [ 1619 | "arr1 = np.random.randn(9).reshape((3,3))\n", 1620 | "arr1" 1621 | ] 1622 | }, 1623 | { 1624 | "cell_type": "code", 1625 | "execution_count": 66, 1626 | "metadata": {}, 1627 | "outputs": [ 1628 | { 1629 | "data": { 1630 | "text/plain": [ 1631 | "array([[-1.04855297, -1.42001794, -1.70627019],\n", 1632 | " [ 1.9507754 , -0.50965218, -0.4380743 ],\n", 1633 | " [-1.25279536, 0.77749036, -1.61389785]])" 1634 | ] 1635 | }, 1636 | "execution_count": 66, 1637 | "metadata": {}, 1638 | "output_type": "execute_result" 1639 | } 1640 | ], 1641 | "source": [ 1642 | "arr2 = np.random.randn(9).reshape((3,3))\n", 1643 | "arr2" 1644 | ] 1645 | }, 1646 | { 1647 | "cell_type": "code", 1648 | "execution_count": 67, 1649 | "metadata": {}, 1650 | "outputs": [ 1651 | { 1652 | "data": { 1653 | "text/plain": [ 1654 | "array([[ True, True, False],\n", 1655 | " [False, True, True],\n", 1656 | " [ True, False, True]])" 1657 | ] 1658 | }, 1659 | "execution_count": 67, 1660 | "metadata": {}, 1661 | "output_type": "execute_result" 1662 | } 1663 | ], 1664 | "source": [ 1665 | "np.greater(arr1, arr2)" 1666 | ] 1667 | }, 1668 | { 1669 | "cell_type": "code", 1670 | "execution_count": 68, 1671 | "metadata": {}, 1672 | "outputs": [ 1673 | { 1674 | "data": { 1675 | "text/plain": [ 1676 | "array([[ True, True, False],\n", 1677 | " [False, True, True],\n", 1678 | " [ True, False, True]])" 1679 | ] 1680 | }, 1681 | "execution_count": 68, 1682 | "metadata": {}, 1683 | "output_type": "execute_result" 1684 | } 1685 | ], 1686 | "source": [ 1687 | "arr1 > arr2" 1688 | ] 1689 | }, 1690 | { 1691 | "cell_type": "markdown", 1692 | "metadata": {}, 1693 | "source": [ 1694 | "## Boolean operations Any and All on ndarrays" 1695 | ] 1696 | }, 1697 | { 1698 | "cell_type": "code", 1699 | "execution_count": 69, 1700 | "metadata": {}, 1701 | "outputs": [ 1702 | { 1703 | "data": { 1704 | "text/plain": [ 1705 | "array([[False, False, False],\n", 1706 | " [False, False, False],\n", 1707 | " [False, False, True]])" 1708 | ] 1709 | }, 1710 | "execution_count": 69, 1711 | "metadata": {}, 1712 | "output_type": "execute_result" 1713 | } 1714 | ], 1715 | "source": [ 1716 | "arr_bool = (arr > -0.5) & (arr < 0.5)\n", 1717 | "arr_bool" 1718 | ] 1719 | }, 1720 | { 1721 | "cell_type": "code", 1722 | "execution_count": 70, 1723 | "metadata": {}, 1724 | "outputs": [ 1725 | { 1726 | "data": { 1727 | "text/plain": [ 1728 | "True" 1729 | ] 1730 | }, 1731 | "execution_count": 70, 1732 | "metadata": {}, 1733 | "output_type": "execute_result" 1734 | } 1735 | ], 1736 | "source": [ 1737 | "arr_bool.any()" 1738 | ] 1739 | }, 1740 | { 1741 | "cell_type": "code", 1742 | "execution_count": 71, 1743 | "metadata": {}, 1744 | "outputs": [ 1745 | { 1746 | "data": { 1747 | "text/plain": [ 1748 | "array([False, False, True])" 1749 | ] 1750 | }, 1751 | "execution_count": 71, 1752 | "metadata": {}, 1753 | "output_type": "execute_result" 1754 | } 1755 | ], 1756 | "source": [ 1757 | "arr_bool.any(axis=1)" 1758 | ] 1759 | }, 1760 | { 1761 | "cell_type": "code", 1762 | "execution_count": 72, 1763 | "metadata": {}, 1764 | "outputs": [ 1765 | { 1766 | "data": { 1767 | "text/plain": [ 1768 | "False" 1769 | ] 1770 | }, 1771 | "execution_count": 72, 1772 | "metadata": {}, 1773 | "output_type": "execute_result" 1774 | } 1775 | ], 1776 | "source": [ 1777 | "arr_bool.all()" 1778 | ] 1779 | }, 1780 | { 1781 | "cell_type": "code", 1782 | "execution_count": 73, 1783 | "metadata": { 1784 | "scrolled": true 1785 | }, 1786 | "outputs": [ 1787 | { 1788 | "data": { 1789 | "text/plain": [ 1790 | "array([False, False, False])" 1791 | ] 1792 | }, 1793 | "execution_count": 73, 1794 | "metadata": {}, 1795 | "output_type": "execute_result" 1796 | } 1797 | ], 1798 | "source": [ 1799 | "arr_bool.all(axis=1)" 1800 | ] 1801 | }, 1802 | { 1803 | "cell_type": "markdown", 1804 | "metadata": {}, 1805 | "source": [ 1806 | "## Sorting ndarrays" 1807 | ] 1808 | }, 1809 | { 1810 | "cell_type": "code", 1811 | "execution_count": 74, 1812 | "metadata": {}, 1813 | "outputs": [ 1814 | { 1815 | "data": { 1816 | "text/plain": [ 1817 | "array([-0.21274028, -0.89546656, 0.3869025 , -0.51080514, -1.18063218,\n", 1818 | " -0.02818223, 0.42833187, 0.06651722, 0.3024719 , -0.63432209])" 1819 | ] 1820 | }, 1821 | "execution_count": 74, 1822 | "metadata": {}, 1823 | "output_type": "execute_result" 1824 | } 1825 | ], 1826 | "source": [ 1827 | "arr1D = np.random.randn(10)\n", 1828 | "arr1D" 1829 | ] 1830 | }, 1831 | { 1832 | "cell_type": "code", 1833 | "execution_count": 75, 1834 | "metadata": {}, 1835 | "outputs": [ 1836 | { 1837 | "data": { 1838 | "text/plain": [ 1839 | "array([-1.18063218, -0.89546656, -0.63432209, -0.51080514, -0.21274028,\n", 1840 | " -0.02818223, 0.06651722, 0.3024719 , 0.3869025 , 0.42833187])" 1841 | ] 1842 | }, 1843 | "execution_count": 75, 1844 | "metadata": {}, 1845 | "output_type": "execute_result" 1846 | } 1847 | ], 1848 | "source": [ 1849 | "np.sort(arr1D)" 1850 | ] 1851 | }, 1852 | { 1853 | "cell_type": "code", 1854 | "execution_count": 76, 1855 | "metadata": {}, 1856 | "outputs": [ 1857 | { 1858 | "data": { 1859 | "text/plain": [ 1860 | "array([-0.21274028, -0.89546656, 0.3869025 , -0.51080514, -1.18063218,\n", 1861 | " -0.02818223, 0.42833187, 0.06651722, 0.3024719 , -0.63432209])" 1862 | ] 1863 | }, 1864 | "execution_count": 76, 1865 | "metadata": {}, 1866 | "output_type": "execute_result" 1867 | } 1868 | ], 1869 | "source": [ 1870 | "arr1D" 1871 | ] 1872 | }, 1873 | { 1874 | "cell_type": "code", 1875 | "execution_count": 77, 1876 | "metadata": {}, 1877 | "outputs": [ 1878 | { 1879 | "data": { 1880 | "text/plain": [ 1881 | "array([4, 1, 9, 3, 0, 5, 7, 8, 2, 6], dtype=int64)" 1882 | ] 1883 | }, 1884 | "execution_count": 77, 1885 | "metadata": {}, 1886 | "output_type": "execute_result" 1887 | } 1888 | ], 1889 | "source": [ 1890 | "np.argsort(arr1D)" 1891 | ] 1892 | }, 1893 | { 1894 | "cell_type": "code", 1895 | "execution_count": 78, 1896 | "metadata": {}, 1897 | "outputs": [ 1898 | { 1899 | "data": { 1900 | "text/plain": [ 1901 | "array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], dtype=int64)" 1902 | ] 1903 | }, 1904 | "execution_count": 78, 1905 | "metadata": {}, 1906 | "output_type": "execute_result" 1907 | } 1908 | ], 1909 | "source": [ 1910 | "arr1D.sort()\n", 1911 | "np.argsort(arr1D)" 1912 | ] 1913 | }, 1914 | { 1915 | "cell_type": "markdown", 1916 | "metadata": {}, 1917 | "source": [ 1918 | "## Searching within ndarrays" 1919 | ] 1920 | }, 1921 | { 1922 | "cell_type": "code", 1923 | "execution_count": 79, 1924 | "metadata": {}, 1925 | "outputs": [ 1926 | { 1927 | "data": { 1928 | "text/plain": [ 1929 | "array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])" 1930 | ] 1931 | }, 1932 | "execution_count": 79, 1933 | "metadata": {}, 1934 | "output_type": "execute_result" 1935 | } 1936 | ], 1937 | "source": [ 1938 | "arr1 = np.array(range(1, 11))\n", 1939 | "arr1" 1940 | ] 1941 | }, 1942 | { 1943 | "cell_type": "code", 1944 | "execution_count": 80, 1945 | "metadata": {}, 1946 | "outputs": [ 1947 | { 1948 | "data": { 1949 | "text/plain": [ 1950 | "array([ 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000,\n", 1951 | " 10000])" 1952 | ] 1953 | }, 1954 | "execution_count": 80, 1955 | "metadata": {}, 1956 | "output_type": "execute_result" 1957 | } 1958 | ], 1959 | "source": [ 1960 | "arr2 = arr1 * 1000\n", 1961 | "arr2" 1962 | ] 1963 | }, 1964 | { 1965 | "cell_type": "code", 1966 | "execution_count": 81, 1967 | "metadata": {}, 1968 | "outputs": [ 1969 | { 1970 | "data": { 1971 | "text/plain": [ 1972 | "array([False, False, False, False, False, True, False, False, True,\n", 1973 | " False])" 1974 | ] 1975 | }, 1976 | "execution_count": 81, 1977 | "metadata": {}, 1978 | "output_type": "execute_result" 1979 | } 1980 | ], 1981 | "source": [ 1982 | "cond = np.random.randn(10) > 0\n", 1983 | "cond" 1984 | ] 1985 | }, 1986 | { 1987 | "cell_type": "code", 1988 | "execution_count": 82, 1989 | "metadata": {}, 1990 | "outputs": [ 1991 | { 1992 | "data": { 1993 | "text/plain": [ 1994 | "array([ 1000, 2000, 3000, 4000, 5000, 6, 7000, 8000, 9,\n", 1995 | " 10000])" 1996 | ] 1997 | }, 1998 | "execution_count": 82, 1999 | "metadata": {}, 2000 | "output_type": "execute_result" 2001 | } 2002 | ], 2003 | "source": [ 2004 | "np.where(cond, arr1, arr2)" 2005 | ] 2006 | }, 2007 | { 2008 | "cell_type": "markdown", 2009 | "metadata": {}, 2010 | "source": [ 2011 | "# File operations on ndarrays" 2012 | ] 2013 | }, 2014 | { 2015 | "cell_type": "markdown", 2016 | "metadata": {}, 2017 | "source": [ 2018 | "## File operations with Text files" 2019 | ] 2020 | }, 2021 | { 2022 | "cell_type": "code", 2023 | "execution_count": 83, 2024 | "metadata": {}, 2025 | "outputs": [ 2026 | { 2027 | "data": { 2028 | "text/plain": [ 2029 | "array([[ 0.8644362 , -0.74216502, 2.26975462],\n", 2030 | " [ nan, nan, nan],\n", 2031 | " [ 1.53277921, 1.46935877, 0.15494743]])" 2032 | ] 2033 | }, 2034 | "execution_count": 83, 2035 | "metadata": {}, 2036 | "output_type": "execute_result" 2037 | } 2038 | ], 2039 | "source": [ 2040 | "arr" 2041 | ] 2042 | }, 2043 | { 2044 | "cell_type": "code", 2045 | "execution_count": 84, 2046 | "metadata": {}, 2047 | "outputs": [], 2048 | "source": [ 2049 | "np.savetxt('arr.csv', arr, fmt='%0.2lf', delimiter=',')" 2050 | ] 2051 | }, 2052 | { 2053 | "cell_type": "code", 2054 | "execution_count": 85, 2055 | "metadata": {}, 2056 | "outputs": [ 2057 | { 2058 | "data": { 2059 | "text/plain": [ 2060 | "\u001b[1;36m0.86\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m-\u001b[0m\u001b[1;36m0.74\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m2.27\u001b[0m\u001b[1;33m\n", 2061 | "\u001b[0m\u001b[0mnan\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mnan\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mnan\u001b[0m\u001b[1;33m\n", 2062 | "\u001b[0m\u001b[1;36m1.53\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m1.47\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m0.15\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n" 2063 | ] 2064 | }, 2065 | "metadata": {}, 2066 | "output_type": "display_data" 2067 | } 2068 | ], 2069 | "source": [ 2070 | "%pycat arr.csv" 2071 | ] 2072 | }, 2073 | { 2074 | "cell_type": "code", 2075 | "execution_count": 86, 2076 | "metadata": {}, 2077 | "outputs": [ 2078 | { 2079 | "data": { 2080 | "text/plain": [ 2081 | "array([[ 0.86, -0.74, 2.27],\n", 2082 | " [ nan, nan, nan],\n", 2083 | " [ 1.53, 1.47, 0.15]])" 2084 | ] 2085 | }, 2086 | "execution_count": 86, 2087 | "metadata": {}, 2088 | "output_type": "execute_result" 2089 | } 2090 | ], 2091 | "source": [ 2092 | "arr_new = np.loadtxt('arr.csv', delimiter=',')\n", 2093 | "arr_new" 2094 | ] 2095 | }, 2096 | { 2097 | "cell_type": "markdown", 2098 | "metadata": {}, 2099 | "source": [ 2100 | "## File operations with Binary files" 2101 | ] 2102 | }, 2103 | { 2104 | "cell_type": "code", 2105 | "execution_count": 87, 2106 | "metadata": {}, 2107 | "outputs": [], 2108 | "source": [ 2109 | "np.save('arr', arr)" 2110 | ] 2111 | }, 2112 | { 2113 | "cell_type": "code", 2114 | "execution_count": 88, 2115 | "metadata": {}, 2116 | "outputs": [ 2117 | { 2118 | "data": { 2119 | "text/plain": [ 2120 | "array([[ 0.8644362 , -0.74216502, 2.26975462],\n", 2121 | " [ nan, nan, nan],\n", 2122 | " [ 1.53277921, 1.46935877, 0.15494743]])" 2123 | ] 2124 | }, 2125 | "execution_count": 88, 2126 | "metadata": {}, 2127 | "output_type": "execute_result" 2128 | } 2129 | ], 2130 | "source": [ 2131 | "arr_new = np.load('arr.npy')\n", 2132 | "arr_new" 2133 | ] 2134 | }, 2135 | { 2136 | "cell_type": "code", 2137 | "execution_count": 89, 2138 | "metadata": {}, 2139 | "outputs": [ 2140 | { 2141 | "data": { 2142 | "text/plain": [ 2143 | "array([[ True, True, True],\n", 2144 | " [False, False, False],\n", 2145 | " [ True, True, True]])" 2146 | ] 2147 | }, 2148 | "execution_count": 89, 2149 | "metadata": {}, 2150 | "output_type": "execute_result" 2151 | } 2152 | ], 2153 | "source": [ 2154 | "arr == arr_new" 2155 | ] 2156 | }, 2157 | { 2158 | "cell_type": "code", 2159 | "execution_count": null, 2160 | "metadata": {}, 2161 | "outputs": [], 2162 | "source": [] 2163 | } 2164 | ], 2165 | "metadata": { 2166 | "kernelspec": { 2167 | "display_name": "Python 3", 2168 | "language": "python", 2169 | "name": "python3" 2170 | }, 2171 | "language_info": { 2172 | "codemirror_mode": { 2173 | "name": "ipython", 2174 | "version": 3 2175 | }, 2176 | "file_extension": ".py", 2177 | "mimetype": "text/x-python", 2178 | "name": "python", 2179 | "nbconvert_exporter": "python", 2180 | "pygments_lexer": "ipython3", 2181 | "version": "3.6.13" 2182 | } 2183 | }, 2184 | "nbformat": 4, 2185 | "nbformat_minor": 4 2186 | } 2187 | -------------------------------------------------------------------------------- /Chapter04/df.csv: -------------------------------------------------------------------------------- 1 | ,A,B,C,D,E 2 | 9,0.5936127527039693,-0.542363581313287,-1.719672378632265,-0.5789087862396088,1.4269485506363453 3 | 10,0.2769969050973699,0.7896671305447348,0.32207411358372423,0.7003923770036988,0.3887166323316587 4 | 27,-0.04126386067735677,0.29588432121730995,-0.42527998805117745,1.7276391201667975,-0.8683525728302848 5 | 39,-0.8209775777189621,-1.0997420126347677,0.08672982893439583,0.4562870103794832,0.43103330308489607 6 | 44,2.072573534652599,-0.5377851185632266,-1.3784300958152218,-0.4924042501649364,2.3277381091718357 7 | 45,1.8044039661642386,-0.24942132634091757,-0.8208638292651728,-1.4933399582170666,0.524175945925593 8 | 61,0.34511317001597924,0.7243746800286961,-2.0403808422422274,-1.0797780988310783,-0.6934244111617518 9 | 71,-2.338046150957248,1.6622623438878599,-0.27535274222162914,-0.7465704488243654,1.2251034612955707 10 | 85,-0.1104324589602783,-1.2734893853043774,0.031786151729383684,0.4623583343156185,0.35354835026082904 11 | 97,-1.0619793207360517,-0.2613546728103239,-1.1713985180433313,-1.857087438077901,-0.14481625312704066 12 | -------------------------------------------------------------------------------- /Chapter04/df.json: -------------------------------------------------------------------------------- 1 | {"A":{"9":0.5936127527,"10":0.2769969051,"27":-0.0412638607,"39":-0.8209775777},"B":{"9":-0.5423635813,"10":0.7896671305,"27":0.2958843212,"39":-1.0997420126},"C":{"9":-1.7196723786,"10":0.3220741136,"27":-0.4252799881,"39":0.0867298289},"D":{"9":-0.5789087862,"10":0.700392377,"27":1.7276391202,"39":0.4562870104},"E":{"9":1.4269485506,"10":0.3887166323,"27":-0.8683525728,"39":0.4310333031}} -------------------------------------------------------------------------------- /Chapter05/fig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Hands-On-Financial-Trading-with-Python/57d12a947b6bb1bcce8af5ddcf95c9775602a9fb/Chapter05/fig.png -------------------------------------------------------------------------------- /Chapter07/cache.sqlite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Hands-On-Financial-Trading-with-Python/57d12a947b6bb1bcce8af5ddcf95c9775602a9fb/Chapter07/cache.sqlite -------------------------------------------------------------------------------- /Chapter08/quandl_eod.py: -------------------------------------------------------------------------------- 1 | """ 2 | Module for building a complete daily dataset from Quandl's EOD dataset. 3 | Source Code Inspiration: https://github.com/quantopian/zipline/issues/2603 4 | """ 5 | from io import BytesIO 6 | import tarfile 7 | from zipfile import ZipFile 8 | 9 | from click import progressbar 10 | from logbook import Logger 11 | import pandas as pd 12 | import requests 13 | from six.moves.urllib.parse import urlencode 14 | from six import iteritems 15 | from trading_calendars import register_calendar_alias 16 | 17 | from . import core as bundles 18 | import numpy as np 19 | 20 | log = Logger(__name__) 21 | 22 | ONE_MEGABYTE = 1024 * 1024 23 | QUANDL_DATA_URL = "https://www.quandl.com/api/v3/databases/EOD/data?" 24 | 25 | 26 | def format_metadata_url(api_key): 27 | """ Build the query URL for Quandl WIKI Prices metadata. 28 | """ 29 | query_params = [("api_key", api_key), ("download_type", "full")] 30 | 31 | return QUANDL_DATA_URL + urlencode(query_params) 32 | 33 | 34 | def load_data_table(file, index_col, show_progress=False): 35 | """ Load data table from zip file provided by Quandl. 36 | """ 37 | with ZipFile(file) as zip_file: 38 | file_names = zip_file.namelist() 39 | assert len(file_names) == 1, "Expected a single file from Quandl." 40 | eod_prices = file_names.pop() 41 | with zip_file.open(eod_prices) as table_file: 42 | if show_progress: 43 | log.info("Parsing raw data.") 44 | data_table = pd.read_csv( 45 | table_file, 46 | header=None, 47 | names=[ 48 | "symbol", 49 | "date", 50 | "open", 51 | "high", 52 | "low", 53 | "close", 54 | "volume", 55 | "ex_dividend", 56 | "split_ratio", 57 | "adjusted_open", 58 | "adjusted_high", 59 | "adjusted_low", 60 | "adjusted_close", 61 | "adjusted_volume", 62 | ], 63 | parse_dates=["date"], 64 | index_col=index_col, 65 | usecols=[ 66 | "symbol", 67 | "date", 68 | "open", 69 | "high", 70 | "low", 71 | "close", 72 | "volume", 73 | "ex_dividend", 74 | "split_ratio", 75 | ], 76 | ) 77 | 78 | return data_table 79 | 80 | 81 | def fetch_data_table(api_key, show_progress, retries): 82 | """ Fetch WIKI Prices data table from Quandl 83 | """ 84 | for _ in range(retries): 85 | try: 86 | if show_progress: 87 | log.info("Downloading WIKI metadata.") 88 | 89 | # Extract link from metadata and download zip file. 90 | table_url = format_metadata_url(api_key) 91 | if show_progress: 92 | raw_file = download_with_progress( 93 | table_url, 94 | chunk_size=ONE_MEGABYTE, 95 | label="Downloading WIKI Prices table from Quandl", 96 | ) 97 | else: 98 | raw_file = download_without_progress(table_url) 99 | 100 | return load_data_table( 101 | file=raw_file, index_col=None, show_progress=show_progress 102 | ) 103 | 104 | except Exception: 105 | log.exception("Exception raised reading Quandl data. Retrying.") 106 | 107 | else: 108 | raise ValueError( 109 | "Failed to download Quandl data after %d attempts." % (retries) 110 | ) 111 | 112 | 113 | def gen_asset_metadata(data, show_progress): 114 | if show_progress: 115 | log.info("Generating asset metadata.") 116 | 117 | data = data.groupby(by="symbol").agg({"date": [np.min, np.max]}) 118 | data.reset_index(inplace=True) 119 | data["start_date"] = data.date.amin 120 | data["end_date"] = data.date.amax 121 | del data["date"] 122 | data.columns = data.columns.get_level_values(0) 123 | 124 | data["exchange"] = "QUANDL-EOD" 125 | data["auto_close_date"] = data["end_date"].values + pd.Timedelta(days=1) 126 | return data 127 | 128 | 129 | def parse_splits(data, show_progress): 130 | if show_progress: 131 | log.info("Parsing split data.") 132 | 133 | data["split_ratio"] = 1.0 / data.split_ratio 134 | data.rename( 135 | columns={"split_ratio": "ratio", "date": "effective_date"}, 136 | inplace=True, 137 | copy=False, 138 | ) 139 | return data 140 | 141 | 142 | def parse_dividends(data, show_progress): 143 | if show_progress: 144 | log.info("Parsing dividend data.") 145 | 146 | data["record_date"] = data["declared_date"] = data["pay_date"] = pd.NaT 147 | data.rename( 148 | columns={"ex_dividend": "amount", "date": "ex_date"}, inplace=True, copy=False 149 | ) 150 | return data 151 | 152 | 153 | def parse_pricing_and_vol(data, sessions, symbol_map): 154 | for asset_id, symbol in iteritems(symbol_map): 155 | asset_data = ( 156 | data.xs(symbol, level=1).reindex(sessions.tz_localize(None)).fillna(0.0) 157 | ) 158 | yield asset_id, asset_data 159 | 160 | 161 | @bundles.register("quandl_eod") 162 | def quandl_eod_bundle(environ, 163 | asset_db_writer, 164 | minute_bar_writer, 165 | daily_bar_writer, 166 | adjustment_writer, 167 | calendar, 168 | start_session, 169 | end_session, 170 | cache, 171 | show_progress, 172 | output_dir): 173 | """ 174 | quandl_bundle builds a daily dataset using Quandl's WIKI Prices dataset. 175 | 176 | For more information on Quandl's API and how to obtain an API key, 177 | please visit https://docs.quandl.com/docs#section-authentication 178 | """ 179 | api_key = environ.get("QUANDL_API_KEY") 180 | if api_key is None: 181 | raise ValueError( 182 | "Please set your QUANDL_API_KEY environment variable and retry." 183 | ) 184 | 185 | raw_data = fetch_data_table( 186 | api_key, show_progress, environ.get("QUANDL_DOWNLOAD_ATTEMPTS", 5) 187 | ) 188 | asset_metadata = gen_asset_metadata(raw_data[["symbol", "date"]], show_progress) 189 | asset_db_writer.write(asset_metadata) 190 | 191 | symbol_map = asset_metadata.symbol 192 | sessions = calendar.sessions_in_range(start_session, end_session) 193 | 194 | raw_data.set_index(["date", "symbol"], inplace=True) 195 | daily_bar_writer.write( 196 | parse_pricing_and_vol(raw_data, sessions, symbol_map), 197 | show_progress=show_progress, 198 | ) 199 | 200 | raw_data.reset_index(inplace=True) 201 | raw_data["symbol"] = raw_data["symbol"].astype("category") 202 | raw_data["sid"] = raw_data.symbol.cat.codes 203 | adjustment_writer.write( 204 | splits=parse_splits( 205 | raw_data[["sid", "date", "split_ratio"]].loc[raw_data.split_ratio != 1], 206 | show_progress=show_progress, 207 | ), 208 | dividends=parse_dividends( 209 | raw_data[["sid", "date", "ex_dividend"]].loc[raw_data.ex_dividend != 0], 210 | show_progress=show_progress, 211 | ), 212 | ) 213 | 214 | 215 | def download_with_progress(url, chunk_size, **progress_kwargs): 216 | """ 217 | Download streaming data from a URL, printing progress information to the 218 | terminal. 219 | 220 | Parameters 221 | ---------- 222 | url : str 223 | A URL that can be understood by ``requests.get``. 224 | chunk_size : int 225 | Number of bytes to read at a time from requests. 226 | **progress_kwargs 227 | Forwarded to click.progressbar. 228 | 229 | Returns 230 | ------- 231 | data : BytesIO 232 | A BytesIO containing the downloaded data. 233 | """ 234 | resp = requests.get(url, stream=True) 235 | resp.raise_for_status() 236 | 237 | total_size = int(resp.headers["content-length"]) 238 | data = BytesIO() 239 | with progressbar(length=total_size, **progress_kwargs) as pbar: 240 | for chunk in resp.iter_content(chunk_size=chunk_size): 241 | data.write(chunk) 242 | pbar.update(len(chunk)) 243 | 244 | data.seek(0) 245 | return data 246 | 247 | 248 | def download_without_progress(url): 249 | """ 250 | Download data from a URL, returning a BytesIO containing the loaded data. 251 | 252 | Parameters 253 | ---------- 254 | url : str 255 | A URL that can be understood by ``requests.get``. 256 | 257 | Returns 258 | ------- 259 | data : BytesIO 260 | A BytesIO containing the downloaded data. 261 | """ 262 | resp = requests.get(url) 263 | resp.raise_for_status() 264 | return BytesIO(resp.content) 265 | 266 | 267 | register_calendar_alias("QUANDL-EOD", "NYSE") -------------------------------------------------------------------------------- /Chapter08/zipline_bundles-master.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PacktPublishing/Hands-On-Financial-Trading-with-Python/57d12a947b6bb1bcce8af5ddcf95c9775602a9fb/Chapter08/zipline_bundles-master.zip -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Packt 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

Machine Learning Summit 2025

2 | 3 | ## Machine Learning Summit 2025 4 | **Bridging Theory and Practice: ML Solutions for Today’s Challenges** 5 | 6 | 3 days, 20+ experts, and 25+ tech sessions and talks covering critical aspects of: 7 | - **Agentic and Generative AI** 8 | - **Applied Machine Learning in the Real World** 9 | - **ML Engineering and Optimization** 10 | 11 | 👉 [Book your ticket now >>](https://packt.link/mlsumgh) 12 | 13 | --- 14 | 15 | ## Join Our Newsletters 📬 16 | 17 | ### DataPro 18 | *The future of AI is unfolding. Don’t fall behind.* 19 | 20 |

DataPro QR

21 | 22 | Stay ahead with [**DataPro**](https://landing.packtpub.com/subscribe-datapronewsletter/?link_from_packtlink=yes), the free weekly newsletter for data scientists, AI/ML researchers, and data engineers. 23 | From trending tools like **PyTorch**, **scikit-learn**, **XGBoost**, and **BentoML** to hands-on insights on **database optimization** and real-world **ML workflows**, you’ll get what matters, fast. 24 | 25 | > Stay sharp with [DataPro](https://landing.packtpub.com/subscribe-datapronewsletter/?link_from_packtlink=yes). Join **115K+ data professionals** who never miss a beat. 26 | 27 | --- 28 | 29 | ### BIPro 30 | *Business runs on data. Make sure yours tells the right story.* 31 | 32 |

BIPro QR

33 | 34 | [**BIPro**](https://landing.packtpub.com/subscribe-bipro-newsletter/?link_from_packtlink=yes) is your free weekly newsletter for BI professionals, analysts, and data leaders. 35 | Get practical tips on **dashboarding**, **data visualization**, and **analytics strategy** with tools like **Power BI**, **Tableau**, **Looker**, **SQL**, and **dbt**. 36 | 37 | > Get smarter with [BIPro](https://landing.packtpub.com/subscribe-bipro-newsletter/?link_from_packtlink=yes). Trusted by **35K+ BI professionals**, see what you’re missing. 38 | 39 | 40 | 41 | 42 | # Hands-On Financial Trading with Python 43 | 44 | Hands-On Financial Trading with Python 45 | 46 | This is the code repository for [Hands-On Financial Trading with Python](https://www.packtpub.com/product/hands-on-financial-trading-with-python/9781838982881?utm_source=github&utm_medium=repository&utm_campaign=9781838982881), published by Packt. 47 | 48 | **A practical guide to using Zipline and other Python libraries for backtesting trading strategies** 49 | 50 | ## What is this book about? 51 | Algorithmic trading helps you stay ahead of the markets by devising strategies in quantitative analysis to gain profits and cut losses. 52 | 53 | The book starts by introducing you to algorithmic trading and explaining why Python is the best platform for developing trading strategies. You’ll then cover quantitative analysis using Python, and learn how to build algorithmic trading strategies with Zipline using various market data sources. Using Zipline as the backtesting library allows access to complimentary US historical daily market data until 2018. As you advance, you will gain an in-depth understanding of Python libraries such as NumPy and pandas for analyzing financial datasets, and explore Matplotlib, statsmodels, and scikit-learn libraries for advanced analytics. You’ll also focus on time series forecasting, covering pmdarima and Facebook Prophet. 54 | 55 | By the end of this trading book, you will be able to build predictive trading signals, adopt basic and advanced algorithmic trading strategies, and perform portfolio optimization. 56 | 57 | This book covers the following exciting features: 58 | * Discover how quantitative analysis works by covering financial statistics and ARIMA 59 | * Use core Python libraries to perform quantitative research and strategy development using real datasets 60 | * Understand how to access financial and economic data in Python 61 | * Implement effective data visualization with Matplotlib 62 | * Apply scientific computing and data visualization with popular Python libraries 63 | * Build and deploy backtesting algorithmic trading strategies 64 | 65 | If you feel this book is for you, get your [copy](https://www.amazon.com/dp/1838982884) today! 66 | 67 | https://www.packtpub.com/ 68 | 69 | ## Instructions and Navigations 70 | All of the code is organized into folders. 71 | 72 | The code will look like the following: 73 | ``` 74 | fig, (ax1, ax2, ax3, ax4) = plt.subplots(4, figsize=(12, 12), sharex=True) 75 | 76 | x = np.linspace(0, 10, num=20) 77 | y1 = np.exp(x) 78 | y2 = x ** 3 79 | y3 = np.sin(y2) 80 | y4 = np.random.randn(20) 81 | 82 | ax1.plot(x, y1, color='black', linestyle='--', linewidth=5, marker='x', markersize=15) 83 | ax2.plot(x, y2, color='green', linestyle='-.', linewidth=2, marker='^', markersize=10, alpha=0.9) 84 | ax3.plot(x, y3, color='red', linestyle=':', marker='*', markersize=15, drawstyle='steps') 85 | ax4.plot(x, y4, color='green', linestyle='-', marker='s', markersize=15) 86 | 87 | ``` 88 | 89 | **Following is what you need for this book:** 90 | This book is for data analysts and financial traders who want to explore how to design algorithmic trading strategies using Python’s core libraries. If you are looking for a practical guide to backtesting algorithmic trading strategies and building your own strategies, then this book is for you. Beginner-level working knowledge of Python programming and statistics will be helpful. 91 | 92 | With the following software and hardware list you can run all code files present in the book (Chapter 1-9). 93 | 94 | ### Software and Hardware List 95 | 96 | | Chapter | Software required | OS required | 97 | | -------- | -------------------------------------------------------------------------------------| -----------------------------------| 98 | | 1 - 9 | Anaconda, Python 3.6, JupyterLab | Windows, Mac OS X, and Linux (Any) | 99 | | | List of packages and dependencies can be found in the environment.yml file | | 100 | 101 | We also provide a PDF file that has color images of the screenshots/diagrams used in this book. [Click here to download it](https://static.packt-cdn.com/downloads/9781838982881_ColorImages.pdf). 102 | 103 | 104 | ### Related products 105 | * Python Algorithmic Trading Cookbook [[Packt]](https://www.packtpub.com/product/python-algorithmic-trading-cookbook/9781838989354) [[Amazon]](https://www.amazon.com/dp/1838989358) 106 | 107 | * Python for Finance Cookbook [[Packt]](https://www.packtpub.com/product/python-for-finance-cookbook/9781789618518) [[Amazon]](https://www.amazon.com/dp/1789618517) 108 | 109 | ## Get to Know the Author 110 | **Jiri Pik** is an artificial intelligence architect and strategist who works with major investment banks, hedge funds, and other players. He has architected and delivered breakthrough trading, portfolio, and risk management systems, as well as decision support systems, across numerous industries. His consulting firm, Jiri Pik—RocketEdge, provides its clients with certified expertise, judgment, and execution at lightspeed. 111 | 112 | **Sourav Ghosh** has worked in several proprietary high-frequency algorithmic trading firms over the last decade. He has built and deployed extremely low-latency, highthroughput automated trading systems for trading exchanges around the world, across multiple asset classes. He specializes in statistical arbitrage market-making and pairs trading strategies for the most liquid global futures contracts. He works as a senior quantitative developer at a trading firm in Chicago. He holds a master's in computer science from the University of Southern California. His areas of interest include computer architecture, FinTech, probability theory and stochastic processes, statistical learning and inference methods, and natural language processing 113 | 114 | ### Download a free PDF 115 | 116 | If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.
117 |

https://packt.link/free-ebook/9781838982881

-------------------------------------------------------------------------------- /environment.yml: -------------------------------------------------------------------------------- 1 | channels: 2 | - conda-forge 3 | - intel 4 | - defaults 5 | dependencies: 6 | - python=3.6 7 | - pip 8 | - arviz=0.11.2=pyhd8ed1ab_0 9 | - bcolz=1.2.1=py36he350917_1001 10 | - blosc=1.21.0=h0e60522_0 11 | - bokeh=0.13.0=py36_1000 12 | - bottleneck=1.3.2=py36h6434af4_3 13 | - brotlipy=0.7.0=py36h68aa20f_1001 14 | - bzip2=1.0.8=vc14h5832a3a_5 15 | - ca-certificates=2020.12.5=h5b45459_0 16 | - cached-property=1.5.2=hd8ed1ab_1 17 | - cached_property=1.5.2=pyha770c72_1 18 | - certifi=2020.12.5=py36ha15d459_1 19 | - cffi=1.14.5=py36he58ceb7_0 20 | - cftime=1.4.1=py36h6434af4_0 21 | - chardet=4.0.0=py36ha15d459_1 22 | - click=7.1.2=pyh9f0ad1d_0 23 | - cloudpickle=1.6.0=py_0 24 | - contextvars=2.4=py_0 25 | - convertdate=2.3.2=pyhd8ed1ab_0 26 | - curl=7.71.1=h2a8f88b_1 27 | - cycler=0.10.0=py_2 28 | - cytoolz=0.11.0=py36h68aa20f_3 29 | - dask==1.2.2 30 | - decorator=4.4.2=py_0 31 | - empyrical=0.5.5=pyh9f0ad1d_0 32 | - ephem=3.7.7.1=py36h779f372_1 33 | - fbprophet=0.6=py36h6538335_0 34 | - freetype=2.10.2=vc14he233217_1 35 | - flask==1.1.2 36 | - flask-compress==1.8.0 37 | - greenlet=1.0.0=py36he2d232f_0 38 | - hdf4=4.2.13=h0e5069d_1004 39 | - hdf5=1.10.6=nompi_h5268f04_1114 40 | - heapdict=1.0.1=py_0 41 | - hijri-converter=2.1.1=pyhd8ed1ab_0 42 | - holidays=0.10.5.2=pyhd8ed1ab_0 43 | - idna=2.10=pyh9f0ad1d_0 44 | - intel-openmp=2020.3=h57928b3_311 45 | - intelpython=2021.1.1=1 46 | - intervaltree=3.0.2=py_0 47 | - iso3166=1.0.1=pyh9f0ad1d_0 48 | - iso4217=1.6.20180829=py_0 49 | - jpeg=9d=h8ffe710_0 50 | - kiwisolver=1.3.1=py36he95197e_1 51 | - korean_lunar_calendar=0.2.1=pyh9f0ad1d_0 52 | - krb5=1.18.2=hc04afaa_0 53 | - libblas=3.9.0=8_mkl 54 | - libcblas=3.9.0=8_mkl 55 | - libcurl=7.71.1=h2a8f88b_1 56 | - libiconv=1.16=he774522_0 57 | - liblapack=3.9.0=8_mkl 58 | - libnetcdf=4.7.4=nompi_h3a9aa94_107 59 | - libpng=1.6.37=vc14he233217_7 60 | - libpython=2.0=py36ha15d459_1 61 | - libssh2=1.9.0=h680486a_6 62 | - libxml2=2.9.10=hf5bbc77_3 63 | - libxslt=1.1.33=h65864e5_2 64 | - locket=0.2.0=py_2 65 | - logbook=1.5.3=py36h68aa20f_4 66 | - lru-dict=1.1.6=py36h68aa20f_3 67 | - lunarcalendar=0.0.9=py_0 68 | - lxml=4.6.2=py36hf8cb5f9_1 69 | - m2w64-binutils=2.25.1=5 70 | - m2w64-bzip2=1.0.6=6 71 | - m2w64-crt-git=5.0.0.4636.2595836=2 72 | - m2w64-gcc=5.3.0=6 73 | - m2w64-gcc-ada=5.3.0=6 74 | - m2w64-gcc-fortran=5.3.0=6 75 | - m2w64-gcc-libgfortran=5.3.0=6 76 | - m2w64-gcc-libs=5.3.0=7 77 | - m2w64-gcc-libs-core=5.3.0=7 78 | - m2w64-gcc-objc=5.3.0=6 79 | - m2w64-gmp=6.1.0=2 80 | - m2w64-headers-git=5.0.0.4636.c0ad18a=2 81 | - m2w64-isl=0.16.1=2 82 | - m2w64-libiconv=1.14=6 83 | - m2w64-libmangle-git=5.0.0.4509.2e5a9a2=2 84 | - m2w64-libwinpthread-git=5.0.0.4634.697f757=2 85 | - m2w64-make=4.1.2351.a80a8b8=2 86 | - m2w64-mpc=1.0.3=3 87 | - m2w64-mpfr=3.1.4=4 88 | - m2w64-pkg-config=0.29.1=2 89 | - m2w64-toolchain=5.3.0=7 90 | - m2w64-toolchain_win-64=2.4.0=0 91 | - m2w64-tools-git=5.0.0.4592.90b8472=2 92 | - m2w64-windows-default-manifest=6.4=3 93 | - m2w64-winpthreads-git=5.0.0.4634.697f757=2 94 | - m2w64-zlib=1.2.8=10 95 | - markupsafe=1.1.1=py36h68aa20f_3 96 | - mkl=2020.4=hb70f87d_311 97 | - mock=4.0.3=py36ha15d459_1 98 | - msys2-conda-epoch=20160418=1 99 | - multipledispatch=0.6.0=py_0 100 | - netcdf4=1.5.6=nompi_py36h694ea1f_100 101 | - networkx=1.11=py36_0 102 | - openssl=1.1.1j=h8ffe710_0 103 | - pandas=0.22.0=py36_1 104 | - partd=1.1.0=py_0 105 | - patsy=0.5.1=py_0 106 | - psutil=5.8.0=py36h68aa20f_1 107 | - pycparser=2.20=pyh9f0ad1d_2 108 | - pymeeus=0.5.10=pyhd8ed1ab_0 109 | - pyopenssl=20.0.1=pyhd8ed1ab_0 110 | - pyparsing=2.4.7=pyh9f0ad1d_0 111 | - pyreadline=2.1=py36ha15d459_1003 112 | - pysocks=1.7.1=py36ha15d459_3 113 | - pystan=2.19.1.1=py36h12199cf_1 114 | - python=3.6.13=h39d44d4_0_cpython 115 | - python-dateutil=2.8.1=py_0 116 | - python-editor=1.0.4=py_0 117 | - python-interface=1.6.0=py_0 118 | - python_abi=3.6=1_cp36m 119 | - requests=2.25.1=pyhd3deb0d_0 120 | - scipy=1.5.3=py36h7ff6e69_0 121 | - setuptools=41.0.1=py36_0 122 | - six=1.15.0=pyh9f0ad1d_0 123 | - sortedcontainers=2.3.0=pyhd8ed1ab_0 124 | - statsmodels=0.11.1=py36h779f372_2 125 | - tblib=1.6.0=py_0 126 | - toolz=0.11.1=py_0 127 | - tornado=6.1=py36h68aa20f_1 128 | - tqdm=4.59.0=pyhd8ed1ab_0 129 | - typing_extensions=3.7.4.3=py_0 130 | - vc=14.1=h869be7e_15 131 | - vs2015_runtime=14.16.27012=hf0eaf9b_15 132 | - wheel=0.31.0=py36_3 133 | - win_inet_pton=1.1.0=py36ha15d459_2 134 | - wincertstore=0.2=py36_3 135 | - xarray=0.13.0=py_0 136 | - yaml=0.2.5=he774522_0 137 | - zict=2.0.0=py_0 138 | - zipline=1.4.1=py36he774522_0 139 | - zipp=3.4.1=pyhd8ed1ab_0 140 | - zlib=1.2.11.1=vc14hfa6e2cd_1 141 | - pip: 142 | - anyio==2.0.2 143 | - appdirs==1.4.4 144 | - argon2-cffi==20.1.0 145 | - async-generator==1.10 146 | - attrs==20.3.0 147 | - babel==2.9.0 148 | - backcall==0.2.0 149 | - beautifulsoup4==4.9.3 150 | - bleach==3.2.1 151 | - brotli==1.0.9 152 | - bs4==0.0.1 153 | - colorama==0.4.4 154 | - dacite==1.6.0 155 | - dash==1.18.1 156 | - dash-bootstrap-components==0.11.1 157 | - dash-colorscales==0.0.4 158 | - dash-core-components==1.14.1 159 | - dash-daq==0.5.0 160 | - dash-html-components==1.1.1 161 | - dash-renderer==1.8.3 162 | - dash-table==4.11.1 163 | - dataclasses==0.8 164 | - defusedxml==0.6.0 165 | - distributed==1.28.1 166 | - dtale==1.30.0 167 | - entrypoints==0.3 168 | - future==0.18.2 169 | - html5lib==1.1 170 | - iexfinance==0.5.0 171 | - inflection==0.5.1 172 | - int-date==0.1.8 173 | - ipykernel==5.4.2 174 | - ipympl==0.6.2 175 | - ipython==7.16.1 176 | - ipython-genutils==0.2.0 177 | - ipywidgets==7.6.3 178 | - itsdangerous==1.1.0 179 | - jedi==0.18.0 180 | - joblib==1.0.0 181 | - json5==0.9.5 182 | - jsonschema==3.2.0 183 | - jupyter==1.0.0 184 | - jupyter-client==6.1.11 185 | - jupyter-console==6.2.0 186 | - jupyter-contrib-core==0.3.3 187 | - jupyter-contrib-nbextensions==0.5.1 188 | - jupyter-core==4.7.0 189 | - jupyter-highlight-selected-word==0.2.0 190 | - jupyter-latex-envs==1.4.6 191 | - jupyter-nbextensions-configurator==0.4.1 192 | - jupyter-server==1.2.1 193 | - jupyterlab==3.0.3 194 | - jupyterlab-pygments==0.1.2 195 | - jupyterlab-server==2.1.1 196 | - jupyterlab-widgets==1.0.0 197 | - jupyterthemes==0.20.0 198 | - kaleido==0.1.0.post1 199 | - lesscpy==0.14.0 200 | - lz4==3.1.1 201 | - mistune==0.8.4 202 | - more-itertools==8.6.0 203 | - mpld3==0.5.2 204 | - msgpack==0.6.2 205 | - multitasking==0.0.9 206 | - nbclassic==0.2.6 207 | - nbclient==0.5.1 208 | - nbconvert==6.0.7 209 | - nbformat==5.0.8 210 | - nest-asyncio==1.4.3 211 | - notebook==6.1.6 212 | - pandocfilters==1.4.3 213 | - parso==0.8.1 214 | - pickleshare==0.7.5 215 | - pillow==8.0.1 216 | - plotly==4.14.1 217 | - ply==3.11 218 | - pmdarima==1.8.0 219 | - ppscore==1.1.0 220 | - prometheus-client==0.9.0 221 | - prompt-toolkit==3.0.10 222 | - pyfolio==0.9.2 223 | - pygments==2.7.3 224 | - pynput==1.7.2 225 | - pyportfolioopt==1.4.1 226 | - pyqt5==5.15.2 227 | - pyqt5-sip==12.8.1 228 | - pyqtwebengine==5.15.2 229 | - pyrsistent==0.17.3 230 | - pywin32==300 231 | - pywinpty==0.5.7 232 | - pyzmq==20.0.0 233 | - qgrid==1.3.1 234 | - qtconsole==5.0.1 235 | - qtpy==1.9.0 236 | - quandl==3.5.3 237 | - requests-cache==0.5.2 238 | - retrying==1.3.3 239 | - scikit-learn==0.24.0 240 | - seaborn==0.10.1 241 | - send2trash==1.5.0 242 | - sniffio==1.2.0 243 | - soupsieve==2.1 244 | - squarify==0.4.3 245 | - stockstats==0.3.2 246 | - strsimpy==0.2.0 247 | - terminado==0.9.2 248 | - testpath==0.4.4 249 | - threadpoolctl==2.1.0 250 | - traitlets==4.3.3 251 | - wcwidth==0.2.5 252 | - webencodings==0.5.1 253 | - werkzeug==1.0.1 254 | - widgetsnbextension==3.5.1 255 | - wrapt==1.12.1 256 | - yahoofinancials==1.6 257 | --------------------------------------------------------------------------------