using StaticArrays
# -----------------------------------------------------
# 
# Datasets from Time Series Analysis by Box and Jenkins
#
# -----------------------------------------------------

const seriesA = SA[17.0, 16.6, 16.3, 16.1, 17.1, 16.9, 16.8, 17.4, 17.1, 17.0, 16.7, 17.4, 17.2, 17.4, 
                17.4, 17.0, 17.3, 17.2, 17.4, 16.8, 17.1, 17.4, 17.4, 17.5, 17.4, 17.6, 17.4, 17.3, 
                17.0, 17.8, 17.5, 18.1, 17.5, 17.4, 17.4, 17.1, 17.6, 17.7, 17.4, 17.8, 17.6, 17.5, 
                16.5, 17.8, 17.3, 17.3, 17.1, 17.4, 16.9, 17.3, 17.6, 16.9, 16.7, 16.8, 16.8, 17.2, 
                16.8, 17.6, 17.2, 16.6, 17.1, 16.9, 16.6, 18.0, 17.2, 17.3, 17.0, 16.9, 17.3, 16.8, 
                17.3, 17.4, 17.7, 16.8, 16.9, 17.0, 16.9, 17.0, 16.6, 16.7, 16.8, 16.7, 16.4, 16.5, 
                16.4, 16.6, 16.5, 16.7, 16.4, 16.4, 16.2, 16.4, 16.3, 16.4, 17.0, 16.9, 17.1, 17.1, 
                16.7, 16.9, 16.5, 17.2, 16.4, 17.0, 17.0, 16.7, 16.2, 16.6, 16.9, 16.5, 16.6, 16.6, 
                17.0, 17.1, 17.1, 16.7, 16.8, 16.3, 16.6, 16.8, 16.9, 17.1, 16.8, 17.0, 17.2, 17.3, 
                17.2, 17.3, 17.2, 17.2, 17.5, 16.9, 16.9, 16.9, 17.0, 16.5, 16.7, 16.8, 16.7, 16.7, 
                16.6, 16.5, 17.0, 16.7, 16.7, 16.9, 17.4, 17.1, 17.0, 16.8, 17.2, 17.2, 17.4, 17.2, 
                16.9, 16.8, 17.0, 17.4, 17.2, 17.2, 17.1, 17.1, 17.1, 17.4, 17.2, 16.9, 16.9, 17.0, 
                16.7, 16.9, 17.3, 17.8, 17.8, 17.6, 17.5, 17.0, 16.9, 17.1, 17.2, 17.4, 17.5, 17.9, 
                17.0, 17.0, 17.0, 17.2, 17.3, 17.4, 17.4, 17.0, 18.0, 18.2, 17.6, 17.8, 17.7, 17.2, 
                17.4]

const seriesB = SA[460, 457, 452, 459, 462, 459, 463, 479, 493, 490, 492, 498, 499, 497, 496, 
                490, 489, 478, 487, 491, 487, 482, 479, 478, 479, 477, 479, 475, 479, 476, 
                476, 478, 479, 477, 476, 475, 475, 473, 474, 474, 474, 465, 466, 467, 471, 
                471, 467, 473, 481, 488, 490, 489, 489, 485, 491, 492, 494, 499, 498, 500, 
                497, 494, 495, 500, 504, 513, 511, 514, 510, 509, 515, 519, 523, 519, 523, 
                531, 547, 551, 547, 541, 545, 549, 545, 549, 547, 543, 540, 539, 532, 517, 
                527, 540, 542, 538, 541, 541, 547, 553, 559, 557, 557, 560, 571, 571, 569, 
                575, 580, 584, 585, 590, 599, 603, 599, 596, 585, 587, 585, 581, 583, 592, 
                592, 596, 596, 595, 598, 598, 595, 595, 592, 588, 582, 576, 578, 589, 585, 
                580, 579, 584, 581, 581, 577, 577, 578, 580, 586, 583, 581, 576, 571, 575, 
                575, 573, 577, 582, 584, 579, 572, 577, 571, 560, 549, 556, 557, 563, 564, 
                567, 561, 559, 553, 553, 553, 547, 550, 544, 541, 532, 525, 542, 555, 558, 
                551, 551, 552, 553, 557, 557, 548, 547, 545, 545, 539, 539, 535, 537, 535, 
                536, 537, 543, 548, 546, 547, 548, 549, 553, 553, 552, 551, 550, 553, 554, 
                551, 551, 545, 547, 547, 537, 539, 538, 533, 525, 513, 510, 521, 521, 521, 
                523, 516, 511, 518, 517, 520, 519, 519, 519, 518, 513, 499, 485, 454, 462, 
                473, 482, 486, 475, 459, 451, 453, 446, 455, 452, 457, 449, 450, 435, 415, 
                398, 399, 361, 383, 393, 385, 360, 364, 365, 370, 374, 359, 335, 323, 306, 
                333, 330, 336, 328, 316, 320, 332, 320, 333, 344, 339, 350, 351, 350, 345, 
                350, 359, 375, 379, 376, 382, 370, 365, 367, 372, 373, 363, 371, 369, 376, 
                387, 387, 376, 385, 385, 380, 373, 382, 377, 376, 379, 386, 387, 386, 389, 
                394, 393, 409, 411, 409, 408, 393, 391, 388, 396, 387, 383, 388, 382, 384, 
                382, 383, 383, 388, 395, 392, 386, 383, 377, 364, 369, 355, 350, 353, 340, 
                350, 349, 358, 360, 360, 366, 359, 356, 355, 367, 357, 361, 355, 348, 343, 
                330, 340, 339, 331, 345, 352, 346, 352, 357]

