test_prophet.py 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807
  1. # Copyright (c) 2017-present, Facebook, Inc.
  2. # All rights reserved.
  3. #
  4. # This source code is licensed under the BSD-style license found in the
  5. # LICENSE file in the root directory of this source tree. An additional grant
  6. # of patent rights can be found in the PATENTS file in the same directory.
  7. from __future__ import absolute_import
  8. from __future__ import division
  9. from __future__ import print_function
  10. from __future__ import unicode_literals
  11. try:
  12. from StringIO import StringIO
  13. except ImportError:
  14. from io import StringIO
  15. import numpy as np
  16. import pandas as pd
  17. # fb-block 1 start
  18. from unittest import TestCase
  19. from fbprophet import Prophet
  20. # fb-block 1 end
  21. # fb-block 2
  22. class TestProphet(TestCase):
  23. def test_fit_predict(self):
  24. N = DATA.shape[0]
  25. train = DATA.head(N // 2)
  26. future = DATA.tail(N // 2)
  27. forecaster = Prophet()
  28. forecaster.fit(train)
  29. forecaster.predict(future)
  30. def test_fit_predict_no_seasons(self):
  31. N = DATA.shape[0]
  32. train = DATA.head(N // 2)
  33. future = DATA.tail(N // 2)
  34. forecaster = Prophet(weekly_seasonality=False, yearly_seasonality=False)
  35. forecaster.fit(train)
  36. forecaster.predict(future)
  37. def test_fit_predict_no_changepoints(self):
  38. N = DATA.shape[0]
  39. train = DATA.head(N // 2)
  40. future = DATA.tail(N // 2)
  41. forecaster = Prophet(n_changepoints=0)
  42. forecaster.fit(train)
  43. forecaster.predict(future)
  44. def test_fit_changepoint_not_in_history(self):
  45. train = DATA[(DATA['ds'] < '2013-01-01') | (DATA['ds'] > '2014-01-01')]
  46. train[(train['ds'] > '2014-01-01')] += 20
  47. future = pd.DataFrame({'ds': DATA['ds']})
  48. forecaster = Prophet(changepoints=['2013-06-06'])
  49. forecaster.fit(train)
  50. forecaster.predict(future)
  51. def test_fit_predict_duplicates(self):
  52. N = DATA.shape[0]
  53. train1 = DATA.head(N // 2).copy()
  54. train2 = DATA.head(N // 2).copy()
  55. train2['y'] += 10
  56. train = train1.append(train2)
  57. future = pd.DataFrame({'ds': DATA['ds'].tail(N // 2)})
  58. forecaster = Prophet()
  59. forecaster.fit(train)
  60. forecaster.predict(future)
  61. def test_setup_dataframe(self):
  62. m = Prophet()
  63. N = DATA.shape[0]
  64. history = DATA.head(N // 2).copy()
  65. history = m.setup_dataframe(history, initialize_scales=True)
  66. self.assertTrue('t' in history)
  67. self.assertEqual(history['t'].min(), 0.0)
  68. self.assertEqual(history['t'].max(), 1.0)
  69. self.assertTrue('y_scaled' in history)
  70. self.assertEqual(history['y_scaled'].max(), 1.0)
  71. def test_get_changepoints(self):
  72. m = Prophet()
  73. N = DATA.shape[0]
  74. history = DATA.head(N // 2).copy()
  75. history = m.setup_dataframe(history, initialize_scales=True)
  76. m.history = history
  77. m.set_changepoints()
  78. cp = m.changepoints_t
  79. self.assertEqual(cp.shape[0], m.n_changepoints)
  80. self.assertEqual(len(cp.shape), 1)
  81. self.assertTrue(cp.min() > 0)
  82. self.assertTrue(cp.max() < N)
  83. mat = m.get_changepoint_matrix()
  84. self.assertEqual(mat.shape[0], N // 2)
  85. self.assertEqual(mat.shape[1], m.n_changepoints)
  86. def test_get_zero_changepoints(self):
  87. m = Prophet(n_changepoints=0)
  88. N = DATA.shape[0]
  89. history = DATA.head(N // 2).copy()
  90. history = m.setup_dataframe(history, initialize_scales=True)
  91. m.history = history
  92. m.set_changepoints()
  93. cp = m.changepoints_t
  94. self.assertEqual(cp.shape[0], 1)
  95. self.assertEqual(cp[0], 0)
  96. mat = m.get_changepoint_matrix()
  97. self.assertEqual(mat.shape[0], N // 2)
  98. self.assertEqual(mat.shape[1], 1)
  99. def test_fourier_series_weekly(self):
  100. mat = Prophet.fourier_series(DATA['ds'], 7, 3)
  101. # These are from the R forecast package directly.
  102. true_values = np.array([
  103. 0.7818315, 0.6234898, 0.9749279, -0.2225209, 0.4338837, -0.9009689,
  104. ])
  105. self.assertAlmostEqual(np.sum((mat[0] - true_values)**2), 0.0)
  106. def test_fourier_series_yearly(self):
  107. mat = Prophet.fourier_series(DATA['ds'], 365.25, 3)
  108. # These are from the R forecast package directly.
  109. true_values = np.array([
  110. 0.7006152, -0.7135393, -0.9998330, 0.01827656, 0.7262249, 0.6874572,
  111. ])
  112. self.assertAlmostEqual(np.sum((mat[0] - true_values)**2), 0.0)
  113. def test_growth_init(self):
  114. model = Prophet(growth='logistic')
  115. history = DATA.iloc[:468].copy()
  116. history['cap'] = history['y'].max()
  117. history = model.setup_dataframe(history, initialize_scales=True)
  118. k, m = model.linear_growth_init(history)
  119. self.assertAlmostEqual(k, 0.3055671)
  120. self.assertAlmostEqual(m, 0.5307511)
  121. k, m = model.logistic_growth_init(history)
  122. self.assertAlmostEqual(k, 1.507925, places=4)
  123. self.assertAlmostEqual(m, -0.08167497, places=4)
  124. def test_piecewise_linear(self):
  125. model = Prophet()
  126. t = np.arange(11.)
  127. m = 0
  128. k = 1.0
  129. deltas = np.array([0.5])
  130. changepoint_ts = np.array([5])
  131. y = model.piecewise_linear(t, deltas, k, m, changepoint_ts)
  132. y_true = np.array([0.0, 1.0, 2.0, 3.0, 4.0, 5.0,
  133. 6.5, 8.0, 9.5, 11.0, 12.5])
  134. self.assertEqual((y - y_true).sum(), 0.0)
  135. t = t[8:]
  136. y_true = y_true[8:]
  137. y = model.piecewise_linear(t, deltas, k, m, changepoint_ts)
  138. self.assertEqual((y - y_true).sum(), 0.0)
  139. def test_piecewise_logistic(self):
  140. model = Prophet()
  141. t = np.arange(11.)
  142. cap = np.ones(11) * 10
  143. m = 0
  144. k = 1.0
  145. deltas = np.array([0.5])
  146. changepoint_ts = np.array([5])
  147. y = model.piecewise_logistic(t, cap, deltas, k, m, changepoint_ts)
  148. y_true = np.array([5.000000, 7.310586, 8.807971, 9.525741, 9.820138,
  149. 9.933071, 9.984988, 9.996646, 9.999252, 9.999833,
  150. 9.999963])
  151. self.assertAlmostEqual((y - y_true).sum(), 0.0, places=5)
  152. t = t[8:]
  153. y_true = y_true[8:]
  154. cap = cap[8:]
  155. y = model.piecewise_logistic(t, cap, deltas, k, m, changepoint_ts)
  156. self.assertAlmostEqual((y - y_true).sum(), 0.0, places=5)
  157. def test_holidays(self):
  158. holidays = pd.DataFrame({
  159. 'ds': pd.to_datetime(['2016-12-25']),
  160. 'holiday': ['xmas'],
  161. 'lower_window': [-1],
  162. 'upper_window': [0],
  163. })
  164. model = Prophet(holidays=holidays)
  165. df = pd.DataFrame({
  166. 'ds': pd.date_range('2016-12-20', '2016-12-31')
  167. })
  168. feats = model.make_holiday_features(df['ds'])
  169. # 11 columns generated even though only 8 overlap
  170. self.assertEqual(feats.shape, (df.shape[0], 2))
  171. self.assertEqual((feats.sum(0) - np.array([1.0, 1.0])).sum(), 0)
  172. holidays = pd.DataFrame({
  173. 'ds': pd.to_datetime(['2016-12-25']),
  174. 'holiday': ['xmas'],
  175. 'lower_window': [-1],
  176. 'upper_window': [10],
  177. })
  178. feats = Prophet(holidays=holidays).make_holiday_features(df['ds'])
  179. # 12 columns generated even though only 8 overlap
  180. self.assertEqual(feats.shape, (df.shape[0], 12))
  181. def test_fit_with_holidays(self):
  182. holidays = pd.DataFrame({
  183. 'ds': pd.to_datetime(['2012-06-06', '2013-06-06']),
  184. 'holiday': ['seans-bday'] * 2,
  185. 'lower_window': [0] * 2,
  186. 'upper_window': [1] * 2,
  187. })
  188. model = Prophet(holidays=holidays, uncertainty_samples=0)
  189. model.fit(DATA).predict()
  190. def test_make_future_dataframe(self):
  191. N = 468
  192. train = DATA.head(N // 2)
  193. forecaster = Prophet()
  194. forecaster.fit(train)
  195. future = forecaster.make_future_dataframe(periods=3, freq='D',
  196. include_history=False)
  197. correct = pd.DatetimeIndex(['2013-04-26', '2013-04-27', '2013-04-28'])
  198. self.assertEqual(len(future), 3)
  199. for i in range(3):
  200. self.assertEqual(future.iloc[i]['ds'], correct[i])
  201. future = forecaster.make_future_dataframe(periods=3, freq='M',
  202. include_history=False)
  203. correct = pd.DatetimeIndex(['2013-04-30', '2013-05-31', '2013-06-30'])
  204. self.assertEqual(len(future), 3)
  205. for i in range(3):
  206. self.assertEqual(future.iloc[i]['ds'], correct[i])
  207. def test_auto_weekly_seasonality(self):
  208. # Should be True
  209. N = 15
  210. train = DATA.head(N)
  211. m = Prophet()
  212. self.assertEqual(m.weekly_seasonality, 'auto')
  213. m.fit(train)
  214. self.assertEqual(m.weekly_seasonality, True)
  215. # Should be False due to too short history
  216. N = 9
  217. train = DATA.head(N)
  218. m = Prophet()
  219. m.fit(train)
  220. self.assertEqual(m.weekly_seasonality, False)
  221. m = Prophet(weekly_seasonality=True)
  222. m.fit(train)
  223. self.assertEqual(m.weekly_seasonality, True)
  224. # Should be False due to weekly spacing
  225. train = DATA.iloc[::7, :]
  226. m = Prophet()
  227. m.fit(train)
  228. self.assertEqual(m.weekly_seasonality, False)
  229. def test_auto_yearly_seasonality(self):
  230. # Should be True
  231. m = Prophet()
  232. self.assertEqual(m.yearly_seasonality, 'auto')
  233. m.fit(DATA)
  234. self.assertEqual(m.yearly_seasonality, True)
  235. # Should be False due to too short history
  236. N = 240
  237. train = DATA.head(N)
  238. m = Prophet()
  239. m.fit(train)
  240. self.assertEqual(m.yearly_seasonality, False)
  241. m = Prophet(yearly_seasonality=True)
  242. m.fit(train)
  243. self.assertEqual(m.yearly_seasonality, True)
  244. DATA = pd.read_csv(StringIO("""
  245. ds,y
  246. 2012-05-18,38.23
  247. 2012-05-21,34.03
  248. 2012-05-22,31.0
  249. 2012-05-23,32.0
  250. 2012-05-24,33.03
  251. 2012-05-25,31.91
  252. 2012-05-29,28.84
  253. 2012-05-30,28.19
  254. 2012-05-31,29.6
  255. 2012-06-01,27.72
  256. 2012-06-04,26.9
  257. 2012-06-05,25.87
  258. 2012-06-06,26.81
  259. 2012-06-07,26.31
  260. 2012-06-08,27.1
  261. 2012-06-11,27.01
  262. 2012-06-12,27.4
  263. 2012-06-13,27.27
  264. 2012-06-14,28.29
  265. 2012-06-15,30.01
  266. 2012-06-18,31.41
  267. 2012-06-19,31.91
  268. 2012-06-20,31.6
  269. 2012-06-21,31.84
  270. 2012-06-22,33.05
  271. 2012-06-25,32.06
  272. 2012-06-26,33.1
  273. 2012-06-27,32.23
  274. 2012-06-28,31.36
  275. 2012-06-29,31.1
  276. 2012-07-02,30.77
  277. 2012-07-03,31.2
  278. 2012-07-05,31.47
  279. 2012-07-06,31.73
  280. 2012-07-09,32.17
  281. 2012-07-10,31.47
  282. 2012-07-11,30.97
  283. 2012-07-12,30.81
  284. 2012-07-13,30.72
  285. 2012-07-16,28.25
  286. 2012-07-17,28.09
  287. 2012-07-18,29.11
  288. 2012-07-19,29.0
  289. 2012-07-20,28.76
  290. 2012-07-23,28.75
  291. 2012-07-24,28.45
  292. 2012-07-25,29.34
  293. 2012-07-26,26.85
  294. 2012-07-27,23.71
  295. 2012-07-30,23.15
  296. 2012-07-31,21.71
  297. 2012-08-01,20.88
  298. 2012-08-02,20.04
  299. 2012-08-03,21.09
  300. 2012-08-06,21.92
  301. 2012-08-07,20.72
  302. 2012-08-08,20.72
  303. 2012-08-09,21.01
  304. 2012-08-10,21.81
  305. 2012-08-13,21.6
  306. 2012-08-14,20.38
  307. 2012-08-15,21.2
  308. 2012-08-16,19.87
  309. 2012-08-17,19.05
  310. 2012-08-20,20.01
  311. 2012-08-21,19.16
  312. 2012-08-22,19.44
  313. 2012-08-23,19.44
  314. 2012-08-24,19.41
  315. 2012-08-27,19.15
  316. 2012-08-28,19.34
  317. 2012-08-29,19.1
  318. 2012-08-30,19.09
  319. 2012-08-31,18.06
  320. 2012-09-04,17.73
  321. 2012-09-05,18.58
  322. 2012-09-06,18.96
  323. 2012-09-07,18.98
  324. 2012-09-10,18.81
  325. 2012-09-11,19.43
  326. 2012-09-12,20.93
  327. 2012-09-13,20.71
  328. 2012-09-14,22.0
  329. 2012-09-17,21.52
  330. 2012-09-18,21.87
  331. 2012-09-19,23.29
  332. 2012-09-20,22.59
  333. 2012-09-21,22.86
  334. 2012-09-24,20.79
  335. 2012-09-25,20.28
  336. 2012-09-26,20.62
  337. 2012-09-27,20.32
  338. 2012-09-28,21.66
  339. 2012-10-01,21.99
  340. 2012-10-02,22.27
  341. 2012-10-03,21.83
  342. 2012-10-04,21.95
  343. 2012-10-05,20.91
  344. 2012-10-08,20.4
  345. 2012-10-09,20.23
  346. 2012-10-10,19.64
  347. 2012-10-11,19.75
  348. 2012-10-12,19.52
  349. 2012-10-15,19.52
  350. 2012-10-16,19.48
  351. 2012-10-17,19.88
  352. 2012-10-18,18.98
  353. 2012-10-19,19.0
  354. 2012-10-22,19.32
  355. 2012-10-23,19.5
  356. 2012-10-24,23.23
  357. 2012-10-25,22.56
  358. 2012-10-26,21.94
  359. 2012-10-31,21.11
  360. 2012-11-01,21.21
  361. 2012-11-02,21.18
  362. 2012-11-05,21.25
  363. 2012-11-06,21.17
  364. 2012-11-07,20.47
  365. 2012-11-08,19.99
  366. 2012-11-09,19.21
  367. 2012-11-12,20.07
  368. 2012-11-13,19.86
  369. 2012-11-14,22.36
  370. 2012-11-15,22.17
  371. 2012-11-16,23.56
  372. 2012-11-19,22.92
  373. 2012-11-20,23.1
  374. 2012-11-21,24.32
  375. 2012-11-23,24.0
  376. 2012-11-26,25.94
  377. 2012-11-27,26.15
  378. 2012-11-28,26.36
  379. 2012-11-29,27.32
  380. 2012-11-30,28.0
  381. 2012-12-03,27.04
  382. 2012-12-04,27.46
  383. 2012-12-05,27.71
  384. 2012-12-06,26.97
  385. 2012-12-07,27.49
  386. 2012-12-10,27.84
  387. 2012-12-11,27.98
  388. 2012-12-12,27.58
  389. 2012-12-13,28.24
  390. 2012-12-14,26.81
  391. 2012-12-17,26.75
  392. 2012-12-18,27.71
  393. 2012-12-19,27.41
  394. 2012-12-20,27.36
  395. 2012-12-21,26.26
  396. 2012-12-24,26.93
  397. 2012-12-26,26.51
  398. 2012-12-27,26.05
  399. 2012-12-28,25.91
  400. 2012-12-31,26.62
  401. 2013-01-02,28.0
  402. 2013-01-03,27.77
  403. 2013-01-04,28.76
  404. 2013-01-07,29.42
  405. 2013-01-08,29.06
  406. 2013-01-09,30.59
  407. 2013-01-10,31.3
  408. 2013-01-11,31.72
  409. 2013-01-14,30.95
  410. 2013-01-15,30.1
  411. 2013-01-16,29.85
  412. 2013-01-17,30.14
  413. 2013-01-18,29.66
  414. 2013-01-22,30.73
  415. 2013-01-23,30.82
  416. 2013-01-24,31.08
  417. 2013-01-25,31.54
  418. 2013-01-28,32.47
  419. 2013-01-29,30.79
  420. 2013-01-30,31.24
  421. 2013-01-31,30.98
  422. 2013-02-01,29.73
  423. 2013-02-04,28.11
  424. 2013-02-05,28.64
  425. 2013-02-06,29.05
  426. 2013-02-07,28.65
  427. 2013-02-08,28.55
  428. 2013-02-11,28.26
  429. 2013-02-12,27.37
  430. 2013-02-13,27.91
  431. 2013-02-14,28.5
  432. 2013-02-15,28.32
  433. 2013-02-19,28.93
  434. 2013-02-20,28.46
  435. 2013-02-21,27.28
  436. 2013-02-22,27.13
  437. 2013-02-25,27.27
  438. 2013-02-26,27.39
  439. 2013-02-27,26.87
  440. 2013-02-28,27.25
  441. 2013-03-01,27.78
  442. 2013-03-04,27.72
  443. 2013-03-05,27.52
  444. 2013-03-06,27.45
  445. 2013-03-07,28.58
  446. 2013-03-08,27.96
  447. 2013-03-11,28.14
  448. 2013-03-12,27.83
  449. 2013-03-13,27.08
  450. 2013-03-14,27.04
  451. 2013-03-15,26.65
  452. 2013-03-18,26.49
  453. 2013-03-19,26.55
  454. 2013-03-20,25.86
  455. 2013-03-21,25.74
  456. 2013-03-22,25.73
  457. 2013-03-25,25.13
  458. 2013-03-26,25.21
  459. 2013-03-27,26.09
  460. 2013-03-28,25.58
  461. 2013-04-01,25.53
  462. 2013-04-02,25.42
  463. 2013-04-03,26.25
  464. 2013-04-04,27.07
  465. 2013-04-05,27.39
  466. 2013-04-08,26.85
  467. 2013-04-09,26.59
  468. 2013-04-10,27.57
  469. 2013-04-11,28.02
  470. 2013-04-12,27.4
  471. 2013-04-15,26.52
  472. 2013-04-16,26.92
  473. 2013-04-17,26.63
  474. 2013-04-18,25.69
  475. 2013-04-19,25.73
  476. 2013-04-22,25.97
  477. 2013-04-23,25.98
  478. 2013-04-24,26.11
  479. 2013-04-25,26.14
  480. 2013-04-26,26.85
  481. 2013-04-29,26.98
  482. 2013-04-30,27.77
  483. 2013-05-01,27.43
  484. 2013-05-02,28.97
  485. 2013-05-03,28.31
  486. 2013-05-06,27.57
  487. 2013-05-07,26.89
  488. 2013-05-08,27.12
  489. 2013-05-09,27.04
  490. 2013-05-10,26.68
  491. 2013-05-13,26.82
  492. 2013-05-14,27.07
  493. 2013-05-15,26.6
  494. 2013-05-16,26.13
  495. 2013-05-17,26.25
  496. 2013-05-20,25.76
  497. 2013-05-21,25.66
  498. 2013-05-22,25.16
  499. 2013-05-23,25.06
  500. 2013-05-24,24.31
  501. 2013-05-28,24.1
  502. 2013-05-29,23.32
  503. 2013-05-30,24.55
  504. 2013-05-31,24.35
  505. 2013-06-03,23.85
  506. 2013-06-04,23.52
  507. 2013-06-05,22.9
  508. 2013-06-06,22.97
  509. 2013-06-07,23.29
  510. 2013-06-10,24.33
  511. 2013-06-11,24.03
  512. 2013-06-12,23.77
  513. 2013-06-13,23.73
  514. 2013-06-14,23.63
  515. 2013-06-17,24.02
  516. 2013-06-18,24.21
  517. 2013-06-19,24.31
  518. 2013-06-20,23.9
  519. 2013-06-21,24.53
  520. 2013-06-24,23.94
  521. 2013-06-25,24.25
  522. 2013-06-26,24.16
  523. 2013-06-27,24.66
  524. 2013-06-28,24.88
  525. 2013-07-01,24.81
  526. 2013-07-02,24.41
  527. 2013-07-03,24.52
  528. 2013-07-05,24.37
  529. 2013-07-08,24.71
  530. 2013-07-09,25.48
  531. 2013-07-10,25.8
  532. 2013-07-11,25.81
  533. 2013-07-12,25.91
  534. 2013-07-15,26.28
  535. 2013-07-16,26.32
  536. 2013-07-17,26.65
  537. 2013-07-18,26.18
  538. 2013-07-19,25.88
  539. 2013-07-22,26.05
  540. 2013-07-23,26.13
  541. 2013-07-24,26.51
  542. 2013-07-25,34.36
  543. 2013-07-26,34.01
  544. 2013-07-29,35.43
  545. 2013-07-30,37.63
  546. 2013-07-31,36.8
  547. 2013-08-01,37.49
  548. 2013-08-02,38.05
  549. 2013-08-05,39.19
  550. 2013-08-06,38.55
  551. 2013-08-07,38.87
  552. 2013-08-08,38.54
  553. 2013-08-09,38.5
  554. 2013-08-12,38.22
  555. 2013-08-13,37.02
  556. 2013-08-14,36.65
  557. 2013-08-15,36.56
  558. 2013-08-16,37.08
  559. 2013-08-19,37.81
  560. 2013-08-20,38.41
  561. 2013-08-21,38.32
  562. 2013-08-22,38.55
  563. 2013-08-23,40.55
  564. 2013-08-26,41.34
  565. 2013-08-27,39.64
  566. 2013-08-28,40.55
  567. 2013-08-29,41.28
  568. 2013-08-30,41.29
  569. 2013-09-03,41.87
  570. 2013-09-04,41.78
  571. 2013-09-05,42.66
  572. 2013-09-06,43.95
  573. 2013-09-09,44.04
  574. 2013-09-10,43.6
  575. 2013-09-11,45.04
  576. 2013-09-12,44.75
  577. 2013-09-13,44.31
  578. 2013-09-16,42.51
  579. 2013-09-17,45.07
  580. 2013-09-18,45.23
  581. 2013-09-19,45.98
  582. 2013-09-20,47.49
  583. 2013-09-23,47.19
  584. 2013-09-24,48.45
  585. 2013-09-25,49.46
  586. 2013-09-26,50.39
  587. 2013-09-27,51.24
  588. 2013-09-30,50.23
  589. 2013-10-01,50.42
  590. 2013-10-02,50.28
  591. 2013-10-03,49.18
  592. 2013-10-04,51.04
  593. 2013-10-07,50.52
  594. 2013-10-08,47.14
  595. 2013-10-09,46.77
  596. 2013-10-10,49.05
  597. 2013-10-11,49.11
  598. 2013-10-14,49.51
  599. 2013-10-15,49.5
  600. 2013-10-16,51.14
  601. 2013-10-17,52.21
  602. 2013-10-18,54.22
  603. 2013-10-21,53.85
  604. 2013-10-22,52.68
  605. 2013-10-23,51.9
  606. 2013-10-24,52.45
  607. 2013-10-25,51.95
  608. 2013-10-28,50.23
  609. 2013-10-29,49.4
  610. 2013-10-30,49.01
  611. 2013-10-31,50.21
  612. 2013-11-01,49.75
  613. 2013-11-04,48.22
  614. 2013-11-05,50.11
  615. 2013-11-06,49.12
  616. 2013-11-07,47.56
  617. 2013-11-08,47.53
  618. 2013-11-11,46.2
  619. 2013-11-12,46.61
  620. 2013-11-13,48.71
  621. 2013-11-14,48.99
  622. 2013-11-15,49.01
  623. 2013-11-18,45.83
  624. 2013-11-19,46.36
  625. 2013-11-20,46.43
  626. 2013-11-21,46.7
  627. 2013-11-22,46.23
  628. 2013-11-25,44.82
  629. 2013-11-26,45.89
  630. 2013-11-27,46.49
  631. 2013-11-29,47.01
  632. 2013-12-02,47.06
  633. 2013-12-03,46.73
  634. 2013-12-04,48.62
  635. 2013-12-05,48.34
  636. 2013-12-06,47.94
  637. 2013-12-09,48.84
  638. 2013-12-10,50.25
  639. 2013-12-11,49.38
  640. 2013-12-12,51.83
  641. 2013-12-13,53.32
  642. 2013-12-16,53.81
  643. 2013-12-17,54.86
  644. 2013-12-18,55.57
  645. 2013-12-19,55.05
  646. 2013-12-20,55.12
  647. 2013-12-23,57.77
  648. 2013-12-24,57.96
  649. 2013-12-26,57.73
  650. 2013-12-27,55.44
  651. 2013-12-30,53.71
  652. 2013-12-31,54.65
  653. 2014-01-02,54.71
  654. 2014-01-03,54.56
  655. 2014-01-06,57.2
  656. 2014-01-07,57.92
  657. 2014-01-08,58.23
  658. 2014-01-09,57.22
  659. 2014-01-10,57.94
  660. 2014-01-13,55.91
  661. 2014-01-14,57.74
  662. 2014-01-15,57.6
  663. 2014-01-16,57.19
  664. 2014-01-17,56.3
  665. 2014-01-21,58.51
  666. 2014-01-22,57.51
  667. 2014-01-23,56.63
  668. 2014-01-24,54.45
  669. 2014-01-27,53.55
  670. 2014-01-28,55.14
  671. 2014-01-29,53.53
  672. 2014-01-30,61.08
  673. 2014-01-31,62.57
  674. 2014-02-03,61.48
  675. 2014-02-04,62.75
  676. 2014-02-05,62.19
  677. 2014-02-06,62.16
  678. 2014-02-07,64.32
  679. 2014-02-10,63.55
  680. 2014-02-11,64.85
  681. 2014-02-12,64.45
  682. 2014-02-13,67.33
  683. 2014-02-14,67.09
  684. 2014-02-18,67.3
  685. 2014-02-19,68.06
  686. 2014-02-20,69.63
  687. 2014-02-21,68.59
  688. 2014-02-24,70.78
  689. 2014-02-25,69.85
  690. 2014-02-26,69.26
  691. 2014-02-27,68.94
  692. 2014-02-28,68.46
  693. 2014-03-03,67.41
  694. 2014-03-04,68.8
  695. 2014-03-05,71.57
  696. 2014-03-06,70.84
  697. 2014-03-07,69.8
  698. 2014-03-10,72.03
  699. 2014-03-11,70.1
  700. 2014-03-12,70.88
  701. 2014-03-13,68.83
  702. 2014-03-14,67.72
  703. 2014-03-17,68.74
  704. 2014-03-18,69.19
  705. 2014-03-19,68.24
  706. 2014-03-20,66.97
  707. 2014-03-21,67.24
  708. 2014-03-24,64.1
  709. 2014-03-25,64.89
  710. 2014-03-26,60.39
  711. 2014-03-27,60.97
  712. 2014-03-28,60.01
  713. 2014-03-31,60.24
  714. 2014-04-01,62.62
  715. 2014-04-02,62.72
  716. 2014-04-03,59.49
  717. 2014-04-04,56.75
  718. 2014-04-07,56.95
  719. 2014-04-08,58.19
  720. 2014-04-09,62.41
  721. 2014-04-10,59.16
  722. 2014-04-11,58.53
  723. 2014-04-14,58.89
  724. 2014-04-15,59.09
  725. 2014-04-16,59.72
  726. 2014-04-17,58.94
  727. 2014-04-21,61.24
  728. 2014-04-22,63.03
  729. 2014-04-23,61.36
  730. 2014-04-24,60.87
  731. 2014-04-25,57.71
  732. 2014-04-28,56.14
  733. 2014-04-29,58.15
  734. 2014-04-30,59.78
  735. 2014-05-01,61.15
  736. 2014-05-02,60.46
  737. 2014-05-05,61.22
  738. 2014-05-06,58.53
  739. 2014-05-07,57.39
  740. 2014-05-08,56.76
  741. 2014-05-09,57.24
  742. 2014-05-12,59.83
  743. 2014-05-13,59.83
  744. 2014-05-14,59.23
  745. 2014-05-15,57.92
  746. 2014-05-16,58.02
  747. 2014-05-19,59.21
  748. 2014-05-20,58.56
  749. 2014-05-21,60.49
  750. 2014-05-22,60.52
  751. 2014-05-23,61.35
  752. 2014-05-27,63.48
  753. 2014-05-28,63.51
  754. 2014-05-29,63.83
  755. 2014-05-30,63.30
  756. """), parse_dates=['ds'])