const seriesB2 = SA[445, 448, 450, 447, 451, 453, 454, 454, 459, 440, 446, 443, 443, 440, 439, 435, 
                435, 436, 435, 435, 435, 433, 429, 428, 425, 427, 425, 422, 409, 407, 423, 422,
                417, 421, 424, 414, 419, 429, 426, 425, 424, 425, 425, 424, 425, 421, 414, 410, 
                411, 406, 406, 413, 411, 410, 405, 409, 410, 405, 401, 401, 401, 414, 419, 425, 
                423, 411, 414, 420, 412, 415, 412, 412, 411, 412, 409, 407, 408, 415, 413, 413, 
                410, 405, 410, 412, 413, 411, 411, 409, 406, 407, 410, 408, 408, 409, 410, 409, 
                405, 406, 405, 407, 409, 407, 409, 425, 425, 428, 436, 442, 442, 433, 435, 433,
                435, 429, 439, 437, 439, 438, 435, 433, 437, 437, 444, 441, 440, 441, 439, 439, 
                438, 437, 441, 442, 441, 437, 427, 423, 424, 428, 428, 431, 425, 423, 420, 426, 
                418, 416, 419, 418, 416, 419, 425, 421, 422, 422, 417, 420, 417, 418, 419, 419, 
                417, 419, 422, 423, 422, 421, 421, 419, 418, 421, 420, 413, 413, 408, 409, 415, 
                415, 420, 420, 424, 426, 423, 423, 425, 431, 436, 436, 440, 436, 443, 445, 439, 
                443, 445, 450, 461, 471, 467, 462, 456, 464, 463, 465, 464, 456, 460, 458, 453, 
                453, 449, 447, 453, 450, 459, 457, 453, 455, 453, 450, 456, 461, 463, 463, 461, 
                465, 473, 473, 475, 499, 485, 491, 496, 504, 504, 509, 511, 524, 525, 541, 531, 
                529, 530, 531, 527, 525, 519, 514, 509, 505, 513, 525, 519, 519, 522, 522]

const seriesC = SA[26.6, 27.0, 27.1, 27.1, 27.1, 27.1, 26.9, 26.8, 26.7, 26.4, 26.0, 25.8, 25.6, 25.2, 
                25.0, 24.6, 24.2, 24.0, 23.7, 23.4, 23.1, 22.9, 22.8, 22.7, 22.6, 22.4, 22.2, 22.0, 
                21.8, 21.4, 20.9, 20.3, 19.7, 19.4, 19.3, 19.2, 19.1, 19.0, 18.9, 18.9, 19.2, 19.3, 
                19.3, 19.4, 19.5, 19.6, 19.6, 19.6, 19.6, 19.6, 19.7, 19.9, 20.0, 20.1, 20.2, 20.3, 
                20.6, 21.6, 21.9, 21.7, 21.3, 21.2, 21.4, 21.7, 22.2, 23.0, 23.8, 24.6, 25.1, 25.6, 
                25.8, 26.1, 26.3, 26.3, 26.2, 26.0, 25.8, 25.6, 25.4, 25.2, 24.9, 24.7, 24.5, 24.4, 
                24.4, 24.4, 24.4, 24.4, 24.3, 24.4, 24.4, 24.4, 24.4, 24.4, 24.5, 24.5, 24.4, 24.3, 
                24.2, 24.2, 24.0, 23.9, 23.7, 23.6, 23.5, 23.5, 23.5, 23.5, 23.5, 23.7, 23.8, 23.8, 
                23.9, 23.9, 23.8, 23.7, 23.6, 23.4, 23.2, 23.0, 22.8, 22.6, 22.4, 22.0, 21.6, 21.3,
                21.2, 21.2, 21.1, 21.0, 20.9, 21.0, 21.0, 21.1, 21.2, 21.1, 20.9, 20.8, 20.8, 20.8, 
                20.8, 20.9, 20.8, 20.8, 20.7, 20.7, 20.8, 20.9, 21.2, 21.4, 21.7, 21.8, 21.9, 22.2, 
                22.5, 22.8, 23.1, 23.4, 23.8, 24.1, 24.6, 24.9, 24.9, 25.1, 25.0, 25.0, 25.0, 25.0, 
                24.9, 24.8, 24.7, 24.6, 24.5, 24.5, 24.5, 24.5, 24.5, 24.5, 24.5, 24.4, 24.4, 24.2, 
                24.2, 24.1, 24.1, 24.0, 24.0, 24.0, 23.9, 23.8, 23.8, 23.7, 23.7, 23.6, 23.7, 23.6, 
                23.6, 23.6, 23.5, 23.5, 23.4, 23.3, 23.3, 23.3, 23.4, 23.4, 23.3, 23.2, 23.3, 23.3, 
                23.2, 23.1, 22.9, 22.8, 22.6, 22.4, 22.2, 21.8, 21.3, 20.8, 20.2, 19.7, 19.3, 19.1, 
                19.0, 18.8]

const seriesD = SA[8.0, 8.0, 7.4, 8.0, 8.0, 8.0, 8.0, 8.8, 8.4, 8.4, 8.0, 8.2, 8.2, 8.2, 
                8.4, 8.4, 8.4, 8.6, 8.8, 8.6, 8.6, 8.6, 8.6, 8.6, 8.8, 8.9, 9.1, 9.5, 
                8.5, 8.4, 8.3, 8.2, 8.1, 8.3, 8.4, 8.7, 8.8, 8.8, 9.2, 9.6, 9.0, 8.8,
                8.6, 8.6, 8.8, 8.8, 8.6, 8.6, 8.4, 8.3, 8.4, 8.3, 8.3, 8.1, 8.2, 8.3,
                8.5, 8.1, 8.1, 7.9, 8.3, 8.1, 8.1, 8.1, 8.4, 8.7, 9.0, 9.3, 9.3, 9.5, 
                9.3, 9.5, 9.5, 9.5, 9.5, 9.5, 9.5, 9.9, 9.5, 9.7, 9.1, 9.1, 8.9, 9.3, 
                9.1, 9.1, 9.3, 9.5, 9.3, 9.3, 9.3, 9.9, 9.7, 9.1, 9.3, 9.5, 9.4, 9.0, 
                9.0, 8.8, 9.0, 8.8, 8.6, 8.6, 8.0, 8.0, 8.0, 8.0, 8.6, 8.0, 8.0, 8.0, 
                7.6, 8.6, 9.6, 9.6, 10.0, 9.4, 9.3, 9.2, 9.5, 9.5, 9.5, 9.9, 9.9, 9.5, 
                9.3, 9.5, 9.5, 9.1, 9.3, 9.5, 9.3, 9.1, 9.3, 9.1, 9.5, 9.4, 9.5, 9.6, 
                10.2, 9.8, 9.6, 9.6, 9.4, 9.4, 9.4, 9.4, 9.6, 9.6, 9.4, 9.4, 9.0, 9.4,
                9.4, 9.6, 9.4, 9.2, 8.8, 8.8, 9.2, 9.2, 9.6, 9.6, 9.8, 9.8, 10.0, 10.0, 
                9.4, 9.8, 8.8, 8.8, 8.8, 8.8, 9.6, 9.6, 9.6, 9.2, 9.2, 9.0, 9.0, 9.0,
                9.4, 9.0, 9.0, 9.4, 9.4, 9.6, 9.4, 9.6, 9.6, 9.6, 10.0, 10.0, 9.6, 9.2, 
                9.2, 9.2, 9.0, 9.0, 9.6, 9.8, 10.2, 10.0, 10.0, 10.0, 9.4, 9.2, 9.6, 9.7, 
                9.7, 9.8, 9.8, 9.8, 10.0, 10.0, 8.6, 9.0, 9.4, 9.4, 9.4, 9.4, 9.4, 9.6, 
                10.0, 10.0, 9.8, 9.8, 9.7, 9.6, 9.4, 9.2, 9.0, 9.4, 9.6, 9.6, 9.6, 9.6, 
                9.6, 9.6, 9.0, 9.4, 9.4, 9.4, 9.6, 9.4, 9.6, 9.6, 9.8, 9.8, 9.8, 9.6, 
                9.2, 9.6, 9.2, 9.2, 9.6, 9.6, 9.6, 9.6, 9.6, 9.6, 10.0, 10.0, 10.4, 10.4, 
                9.8, 9.0, 9.6, 9.8, 9.6, 8.6, 8.0, 8.0, 8.0, 8.0, 8.4, 8.8, 8.4, 8.4, 
                9.0, 9.0, 9.4, 10.0, 10.0, 10.0, 10.2, 10.0, 10.0, 9.6, 9.0, 9.0, 8.6, 
                9.0, 9.6, 9.6, 9.0, 9.0, 8.9, 8.8, 8.7, 8.6, 8.3, 7.9, 8.5, 8.7, 8.9, 9.1, 
                9.1, 9.1]

const seriesE = SA[101, 82, 66, 35, 31, 7, 20, 92, 154, 125, 
                85, 68, 38, 23, 10, 24, 83, 132, 131, 118, 
                90, 67, 60, 47, 41, 21, 16, 6, 4, 7, 
                14, 34, 45, 43, 48, 42, 28, 10, 8, 2, 
                0, 1, 5, 12, 14, 35, 46, 41, 30, 24, 
                16, 7, 4, 2, 8, 17, 36, 50, 62, 67, 
                71, 48, 28, 8, 13, 57, 122, 138, 103, 86, 
                63, 37, 24, 11, 15, 40, 62, 98, 124, 96, 
                66, 64, 54, 39, 21, 7, 4, 23, 55, 94,
                96, 77, 59, 44, 47, 30, 16, 7, 37, 74]

const seriesF = SA[47, 64, 23, 71, 38, 64, 55, 41, 59, 48, 71, 35, 57, 40, 58, 
                44, 80, 55, 37, 74, 51, 57, 50, 60, 45, 57, 50, 45, 25, 59, 
                50, 71, 56, 74, 50, 58, 45, 54, 36, 54, 48, 55, 45, 57, 50, 
                62, 44, 64, 43, 52, 38, 59, 55, 41, 53, 49, 34, 35, 54, 45, 
                68, 38, 50, 60, 39, 59, 40, 57, 54, 23]

const seriesG = SA[112, 118, 132, 129, 121, 135, 148, 148, 136, 119, 104, 118,
                115, 126, 141, 135, 125, 149, 170, 170, 158, 133, 114, 140,
                145, 150, 178, 163, 172, 178, 199, 199, 184, 162, 146, 166,
                171, 180, 193, 181, 183, 218, 230, 242, 209, 191, 172, 194,
                196, 196, 236, 235, 229, 243, 264, 272, 237, 211, 180, 201,
                204, 188, 235, 227, 234, 264, 302, 293, 259, 229, 203, 229,
                242, 233, 267, 269, 270, 315, 364, 347, 312, 274, 237, 278,
                284, 277, 317, 313, 318, 374, 413, 405, 355, 306, 271, 306,
                315, 301, 356, 348, 355, 422, 465, 467, 404, 347, 305, 336,
                340, 318, 362, 348, 363, 435, 491, 505, 404, 359, 310, 337,
                360, 342, 406, 396, 420, 472, 548, 559, 463, 407, 362, 405,
                417, 391, 419, 461, 472, 535, 622, 606, 508, 461, 390, 432]

# ------------------------------------------------------
# 
# Datasets from Introduction Time Series and Forecasting
# by Brockwell and Davis
#
# ------------------------------------------------------

const dowj = SA[110.94, 110.69, 110.43, 110.56, 110.75, 110.84, 110.46, 110.56, 110.46, 110.05,
            109.6, 109.31, 109.31, 109.25, 109.02, 108.54, 108.77, 109.02, 109.44, 109.38, 
            109.53, 109.89, 110.56, 110.56, 110.72, 111.23, 111.48, 111.58, 111.9, 112.19, 
            112.06, 111.96, 111.68, 111.36, 111.42, 112, 112.22, 112.7, 113.15, 114.36, 
            114.65, 115.06, 115.86, 116.4, 116.44, 116.88, 118.07, 118.51, 119.28, 119.79, 
            119.7, 119.28, 119.66, 120.14, 120.97, 121.13, 121.55, 121.96, 122.26, 123.79, 
            124.11, 124.14, 123.37, 123.02, 122.86, 123.02, 123.11, 123.05, 123.05, 122.83, 
            123.18, 122.67, 122.73, 122.86, 122.67, 122.09, 122, 121.23]

const wine = SA[464, 675, 703, 887, 1139, 1077, 1318, 1260, 1120, 963, 996, 960, 530, 883, 
            894, 1045, 1199, 1287, 1565, 1577, 1076, 918, 1008, 1063, 544, 635, 804, 980, 
            1018, 1064, 1404, 1286, 1104, 999, 996, 1015, 615, 722, 832, 977, 1270, 1437, 
            1520, 1708, 1151, 934, 1159, 1209, 699, 830, 996, 1124, 1458, 1270, 1753, 2258, 
            1208, 1241, 1265, 1828, 809, 997, 1164, 1205, 1538, 1513, 1378, 2083, 1357, 1536, 
            1526, 1376, 779, 1005, 1193, 1522, 1539, 1546, 2116, 2326, 1596, 1356, 1553, 1613, 
            814, 1150, 1225, 1691, 1759, 1754, 2100, 2062, 2012, 1897, 1964, 2186, 966, 1549,
            1538, 1612, 2078, 2137, 2907, 2249, 1883, 1739, 1828, 1868, 1138, 1430, 1809, 1763, 
            2200, 2067, 2503, 2141, 2103, 1972, 2181, 2344, 970, 1199, 1718, 1683, 2025, 2051, 
            2439, 2353, 2230, 1852, 2147, 2286, 1007, 1665, 1642, 1525, 1838, 1892, 2920, 2572, 
            2617, 2047]

const lake = SA[10.38, 11.86, 10.97, 10.8, 9.79, 10.39, 10.42, 10.82, 11.4, 11.32, 11.44, 11.68, 11.17, 
            10.53, 10.01, 9.91, 9.14, 9.16, 9.55, 9.67, 8.44, 8.24, 9.1, 9.09, 9.35, 8.82, 9.32, 9.01, 
            9, 9.8, 9.83, 9.72, 9.89, 10.01, 9.37, 8.69, 8.19, 8.67, 9.55, 8.92, 8.09, 9.37, 10.13, 
            10.14, 9.51, 9.24, 8.66, 8.86, 8.05, 7.79, 6.75, 6.75, 7.82, 8.64, 10.58, 9.48, 7.38, 
            6.9, 6.94, 6.24, 6.84, 6.85, 6.9, 7.79, 8.18, 7.51, 7.23, 8.42, 9.61, 9.05, 9.26, 9.22, 
            9.38, 9.1, 7.95, 8.12, 9.75, 10.85, 10.41, 9.96, 9.61, 8.76, 8.18, 7.21, 7.13, 9.1, 8.25, 
            7.91, 6.89, 5.96, 6.8, 7.68, 8.38, 8.52, 9.74, 9.31, 9.89, 9.96, ]