From b23f1f30f1c1d9ee0be35abe6c7aa69437882f21 Mon Sep 17 00:00:00 2001 From: Shunsuke Hori Date: Sat, 17 Mar 2018 12:52:30 -0700 Subject: [PATCH 01/10] initial commit for hamilton filter --- quantecon/__init__.py | 1 + quantecon/filter.py | 55 ++++++ quantecon/tests/data/employment.csv | 278 ++++++++++++++++++++++++++++ quantecon/tests/test_filter.py | 31 ++++ 4 files changed, 365 insertions(+) create mode 100644 quantecon/filter.py create mode 100644 quantecon/tests/data/employment.csv create mode 100644 quantecon/tests/test_filter.py diff --git a/quantecon/__init__.py b/quantecon/__init__.py index d18e84870..7600dc6e4 100644 --- a/quantecon/__init__.py +++ b/quantecon/__init__.py @@ -25,6 +25,7 @@ from .lae import LAE from .arma import ARMA from .lqcontrol import LQ +from .filter import hamilton_filter from .lqnash import nnash from .lss import LinearStateSpace from .matrix_eqn import solve_discrete_lyapunov, solve_discrete_riccati diff --git a/quantecon/filter.py b/quantecon/filter.py new file mode 100644 index 000000000..b52bab37b --- /dev/null +++ b/quantecon/filter.py @@ -0,0 +1,55 @@ +""" +Filename: filter.py +Authors: Shunsuke Hori + +function for filtering + +""" +import pandas as pd +import numpy as np + +def hamilton_filter(data, h, p, prefix = ''): + r""" + This function applies "Hamilton filter" to the data + + http://econweb.ucsd.edu/~jhamilto/hp.pdf + + Parameters + ---------- + data : arrray or dataframe + h : integer + Time horizon that we are likely to predict incorrectly. + Original paper recommends 2 for annual data, 8 for quarterly data, + 24 for monthly data. + p : integer + Number of lags in regression. + Must be greater than h. + + Note: For seasonal data, it's desirable for p and h to be integer multiples + of the number of obsevations in a year. + e.g. For quarterly data, h = 8 and p = 4 are recommended. + + Returns + ------- + filtered_data : Dataframe containing cyclical component and trend component + with specified prefix. + """ + # transform data to array + y = np.asarray(data, float) + # sample size + T = len(y) + # construct X matrix of lags + X = np.ones((T-p-h+1, p+1)) + for j in range(1, p+1): + X[:, j] = y[p-j:T-h-j+1:1] + + # do OLS regression + b = np.linalg.solve(X.transpose()@X, X.transpose()@y[p+h-1:T]) + # trend component (`nan` for the first p+h-1 period) + trend = np.append(np.zeros(p+h-1)+np.nan, X@b) + # cycle component + cycle = data - trend + + filtered_data = pd.DataFrame(data = {prefix+'cycle': cycle, prefix+'trend': trend}) + return filtered_data + diff --git a/quantecon/tests/data/employment.csv b/quantecon/tests/data/employment.csv new file mode 100644 index 000000000..fdef8a09f --- /dev/null +++ b/quantecon/tests/data/employment.csv @@ -0,0 +1,278 @@ +1947,43606,NaN +1947.25,43808,NaN +1947.5,44201,NaN +1947.75,44579,NaN +1948,44681,NaN +1948.25,45033,NaN +1948.5,45295,NaN +1948.75,45029,NaN +1949,44238,NaN +1949.25,43739,NaN +1949.5,43784,NaN +1949.75,43517,-7.828544990143880000 +1950,43952,-6.009595289257050000 +1950.25,45084,-5.230911150321850000 +1950.5,46442,-2.702857475404240000 +1950.75,46855,0.524339864905642000 +1951,47871,5.354856273903350000 +1951.25,48068,4.885324247663220000 +1951.5,47955,2.501188736785250000 +1951.75,48309,5.631874980512980000 +1952,48504,3.404621547864510000 +1952.25,48286,-1.319838327435040000 +1952.5,49319,-1.096267860320950000 +1952.75,50164,3.527568943380400000 +1953,50475,-0.175339037088634000 +1953.25,50522,1.069876276559630000 +1953.5,50365,1.871583865583260000 +1953.75,49702,-2.706665255501090000 +1954,49158,-3.754534156859790000 +1954.25,48896,-2.303657488871750000 +1954.5,48882,-8.280840081895350000 +1954.75,49331,-7.948981845290970000 +1955,49963,-4.539810883400610000 +1955.25,50790,-2.979932902161860000 +1955.5,51262,-2.063823868646980000 +1955.75,51805,1.137235048578300000 +1956,52295,2.218028850504200000 +1956.25,52584,2.050715965007160000 +1956.5,52601,1.808543587914980000 +1956.75,52930,0.842430901823946000 +1957,53157,0.232785834864444000 +1957.25,53066,-1.327637023720400000 +1957.5,52932,-1.191408083657050000 +1957.75,52385,-3.497475867374310000 +1958,51300,-6.728438611070720000 +1958.25,50912,-7.485979127287460000 +1958.5,51506,-5.902346893848060000 +1958.75,52088,-6.593003219688170000 +1959,53016,-5.055357347817790000 +1959.25,53679,-2.597321563415790000 +1959.5,53429,-3.064874360676410000 +1959.75,54175,-0.021780530259320600 +1960,54458,3.553936473780370000 +1960.25,54347,1.470961399202220000 +1960.5,54228,-2.464133018802390000 +1960.75,53744,-2.864335227633090000 +1961,53662,-4.473181102634500000 +1961.25,53977,-4.182056947743150000 +1961.5,54388,-0.572917915919334000 +1961.75,54871,-4.447449852729050000 +1962,55276,-3.346466754270520000 +1962.25,55644,-0.803992796037392000 +1962.5,55977,-0.768202469010248000 +1962.75,56028,0.652175210541373000 +1963,56322,0.074466462140435400 +1963.25,56658,-0.961581478374910000 +1963.5,57077,-0.461965228195595000 +1963.75,57360,-0.494130518155771000 +1964,57898,0.067421337295627400 +1964.25,58221,0.083972174612881600 +1964.5,58903,0.638399912690375000 +1964.75,59421,2.016039893933790000 +1965,60003,1.675172596133050000 +1965.25,60690,2.018472554424990000 +1965.5,61490,2.704677891833170000 +1965.75,62321,3.979020367233030000 +1966,63192,3.869681401161870000 +1966.25,64110,5.295775640182680000 +1966.5,64644,4.300921996339180000 +1966.75,65200,4.703721649122140000 +1967,65530,4.367558769197560000 +1967.25,65750,3.249897511452670000 +1967.5,66164,2.500313203829360000 +1967.75,66900,2.418292890593650000 +1968,67295,1.706718262307960000 +1968.25,67904,1.167341319734760000 +1968.5,68487,2.060769738315000000 +1968.75,69246,2.079087793703370000 +1969,69905,2.646034118366740000 +1969.25,70636,3.455861392712000000 +1969.5,70917,2.586313620752890000 +1969.75,71240,1.355563947581690000 +1970,71452,2.115499240968350000 +1970.25,71029,0.307739297728403000 +1970.5,70948,-0.757010501101604000 +1970.75,70790,-2.213890373917820000 +1971,70859,-2.766113279081540000 +1971.25,71253,-3.265571850116890000 +1971.5,71617,-2.357279530184540000 +1971.75,72108,-2.395121157829180000 +1972,72945,-1.677676764062430000 +1972.25,73760,1.145236611002250000 +1972.5,74263,0.862510913851565000 +1972.75,75270,2.241369233064690000 +1973,76285,3.303960907880310000 +1973.25,76887,3.017635369761370000 +1973.5,77276,3.453430541044550000 +1973.75,78035,3.786271400754910000 +1974,78296,2.423645471686540000 +1974.25,78602,2.075594278085420000 +1974.5,78611,2.244196985351210000 +1974.75,77657,-1.358491164160570000 +1975,76649,-3.946451173748070000 +1975.25,76520,-3.773729414565420000 +1975.5,77230,-3.200965769969340000 +1975.75,78018,-4.190888670366120000 +1976,79049,-2.339299435203200000 +1976.25,79376,-2.361988858915080000 +1976.5,79892,-1.583926294477350000 +1976.75,80448,1.789482295381730000 +1977,81391,3.627191718877380000 +1977.25,82488,2.893213478579810000 +1977.5,83532,2.230882515851140000 +1977.75,84408,3.264565953271810000 +1978,85461,3.508687582742140000 +1978.25,86951,6.180936210430670000 +1978.5,87618,5.819937595428430000 +1978.75,88673,5.850407651069190000 +1979,89480,5.159511179125730000 +1979.25,90109,4.543169910140020000 +1979.5,90325,4.006064744236940000 +1979.75,90673,3.721455755457780000 +1980,90994,2.476155390855180000 +1980.25,90099,-0.882009610710384000 +1980.5,90210,0.063600256063182300 +1980.75,90943,-0.959820261955883000 +1981,91210,-1.559813171974840000 +1981.25,91490,-1.532630224900690000 +1981.5,91479,-1.428492671444700000 +1981.75,90893,-2.939641582410100000 +1982,90432,-3.962898676559460000 +1982.25,89864,-1.806399523803290000 +1982.5,89183,-4.691925038722960000 +1982.75,88769,-7.179162336782380000 +1983,89090,-5.508627866633560000 +1983.25,90022,-4.590779155525520000 +1983.5,91247,-3.107416305489780000 +1983.75,92227,-0.709320217337563000 +1984,93429,0.468658343989773000 +1984.25,94479,2.045498651162230000 +1984.5,95344,3.898799254845470000 +1984.75,96107,4.641264903377530000 +1985,96843,4.016297594999510000 +1985.25,97459,3.251232909434980000 +1985.5,98045,2.880273653217500000 +1985.75,98609,3.302004379494750000 +1986,98935,2.141386590836190000 +1986.25,99155,1.430222229139190000 +1986.5,99934,1.654001379757120000 +1986.75,100511,1.415578566214890000 +1987,101164,1.197739203008500000 +1987.25,101900,1.391942609478970000 +1987.5,102646,1.510330115361060000 +1987.75,103664,1.882569624100140000 +1988,104487,2.638598851012830000 +1988.25,105324,3.248123083100840000 +1988.5,106009,2.216916482123000000 +1988.75,106906,2.929008784044980000 +1989,107619,3.112316472461320000 +1989.25,108026,2.590061367329100000 +1989.5,108365,2.258826550585130000 +1989.75,108849,1.452957229932960000 +1990,109647,1.773498072602710000 +1990.25,109862,1.253566176359300000 +1990.5,109525,0.397721754756503000 +1990.75,109160,-1.067112244720420000 +1991,108577,-2.028441125011800000 +1991.25,108338,-2.200141305469970000 +1991.5,108340,-2.638768199405380000 +1991.75,108325,-3.452971945285300000 +1992,108368,-4.481730127522950000 +1992.25,108721,-3.459264974178950000 +1992.5,108966,-2.326015303070790000 +1992.75,109496,-1.993296986332780000 +1993,109998,-1.054342608477780000 +1993.25,110754,-0.661721481246104000 +1993.5,111451,-0.317558619556166000 +1993.75,112312,0.758535271532082000 +1994,113248,1.603175280158210000 +1994.25,114246,1.803178589600290000 +1994.5,115254,2.738050917804230000 +1994.75,116164,2.838328878736770000 +1995,116913,3.116811387681080000 +1995.25,117294,2.617817123061060000 +1995.5,117887,2.660111760563040000 +1995.75,118322,2.201887578591140000 +1996,119002,1.910008883762430000 +1996.25,119774,1.745999549228830000 +1996.5,120427,1.485712346494670000 +1996.75,121147,1.462770358501300000 +1997,122000,1.688869156312420000 +1997.25,122818,2.342653090835710000 +1997.5,123605,2.045406035989340000 +1997.75,124554,2.514951365297980000 +1998,125177,2.237797172343560000 +1998.25,126080,2.232527796689510000 +1998.5,126774,2.534153690711260000 +1998.75,127601,2.536366435665060000 +1999,128244,2.177945172042880000 +1999.25,129091,2.300721668514370000 +1999.5,129791,2.305166265823800000 +1999.75,130780,2.122532848258060000 +2000,131608,2.647083070935200000 +2000.25,132075,1.980591631542210000 +2000.5,132377,1.828076118189070000 +2000.75,132731,1.389021765476630000 +2001,132752,1.048578435407080000 +2001.25,132302,-0.136049213340812000 +2001.5,131793,-0.919488614005559000 +2001.75,131005,-2.500652574522520000 +2002,130713,-3.153618610700280000 +2002.25,130684,-3.084009650043300000 +2002.5,130526,-3.448971599434570000 +2002.75,130505,-3.987698609003020000 +2003,130238,-3.938073696722540000 +2003.25,130195,-3.254281918448900000 +2003.5,130281,-3.040940368268370000 +2003.75,130618,-2.143713898846950000 +2004,131158,-2.117135877259440000 +2004.25,131791,-1.850438443569830000 +2004.5,132120,-1.054408677405260000 +2004.75,132660,-0.690022502444890000 +2005,133169,0.123209959927408000 +2005.25,133955,0.505506056121476000 +2005.5,134593,0.745741669033123000 +2005.75,135174,0.813397232296666000 +2006,136049,0.989677984953460000 +2006.25,136337,0.815433267942808000 +2006.5,136883,1.392179255047490000 +2006.75,137266,1.014242547704950000 +2007,137785,0.978735563346390000 +2007.25,138085,0.436567947918320000 +2007.5,138116,0.211083541672906000 +2007.75,138413,0.138154407901766000 +2008,138268,-0.959598233576571000 +2008.25,137708,-0.945981009351272000 +2008.5,136781,-2.305217365696310000 +2008.75,134844,-4.024675231403990000 +2009,132527,-6.192175574879230000 +2009.25,131020,-7.370305629168800000 +2009.5,130260,-7.726364649773360000 +2009.75,129774,-8.731791369897110000 +2010,129896,-8.155431114489600000 +2010.25,130528,-6.897272353093740000 +2010.5,130372,-6.313047150300460000 +2010.75,130840,-3.867474811755070000 +2011,131295,-1.886792933676590000 +2011.25,131949,-1.603880190496060000 +2011.5,132372,-1.392474969570230000 +2011.75,132927,-0.312405201881120000 +2012,133761,0.021898297728739600 +2012.25,134038,-0.446917723523029000 +2012.5,134552,1.270743826191850000 +2012.75,135076,0.672721105518576000 +2013,135712,0.656967452832078000 +2013.25,136268,0.659959278560109000 +2013.5,136862,1.066737056829650000 +2013.75,137387,0.929806490483770000 +2014,138014,0.441272476277845000 +2014.25,138843,1.524489591871540000 +2014.5,139579,1.403754218931230000 +2014.75,140402,1.431144841079690000 +2015,140972,1.377280211841030000 +2015.25,141724,1.625820726166470000 +2015.5,142300,1.596020279933330000 +2015.75,143146,1.858248471076880000 +2016,143733,1.723205816859260000 +2016.25,144175,1.257525615789750000 diff --git a/quantecon/tests/test_filter.py b/quantecon/tests/test_filter.py new file mode 100644 index 000000000..dae816a61 --- /dev/null +++ b/quantecon/tests/test_filter.py @@ -0,0 +1,31 @@ +""" +Filename: test_filter.py +Authors: Shunsuke Hori + +Tests for filter.py. +Using the data of original paper. + +""" + +import sys +import os +import unittest +import pandas as pd +import numpy as np +from numpy.testing import assert_allclose +from quantecon.filter import hamilton_filter +from quantecon.tests.util import get_data_dir + +def test_hamilton_filter(): + # read data + data_dir = get_data_dir() + data = pd.read_csv(os.path.join(data_dir, "employment.csv"), + names = ['year', 'employment', 'matlab_cycle']) + + filtered_data = hamilton_filter(100*np.log(data['employment']), 8, 4, 'empl_') + assert_allclose(data['matlab_cycle'], filtered_data['empl_cycle'], + rtol = 1e-07, atol = 1e-07) + + +if __name__ == '__main__': + test_hamilton_filter() From adb3123dc8345df2efcd24f472f0318c72006e4f Mon Sep 17 00:00:00 2001 From: Shunsuke Hori Date: Sun, 18 Mar 2018 09:00:54 -0700 Subject: [PATCH 02/10] return array instead of dataframe --- quantecon/filter.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/quantecon/filter.py b/quantecon/filter.py index b52bab37b..e8c881bac 100644 --- a/quantecon/filter.py +++ b/quantecon/filter.py @@ -5,10 +5,9 @@ function for filtering """ -import pandas as pd import numpy as np -def hamilton_filter(data, h, p, prefix = ''): +def hamilton_filter(data, h, p): r""" This function applies "Hamilton filter" to the data @@ -31,8 +30,9 @@ def hamilton_filter(data, h, p, prefix = ''): Returns ------- - filtered_data : Dataframe containing cyclical component and trend component - with specified prefix. + cycle : array of cyclical component + trend : trend component + """ # transform data to array y = np.asarray(data, float) @@ -47,9 +47,8 @@ def hamilton_filter(data, h, p, prefix = ''): b = np.linalg.solve(X.transpose()@X, X.transpose()@y[p+h-1:T]) # trend component (`nan` for the first p+h-1 period) trend = np.append(np.zeros(p+h-1)+np.nan, X@b) - # cycle component + # cyclical component cycle = data - trend - filtered_data = pd.DataFrame(data = {prefix+'cycle': cycle, prefix+'trend': trend}) - return filtered_data + return cycle, trend From d8df60456dd4b73ce13765c97073d61120e2aec5 Mon Sep 17 00:00:00 2001 From: Shunsuke Hori Date: Sun, 18 Mar 2018 09:52:31 -0700 Subject: [PATCH 03/10] increase precision of matlab output --- quantecon/tests/data/employment.csv | 556 ++++++++++++++-------------- 1 file changed, 278 insertions(+), 278 deletions(-) diff --git a/quantecon/tests/data/employment.csv b/quantecon/tests/data/employment.csv index fdef8a09f..6273d6c09 100644 --- a/quantecon/tests/data/employment.csv +++ b/quantecon/tests/data/employment.csv @@ -1,278 +1,278 @@ -1947,43606,NaN -1947.25,43808,NaN -1947.5,44201,NaN -1947.75,44579,NaN -1948,44681,NaN -1948.25,45033,NaN -1948.5,45295,NaN -1948.75,45029,NaN -1949,44238,NaN -1949.25,43739,NaN -1949.5,43784,NaN -1949.75,43517,-7.828544990143880000 -1950,43952,-6.009595289257050000 -1950.25,45084,-5.230911150321850000 -1950.5,46442,-2.702857475404240000 -1950.75,46855,0.524339864905642000 -1951,47871,5.354856273903350000 -1951.25,48068,4.885324247663220000 -1951.5,47955,2.501188736785250000 -1951.75,48309,5.631874980512980000 -1952,48504,3.404621547864510000 -1952.25,48286,-1.319838327435040000 -1952.5,49319,-1.096267860320950000 -1952.75,50164,3.527568943380400000 -1953,50475,-0.175339037088634000 -1953.25,50522,1.069876276559630000 -1953.5,50365,1.871583865583260000 -1953.75,49702,-2.706665255501090000 -1954,49158,-3.754534156859790000 -1954.25,48896,-2.303657488871750000 -1954.5,48882,-8.280840081895350000 -1954.75,49331,-7.948981845290970000 -1955,49963,-4.539810883400610000 -1955.25,50790,-2.979932902161860000 -1955.5,51262,-2.063823868646980000 -1955.75,51805,1.137235048578300000 -1956,52295,2.218028850504200000 -1956.25,52584,2.050715965007160000 -1956.5,52601,1.808543587914980000 -1956.75,52930,0.842430901823946000 -1957,53157,0.232785834864444000 -1957.25,53066,-1.327637023720400000 -1957.5,52932,-1.191408083657050000 -1957.75,52385,-3.497475867374310000 -1958,51300,-6.728438611070720000 -1958.25,50912,-7.485979127287460000 -1958.5,51506,-5.902346893848060000 -1958.75,52088,-6.593003219688170000 -1959,53016,-5.055357347817790000 -1959.25,53679,-2.597321563415790000 -1959.5,53429,-3.064874360676410000 -1959.75,54175,-0.021780530259320600 -1960,54458,3.553936473780370000 -1960.25,54347,1.470961399202220000 -1960.5,54228,-2.464133018802390000 -1960.75,53744,-2.864335227633090000 -1961,53662,-4.473181102634500000 -1961.25,53977,-4.182056947743150000 -1961.5,54388,-0.572917915919334000 -1961.75,54871,-4.447449852729050000 -1962,55276,-3.346466754270520000 -1962.25,55644,-0.803992796037392000 -1962.5,55977,-0.768202469010248000 -1962.75,56028,0.652175210541373000 -1963,56322,0.074466462140435400 -1963.25,56658,-0.961581478374910000 -1963.5,57077,-0.461965228195595000 -1963.75,57360,-0.494130518155771000 -1964,57898,0.067421337295627400 -1964.25,58221,0.083972174612881600 -1964.5,58903,0.638399912690375000 -1964.75,59421,2.016039893933790000 -1965,60003,1.675172596133050000 -1965.25,60690,2.018472554424990000 -1965.5,61490,2.704677891833170000 -1965.75,62321,3.979020367233030000 -1966,63192,3.869681401161870000 -1966.25,64110,5.295775640182680000 -1966.5,64644,4.300921996339180000 -1966.75,65200,4.703721649122140000 -1967,65530,4.367558769197560000 -1967.25,65750,3.249897511452670000 -1967.5,66164,2.500313203829360000 -1967.75,66900,2.418292890593650000 -1968,67295,1.706718262307960000 -1968.25,67904,1.167341319734760000 -1968.5,68487,2.060769738315000000 -1968.75,69246,2.079087793703370000 -1969,69905,2.646034118366740000 -1969.25,70636,3.455861392712000000 -1969.5,70917,2.586313620752890000 -1969.75,71240,1.355563947581690000 -1970,71452,2.115499240968350000 -1970.25,71029,0.307739297728403000 -1970.5,70948,-0.757010501101604000 -1970.75,70790,-2.213890373917820000 -1971,70859,-2.766113279081540000 -1971.25,71253,-3.265571850116890000 -1971.5,71617,-2.357279530184540000 -1971.75,72108,-2.395121157829180000 -1972,72945,-1.677676764062430000 -1972.25,73760,1.145236611002250000 -1972.5,74263,0.862510913851565000 -1972.75,75270,2.241369233064690000 -1973,76285,3.303960907880310000 -1973.25,76887,3.017635369761370000 -1973.5,77276,3.453430541044550000 -1973.75,78035,3.786271400754910000 -1974,78296,2.423645471686540000 -1974.25,78602,2.075594278085420000 -1974.5,78611,2.244196985351210000 -1974.75,77657,-1.358491164160570000 -1975,76649,-3.946451173748070000 -1975.25,76520,-3.773729414565420000 -1975.5,77230,-3.200965769969340000 -1975.75,78018,-4.190888670366120000 -1976,79049,-2.339299435203200000 -1976.25,79376,-2.361988858915080000 -1976.5,79892,-1.583926294477350000 -1976.75,80448,1.789482295381730000 -1977,81391,3.627191718877380000 -1977.25,82488,2.893213478579810000 -1977.5,83532,2.230882515851140000 -1977.75,84408,3.264565953271810000 -1978,85461,3.508687582742140000 -1978.25,86951,6.180936210430670000 -1978.5,87618,5.819937595428430000 -1978.75,88673,5.850407651069190000 -1979,89480,5.159511179125730000 -1979.25,90109,4.543169910140020000 -1979.5,90325,4.006064744236940000 -1979.75,90673,3.721455755457780000 -1980,90994,2.476155390855180000 -1980.25,90099,-0.882009610710384000 -1980.5,90210,0.063600256063182300 -1980.75,90943,-0.959820261955883000 -1981,91210,-1.559813171974840000 -1981.25,91490,-1.532630224900690000 -1981.5,91479,-1.428492671444700000 -1981.75,90893,-2.939641582410100000 -1982,90432,-3.962898676559460000 -1982.25,89864,-1.806399523803290000 -1982.5,89183,-4.691925038722960000 -1982.75,88769,-7.179162336782380000 -1983,89090,-5.508627866633560000 -1983.25,90022,-4.590779155525520000 -1983.5,91247,-3.107416305489780000 -1983.75,92227,-0.709320217337563000 -1984,93429,0.468658343989773000 -1984.25,94479,2.045498651162230000 -1984.5,95344,3.898799254845470000 -1984.75,96107,4.641264903377530000 -1985,96843,4.016297594999510000 -1985.25,97459,3.251232909434980000 -1985.5,98045,2.880273653217500000 -1985.75,98609,3.302004379494750000 -1986,98935,2.141386590836190000 -1986.25,99155,1.430222229139190000 -1986.5,99934,1.654001379757120000 -1986.75,100511,1.415578566214890000 -1987,101164,1.197739203008500000 -1987.25,101900,1.391942609478970000 -1987.5,102646,1.510330115361060000 -1987.75,103664,1.882569624100140000 -1988,104487,2.638598851012830000 -1988.25,105324,3.248123083100840000 -1988.5,106009,2.216916482123000000 -1988.75,106906,2.929008784044980000 -1989,107619,3.112316472461320000 -1989.25,108026,2.590061367329100000 -1989.5,108365,2.258826550585130000 -1989.75,108849,1.452957229932960000 -1990,109647,1.773498072602710000 -1990.25,109862,1.253566176359300000 -1990.5,109525,0.397721754756503000 -1990.75,109160,-1.067112244720420000 -1991,108577,-2.028441125011800000 -1991.25,108338,-2.200141305469970000 -1991.5,108340,-2.638768199405380000 -1991.75,108325,-3.452971945285300000 -1992,108368,-4.481730127522950000 -1992.25,108721,-3.459264974178950000 -1992.5,108966,-2.326015303070790000 -1992.75,109496,-1.993296986332780000 -1993,109998,-1.054342608477780000 -1993.25,110754,-0.661721481246104000 -1993.5,111451,-0.317558619556166000 -1993.75,112312,0.758535271532082000 -1994,113248,1.603175280158210000 -1994.25,114246,1.803178589600290000 -1994.5,115254,2.738050917804230000 -1994.75,116164,2.838328878736770000 -1995,116913,3.116811387681080000 -1995.25,117294,2.617817123061060000 -1995.5,117887,2.660111760563040000 -1995.75,118322,2.201887578591140000 -1996,119002,1.910008883762430000 -1996.25,119774,1.745999549228830000 -1996.5,120427,1.485712346494670000 -1996.75,121147,1.462770358501300000 -1997,122000,1.688869156312420000 -1997.25,122818,2.342653090835710000 -1997.5,123605,2.045406035989340000 -1997.75,124554,2.514951365297980000 -1998,125177,2.237797172343560000 -1998.25,126080,2.232527796689510000 -1998.5,126774,2.534153690711260000 -1998.75,127601,2.536366435665060000 -1999,128244,2.177945172042880000 -1999.25,129091,2.300721668514370000 -1999.5,129791,2.305166265823800000 -1999.75,130780,2.122532848258060000 -2000,131608,2.647083070935200000 -2000.25,132075,1.980591631542210000 -2000.5,132377,1.828076118189070000 -2000.75,132731,1.389021765476630000 -2001,132752,1.048578435407080000 -2001.25,132302,-0.136049213340812000 -2001.5,131793,-0.919488614005559000 -2001.75,131005,-2.500652574522520000 -2002,130713,-3.153618610700280000 -2002.25,130684,-3.084009650043300000 -2002.5,130526,-3.448971599434570000 -2002.75,130505,-3.987698609003020000 -2003,130238,-3.938073696722540000 -2003.25,130195,-3.254281918448900000 -2003.5,130281,-3.040940368268370000 -2003.75,130618,-2.143713898846950000 -2004,131158,-2.117135877259440000 -2004.25,131791,-1.850438443569830000 -2004.5,132120,-1.054408677405260000 -2004.75,132660,-0.690022502444890000 -2005,133169,0.123209959927408000 -2005.25,133955,0.505506056121476000 -2005.5,134593,0.745741669033123000 -2005.75,135174,0.813397232296666000 -2006,136049,0.989677984953460000 -2006.25,136337,0.815433267942808000 -2006.5,136883,1.392179255047490000 -2006.75,137266,1.014242547704950000 -2007,137785,0.978735563346390000 -2007.25,138085,0.436567947918320000 -2007.5,138116,0.211083541672906000 -2007.75,138413,0.138154407901766000 -2008,138268,-0.959598233576571000 -2008.25,137708,-0.945981009351272000 -2008.5,136781,-2.305217365696310000 -2008.75,134844,-4.024675231403990000 -2009,132527,-6.192175574879230000 -2009.25,131020,-7.370305629168800000 -2009.5,130260,-7.726364649773360000 -2009.75,129774,-8.731791369897110000 -2010,129896,-8.155431114489600000 -2010.25,130528,-6.897272353093740000 -2010.5,130372,-6.313047150300460000 -2010.75,130840,-3.867474811755070000 -2011,131295,-1.886792933676590000 -2011.25,131949,-1.603880190496060000 -2011.5,132372,-1.392474969570230000 -2011.75,132927,-0.312405201881120000 -2012,133761,0.021898297728739600 -2012.25,134038,-0.446917723523029000 -2012.5,134552,1.270743826191850000 -2012.75,135076,0.672721105518576000 -2013,135712,0.656967452832078000 -2013.25,136268,0.659959278560109000 -2013.5,136862,1.066737056829650000 -2013.75,137387,0.929806490483770000 -2014,138014,0.441272476277845000 -2014.25,138843,1.524489591871540000 -2014.5,139579,1.403754218931230000 -2014.75,140402,1.431144841079690000 -2015,140972,1.377280211841030000 -2015.25,141724,1.625820726166470000 -2015.5,142300,1.596020279933330000 -2015.75,143146,1.858248471076880000 -2016,143733,1.723205816859260000 -2016.25,144175,1.257525615789750000 +1947,43606,NaN +1947.25,43808,NaN +1947.5,44201,NaN +1947.75,44579,NaN +1948,44681,NaN +1948.25,45033,NaN +1948.5,45295,NaN +1948.75,45029,NaN +1949,44238,NaN +1949.25,43739,NaN +1949.5,43784,NaN +1949.75,43517,-7.8285449901438824 +1950,43952,-6.0095952892570494 +1950.25,45084,-5.2309111503218446 +1950.5,46442,-2.7028574754042438 +1950.75,46855,0.52433986490564166 +1951,47871,5.3548562739033514 +1951.25,48068,4.8853242476632204 +1951.5,47955,2.5011887367852523 +1951.75,48309,5.6318749805129755 +1952,48504,3.4046215478645081 +1952.25,48286,-1.3198383274350363 +1952.5,49319,-1.0962678603209497 +1952.75,50164,3.5275689433804018 +1953,50475,-0.17533903708863363 +1953.25,50522,1.0698762765596257 +1953.5,50365,1.8715838655832613 +1953.75,49702,-2.7066652555010933 +1954,49158,-3.7545341568597905 +1954.25,48896,-2.3036574888717496 +1954.5,48882,-8.2808400818953487 +1954.75,49331,-7.9489818452909731 +1955,49963,-4.5398108834006052 +1955.25,50790,-2.9799329021618632 +1955.5,51262,-2.0638238686469776 +1955.75,51805,1.1372350485783045 +1956,52295,2.2180288505041972 +1956.25,52584,2.0507159650071571 +1956.5,52601,1.8085435879149827 +1956.75,52930,0.84243090182394553 +1957,53157,0.23278583486444404 +1957.25,53066,-1.3276370237203992 +1957.5,52932,-1.191408083657052 +1957.75,52385,-3.4974758673743054 +1958,51300,-6.7284386110707146 +1958.25,50912,-7.4859791272874645 +1958.5,51506,-5.9023468938480619 +1958.75,52088,-6.5930032196881712 +1959,53016,-5.0553573478177896 +1959.25,53679,-2.5973215634157896 +1959.5,53429,-3.0648743606764128 +1959.75,54175,-0.021780530259320585 +1960,54458,3.553936473780368 +1960.25,54347,1.4709613992022241 +1960.5,54228,-2.4641330188023858 +1960.75,53744,-2.8643352276330916 +1961,53662,-4.4731811026344985 +1961.25,53977,-4.1820569477431491 +1961.5,54388,-0.57291791591933361 +1961.75,54871,-4.4474498527290507 +1962,55276,-3.3464667542705229 +1962.25,55644,-0.8039927960373916 +1962.5,55977,-0.76820246901024802 +1962.75,56028,0.65217521054137251 +1963,56322,0.074466462140435397 +1963.25,56658,-0.96158147837491015 +1963.5,57077,-0.46196522819559505 +1963.75,57360,-0.49413051815577091 +1964,57898,0.067421337295627382 +1964.25,58221,0.083972174612881645 +1964.5,58903,0.63839991269037455 +1964.75,59421,2.0160398939337938 +1965,60003,1.6751725961330521 +1965.25,60690,2.0184725544249886 +1965.5,61490,2.7046778918331711 +1965.75,62321,3.9790203672330335 +1966,63192,3.8696814011618699 +1966.25,64110,5.2957756401826828 +1966.5,64644,4.3009219963391843 +1966.75,65200,4.7037216491221443 +1967,65530,4.3675587691975579 +1967.25,65750,3.2498975114526729 +1967.5,66164,2.5003132038293643 +1967.75,66900,2.4182928905936478 +1968,67295,1.7067182623079589 +1968.25,67904,1.16734131973476 +1968.5,68487,2.0607697383150025 +1968.75,69246,2.0790877937033656 +1969,69905,2.6460341183667424 +1969.25,70636,3.455861392711995 +1969.5,70917,2.5863136207528896 +1969.75,71240,1.3555639475816861 +1970,71452,2.1154992409683473 +1970.25,71029,0.30773929772840347 +1970.5,70948,-0.75701050110160395 +1970.75,70790,-2.2138903739178204 +1971,70859,-2.7661132790815373 +1971.25,71253,-3.2655718501168849 +1971.5,71617,-2.3572795301845417 +1971.75,72108,-2.3951211578291804 +1972,72945,-1.6776767640624257 +1972.25,73760,1.1452366110022467 +1972.5,74263,0.86251091385156542 +1972.75,75270,2.2413692330646882 +1973,76285,3.3039609078803096 +1973.25,76887,3.0176353697613649 +1973.5,77276,3.453430541044554 +1973.75,78035,3.786271400754913 +1974,78296,2.423645471686541 +1974.25,78602,2.0755942780854184 +1974.5,78611,2.2441969853512092 +1974.75,77657,-1.3584911641605686 +1975,76649,-3.9464511737480734 +1975.25,76520,-3.7737294145654232 +1975.5,77230,-3.2009657699693435 +1975.75,78018,-4.190888670366121 +1976,79049,-2.3392994352032019 +1976.25,79376,-2.3619888589150833 +1976.5,79892,-1.5839262944773509 +1976.75,80448,1.7894822953817311 +1977,81391,3.6271917188773841 +1977.25,82488,2.8932134785798098 +1977.5,83532,2.2308825158511354 +1977.75,84408,3.2645659532718128 +1978,85461,3.5086875827421409 +1978.25,86951,6.1809362104306729 +1978.5,87618,5.8199375954284278 +1978.75,88673,5.8504076510691903 +1979,89480,5.1595111791257295 +1979.25,90109,4.5431699101400227 +1979.5,90325,4.0060647442369373 +1979.75,90673,3.7214557554577823 +1980,90994,2.4761553908551832 +1980.25,90099,-0.88200961071038364 +1980.5,90210,0.063600256063182314 +1980.75,90943,-0.95982026195588332 +1981,91210,-1.559813171974838 +1981.25,91490,-1.5326302249006858 +1981.5,91479,-1.428492671444701 +1981.75,90893,-2.9396415824101041 +1982,90432,-3.9628986765594618 +1982.25,89864,-1.8063995238032931 +1982.5,89183,-4.6919250387229567 +1982.75,88769,-7.1791623367823831 +1983,89090,-5.5086278666335602 +1983.25,90022,-4.5907791555255244 +1983.5,91247,-3.1074163054897781 +1983.75,92227,-0.70932021733756301 +1984,93429,0.46865834398977313 +1984.25,94479,2.0454986511622337 +1984.5,95344,3.8987992548454713 +1984.75,96107,4.6412649033775324 +1985,96843,4.0162975949995143 +1985.25,97459,3.2512329094349752 +1985.5,98045,2.8802736532175004 +1985.75,98609,3.3020043794947469 +1986,98935,2.1413865908361913 +1986.25,99155,1.4302222291391899 +1986.5,99934,1.6540013797571191 +1986.75,100511,1.4155785662148901 +1987,101164,1.1977392030084957 +1987.25,101900,1.3919426094789742 +1987.5,102646,1.5103301153610573 +1987.75,103664,1.8825696241001424 +1988,104487,2.63859885101283 +1988.25,105324,3.2481230831008361 +1988.5,106009,2.216916482122997 +1988.75,106906,2.9290087840449814 +1989,107619,3.1123164724613162 +1989.25,108026,2.5900613673290991 +1989.5,108365,2.2588265505851268 +1989.75,108849,1.4529572299329629 +1990,109647,1.7734980726027061 +1990.25,109862,1.2535661763592998 +1990.5,109525,0.39772175475650329 +1990.75,109160,-1.0671122447204198 +1991,108577,-2.0284411250117955 +1991.25,108338,-2.2001413054699697 +1991.5,108340,-2.6387681994053764 +1991.75,108325,-3.4529719452852987 +1992,108368,-4.4817301275229511 +1992.25,108721,-3.4592649741789501 +1992.5,108966,-2.3260153030707897 +1992.75,109496,-1.9932969863327799 +1993,109998,-1.0543426084777821 +1993.25,110754,-0.6617214812461043 +1993.5,111451,-0.31755861955616638 +1993.75,112312,0.75853527153208233 +1994,113248,1.6031752801582115 +1994.25,114246,1.803178589600293 +1994.5,115254,2.7380509178042303 +1994.75,116164,2.8383288787367746 +1995,116913,3.1168113876810821 +1995.25,117294,2.6178171230610587 +1995.5,117887,2.6601117605630407 +1995.75,118322,2.2018875785911405 +1996,119002,1.9100088837624298 +1996.25,119774,1.7459995492288272 +1996.5,120427,1.4857123464946653 +1996.75,121147,1.4627703585013023 +1997,122000,1.6888691563124212 +1997.25,122818,2.3426530908357108 +1997.5,123605,2.0454060359893447 +1997.75,124554,2.5149513652979749 +1998,125177,2.2377971723435621 +1998.25,126080,2.2325277966895101 +1998.5,126774,2.5341536907112641 +1998.75,127601,2.5363664356650588 +1999,128244,2.1779451720428824 +1999.25,129091,2.3007216685143703 +1999.5,129791,2.3051662658238001 +1999.75,130780,2.1225328482580608 +2000,131608,2.6470830709351958 +2000.25,132075,1.980591631542211 +2000.5,132377,1.8280761181890739 +2000.75,132731,1.3890217654766275 +2001,132752,1.0485784354070802 +2001.25,132302,-0.13604921334081155 +2001.5,131793,-0.9194886140055587 +2001.75,131005,-2.500652574522519 +2002,130713,-3.1536186107002777 +2002.25,130684,-3.0840096500432992 +2002.5,130526,-3.4489715994345715 +2002.75,130505,-3.9876986090030186 +2003,130238,-3.9380736967225403 +2003.25,130195,-3.2542819184488962 +2003.5,130281,-3.040940368268366 +2003.75,130618,-2.1437138988469542 +2004,131158,-2.1171358772594431 +2004.25,131791,-1.8504384435698285 +2004.5,132120,-1.054408677405263 +2004.75,132660,-0.69002250244489005 +2005,133169,0.12320995992740791 +2005.25,133955,0.50550605612147592 +2005.5,134593,0.74574166903312289 +2005.75,135174,0.81339723229666561 +2006,136049,0.9896779849534596 +2006.25,136337,0.81543326794280802 +2006.5,136883,1.3921792550474947 +2006.75,137266,1.0142425477049528 +2007,137785,0.97873556334639034 +2007.25,138085,0.43656794791831999 +2007.5,138116,0.21108354167290599 +2007.75,138413,0.13815440790176581 +2008,138268,-0.95959823357657115 +2008.25,137708,-0.9459810093512715 +2008.5,136781,-2.3052173656963078 +2008.75,134844,-4.0246752314039895 +2009,132527,-6.1921755748792293 +2009.25,131020,-7.3703056291687972 +2009.5,130260,-7.7263646497733589 +2009.75,129774,-8.7317913698971097 +2010,129896,-8.1554311144896019 +2010.25,130528,-6.8972723530937401 +2010.5,130372,-6.3130471503004628 +2010.75,130840,-3.8674748117550735 +2011,131295,-1.8867929336765883 +2011.25,131949,-1.6038801904960565 +2011.5,132372,-1.3924749695702303 +2011.75,132927,-0.31240520188111986 +2012,133761,0.021898297728739635 +2012.25,134038,-0.44691772352302905 +2012.5,134552,1.2707438261918469 +2012.75,135076,0.67272110551857622 +2013,135712,0.65696745283207747 +2013.25,136268,0.65995927856010894 +2013.5,136862,1.0667370568296519 +2013.75,137387,0.92980649048377018 +2014,138014,0.44127247627784527 +2014.25,138843,1.5244895918715429 +2014.5,139579,1.4037542189312262 +2014.75,140402,1.4311448410796856 +2015,140972,1.3772802118410254 +2015.25,141724,1.6258207261664666 +2015.5,142300,1.5960202799333274 +2015.75,143146,1.8582484710768767 +2016,143733,1.723205816859263 +2016.25,144175,1.2575256157897456 From 9517eed193fe34dbb1bc0015deee9c084c05cb87 Mon Sep 17 00:00:00 2001 From: Shunsuke Hori Date: Thu, 22 Mar 2018 15:52:55 -0700 Subject: [PATCH 04/10] delete file and author name and add random walk case --- quantecon/filter.py | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/quantecon/filter.py b/quantecon/filter.py index e8c881bac..cfa68f716 100644 --- a/quantecon/filter.py +++ b/quantecon/filter.py @@ -1,13 +1,11 @@ """ -Filename: filter.py -Authors: Shunsuke Hori function for filtering """ import numpy as np -def hamilton_filter(data, h, p): +def hamilton_filter(data, h, *args): r""" This function applies "Hamilton filter" to the data @@ -20,9 +18,10 @@ def hamilton_filter(data, h, p): Time horizon that we are likely to predict incorrectly. Original paper recommends 2 for annual data, 8 for quarterly data, 24 for monthly data. - p : integer - Number of lags in regression. + *args : integer + If supplied, it is p in the paper. Number of lags in regression. Must be greater than h. + If not supplied, random walk process is assumed. Note: For seasonal data, it's desirable for p and h to be integer multiples of the number of obsevations in a year. @@ -38,17 +37,26 @@ def hamilton_filter(data, h, p): y = np.asarray(data, float) # sample size T = len(y) - # construct X matrix of lags - X = np.ones((T-p-h+1, p+1)) - for j in range(1, p+1): - X[:, j] = y[p-j:T-h-j+1:1] - - # do OLS regression - b = np.linalg.solve(X.transpose()@X, X.transpose()@y[p+h-1:T]) - # trend component (`nan` for the first p+h-1 period) - trend = np.append(np.zeros(p+h-1)+np.nan, X@b) - # cyclical component - cycle = data - trend + if len(args) == 1: # if p is supplied + p = args[0] + # construct X matrix of lags + X = np.ones((T-p-h+1, p+1)) + for j in range(1, p+1): + X[:, j] = y[p-j:T-h-j+1:1] + + # do OLS regression + b = np.linalg.solve(X.transpose()@X, X.transpose()@y[p+h-1:T]) + # trend component (`nan` for the first p+h-1 period) + trend = np.append(np.zeros(p+h-1)+np.nan, X@b) + # cyclical component + cycle = y - trend + + elif len(args) == 0: # if p is not supplied (random walk) + cycle = np.append(np.zeros(h)+np.nan, y[h:T] - y[0:T-h]) + trend = y - cycle + return cycle, trend + + From 87468bd8e72d82228c34b84a77bcc675c0313fb3 Mon Sep 17 00:00:00 2001 From: Shunsuke Hori Date: Thu, 22 Mar 2018 17:14:43 -0700 Subject: [PATCH 05/10] update test --- quantecon/tests/data/employment.csv | 556 ++++++++++++++-------------- quantecon/tests/test_filter.py | 11 +- 2 files changed, 283 insertions(+), 284 deletions(-) diff --git a/quantecon/tests/data/employment.csv b/quantecon/tests/data/employment.csv index 6273d6c09..85f31e2f9 100644 --- a/quantecon/tests/data/employment.csv +++ b/quantecon/tests/data/employment.csv @@ -1,278 +1,278 @@ -1947,43606,NaN -1947.25,43808,NaN -1947.5,44201,NaN -1947.75,44579,NaN -1948,44681,NaN -1948.25,45033,NaN -1948.5,45295,NaN -1948.75,45029,NaN -1949,44238,NaN -1949.25,43739,NaN -1949.5,43784,NaN -1949.75,43517,-7.8285449901438824 -1950,43952,-6.0095952892570494 -1950.25,45084,-5.2309111503218446 -1950.5,46442,-2.7028574754042438 -1950.75,46855,0.52433986490564166 -1951,47871,5.3548562739033514 -1951.25,48068,4.8853242476632204 -1951.5,47955,2.5011887367852523 -1951.75,48309,5.6318749805129755 -1952,48504,3.4046215478645081 -1952.25,48286,-1.3198383274350363 -1952.5,49319,-1.0962678603209497 -1952.75,50164,3.5275689433804018 -1953,50475,-0.17533903708863363 -1953.25,50522,1.0698762765596257 -1953.5,50365,1.8715838655832613 -1953.75,49702,-2.7066652555010933 -1954,49158,-3.7545341568597905 -1954.25,48896,-2.3036574888717496 -1954.5,48882,-8.2808400818953487 -1954.75,49331,-7.9489818452909731 -1955,49963,-4.5398108834006052 -1955.25,50790,-2.9799329021618632 -1955.5,51262,-2.0638238686469776 -1955.75,51805,1.1372350485783045 -1956,52295,2.2180288505041972 -1956.25,52584,2.0507159650071571 -1956.5,52601,1.8085435879149827 -1956.75,52930,0.84243090182394553 -1957,53157,0.23278583486444404 -1957.25,53066,-1.3276370237203992 -1957.5,52932,-1.191408083657052 -1957.75,52385,-3.4974758673743054 -1958,51300,-6.7284386110707146 -1958.25,50912,-7.4859791272874645 -1958.5,51506,-5.9023468938480619 -1958.75,52088,-6.5930032196881712 -1959,53016,-5.0553573478177896 -1959.25,53679,-2.5973215634157896 -1959.5,53429,-3.0648743606764128 -1959.75,54175,-0.021780530259320585 -1960,54458,3.553936473780368 -1960.25,54347,1.4709613992022241 -1960.5,54228,-2.4641330188023858 -1960.75,53744,-2.8643352276330916 -1961,53662,-4.4731811026344985 -1961.25,53977,-4.1820569477431491 -1961.5,54388,-0.57291791591933361 -1961.75,54871,-4.4474498527290507 -1962,55276,-3.3464667542705229 -1962.25,55644,-0.8039927960373916 -1962.5,55977,-0.76820246901024802 -1962.75,56028,0.65217521054137251 -1963,56322,0.074466462140435397 -1963.25,56658,-0.96158147837491015 -1963.5,57077,-0.46196522819559505 -1963.75,57360,-0.49413051815577091 -1964,57898,0.067421337295627382 -1964.25,58221,0.083972174612881645 -1964.5,58903,0.63839991269037455 -1964.75,59421,2.0160398939337938 -1965,60003,1.6751725961330521 -1965.25,60690,2.0184725544249886 -1965.5,61490,2.7046778918331711 -1965.75,62321,3.9790203672330335 -1966,63192,3.8696814011618699 -1966.25,64110,5.2957756401826828 -1966.5,64644,4.3009219963391843 -1966.75,65200,4.7037216491221443 -1967,65530,4.3675587691975579 -1967.25,65750,3.2498975114526729 -1967.5,66164,2.5003132038293643 -1967.75,66900,2.4182928905936478 -1968,67295,1.7067182623079589 -1968.25,67904,1.16734131973476 -1968.5,68487,2.0607697383150025 -1968.75,69246,2.0790877937033656 -1969,69905,2.6460341183667424 -1969.25,70636,3.455861392711995 -1969.5,70917,2.5863136207528896 -1969.75,71240,1.3555639475816861 -1970,71452,2.1154992409683473 -1970.25,71029,0.30773929772840347 -1970.5,70948,-0.75701050110160395 -1970.75,70790,-2.2138903739178204 -1971,70859,-2.7661132790815373 -1971.25,71253,-3.2655718501168849 -1971.5,71617,-2.3572795301845417 -1971.75,72108,-2.3951211578291804 -1972,72945,-1.6776767640624257 -1972.25,73760,1.1452366110022467 -1972.5,74263,0.86251091385156542 -1972.75,75270,2.2413692330646882 -1973,76285,3.3039609078803096 -1973.25,76887,3.0176353697613649 -1973.5,77276,3.453430541044554 -1973.75,78035,3.786271400754913 -1974,78296,2.423645471686541 -1974.25,78602,2.0755942780854184 -1974.5,78611,2.2441969853512092 -1974.75,77657,-1.3584911641605686 -1975,76649,-3.9464511737480734 -1975.25,76520,-3.7737294145654232 -1975.5,77230,-3.2009657699693435 -1975.75,78018,-4.190888670366121 -1976,79049,-2.3392994352032019 -1976.25,79376,-2.3619888589150833 -1976.5,79892,-1.5839262944773509 -1976.75,80448,1.7894822953817311 -1977,81391,3.6271917188773841 -1977.25,82488,2.8932134785798098 -1977.5,83532,2.2308825158511354 -1977.75,84408,3.2645659532718128 -1978,85461,3.5086875827421409 -1978.25,86951,6.1809362104306729 -1978.5,87618,5.8199375954284278 -1978.75,88673,5.8504076510691903 -1979,89480,5.1595111791257295 -1979.25,90109,4.5431699101400227 -1979.5,90325,4.0060647442369373 -1979.75,90673,3.7214557554577823 -1980,90994,2.4761553908551832 -1980.25,90099,-0.88200961071038364 -1980.5,90210,0.063600256063182314 -1980.75,90943,-0.95982026195588332 -1981,91210,-1.559813171974838 -1981.25,91490,-1.5326302249006858 -1981.5,91479,-1.428492671444701 -1981.75,90893,-2.9396415824101041 -1982,90432,-3.9628986765594618 -1982.25,89864,-1.8063995238032931 -1982.5,89183,-4.6919250387229567 -1982.75,88769,-7.1791623367823831 -1983,89090,-5.5086278666335602 -1983.25,90022,-4.5907791555255244 -1983.5,91247,-3.1074163054897781 -1983.75,92227,-0.70932021733756301 -1984,93429,0.46865834398977313 -1984.25,94479,2.0454986511622337 -1984.5,95344,3.8987992548454713 -1984.75,96107,4.6412649033775324 -1985,96843,4.0162975949995143 -1985.25,97459,3.2512329094349752 -1985.5,98045,2.8802736532175004 -1985.75,98609,3.3020043794947469 -1986,98935,2.1413865908361913 -1986.25,99155,1.4302222291391899 -1986.5,99934,1.6540013797571191 -1986.75,100511,1.4155785662148901 -1987,101164,1.1977392030084957 -1987.25,101900,1.3919426094789742 -1987.5,102646,1.5103301153610573 -1987.75,103664,1.8825696241001424 -1988,104487,2.63859885101283 -1988.25,105324,3.2481230831008361 -1988.5,106009,2.216916482122997 -1988.75,106906,2.9290087840449814 -1989,107619,3.1123164724613162 -1989.25,108026,2.5900613673290991 -1989.5,108365,2.2588265505851268 -1989.75,108849,1.4529572299329629 -1990,109647,1.7734980726027061 -1990.25,109862,1.2535661763592998 -1990.5,109525,0.39772175475650329 -1990.75,109160,-1.0671122447204198 -1991,108577,-2.0284411250117955 -1991.25,108338,-2.2001413054699697 -1991.5,108340,-2.6387681994053764 -1991.75,108325,-3.4529719452852987 -1992,108368,-4.4817301275229511 -1992.25,108721,-3.4592649741789501 -1992.5,108966,-2.3260153030707897 -1992.75,109496,-1.9932969863327799 -1993,109998,-1.0543426084777821 -1993.25,110754,-0.6617214812461043 -1993.5,111451,-0.31755861955616638 -1993.75,112312,0.75853527153208233 -1994,113248,1.6031752801582115 -1994.25,114246,1.803178589600293 -1994.5,115254,2.7380509178042303 -1994.75,116164,2.8383288787367746 -1995,116913,3.1168113876810821 -1995.25,117294,2.6178171230610587 -1995.5,117887,2.6601117605630407 -1995.75,118322,2.2018875785911405 -1996,119002,1.9100088837624298 -1996.25,119774,1.7459995492288272 -1996.5,120427,1.4857123464946653 -1996.75,121147,1.4627703585013023 -1997,122000,1.6888691563124212 -1997.25,122818,2.3426530908357108 -1997.5,123605,2.0454060359893447 -1997.75,124554,2.5149513652979749 -1998,125177,2.2377971723435621 -1998.25,126080,2.2325277966895101 -1998.5,126774,2.5341536907112641 -1998.75,127601,2.5363664356650588 -1999,128244,2.1779451720428824 -1999.25,129091,2.3007216685143703 -1999.5,129791,2.3051662658238001 -1999.75,130780,2.1225328482580608 -2000,131608,2.6470830709351958 -2000.25,132075,1.980591631542211 -2000.5,132377,1.8280761181890739 -2000.75,132731,1.3890217654766275 -2001,132752,1.0485784354070802 -2001.25,132302,-0.13604921334081155 -2001.5,131793,-0.9194886140055587 -2001.75,131005,-2.500652574522519 -2002,130713,-3.1536186107002777 -2002.25,130684,-3.0840096500432992 -2002.5,130526,-3.4489715994345715 -2002.75,130505,-3.9876986090030186 -2003,130238,-3.9380736967225403 -2003.25,130195,-3.2542819184488962 -2003.5,130281,-3.040940368268366 -2003.75,130618,-2.1437138988469542 -2004,131158,-2.1171358772594431 -2004.25,131791,-1.8504384435698285 -2004.5,132120,-1.054408677405263 -2004.75,132660,-0.69002250244489005 -2005,133169,0.12320995992740791 -2005.25,133955,0.50550605612147592 -2005.5,134593,0.74574166903312289 -2005.75,135174,0.81339723229666561 -2006,136049,0.9896779849534596 -2006.25,136337,0.81543326794280802 -2006.5,136883,1.3921792550474947 -2006.75,137266,1.0142425477049528 -2007,137785,0.97873556334639034 -2007.25,138085,0.43656794791831999 -2007.5,138116,0.21108354167290599 -2007.75,138413,0.13815440790176581 -2008,138268,-0.95959823357657115 -2008.25,137708,-0.9459810093512715 -2008.5,136781,-2.3052173656963078 -2008.75,134844,-4.0246752314039895 -2009,132527,-6.1921755748792293 -2009.25,131020,-7.3703056291687972 -2009.5,130260,-7.7263646497733589 -2009.75,129774,-8.7317913698971097 -2010,129896,-8.1554311144896019 -2010.25,130528,-6.8972723530937401 -2010.5,130372,-6.3130471503004628 -2010.75,130840,-3.8674748117550735 -2011,131295,-1.8867929336765883 -2011.25,131949,-1.6038801904960565 -2011.5,132372,-1.3924749695702303 -2011.75,132927,-0.31240520188111986 -2012,133761,0.021898297728739635 -2012.25,134038,-0.44691772352302905 -2012.5,134552,1.2707438261918469 -2012.75,135076,0.67272110551857622 -2013,135712,0.65696745283207747 -2013.25,136268,0.65995927856010894 -2013.5,136862,1.0667370568296519 -2013.75,137387,0.92980649048377018 -2014,138014,0.44127247627784527 -2014.25,138843,1.5244895918715429 -2014.5,139579,1.4037542189312262 -2014.75,140402,1.4311448410796856 -2015,140972,1.3772802118410254 -2015.25,141724,1.6258207261664666 -2015.5,142300,1.5960202799333274 -2015.75,143146,1.8582484710768767 -2016,143733,1.723205816859263 -2016.25,144175,1.2575256157897456 +1947,43606,NaN,NaN +1947.25,43808,NaN,NaN +1947.5,44201,NaN,NaN +1947.75,44579,NaN,NaN +1948,44681,NaN,NaN +1948.25,45033,NaN,NaN +1948.5,45295,NaN,NaN +1948.75,45029,NaN,NaN +1949,44238,NaN,1.438939266971146935247816145420074462890625 +1949.25,43739,NaN,-0.157629648730789995170198380947113037109375 +1949.5,43784,NaN,-0.947895942049626683001406490802764892578125 +1949.75,43517,-7.828545178604372267727740108966827392578125,-2.41112297743484305101446807384490966796875 +1950,43952,-6.00959547800039217690937221050262451171875,-1.645022597631395910866558551788330078125 +1950.25,45084,-5.230911338902160423458553850650787353515625,0.113186203368286442128010094165802001953125 +1950.5,46442,-2.7028576642433108645491302013397216796875,2.500757110324911991483531892299652099609375 +1950.75,46855,0.5243396757296068244613707065582275390625,3.9750999926172880805097520351409912109375 +1951,47871,5.35485608470435181516222655773162841796875,7.89257448608304912340827286243438720703125 +1951.25,48068,4.88532405905652922228910028934478759765625,9.437652243032289334223605692386627197265625 +1951.5,47955,2.501188548570326020126231014728546142578125,9.09946173382968481746502220630645751953125 +1951.75,48309,5.63187479197176799061708152294158935546875,10.446621235585553222335875034332275390625 +1952,48504,3.404621359892871623742394149303436279296875,9.85481394165117308148182928562164306640625 +1952.25,48286,-1.31983851543418495566584169864654541015625,6.86142471901302997139282524585723876953125 +1952.5,49319,-1.09626804884828743524849414825439453125,6.01051801158837406546808779239654541015625 +1952.75,50164,3.527568753818968616542406380176544189453125,6.8239911386017411132343113422393798828125 +1953,50475,-0.175339226260120994993485510349273681640625,5.296827110250205805641598999500274658203125 +1953.25,50522,1.06987608644476495101116597652435302734375,4.97922099315110244788229465484619140625 +1953.5,50365,1.871583675473402763600461184978485107421875,4.903341821473077288828790187835693359375 +1953.75,49702,-2.70666544528421582072041928768157958984375,2.84272950376407607109285891056060791015625 +1954,49158,-3.754534346973059655283577740192413330078125,1.339333161830154494964517652988433837890625 +1954.25,48896,-2.30365767920056896400637924671173095703125,1.255392997409217059612274169921875 +1954.5,48882,-8.28084027146041989908553659915924072265625,-0.8900171783825499005615711212158203125 +1954.75,49331,-7.948982035645940413814969360828399658203125,-1.67449512816483547794632613658905029296875 +1955,49963,-4.53981107422669083462096750736236572265625,-1.0195432705904750037007033824920654296875 +1955.25,50790,-2.979933093086629014578647911548614501953125,0.5290599832587759010493755340576171875 +1955.5,51262,-2.06382405962403936428017914295196533203125,1.76532475573594638262875378131866455078125 +1955.75,51805,1.137234857471412396989762783050537109375,4.144149596210581876221112906932830810546875 +1956,52295,2.218028659802484980900771915912628173828125,6.18611638184984258259646594524383544921875 +1956.25,52584,2.050715774591253648395650088787078857421875,7.271629741722108519752509891986846923828125 +1956.5,52601,1.8085433976402782718650996685028076171875,7.332590041323555851704441010951995849609375 +1956.75,52930,0.842430711711131152696907520294189453125,7.0417599189740940346382558345794677734375 +1957,53157,0.2327856445599536527879536151885986328125,6.19670673510472624911926686763763427734375 +1957.25,53066,-1.327637214201558890636079013347625732421875,4.383693703603739777463488280773162841796875 +1957.5,52932,-1.19140827463206733227707445621490478515625,3.20583339587983573437668383121490478515625 +1957.75,52385,-3.497476058391839615069329738616943359375,1.11336211012121566454879939556121826171875 +1958,51300,-6.728438802321079492685385048389434814453125,-1.9210012029507197439670562744140625 +1958.25,50912,-7.485979318776799118495546281337738037109375,-3.2313238805900255101732909679412841796875 +1958.5,51506,-5.9023470855054256389848887920379638671875,-2.103682523189718267531134188175201416015625 +1958.75,52088,-6.593003411156360016320832073688507080078125,-1.603568993533599496004171669483184814453125 +1959,53016,-5.055357539517217446700669825077056884765625,-0.26560440581170041696168482303619384765625 +1959.25,53679,-2.597321755297571144183166325092315673828125,1.148544172864376378129236400127410888671875 +1959.5,53429,-3.06487455247452089679427444934844970703125,0.93455988066170903039164841175079345703125 +1959.75,54175,-0.0217807221861221478320658206939697265625,3.35992566174945750390179455280303955078125 +1960,54458,3.5539362818935842369683086872100830078125,5.973901019329105110955424606800079345703125 +1960.25,54347,1.470961208108974460628814995288848876953125,6.529076209629920413135550916194915771484375 +1960.5,54228,-2.464133209499550503096543252468109130859375,5.14990744792476107249967753887176513671875 +1960.75,53744,-2.86433541876749586663208901882171630859375,3.129743693537648141500540077686309814453125 +1961,53662,-4.473181293800053026643581688404083251953125,1.21113612277486026869155466556549072265625 +1961.25,53977,-4.18205713941779322340153157711029052734375,0.553616632830426169675774872303009033203125 +1961.5,54388,-0.572918108130807013367302715778350830078125,1.77898715760193226742558181285858154296875 +1961.75,54871,-4.44745004423248246894218027591705322265625,1.2765428377597345388494431972503662109375 +1962,55276,-3.34646694645607567508704960346221923828125,1.490905557122232494293712079524993896484375 +1962.25,55644,-0.8039929883570948732085525989532470703125,2.3584840945650284993462264537811279296875 +1962.5,55977,-0.768202661215809712302871048450469970703125,3.174351186607736963196657598018646240234375 +1962.75,56028,0.652175018216667012893594801425933837890625,4.161953290686369655304588377475738525390625 +1963,56322,0.074466270225457265041768550872802734375,4.83801065692341580870561301708221435546875 +1963.25,56658,-0.961581670192799720098264515399932861328125,4.847516560284930164925754070281982421875 +1963.5,57077,-0.461965420161732254200614988803863525390625,4.82576921203917663660831749439239501953125 +1963.75,57360,-0.49413071024218879756517708301544189453125,4.43622204913435780326835811138153076171875 +1964,57898,0.06742114500548268551938235759735107421875,4.634402372677641324116848409175872802734375 +1964.25,58221,0.0839719821969993063248693943023681640625,4.52718592007431652746163308620452880859375 +1964.5,58903,0.63839972014966406277380883693695068359375,5.09511310633160974248312413692474365234375 +1964.75,59421,2.01603970118094366625882685184478759765625,5.87961334664350943057797849178314208984375 +1965,60003,1.67517240352390217594802379608154296875,6.330933838923328949022106826305389404296875 +1965.25,60690,2.018472361682825066964142024517059326171875,6.874574433877796764136292040348052978515625 +1965.5,61490,2.704677699013018354889936745166778564453125,7.44733265515469611273147165775299072265625 +1965.75,62321,3.9790201742116551031358540058135986328125,8.29512513554846009355969727039337158203125 +1966,63192,3.869681208183692433522082865238189697265625,8.749486919410401242203079164028167724609375 +1966.25,64110,5.29577544689891510643064975738525390625,9.635424360109709596144966781139373779296875 +1966.5,64644,4.300921803145683952607214450836181640625,9.3003270339859227533452212810516357421875 +1966.75,65200,4.70372145557985277264378964900970458984375,9.281176968937188576092012226581573486328125 +1967,65530,4.36755857556408955133520066738128662109375,8.811349207926241433597169816493988037109375 +1967.25,65750,3.24989731767027478781528770923614501953125,8.0080731210109661333262920379638671875 +1967.5,66164,2.500313009865976709988899528980255126953125,7.32619484145971000543795526027679443359375 +1967.75,66900,2.41829269638765254057943820953369140625,7.090051948733389508561231195926666259765625 +1968,67295,1.706718067873907784814946353435516357421875,6.290822882355996625847183167934417724609375 +1968.25,67904,1.167341125062876017182134091854095458984375,5.749458499235288400086574256420135498046875 +1968.5,68487,2.06076954324407779495231807231903076171875,5.7748652749187385779805481433868408203125 +1968.75,69246,2.079087598568321482161991298198699951171875,6.020591273371564966510049998760223388671875 +1969,69905,2.64603392299295592238195240497589111328125,6.462912438838202433544211089611053466796875 +1969.25,70636,3.455861197253625505254603922367095947265625,7.168025849300420304643921554088592529296875 +1969.5,70917,2.5863134253204407286830246448516845703125,6.93736707468769964179955422878265380859375 +1969.75,71240,1.35556375210944679565727710723876953125,6.285549128728007417521439492702484130859375 +1970,71452,2.1154990451277626561932265758514404296875,5.993995590096119485679082572460174560546875 +1970.25,71029,0.307739101923061753041110932826995849609375,4.499330136073922403738833963871002197265625 +1970.5,70948,-0.757010697119085307349450886249542236328125,3.530326810775704871048219501972198486328125 +1970.75,70790,-2.213890570021931125666014850139617919921875,2.20523661197739784256555140018463134765625 +1971,70859,-2.766113475445308722555637359619140625,1.35548095637795995571650564670562744140625 +1971.25,71253,-3.265572046604802380898036062717437744140625,0.869699397463818968390114605426788330078125 +1971.5,71617,-2.357279727014201853307895362377166748046875,0.98222968252639475394971668720245361328125 +1971.75,72108,-2.39512135463564845849759876728057861328125,1.211053671833042244543321430683135986328125 +1972,72945,-1.67767696099690510891377925872802734375,2.067983693722226234967820346355438232421875 +1972.25,73760,1.145236413833345068269409239292144775390625,3.772833489608046875218860805034637451171875 +1972.5,74263,0.8625107170037153991870582103729248046875,4.56656321891068728291429579257965087890625 +1972.75,75270,2.241369036145670179394073784351348876953125,6.13639012603425726410932838916778564453125 +1973,76285,3.303960711090667246025986969470977783203125,7.378433956160051820916123688220977783203125 +1973.25,76887,3.017635173018106797826476395130157470703125,7.609988798018321176641620695590972900390625 +1973.5,77276,3.45343034414008798194117844104766845703125,7.60509527781914584920741617679595947265625 +1973.75,78035,3.78627120380906490026973187923431396484375,7.8992448854723988915793597698211669921875 +1974,78296,2.423645274705222618649713695049285888671875,7.079078359965706113143824040889739990234375 +1974.25,78602,2.07559408083534435718320310115814208984375,6.358056515571661293506622314453125 +1974.5,78611,2.244196787816463256604038178920745849609375,5.689879222016543280915357172489166259765625 +1974.75,77657,-1.358491361610731473774649202823638916015625,3.12200445856115038623102009296417236328125 +1975,76649,-3.94645137152247116318903863430023193359375,0.4760232353137325844727456569671630859375 +1975.25,76520,-3.773729612694523893878795206546783447265625,-0.478466693364907769137062132358551025390625 +1975.5,77230,-3.2009659682325946050696074962615966796875,-0.059544614913420446100644767284393310546875 +1975.75,78018,-4.190888868581168935634195804595947265625,-0.021787469727996722212992608547210693359375 +1976,79049,-2.339299633796372290817089378833770751953125,0.95713972305702554876916110515594482421875 +1976.25,79376,-2.361989057471646447083912789821624755859375,0.979891115463715323130600154399871826171875 +1976.5,79892,-1.583926493200351615087129175662994384765625,1.616408385031036232248879969120025634765625 +1976.75,80448,1.7894820964238533633761107921600341796875,3.530931933573128844727762043476104736328125 +1977,81391,3.62719152026375013520009815692901611328125,6.002814286685179467895068228244781494140625 +1977.25,82488,2.8932132804538923664949834346771240234375,7.51006836435908553539775311946868896484375 +1977.5,83532,2.23088231786232427111826837062835693359375,7.84418093933572890819050371646881103515625 +1977.75,84408,3.264565755016519688069820404052734375,7.872261454255522039602510631084442138671875 +1978,85461,3.5086873843729335931129753589630126953125,7.799221817409488721750676631927490234375 +1978.25,86951,6.180936011590574707952328026294708251953125,9.114868603802960933535359799861907958984375 +1978.5,87618,5.819937396682007602066732943058013916015625,9.231073368346415009000338613986968994140625 +1978.75,88673,5.850407452183162604342214763164520263671875,9.7344433166335875284858047962188720703125 +1979,89480,5.1595109802210572524927556514739990234375,9.47504348367738202796317636966705322265625 +1979.25,90109,4.5431697110116147086955606937408447265625,8.83672204222830259823240339756011962890625 +1979.5,90325,4.006064544836817731265909969806671142578125,7.81844850591733120381832122802734375 +1979.75,90673,3.721455555799138892325572669506072998046875,7.15974442896686014137230813503265380859375 +1980,90994,2.476155191083080353564582765102386474609375,6.27334387489872824517078697681427001953125 +1980.25,90099,-0.88200981061572747421450912952423095703125,3.55643241768439111183397471904754638671875 +1980.5,90210,0.06360005557644399232231080532073974609375,2.915382938215998365194536745548248291015625 +1980.75,90943,-0.959820462356219650246202945709228515625,2.527749050244210593518801033496856689453125 +1981,91210,-1.559813372713279022718779742717742919921875,1.914940357013620086945593357086181640625 +1981.25,91490,-1.532630425805791674065403640270233154296875,1.5209628053517008083872497081756591796875 +1981.5,91479,-1.428492872554443238186649978160858154296875,1.26951607100136243388988077640533447265625 +1981.75,90893,-2.939641783474371550255455076694488525390625,0.24233623879581500659696757793426513671875 +1982,90432,-3.96289887771990834153257310390472412109375,-0.619538321510617606691084802150726318359375 +1982.25,89864,-1.806399725325036342837847769260406494140625,-0.26116494342977603082545101642608642578125 +1982.5,89183,-4.691925239654437973513267934322357177734375,-1.144984720546517564798705279827117919921875 +1982.75,88769,-7.179162537727506787632592022418975830078125,-2.419544668681055554770864546298980712890625 +1983,89090,-5.50862806791337789036333560943603515625,-2.351744545951305553899146616458892822265625 +1983.25,90022,-4.590779356784651099587790668010711669921875,-1.617559178840792810660786926746368408203125 +1983.5,91247,-3.107416506881008899654261767864227294921875,-0.253932253389621109818108379840850830078125 +1983.75,92227,-0.709320418830657217768020927906036376953125,1.45699388239745530881918966770172119140625 +1984,93429,0.4686581427149576484225690364837646484375,3.26036024852646733052097260951995849609375 +1984.25,94479,2.045498449927663386915810406208038330078125,5.008017124318939750082790851593017578125 +1984.5,95344,3.89879905370844426215626299381256103515625,6.680096554154033583472482860088348388671875 +1984.75,96107,4.641264702456965096644125878810882568359375,7.942466416457818922935985028743743896484375 +1985,96843,4.01629739431018606410361826419830322265625,8.34440157917924807406961917877197265625 +1985.25,97459,3.251232708737006760202348232269287109375,7.93776918399453279562294483184814453125 +1985.5,98045,2.880273452330357031314633786678314208984375,7.185644174165872755111195147037506103515625 +1985.75,98609,3.302004178273136858479119837284088134765625,6.69096059920912011875770986080169677734375 +1986,98935,2.1413863895149916061200201511383056640625,5.726127929707445218809880316257476806640625 +1986.25,99155,1.430222027520130723132751882076263427734375,4.830669475533568402170203626155853271484375 +1986.5,99934,1.65400117791796219535171985626220703125,4.70185640875888566370122134685516357421875 +1986.75,100511,1.415578364213388340431265532970428466796875,4.480502013160730712115764617919921875 +1987,101164,1.19773900087102447287179529666900634765625,4.36518518163620683480985462665557861328125 +1987.25,101900,1.391942407181204544031061232089996337890625,4.45601634856984674115665256977081298828125 +1987.5,102646,1.5103299129596052807755768299102783203125,4.585961838938374057761393487453460693359375 +1987.75,103664,1.882569421590233105234801769256591796875,4.999236437411809674813412129878997802734375 +1988,104487,2.638598648349443465122021734714508056640625,5.459959290802771647577174007892608642578125 +1988.25,105324,3.248122880384698873967863619327545166015625,6.035703106018672770005650818347930908203125 +1988.5,106009,2.21691627950667680124752223491668701171875,5.901402807595104604843072593212127685546875 +1988.75,106906,2.92900858117400275659747421741485595703125,6.168276943169303194736130535602569580078125 +1989,107619,3.11231626953531304025091230869293212890625,6.185424972422651990200392901897430419921875 +1989.25,108026,2.59006116429600297124125063419342041015625,5.837999866287873373948968946933746337890625 +1989.5,108365,2.2588263474162886268459260463714599609375,5.42189832995018150541000068187713623046875 +1989.75,108849,1.45295702669454840361140668392181396484375,4.8806700976228967192582786083221435546875 +1990,109647,1.773497869113953129271976649761199951171875,4.820345295605875435285270214080810546875 +1990.25,109862,1.25356597275958847603760659694671630859375,4.218371933895468828268349170684814453125 +1990.5,109525,0.39772155097989525529555976390838623046875,3.262883753179949053446762263774871826171875 +1990.75,109160,-1.067112448548641623347066342830657958984375,2.086475216250846642651595175266265869140625 +1991,108577,-2.028441329053976005525328218936920166015625,0.886238663299309337162412703037261962890625 +1991.25,108338,-2.20014150967062960262410342693328857421875,0.288403076536496882908977568149566650390625 +1991.5,108340,-2.63876840365310272318311035633087158203125,-0.02307284106109364074654877185821533203125 +1991.75,108325,-3.452972149553033887059427797794342041015625,-0.48256330578578854328952729701995849609375 +1992,108368,-4.481730331821381696499884128570556640625,-1.173327223594014867558144032955169677734375 +1992.25,108721,-3.459265178760915659950114786624908447265625,-1.044006499668512333300895988941192626953125 +1992.5,108966,-2.326015507733018239377997815608978271484375,-0.511692673554762222920544445514678955078125 +1992.75,109496,-1.99329719088927959091961383819580078125,0.307332306882699413108639419078826904296875 +1993,109998,-1.05434281302223098464310169219970703125,1.3002585111016742303036153316497802734375 +1993.25,110754,-0.66172168560069621889851987361907958984375,2.205555599759463802911341190338134765625 +1993.5,111451,-0.317558823862100325641222298145294189453125,2.83106021953381059574894607067108154296875 +1993.75,112312,0.758535067198181423009373247623443603515625,3.61447450436753570102155208587646484375 +1994,113248,1.6031750758420457714237272739410400390625,4.404726169050491080270148813724517822265625 +1994.25,114246,1.803178385335058919736184179782867431640625,4.9569050480249643442220985889434814453125 +1994.5,115254,2.7380507134248546208254992961883544921875,5.6102481468415135168470442295074462890625 +1994.75,116164,2.83832867439150504651479423046112060546875,5.91149668363505043089389801025390625 +1995,116913,3.1168111832112117554061114788055419921875,6.0967884645242520491592586040496826171875 +1995.25,117294,2.617816918567541506490670144557952880859375,5.73720778015194809995591640472412109375 +1995.5,117887,2.660111555907860747538506984710693359375,5.614150610413844333379529416561126708984375 +1995.75,118322,2.201887373866838970570825040340423583984375,5.212900890308674206607975065708160400390625 +1996,119002,1.91000867889806613675318658351898193359375,4.956019552993211618741042912006378173828125 +1996.25,119774,1.74599934422303704195655882358551025390625,4.7252615526149384095333516597747802734375 +1996.5,120427,1.485712141329486257745884358882904052734375,4.39053717927527031861245632171630859375 +1996.75,121147,1.46277015316081815399229526519775390625,4.20016985197389658424071967601776123046875 +1997,122000,1.688868950812093316926620900630950927734375,4.2590976279070673626847565174102783203125 +1997.25,122818,2.342652885167126441956497728824615478515625,4.6019981319795988383702933788299560546875 +1997.5,123605,2.045405830342360786744393408298492431640625,4.736445875058734600315801799297332763671875 +1997.75,124554,2.514951159506381372921168804168701171875,5.132963523597709354362450540065765380859375 +1998,125177,2.237796966552195954136550426483154296875,5.05884360266963994945399463176727294921875 +1998.25,126080,2.23252759078741291887126863002777099609375,5.1309992362921548192389309406280517578125 +1998.5,126774,2.534153484664784627966582775115966796875,5.136221343385614090948365628719329833984375 +1998.75,127601,2.536366229547411421663127839565277099609375,5.190352360552196842036210000514984130859375 +1999,128244,2.177944965837241397821344435214996337890625,4.9913654597503409604541957378387451171875 +1999.25,129091,2.300721462165029151947237551212310791015625,4.981399724620814595255069434642791748046875 +1999.5,129791,2.30516605935508778202347457408905029296875,4.883446714399951815721578896045684814453125 +1999.75,130780,2.1225326417088581365533173084259033203125,4.8777165324418092495761811733245849609375 +2000,131608,2.647082864175217764568515121936798095703125,5.009907159743534066365100443363189697265625 +2000.25,132075,1.980591424777912834542803466320037841796875,4.645331694080823581316508352756500244140625 +2000.5,132377,1.82807591123082602280192077159881591796875,4.32479387410103299771435558795928955078125 +2000.75,132731,1.389021558467675276915542781352996826171875,3.941631583091975699062459170818328857421875 +2001,132752,1.04857822823623791919089853763580322265625,3.45480265911692185909487307071685791015625 +2001.25,132302,-0.13604942054598723188973963260650634765625,2.45696061425815059919841587543487548828125 +2001.5,131793,-0.919488821373533937730826437473297119140625,1.53070454602629979490302503108978271484375 +2001.75,131005,-2.500652781920280176564119756221771240234375,0.171896827857608514023013412952423095703125 +2002,130713,-3.15361881828857804066501557826995849609375,-0.6823727210858123726211488246917724609375 +2002.25,130684,-3.084009857788032604730688035488128662109375,-1.0587747664440030348487198352813720703125 +2002.5,130526,-3.448971807237512621213681995868682861328125,-1.408147176562806635047309100627899169921875 +2002.75,130505,-3.987698816823694869526661932468414306640625,-1.69129834964724068413488566875457763671875 +2003,130238,-3.9380739046537200920283794403076171875,-1.911918005096367778605781495571136474609375 +2003.25,130195,-3.254282126432144650607369840145111083984375,-1.605386158530336615513078868389129638671875 +2003.5,130281,-3.040940576160437558428384363651275634765625,-1.153885373025332228280603885650634765625 +2003.75,130618,-2.1437141067171978647820651531219482421875,-0.295845764529303778544999659061431884765625 +2004,131158,-2.11713608491254490218125283718109130859375,0.339862320254042060696519911289215087890625 +2004.25,131791,-1.850438651186095739831216633319854736328125,0.843513907019541875342838466167449951171875 +2004.5,132120,-1.054408885061775436042807996273040771484375,1.21381598877678698045201599597930908203125 +2004.75,132660,-0.690022710042057951795868575572967529296875,1.6377923892387116211466491222381591796875 +2005,133169,0.1232097522761250729672610759735107421875,2.22554524161250810720957815647125244140625 +2005.25,133955,0.505505848569328009034506976604461669921875,2.847059607560595395625568926334381103515625 +2005.5,134593,0.745741461486659318325109779834747314453125,3.256175376090823192498646676540374755859375 +2005.75,135174,0.813397024771575161139480769634246826171875,3.42858046566470875404775142669677734375 +2006,136049,0.9896777773947178502567112445831298828125,3.6612411654559764428995549678802490234375 +2006.25,136337,0.815433060309487700578756630420684814453125,3.39124274224241162301041185855865478515625 +2006.5,136883,1.39217904727001950959675014019012451171875,3.541594582877223729155957698822021484375 +2006.75,137266,1.014242339948623339296318590641021728515625,3.413118508980915066786110401153564453125 +2007,137785,0.978735355491153313778340816497802734375,3.40755009567646993673406541347503662109375 +2007.25,138085,0.43656774004693943425081670284271240234375,3.036551491683212589123286306858062744140625 +2007.5,138116,0.211083333646229220903478562831878662109375,2.58385018633407526067458093166351318359375 +2007.75,138413,0.1381541997970998636446893215179443359375,2.36791319851408843533135950565338134765625 +2008,138268,-0.9595984417037470848299562931060791015625,1.6178715878950242768041789531707763671875 +2008.25,137708,-0.945981217717189792892895638942718505859375,1.0005739481466662255115807056427001953125 +2008.5,136781,-2.305217574001972025143913924694061279296875,-0.074543969775504592689685523509979248046875 +2008.75,134844,-4.02467543983357245451770722866058349609375,-1.7802094473454417311586439609527587890625 +2009,132527,-6.192175783319044057861901819705963134765625,-3.89081009916890252497978508472442626953125 +2009.25,131020,-7.37030583772457248414866626262664794921875,-5.25194542680264930822886526584625244140625 +2009.5,130260,-7.7263648583912072353996336460113525390625,-5.856145865982171017094515264034271240234375 +2009.75,129774,-8.731791578452657631714828312397003173828125,-6.444749336898212277446873486042022705078125 +2010,129896,-8.155431323180664548999629914760589599609375,-6.24597005574969443841837346553802490234375 +2010.25,130528,-6.89727256179367032018490135669708251953125,-5.354773822487686629756353795528411865234375 +2010.5,130372,-6.31304735895582780358381569385528564453125,-4.798920414391659505781717598438262939453125 +2010.75,130840,-3.867475020431584198377095162868499755859375,-3.01433520435830359929241240024566650390625 +2011,131295,-1.88679314208138748654164373874664306640625,-0.933969839965584469609893858432769775390625 +2011.25,131949,-1.603880398430419518263079226016998291015625,0.706550098861725928145460784435272216796875 +2011.5,132372,-1.3924751772510717273689806461334228515625,1.608368765698969582444988191127777099609375 +2011.75,132927,-0.31240540947646877611987292766571044921875,2.4005629316607155487872660160064697265625 +2012,133761,0.021898090284366844571195542812347412109375,2.93204951001871449989266693592071533203125 +2012.25,134038,-0.446917930950803565792739391326904296875,2.653557870351733072311617434024810791015625 +2012.5,134552,1.27074361849690831149928271770477294921875,3.155883891544135622098110616207122802734375 +2012.75,135076,0.67272089803054768708534538745880126953125,3.186238032700885014492087066173553466796875 +2013,135712,0.656967245215128059498965740203857421875,3.308829343967090608202852308750152587890625 +2013.25,136268,0.659959070921104284934699535369873046875,3.220805061698001736658625304698944091796875 +2013.5,136862,1.066736849044218615745194256305694580078125,3.33569781159530975855886936187744140625 +2013.75,137387,0.92980628268787768320180475711822509765625,3.300165569128921561059542000293731689453125 +2014,138014,0.4412722684419350116513669490814208984375,3.130050390193673592875711619853973388671875 +2014.25,138843,1.524489383805530451354570686817169189453125,3.5220456527358692255802452564239501953125 +2014.5,139579,1.403754010921829831204377114772796630859375,3.6680007788017974235117435455322265625 +2014.75,140402,1.431144632979112429893575608730316162109375,3.867215350730475620366632938385009765625 +2015,140972,1.377280003691112142405472695827484130859375,3.802629580577331580570898950099945068359375 +2015.25,141724,1.6258205179101423709653317928314208984375,3.9257969357995534664951264858245849609375 +2015.5,142300,1.596020071619250302319414913654327392578125,3.896438620460912716225720942020416259765625 +2015.75,143146,1.8582482626707133022136986255645751953125,4.1063327389174446580000221729278564453125 +2016,143733,1.723205608408761690952815115451812744140625,4.060228252759088718448765575885772705078125 +2016.25,144175,1.2575254072826282936148345470428466796875,3.768404113545329892076551914215087890625 diff --git a/quantecon/tests/test_filter.py b/quantecon/tests/test_filter.py index dae816a61..bf634ac08 100644 --- a/quantecon/tests/test_filter.py +++ b/quantecon/tests/test_filter.py @@ -1,7 +1,4 @@ """ -Filename: test_filter.py -Authors: Shunsuke Hori - Tests for filter.py. Using the data of original paper. @@ -20,11 +17,13 @@ def test_hamilton_filter(): # read data data_dir = get_data_dir() data = pd.read_csv(os.path.join(data_dir, "employment.csv"), - names = ['year', 'employment', 'matlab_cycle']) + names = ['year', 'employment', 'matlab_cycle', 'matlab_cycle_rw']) - filtered_data = hamilton_filter(100*np.log(data['employment']), 8, 4, 'empl_') - assert_allclose(data['matlab_cycle'], filtered_data['empl_cycle'], + data['hamilton_cyc'], data['hamilton_trend'] = hamilton_filter(100*np.log(data['employment']), 8, 4) + data['hamilton_cyc_rw'], data['hamilton_trend_rw'] = hamilton_filter(100*np.log(data['employment']), 8) + assert_allclose(data['matlab_cycle'], filtered_data['hamilton_cycle'], rtol = 1e-07, atol = 1e-07) + assert_allclose(data['matlab_cycle_rw'], filtered_data['hamilton_cycle_rw']) if __name__ == '__main__': From 9bcd4d1f4caf014af4a4aa42d9ac91cb16e47a1b Mon Sep 17 00:00:00 2001 From: Shunsuke Hori Date: Thu, 22 Mar 2018 17:23:20 -0700 Subject: [PATCH 06/10] fix test --- quantecon/tests/test_filter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quantecon/tests/test_filter.py b/quantecon/tests/test_filter.py index bf634ac08..d8a2a36e1 100644 --- a/quantecon/tests/test_filter.py +++ b/quantecon/tests/test_filter.py @@ -21,9 +21,9 @@ def test_hamilton_filter(): data['hamilton_cyc'], data['hamilton_trend'] = hamilton_filter(100*np.log(data['employment']), 8, 4) data['hamilton_cyc_rw'], data['hamilton_trend_rw'] = hamilton_filter(100*np.log(data['employment']), 8) - assert_allclose(data['matlab_cycle'], filtered_data['hamilton_cycle'], + assert_allclose(data['matlab_cycle'], data['hamilton_cycle'], rtol = 1e-07, atol = 1e-07) - assert_allclose(data['matlab_cycle_rw'], filtered_data['hamilton_cycle_rw']) + assert_allclose(data['matlab_cycle_rw'], data['hamilton_cycle_rw']) if __name__ == '__main__': From 60538a46cd48830a51125edaf49c377a128707d3 Mon Sep 17 00:00:00 2001 From: Shunsuke Hori Date: Thu, 22 Mar 2018 17:33:44 -0700 Subject: [PATCH 07/10] fix test --- quantecon/tests/test_filter.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/quantecon/tests/test_filter.py b/quantecon/tests/test_filter.py index d8a2a36e1..ed19fafdc 100644 --- a/quantecon/tests/test_filter.py +++ b/quantecon/tests/test_filter.py @@ -17,13 +17,13 @@ def test_hamilton_filter(): # read data data_dir = get_data_dir() data = pd.read_csv(os.path.join(data_dir, "employment.csv"), - names = ['year', 'employment', 'matlab_cycle', 'matlab_cycle_rw']) + names = ['year', 'employment', 'matlab_cyc', 'matlab_cycle_rw']) data['hamilton_cyc'], data['hamilton_trend'] = hamilton_filter(100*np.log(data['employment']), 8, 4) data['hamilton_cyc_rw'], data['hamilton_trend_rw'] = hamilton_filter(100*np.log(data['employment']), 8) - assert_allclose(data['matlab_cycle'], data['hamilton_cycle'], + assert_allclose(data['matlab_cyc'], data['hamilton_cyc'], rtol = 1e-07, atol = 1e-07) - assert_allclose(data['matlab_cycle_rw'], data['hamilton_cycle_rw']) + assert_allclose(data['matlab_cyc_rw'], data['hamilton_cyc_rw']) if __name__ == '__main__': From 9debf40ceb1cd35d96ccd69a7aa3f89f970e895d Mon Sep 17 00:00:00 2001 From: Shunsuke Hori Date: Thu, 22 Mar 2018 22:31:56 -0700 Subject: [PATCH 08/10] make tolerance larger --- quantecon/tests/test_filter.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/quantecon/tests/test_filter.py b/quantecon/tests/test_filter.py index ed19fafdc..bf997380a 100644 --- a/quantecon/tests/test_filter.py +++ b/quantecon/tests/test_filter.py @@ -16,13 +16,14 @@ def test_hamilton_filter(): # read data data_dir = get_data_dir() + data_dir = 'data' data = pd.read_csv(os.path.join(data_dir, "employment.csv"), - names = ['year', 'employment', 'matlab_cyc', 'matlab_cycle_rw']) + names = ['year', 'employment', 'matlab_cyc', 'matlab_cyc_rw']) data['hamilton_cyc'], data['hamilton_trend'] = hamilton_filter(100*np.log(data['employment']), 8, 4) data['hamilton_cyc_rw'], data['hamilton_trend_rw'] = hamilton_filter(100*np.log(data['employment']), 8) assert_allclose(data['matlab_cyc'], data['hamilton_cyc'], - rtol = 1e-07, atol = 1e-07) + rtol = 1e-06, atol = 1e-06) assert_allclose(data['matlab_cyc_rw'], data['hamilton_cyc_rw']) From a248d779791e06ad13b73a86a94c5d7803249cc1 Mon Sep 17 00:00:00 2001 From: Shunsuke Hori Date: Thu, 22 Mar 2018 22:42:30 -0700 Subject: [PATCH 09/10] change data location --- {quantecon/tests/data => data}/employment.csv | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {quantecon/tests/data => data}/employment.csv (100%) diff --git a/quantecon/tests/data/employment.csv b/data/employment.csv similarity index 100% rename from quantecon/tests/data/employment.csv rename to data/employment.csv From bacc9c06b3ab8c7729a51fbfc23ca6cb045c5d0d Mon Sep 17 00:00:00 2001 From: Shunsuke Hori Date: Sat, 24 Mar 2018 21:23:22 -0700 Subject: [PATCH 10/10] update matlab output --- data/employment.csv | 534 ++++++++++++++++----------------- quantecon/tests/test_filter.py | 2 +- 2 files changed, 268 insertions(+), 268 deletions(-) diff --git a/data/employment.csv b/data/employment.csv index 85f31e2f9..cb9ef1da6 100644 --- a/data/employment.csv +++ b/data/employment.csv @@ -9,270 +9,270 @@ 1949,44238,NaN,1.438939266971146935247816145420074462890625 1949.25,43739,NaN,-0.157629648730789995170198380947113037109375 1949.5,43784,NaN,-0.947895942049626683001406490802764892578125 -1949.75,43517,-7.828545178604372267727740108966827392578125,-2.41112297743484305101446807384490966796875 -1950,43952,-6.00959547800039217690937221050262451171875,-1.645022597631395910866558551788330078125 -1950.25,45084,-5.230911338902160423458553850650787353515625,0.113186203368286442128010094165802001953125 -1950.5,46442,-2.7028576642433108645491302013397216796875,2.500757110324911991483531892299652099609375 -1950.75,46855,0.5243396757296068244613707065582275390625,3.9750999926172880805097520351409912109375 -1951,47871,5.35485608470435181516222655773162841796875,7.89257448608304912340827286243438720703125 -1951.25,48068,4.88532405905652922228910028934478759765625,9.437652243032289334223605692386627197265625 -1951.5,47955,2.501188548570326020126231014728546142578125,9.09946173382968481746502220630645751953125 -1951.75,48309,5.63187479197176799061708152294158935546875,10.446621235585553222335875034332275390625 -1952,48504,3.404621359892871623742394149303436279296875,9.85481394165117308148182928562164306640625 -1952.25,48286,-1.31983851543418495566584169864654541015625,6.86142471901302997139282524585723876953125 -1952.5,49319,-1.09626804884828743524849414825439453125,6.01051801158837406546808779239654541015625 -1952.75,50164,3.527568753818968616542406380176544189453125,6.8239911386017411132343113422393798828125 -1953,50475,-0.175339226260120994993485510349273681640625,5.296827110250205805641598999500274658203125 -1953.25,50522,1.06987608644476495101116597652435302734375,4.97922099315110244788229465484619140625 -1953.5,50365,1.871583675473402763600461184978485107421875,4.903341821473077288828790187835693359375 -1953.75,49702,-2.70666544528421582072041928768157958984375,2.84272950376407607109285891056060791015625 -1954,49158,-3.754534346973059655283577740192413330078125,1.339333161830154494964517652988433837890625 -1954.25,48896,-2.30365767920056896400637924671173095703125,1.255392997409217059612274169921875 -1954.5,48882,-8.28084027146041989908553659915924072265625,-0.8900171783825499005615711212158203125 -1954.75,49331,-7.948982035645940413814969360828399658203125,-1.67449512816483547794632613658905029296875 -1955,49963,-4.53981107422669083462096750736236572265625,-1.0195432705904750037007033824920654296875 -1955.25,50790,-2.979933093086629014578647911548614501953125,0.5290599832587759010493755340576171875 -1955.5,51262,-2.06382405962403936428017914295196533203125,1.76532475573594638262875378131866455078125 -1955.75,51805,1.137234857471412396989762783050537109375,4.144149596210581876221112906932830810546875 -1956,52295,2.218028659802484980900771915912628173828125,6.18611638184984258259646594524383544921875 -1956.25,52584,2.050715774591253648395650088787078857421875,7.271629741722108519752509891986846923828125 -1956.5,52601,1.8085433976402782718650996685028076171875,7.332590041323555851704441010951995849609375 -1956.75,52930,0.842430711711131152696907520294189453125,7.0417599189740940346382558345794677734375 -1957,53157,0.2327856445599536527879536151885986328125,6.19670673510472624911926686763763427734375 -1957.25,53066,-1.327637214201558890636079013347625732421875,4.383693703603739777463488280773162841796875 -1957.5,52932,-1.19140827463206733227707445621490478515625,3.20583339587983573437668383121490478515625 -1957.75,52385,-3.497476058391839615069329738616943359375,1.11336211012121566454879939556121826171875 -1958,51300,-6.728438802321079492685385048389434814453125,-1.9210012029507197439670562744140625 -1958.25,50912,-7.485979318776799118495546281337738037109375,-3.2313238805900255101732909679412841796875 -1958.5,51506,-5.9023470855054256389848887920379638671875,-2.103682523189718267531134188175201416015625 -1958.75,52088,-6.593003411156360016320832073688507080078125,-1.603568993533599496004171669483184814453125 -1959,53016,-5.055357539517217446700669825077056884765625,-0.26560440581170041696168482303619384765625 -1959.25,53679,-2.597321755297571144183166325092315673828125,1.148544172864376378129236400127410888671875 -1959.5,53429,-3.06487455247452089679427444934844970703125,0.93455988066170903039164841175079345703125 -1959.75,54175,-0.0217807221861221478320658206939697265625,3.35992566174945750390179455280303955078125 -1960,54458,3.5539362818935842369683086872100830078125,5.973901019329105110955424606800079345703125 -1960.25,54347,1.470961208108974460628814995288848876953125,6.529076209629920413135550916194915771484375 -1960.5,54228,-2.464133209499550503096543252468109130859375,5.14990744792476107249967753887176513671875 -1960.75,53744,-2.86433541876749586663208901882171630859375,3.129743693537648141500540077686309814453125 -1961,53662,-4.473181293800053026643581688404083251953125,1.21113612277486026869155466556549072265625 -1961.25,53977,-4.18205713941779322340153157711029052734375,0.553616632830426169675774872303009033203125 -1961.5,54388,-0.572918108130807013367302715778350830078125,1.77898715760193226742558181285858154296875 -1961.75,54871,-4.44745004423248246894218027591705322265625,1.2765428377597345388494431972503662109375 -1962,55276,-3.34646694645607567508704960346221923828125,1.490905557122232494293712079524993896484375 -1962.25,55644,-0.8039929883570948732085525989532470703125,2.3584840945650284993462264537811279296875 -1962.5,55977,-0.768202661215809712302871048450469970703125,3.174351186607736963196657598018646240234375 -1962.75,56028,0.652175018216667012893594801425933837890625,4.161953290686369655304588377475738525390625 -1963,56322,0.074466270225457265041768550872802734375,4.83801065692341580870561301708221435546875 -1963.25,56658,-0.961581670192799720098264515399932861328125,4.847516560284930164925754070281982421875 -1963.5,57077,-0.461965420161732254200614988803863525390625,4.82576921203917663660831749439239501953125 -1963.75,57360,-0.49413071024218879756517708301544189453125,4.43622204913435780326835811138153076171875 -1964,57898,0.06742114500548268551938235759735107421875,4.634402372677641324116848409175872802734375 -1964.25,58221,0.0839719821969993063248693943023681640625,4.52718592007431652746163308620452880859375 -1964.5,58903,0.63839972014966406277380883693695068359375,5.09511310633160974248312413692474365234375 -1964.75,59421,2.01603970118094366625882685184478759765625,5.87961334664350943057797849178314208984375 -1965,60003,1.67517240352390217594802379608154296875,6.330933838923328949022106826305389404296875 -1965.25,60690,2.018472361682825066964142024517059326171875,6.874574433877796764136292040348052978515625 -1965.5,61490,2.704677699013018354889936745166778564453125,7.44733265515469611273147165775299072265625 -1965.75,62321,3.9790201742116551031358540058135986328125,8.29512513554846009355969727039337158203125 -1966,63192,3.869681208183692433522082865238189697265625,8.749486919410401242203079164028167724609375 -1966.25,64110,5.29577544689891510643064975738525390625,9.635424360109709596144966781139373779296875 -1966.5,64644,4.300921803145683952607214450836181640625,9.3003270339859227533452212810516357421875 -1966.75,65200,4.70372145557985277264378964900970458984375,9.281176968937188576092012226581573486328125 -1967,65530,4.36755857556408955133520066738128662109375,8.811349207926241433597169816493988037109375 -1967.25,65750,3.24989731767027478781528770923614501953125,8.0080731210109661333262920379638671875 -1967.5,66164,2.500313009865976709988899528980255126953125,7.32619484145971000543795526027679443359375 -1967.75,66900,2.41829269638765254057943820953369140625,7.090051948733389508561231195926666259765625 -1968,67295,1.706718067873907784814946353435516357421875,6.290822882355996625847183167934417724609375 -1968.25,67904,1.167341125062876017182134091854095458984375,5.749458499235288400086574256420135498046875 -1968.5,68487,2.06076954324407779495231807231903076171875,5.7748652749187385779805481433868408203125 -1968.75,69246,2.079087598568321482161991298198699951171875,6.020591273371564966510049998760223388671875 -1969,69905,2.64603392299295592238195240497589111328125,6.462912438838202433544211089611053466796875 -1969.25,70636,3.455861197253625505254603922367095947265625,7.168025849300420304643921554088592529296875 -1969.5,70917,2.5863134253204407286830246448516845703125,6.93736707468769964179955422878265380859375 -1969.75,71240,1.35556375210944679565727710723876953125,6.285549128728007417521439492702484130859375 -1970,71452,2.1154990451277626561932265758514404296875,5.993995590096119485679082572460174560546875 -1970.25,71029,0.307739101923061753041110932826995849609375,4.499330136073922403738833963871002197265625 -1970.5,70948,-0.757010697119085307349450886249542236328125,3.530326810775704871048219501972198486328125 -1970.75,70790,-2.213890570021931125666014850139617919921875,2.20523661197739784256555140018463134765625 -1971,70859,-2.766113475445308722555637359619140625,1.35548095637795995571650564670562744140625 -1971.25,71253,-3.265572046604802380898036062717437744140625,0.869699397463818968390114605426788330078125 -1971.5,71617,-2.357279727014201853307895362377166748046875,0.98222968252639475394971668720245361328125 -1971.75,72108,-2.39512135463564845849759876728057861328125,1.211053671833042244543321430683135986328125 -1972,72945,-1.67767696099690510891377925872802734375,2.067983693722226234967820346355438232421875 -1972.25,73760,1.145236413833345068269409239292144775390625,3.772833489608046875218860805034637451171875 -1972.5,74263,0.8625107170037153991870582103729248046875,4.56656321891068728291429579257965087890625 -1972.75,75270,2.241369036145670179394073784351348876953125,6.13639012603425726410932838916778564453125 -1973,76285,3.303960711090667246025986969470977783203125,7.378433956160051820916123688220977783203125 -1973.25,76887,3.017635173018106797826476395130157470703125,7.609988798018321176641620695590972900390625 -1973.5,77276,3.45343034414008798194117844104766845703125,7.60509527781914584920741617679595947265625 -1973.75,78035,3.78627120380906490026973187923431396484375,7.8992448854723988915793597698211669921875 -1974,78296,2.423645274705222618649713695049285888671875,7.079078359965706113143824040889739990234375 -1974.25,78602,2.07559408083534435718320310115814208984375,6.358056515571661293506622314453125 -1974.5,78611,2.244196787816463256604038178920745849609375,5.689879222016543280915357172489166259765625 -1974.75,77657,-1.358491361610731473774649202823638916015625,3.12200445856115038623102009296417236328125 -1975,76649,-3.94645137152247116318903863430023193359375,0.4760232353137325844727456569671630859375 -1975.25,76520,-3.773729612694523893878795206546783447265625,-0.478466693364907769137062132358551025390625 -1975.5,77230,-3.2009659682325946050696074962615966796875,-0.059544614913420446100644767284393310546875 -1975.75,78018,-4.190888868581168935634195804595947265625,-0.021787469727996722212992608547210693359375 -1976,79049,-2.339299633796372290817089378833770751953125,0.95713972305702554876916110515594482421875 -1976.25,79376,-2.361989057471646447083912789821624755859375,0.979891115463715323130600154399871826171875 -1976.5,79892,-1.583926493200351615087129175662994384765625,1.616408385031036232248879969120025634765625 -1976.75,80448,1.7894820964238533633761107921600341796875,3.530931933573128844727762043476104736328125 -1977,81391,3.62719152026375013520009815692901611328125,6.002814286685179467895068228244781494140625 -1977.25,82488,2.8932132804538923664949834346771240234375,7.51006836435908553539775311946868896484375 -1977.5,83532,2.23088231786232427111826837062835693359375,7.84418093933572890819050371646881103515625 -1977.75,84408,3.264565755016519688069820404052734375,7.872261454255522039602510631084442138671875 -1978,85461,3.5086873843729335931129753589630126953125,7.799221817409488721750676631927490234375 -1978.25,86951,6.180936011590574707952328026294708251953125,9.114868603802960933535359799861907958984375 -1978.5,87618,5.819937396682007602066732943058013916015625,9.231073368346415009000338613986968994140625 -1978.75,88673,5.850407452183162604342214763164520263671875,9.7344433166335875284858047962188720703125 -1979,89480,5.1595109802210572524927556514739990234375,9.47504348367738202796317636966705322265625 -1979.25,90109,4.5431697110116147086955606937408447265625,8.83672204222830259823240339756011962890625 -1979.5,90325,4.006064544836817731265909969806671142578125,7.81844850591733120381832122802734375 -1979.75,90673,3.721455555799138892325572669506072998046875,7.15974442896686014137230813503265380859375 -1980,90994,2.476155191083080353564582765102386474609375,6.27334387489872824517078697681427001953125 -1980.25,90099,-0.88200981061572747421450912952423095703125,3.55643241768439111183397471904754638671875 -1980.5,90210,0.06360005557644399232231080532073974609375,2.915382938215998365194536745548248291015625 -1980.75,90943,-0.959820462356219650246202945709228515625,2.527749050244210593518801033496856689453125 -1981,91210,-1.559813372713279022718779742717742919921875,1.914940357013620086945593357086181640625 -1981.25,91490,-1.532630425805791674065403640270233154296875,1.5209628053517008083872497081756591796875 -1981.5,91479,-1.428492872554443238186649978160858154296875,1.26951607100136243388988077640533447265625 -1981.75,90893,-2.939641783474371550255455076694488525390625,0.24233623879581500659696757793426513671875 -1982,90432,-3.96289887771990834153257310390472412109375,-0.619538321510617606691084802150726318359375 -1982.25,89864,-1.806399725325036342837847769260406494140625,-0.26116494342977603082545101642608642578125 -1982.5,89183,-4.691925239654437973513267934322357177734375,-1.144984720546517564798705279827117919921875 -1982.75,88769,-7.179162537727506787632592022418975830078125,-2.419544668681055554770864546298980712890625 -1983,89090,-5.50862806791337789036333560943603515625,-2.351744545951305553899146616458892822265625 -1983.25,90022,-4.590779356784651099587790668010711669921875,-1.617559178840792810660786926746368408203125 -1983.5,91247,-3.107416506881008899654261767864227294921875,-0.253932253389621109818108379840850830078125 -1983.75,92227,-0.709320418830657217768020927906036376953125,1.45699388239745530881918966770172119140625 -1984,93429,0.4686581427149576484225690364837646484375,3.26036024852646733052097260951995849609375 -1984.25,94479,2.045498449927663386915810406208038330078125,5.008017124318939750082790851593017578125 -1984.5,95344,3.89879905370844426215626299381256103515625,6.680096554154033583472482860088348388671875 -1984.75,96107,4.641264702456965096644125878810882568359375,7.942466416457818922935985028743743896484375 -1985,96843,4.01629739431018606410361826419830322265625,8.34440157917924807406961917877197265625 -1985.25,97459,3.251232708737006760202348232269287109375,7.93776918399453279562294483184814453125 -1985.5,98045,2.880273452330357031314633786678314208984375,7.185644174165872755111195147037506103515625 -1985.75,98609,3.302004178273136858479119837284088134765625,6.69096059920912011875770986080169677734375 -1986,98935,2.1413863895149916061200201511383056640625,5.726127929707445218809880316257476806640625 -1986.25,99155,1.430222027520130723132751882076263427734375,4.830669475533568402170203626155853271484375 -1986.5,99934,1.65400117791796219535171985626220703125,4.70185640875888566370122134685516357421875 -1986.75,100511,1.415578364213388340431265532970428466796875,4.480502013160730712115764617919921875 -1987,101164,1.19773900087102447287179529666900634765625,4.36518518163620683480985462665557861328125 -1987.25,101900,1.391942407181204544031061232089996337890625,4.45601634856984674115665256977081298828125 -1987.5,102646,1.5103299129596052807755768299102783203125,4.585961838938374057761393487453460693359375 -1987.75,103664,1.882569421590233105234801769256591796875,4.999236437411809674813412129878997802734375 -1988,104487,2.638598648349443465122021734714508056640625,5.459959290802771647577174007892608642578125 -1988.25,105324,3.248122880384698873967863619327545166015625,6.035703106018672770005650818347930908203125 -1988.5,106009,2.21691627950667680124752223491668701171875,5.901402807595104604843072593212127685546875 -1988.75,106906,2.92900858117400275659747421741485595703125,6.168276943169303194736130535602569580078125 -1989,107619,3.11231626953531304025091230869293212890625,6.185424972422651990200392901897430419921875 -1989.25,108026,2.59006116429600297124125063419342041015625,5.837999866287873373948968946933746337890625 -1989.5,108365,2.2588263474162886268459260463714599609375,5.42189832995018150541000068187713623046875 -1989.75,108849,1.45295702669454840361140668392181396484375,4.8806700976228967192582786083221435546875 -1990,109647,1.773497869113953129271976649761199951171875,4.820345295605875435285270214080810546875 -1990.25,109862,1.25356597275958847603760659694671630859375,4.218371933895468828268349170684814453125 -1990.5,109525,0.39772155097989525529555976390838623046875,3.262883753179949053446762263774871826171875 -1990.75,109160,-1.067112448548641623347066342830657958984375,2.086475216250846642651595175266265869140625 -1991,108577,-2.028441329053976005525328218936920166015625,0.886238663299309337162412703037261962890625 -1991.25,108338,-2.20014150967062960262410342693328857421875,0.288403076536496882908977568149566650390625 -1991.5,108340,-2.63876840365310272318311035633087158203125,-0.02307284106109364074654877185821533203125 -1991.75,108325,-3.452972149553033887059427797794342041015625,-0.48256330578578854328952729701995849609375 -1992,108368,-4.481730331821381696499884128570556640625,-1.173327223594014867558144032955169677734375 -1992.25,108721,-3.459265178760915659950114786624908447265625,-1.044006499668512333300895988941192626953125 -1992.5,108966,-2.326015507733018239377997815608978271484375,-0.511692673554762222920544445514678955078125 -1992.75,109496,-1.99329719088927959091961383819580078125,0.307332306882699413108639419078826904296875 -1993,109998,-1.05434281302223098464310169219970703125,1.3002585111016742303036153316497802734375 -1993.25,110754,-0.66172168560069621889851987361907958984375,2.205555599759463802911341190338134765625 -1993.5,111451,-0.317558823862100325641222298145294189453125,2.83106021953381059574894607067108154296875 -1993.75,112312,0.758535067198181423009373247623443603515625,3.61447450436753570102155208587646484375 -1994,113248,1.6031750758420457714237272739410400390625,4.404726169050491080270148813724517822265625 -1994.25,114246,1.803178385335058919736184179782867431640625,4.9569050480249643442220985889434814453125 -1994.5,115254,2.7380507134248546208254992961883544921875,5.6102481468415135168470442295074462890625 -1994.75,116164,2.83832867439150504651479423046112060546875,5.91149668363505043089389801025390625 -1995,116913,3.1168111832112117554061114788055419921875,6.0967884645242520491592586040496826171875 -1995.25,117294,2.617816918567541506490670144557952880859375,5.73720778015194809995591640472412109375 -1995.5,117887,2.660111555907860747538506984710693359375,5.614150610413844333379529416561126708984375 -1995.75,118322,2.201887373866838970570825040340423583984375,5.212900890308674206607975065708160400390625 -1996,119002,1.91000867889806613675318658351898193359375,4.956019552993211618741042912006378173828125 -1996.25,119774,1.74599934422303704195655882358551025390625,4.7252615526149384095333516597747802734375 -1996.5,120427,1.485712141329486257745884358882904052734375,4.39053717927527031861245632171630859375 -1996.75,121147,1.46277015316081815399229526519775390625,4.20016985197389658424071967601776123046875 -1997,122000,1.688868950812093316926620900630950927734375,4.2590976279070673626847565174102783203125 -1997.25,122818,2.342652885167126441956497728824615478515625,4.6019981319795988383702933788299560546875 -1997.5,123605,2.045405830342360786744393408298492431640625,4.736445875058734600315801799297332763671875 -1997.75,124554,2.514951159506381372921168804168701171875,5.132963523597709354362450540065765380859375 -1998,125177,2.237796966552195954136550426483154296875,5.05884360266963994945399463176727294921875 -1998.25,126080,2.23252759078741291887126863002777099609375,5.1309992362921548192389309406280517578125 -1998.5,126774,2.534153484664784627966582775115966796875,5.136221343385614090948365628719329833984375 -1998.75,127601,2.536366229547411421663127839565277099609375,5.190352360552196842036210000514984130859375 -1999,128244,2.177944965837241397821344435214996337890625,4.9913654597503409604541957378387451171875 -1999.25,129091,2.300721462165029151947237551212310791015625,4.981399724620814595255069434642791748046875 -1999.5,129791,2.30516605935508778202347457408905029296875,4.883446714399951815721578896045684814453125 -1999.75,130780,2.1225326417088581365533173084259033203125,4.8777165324418092495761811733245849609375 -2000,131608,2.647082864175217764568515121936798095703125,5.009907159743534066365100443363189697265625 -2000.25,132075,1.980591424777912834542803466320037841796875,4.645331694080823581316508352756500244140625 -2000.5,132377,1.82807591123082602280192077159881591796875,4.32479387410103299771435558795928955078125 -2000.75,132731,1.389021558467675276915542781352996826171875,3.941631583091975699062459170818328857421875 -2001,132752,1.04857822823623791919089853763580322265625,3.45480265911692185909487307071685791015625 -2001.25,132302,-0.13604942054598723188973963260650634765625,2.45696061425815059919841587543487548828125 -2001.5,131793,-0.919488821373533937730826437473297119140625,1.53070454602629979490302503108978271484375 -2001.75,131005,-2.500652781920280176564119756221771240234375,0.171896827857608514023013412952423095703125 -2002,130713,-3.15361881828857804066501557826995849609375,-0.6823727210858123726211488246917724609375 -2002.25,130684,-3.084009857788032604730688035488128662109375,-1.0587747664440030348487198352813720703125 -2002.5,130526,-3.448971807237512621213681995868682861328125,-1.408147176562806635047309100627899169921875 -2002.75,130505,-3.987698816823694869526661932468414306640625,-1.69129834964724068413488566875457763671875 -2003,130238,-3.9380739046537200920283794403076171875,-1.911918005096367778605781495571136474609375 -2003.25,130195,-3.254282126432144650607369840145111083984375,-1.605386158530336615513078868389129638671875 -2003.5,130281,-3.040940576160437558428384363651275634765625,-1.153885373025332228280603885650634765625 -2003.75,130618,-2.1437141067171978647820651531219482421875,-0.295845764529303778544999659061431884765625 -2004,131158,-2.11713608491254490218125283718109130859375,0.339862320254042060696519911289215087890625 -2004.25,131791,-1.850438651186095739831216633319854736328125,0.843513907019541875342838466167449951171875 -2004.5,132120,-1.054408885061775436042807996273040771484375,1.21381598877678698045201599597930908203125 -2004.75,132660,-0.690022710042057951795868575572967529296875,1.6377923892387116211466491222381591796875 -2005,133169,0.1232097522761250729672610759735107421875,2.22554524161250810720957815647125244140625 -2005.25,133955,0.505505848569328009034506976604461669921875,2.847059607560595395625568926334381103515625 -2005.5,134593,0.745741461486659318325109779834747314453125,3.256175376090823192498646676540374755859375 -2005.75,135174,0.813397024771575161139480769634246826171875,3.42858046566470875404775142669677734375 -2006,136049,0.9896777773947178502567112445831298828125,3.6612411654559764428995549678802490234375 -2006.25,136337,0.815433060309487700578756630420684814453125,3.39124274224241162301041185855865478515625 -2006.5,136883,1.39217904727001950959675014019012451171875,3.541594582877223729155957698822021484375 -2006.75,137266,1.014242339948623339296318590641021728515625,3.413118508980915066786110401153564453125 -2007,137785,0.978735355491153313778340816497802734375,3.40755009567646993673406541347503662109375 -2007.25,138085,0.43656774004693943425081670284271240234375,3.036551491683212589123286306858062744140625 -2007.5,138116,0.211083333646229220903478562831878662109375,2.58385018633407526067458093166351318359375 -2007.75,138413,0.1381541997970998636446893215179443359375,2.36791319851408843533135950565338134765625 -2008,138268,-0.9595984417037470848299562931060791015625,1.6178715878950242768041789531707763671875 -2008.25,137708,-0.945981217717189792892895638942718505859375,1.0005739481466662255115807056427001953125 -2008.5,136781,-2.305217574001972025143913924694061279296875,-0.074543969775504592689685523509979248046875 -2008.75,134844,-4.02467543983357245451770722866058349609375,-1.7802094473454417311586439609527587890625 -2009,132527,-6.192175783319044057861901819705963134765625,-3.89081009916890252497978508472442626953125 -2009.25,131020,-7.37030583772457248414866626262664794921875,-5.25194542680264930822886526584625244140625 -2009.5,130260,-7.7263648583912072353996336460113525390625,-5.856145865982171017094515264034271240234375 -2009.75,129774,-8.731791578452657631714828312397003173828125,-6.444749336898212277446873486042022705078125 -2010,129896,-8.155431323180664548999629914760589599609375,-6.24597005574969443841837346553802490234375 -2010.25,130528,-6.89727256179367032018490135669708251953125,-5.354773822487686629756353795528411865234375 -2010.5,130372,-6.31304735895582780358381569385528564453125,-4.798920414391659505781717598438262939453125 -2010.75,130840,-3.867475020431584198377095162868499755859375,-3.01433520435830359929241240024566650390625 -2011,131295,-1.88679314208138748654164373874664306640625,-0.933969839965584469609893858432769775390625 -2011.25,131949,-1.603880398430419518263079226016998291015625,0.706550098861725928145460784435272216796875 -2011.5,132372,-1.3924751772510717273689806461334228515625,1.608368765698969582444988191127777099609375 -2011.75,132927,-0.31240540947646877611987292766571044921875,2.4005629316607155487872660160064697265625 -2012,133761,0.021898090284366844571195542812347412109375,2.93204951001871449989266693592071533203125 -2012.25,134038,-0.446917930950803565792739391326904296875,2.653557870351733072311617434024810791015625 -2012.5,134552,1.27074361849690831149928271770477294921875,3.155883891544135622098110616207122802734375 -2012.75,135076,0.67272089803054768708534538745880126953125,3.186238032700885014492087066173553466796875 -2013,135712,0.656967245215128059498965740203857421875,3.308829343967090608202852308750152587890625 -2013.25,136268,0.659959070921104284934699535369873046875,3.220805061698001736658625304698944091796875 -2013.5,136862,1.066736849044218615745194256305694580078125,3.33569781159530975855886936187744140625 -2013.75,137387,0.92980628268787768320180475711822509765625,3.300165569128921561059542000293731689453125 -2014,138014,0.4412722684419350116513669490814208984375,3.130050390193673592875711619853973388671875 -2014.25,138843,1.524489383805530451354570686817169189453125,3.5220456527358692255802452564239501953125 -2014.5,139579,1.403754010921829831204377114772796630859375,3.6680007788017974235117435455322265625 -2014.75,140402,1.431144632979112429893575608730316162109375,3.867215350730475620366632938385009765625 -2015,140972,1.377280003691112142405472695827484130859375,3.802629580577331580570898950099945068359375 -2015.25,141724,1.6258205179101423709653317928314208984375,3.9257969357995534664951264858245849609375 -2015.5,142300,1.596020071619250302319414913654327392578125,3.896438620460912716225720942020416259765625 -2015.75,143146,1.8582482626707133022136986255645751953125,4.1063327389174446580000221729278564453125 -2016,143733,1.723205608408761690952815115451812744140625,4.060228252759088718448765575885772705078125 -2016.25,144175,1.2575254072826282936148345470428466796875,3.768404113545329892076551914215087890625 +1949.75,43517,-7.828544971260043894289992749691009521484375,-2.41112297743484305101446807384490966796875 +1950,43952,-6.0095952707933975034393370151519775390625,-1.645022597631395910866558551788330078125 +1950.25,45084,-5.23091113064720047987066209316253662109375,0.113186203368286442128010094165802001953125 +1950.5,46442,-2.70285745641331232036463916301727294921875,2.500757110324911991483531892299652099609375 +1950.75,46855,0.52433988334678360843099653720855712890625,3.9750999926172880805097520351409912109375 +1951,47871,5.354856293356760943424887955188751220703125,7.89257448608304912340827286243438720703125 +1951.25,48068,4.88532426947995190857909619808197021484375,9.437652243032289334223605692386627197265625 +1951.5,47955,2.501188758772741493885405361652374267578125,9.09946173382968481746502220630645751953125 +1951.75,48309,5.631875000154877852764911949634552001953125,10.446621235585553222335875034332275390625 +1952,48504,3.404621569023220217786729335784912109375,9.85481394165117308148182928562164306640625 +1952.25,48286,-1.319838307391137277591042220592498779296875,6.86142471901302997139282524585723876953125 +1952.5,49319,-1.096267842665156422299332916736602783203125,6.01051801158837406546808779239654541015625 +1952.75,50164,3.527568958810434196493588387966156005859375,6.8239911386017411132343113422393798828125 +1953,50475,-0.175339018134536672732792794704437255859375,5.296827110250205805641598999500274658203125 +1953.25,50522,1.06987629345849200035445392131805419921875,4.97922099315110244788229465484619140625 +1953.5,50365,1.87158388414854925940744578838348388671875,4.903341821473077288828790187835693359375 +1953.75,49702,-2.70666523492445776355452835559844970703125,2.84272950376407607109285891056060791015625 +1954,49158,-3.754534137614200517418794333934783935546875,1.339333161830154494964517652988433837890625 +1954.25,48896,-2.3036574699517586850561201572418212890625,1.255392997409217059612274169921875 +1954.5,48882,-8.2808400602079927921295166015625,-0.8900171783825499005615711212158203125 +1954.75,49331,-7.94898182712813650141470134258270263671875,-1.67449512816483547794632613658905029296875 +1955,49963,-4.539810866057223392999731004238128662109375,-1.0195432705904750037007033824920654296875 +1955.25,50790,-2.97993288345924156601540744304656982421875,0.5290599832587759010493755340576171875 +1955.5,51262,-2.0638238490946605452336370944976806640625,1.76532475573594638262875378131866455078125 +1955.75,51805,1.13723506827636811067350208759307861328125,4.144149596210581876221112906932830810546875 +1956,52295,2.2180288718545853043906390666961669921875,6.18611638184984258259646594524383544921875 +1956.25,52584,2.050715986669956691912375390529632568359375,7.271629741722108519752509891986846923828125 +1956.5,52601,1.8085436089922950486652553081512451171875,7.332590041323555851704441010951995849609375 +1956.75,52930,0.8424309225529214018024504184722900390625,7.0417599189740940346382558345794677734375 +1957,53157,0.23278585433445186936296522617340087890625,6.19670673510472624911926686763763427734375 +1957.25,53066,-1.327637004817233901121653616428375244140625,4.383693703603739777463488280773162841796875 +1957.5,52932,-1.19140806576388058601878583431243896484375,3.20583339587983573437668383121490478515625 +1957.75,52385,-3.497475848502062945044599473476409912109375,1.11336211012121566454879939556121826171875 +1958,51300,-6.728438592193924705497920513153076171875,-1.9210012029507197439670562744140625 +1958.25,50912,-7.485979108499805079190991818904876708984375,-3.2313238805900255101732909679412841796875 +1958.5,51506,-5.902346874764816675451584160327911376953125,-2.103682523189718267531134188175201416015625 +1958.75,52088,-6.5930031994130331440828740596771240234375,-1.603568993533599496004171669483184814453125 +1959,53016,-5.055357328305717601324431598186492919921875,-0.26560440581170041696168482303619384765625 +1959.25,53679,-2.597321544153828654089011251926422119140625,1.148544172864376378129236400127410888671875 +1959.5,53429,-3.064874340562482757377438247203826904296875,0.93455988066170903039164841175079345703125 +1959.75,54175,-0.02178051029613925493322312831878662109375,3.35992566174945750390179455280303955078125 +1960,54458,3.55393649424559043836779892444610595703125,5.973901019329105110955424606800079345703125 +1960.25,54347,1.470961422119898998062126338481903076171875,6.529076209629920413135550916194915771484375 +1960.5,54228,-2.4641329963315001805312931537628173828125,5.14990744792476107249967753887176513671875 +1960.75,53744,-2.864335208275178956682793796062469482421875,3.129743693537648141500540077686309814453125 +1961,53662,-4.4731810834464340587146580219268798828125,1.21113612277486026869155466556549072265625 +1961.25,53977,-4.18205692970923337270505726337432861328125,0.553616632830426169675774872303009033203125 +1961.5,54388,-0.5729178983137899194844067096710205078125,1.77898715760193226742558181285858154296875 +1961.75,54871,-4.4474498315057644504122436046600341796875,1.2765428377597345388494431972503662109375 +1962,55276,-3.346466735569492811919189989566802978515625,1.490905557122232494293712079524993896484375 +1962.25,55644,-0.8039927771196744288317859172821044921875,2.3584840945650284993462264537811279296875 +1962.5,55977,-0.76820244881355392863042652606964111328125,3.174351186607736963196657598018646240234375 +1962.75,56028,0.65217523059754967107437551021575927734375,4.161953290686369655304588377475738525390625 +1963,56322,0.074466483560172491706907749176025390625,4.83801065692341580870561301708221435546875 +1963.25,56658,-0.96158145736126243718899786472320556640625,4.847516560284930164925754070281982421875 +1963.5,57077,-0.4619652083420078270137310028076171875,4.82576921203917663660831749439239501953125 +1963.75,57360,-0.494130498693493791506625711917877197265625,4.43622204913435780326835811138153076171875 +1964,57898,0.06742135645845337421633303165435791015625,4.634402372677641324116848409175872802734375 +1964.25,58221,0.083972193918043558369390666484832763671875,4.52718592007431652746163308620452880859375 +1964.5,58903,0.638399932118090873700566589832305908203125,5.09511310633160974248312413692474365234375 +1964.75,59421,2.016039913199392685783095657825469970703125,5.87961334664350943057797849178314208984375 +1965,60003,1.675172616378631573752500116825103759765625,6.330933838923328949022106826305389404296875 +1965.25,60690,2.01847257427789372741244733333587646484375,6.874574433877796764136292040348052978515625 +1965.5,61490,2.704677911540557033731602132320404052734375,7.44733265515469611273147165775299072265625 +1965.75,62321,3.97902038659458412439562380313873291015625,8.29512513554846009355969727039337158203125 +1966,63192,3.869681421079121719230897724628448486328125,8.749486919410401242203079164028167724609375 +1966.25,64110,5.29577565936415339820086956024169921875,9.635424360109709596144966781139373779296875 +1966.5,64644,4.300922016269396408461034297943115234375,9.3003270339859227533452212810516357421875 +1966.75,65200,4.70372166817696779617108404636383056640625,9.281176968937188576092012226581573486328125 +1967,65530,4.367558788537962755071930587291717529296875,8.811349207926241433597169816493988037109375 +1967.25,65750,3.249897530859698235872201621532440185546875,8.0080731210109661333262920379638671875 +1967.5,66164,2.500313223096100045950151979923248291015625,7.32619484145971000543795526027679443359375 +1967.75,66900,2.418292909613228403031826019287109375,7.090051948733389508561231195926666259765625 +1968,67295,1.7067182812797909718938171863555908203125,6.290822882355996625847183167934417724609375 +1968.25,67904,1.167341338690675911493599414825439453125,5.749458499235288400086574256420135498046875 +1968.5,68487,2.06076975685709840035997331142425537109375,5.7748652749187385779805481433868408203125 +1968.75,69246,2.0790878131183490040712058544158935546875,6.020591273371564966510049998760223388671875 +1969,69905,2.646034137755123083479702472686767578125,6.462912438838202433544211089611053466796875 +1969.25,70636,3.455861412496460616239346563816070556640625,7.168025849300420304643921554088592529296875 +1969.5,70917,2.586313641062361057265661656856536865234375,6.93736707468769964179955422878265380859375 +1969.75,71240,1.35556396782203592010773718357086181640625,6.285549128728007417521439492702484130859375 +1970,71452,2.11549926016914469073526561260223388671875,5.993995590096119485679082572460174560546875 +1970.25,71029,0.307739317693858538405038416385650634765625,4.499330136073922403738833963871002197265625 +1970.5,70948,-0.7570104814176374929957091808319091796875,3.530326810775704871048219501972198486328125 +1970.75,70790,-2.213890354110162661527283489704132080078125,2.20523661197739784256555140018463134765625 +1971,70859,-2.766113259672920321463607251644134521484375,1.35548095637795995571650564670562744140625 +1971.25,71253,-3.265571830497947303229011595249176025390625,0.869699397463818968390114605426788330078125 +1971.5,71617,-2.357279510995113014359958469867706298828125,0.98222968252639475394971668720245361328125 +1971.75,72108,-2.3951211377270738012157380580902099609375,1.211053671833042244543321430683135986328125 +1972,72945,-1.677676743917118074023164808750152587890625,2.067983693722226234967820346355438232421875 +1972.25,73760,1.145236630844237879500724375247955322265625,3.772833489608046875218860805034637451171875 +1972.5,74263,0.862510935256068478338420391082763671875,4.56656321891068728291429579257965087890625 +1972.75,75270,2.241369254016035483800806105136871337890625,6.13639012603425726410932838916778564453125 +1973,76285,3.30396092901128213270567357540130615234375,7.378433956160051820916123688220977783203125 +1973.25,76887,3.017635390742043455247767269611358642578125,7.609988798018321176641620695590972900390625 +1973.5,77276,3.453430561267623488674871623516082763671875,7.60509527781914584920741617679595947265625 +1973.75,78035,3.786271421004812509636394679546356201171875,7.8992448854723988915793597698211669921875 +1974,78296,2.423645491991237577167339622974395751953125,7.079078359965706113143824040889739990234375 +1974.25,78602,2.0755942976729784277267754077911376953125,6.358056515571661293506622314453125 +1974.5,78611,2.244197004623174507287330925464630126953125,5.689879222016543280915357172489166259765625 +1974.75,77657,-1.3584911438738345168530941009521484375,3.12200445856115038623102009296417236328125 +1975,76649,-3.946451154236228830995969474315643310546875,0.4760232353137325844727456569671630859375 +1975.25,76520,-3.77372939554743425105698406696319580078125,-0.478466693364907769137062132358551025390625 +1975.5,77230,-3.20096575031902830232866108417510986328125,-0.059544614913420446100644767284393310546875 +1975.75,78018,-4.1908886498640640638768672943115234375,-0.021787469727996722212992608547210693359375 +1976,79049,-2.33929941562337262439541518688201904296875,0.95713972305702554876916110515594482421875 +1976.25,79376,-2.36198883854603991494514048099517822265625,0.979891115463715323130600154399871826171875 +1976.5,79892,-1.5839262741910715703852474689483642578125,1.616408385031036232248879969120025634765625 +1976.75,80448,1.789482315473151174956001341342926025390625,3.530931933573128844727762043476104736328125 +1977,81391,3.6271917407439104863442480564117431640625,6.002814286685179467895068228244781494140625 +1977.25,82488,2.893213501586387792485766112804412841796875,7.51006836435908553539775311946868896484375 +1977.5,83532,2.23088253791365787037648260593414306640625,7.84418093933572890819050371646881103515625 +1977.75,84408,3.264565973511707852594554424285888671875,7.872261454255522039602510631084442138671875 +1978,85461,3.508687602696454632678069174289703369140625,7.799221817409488721750676631927490234375 +1978.25,86951,6.18093622944752496550790965557098388671875,9.114868603802960933535359799861907958984375 +1978.5,87618,5.819937615755179649568162858486175537109375,9.231073368346415009000338613986968994140625 +1978.75,88673,5.85040767139298623078502714633941650390625,9.7344433166335875284858047962188720703125 +1979,89480,5.159511199595044672605581581592559814453125,9.47504348367738202796317636966705322265625 +1979.25,90109,4.543169930055910299415700137615203857421875,8.83672204222830259823240339756011962890625 +1979.5,90325,4.0060647637392321485094726085662841796875,7.81844850591733120381832122802734375 +1979.75,90673,3.721455774920059411670081317424774169921875,7.15974442896686014137230813503265380859375 +1980,90994,2.476155410777437282376922667026519775390625,6.27334387489872824517078697681427001953125 +1980.25,90099,-0.882009590690358891151845455169677734375,3.55643241768439111183397471904754638671875 +1980.5,90210,0.063600274816735691274516284465789794921875,2.915382938215998365194536745548248291015625 +1980.75,90943,-0.959820241743500446318648755550384521484375,2.527749050244210593518801033496856689453125 +1981,91210,-1.559813152204924335819669067859649658203125,1.914940357013620086945593357086181640625 +1981.25,91490,-1.5326302049606965738348662853240966796875,1.5209628053517008083872497081756591796875 +1981.5,91479,-1.428492651374881461379118263721466064453125,1.26951607100136243388988077640533447265625 +1981.75,90893,-2.939641561540838665678165853023529052734375,0.24233623879581500659696757793426513671875 +1982,90432,-3.962898655756134758121334016323089599609375,-0.619538321510617606691084802150726318359375 +1982.25,89864,-1.806399503766215275391004979610443115234375,-0.26116494342977603082545101642608642578125 +1982.5,89183,-4.691925016176583085325546562671661376953125,-1.144984720546517564798705279827117919921875 +1982.75,88769,-7.17916231496974432957358658313751220703125,-2.419544668681055554770864546298980712890625 +1983,89090,-5.508627846417539331014268100261688232421875,-2.351744545951305553899146616458892822265625 +1983.25,90022,-4.590779134790864191018044948577880859375,-1.617559178840792810660786926746368408203125 +1983.5,91247,-3.107416284786495452863164246082305908203125,-0.253932253389621109818108379840850830078125 +1983.75,92227,-0.709320196554699577973224222660064697265625,1.45699388239745530881918966770172119140625 +1984,93429,0.468658365822420819313265383243560791015625,3.26036024852646733052097260951995849609375 +1984.25,94479,2.0454986729282609303481876850128173828125,5.008017124318939750082790851593017578125 +1984.5,95344,3.89879927665197101305238902568817138671875,6.680096554154033583472482860088348388671875 +1984.75,96107,4.641264925560562915052287280559539794921875,7.942466416457818922935985028743743896484375 +1985,96843,4.0162976172750859404914081096649169921875,8.34440157917924807406961917877197265625 +1985.25,97459,3.251232930855394442914985120296478271484375,7.93776918399453279562294483184814453125 +1985.5,98045,2.880273673620877161738462746143341064453125,7.185644174165872755111195147037506103515625 +1985.75,98609,3.302004399109819132718257606029510498046875,6.69096059920912011875770986080169677734375 +1986,98935,2.141386610900326559203676879405975341796875,5.726127929707445218809880316257476806640625 +1986.25,99155,1.430222248900236081681214272975921630859375,4.830669475533568402170203626155853271484375 +1986.5,99934,1.654001399597973431809805333614349365234375,4.70185640875888566370122134685516357421875 +1986.75,100511,1.415578586353376522311009466648101806640625,4.480502013160730712115764617919921875 +1987,101164,1.197739223369126193574629724025726318359375,4.36518518163620683480985462665557861328125 +1987.25,101900,1.391942629865297931246459484100341796875,4.45601634856984674115665256977081298828125 +1987.5,102646,1.51033013593178111477755010128021240234375,4.585961838938374057761393487453460693359375 +1987.75,103664,1.88256964475704080541618168354034423828125,4.999236437411809674813412129878997802734375 +1988,104487,2.638598871588555994094349443912506103515625,5.459959290802771647577174007892608642578125 +1988.25,105324,3.248123103970783631666563451290130615234375,6.035703106018672770005650818347930908203125 +1988.5,106009,2.216916503548191030859015882015228271484375,5.901402807595104604843072593212127685546875 +1988.75,106906,2.929008804615705230389721691608428955078125,6.168276943169303194736130535602569580078125 +1989,107619,3.11231649319597636349499225616455078125,6.185424972422651990200392901897430419921875 +1989.25,108026,2.590061388086041915812529623508453369140625,5.837999866287873373948968946933746337890625 +1989.5,108365,2.25882657122792807058431208133697509765625,5.42189832995018150541000068187713623046875 +1989.75,108849,1.452957250707186176441609859466552734375,4.8806700976228967192582786083221435546875 +1990,109647,1.77349809292127247317694127559661865234375,4.820345295605875435285270214080810546875 +1990.25,109862,1.25356619689000581274740397930145263671875,4.218371933895468828268349170684814453125 +1990.5,109525,0.397721775270156285841949284076690673828125,3.262883753179949053446762263774871826171875 +1990.75,109160,-1.067112223874801202327944338321685791015625,2.086475216250846642651595175266265869140625 +1991,108577,-2.028441104476996770245023071765899658203125,0.886238663299309337162412703037261962890625 +1991.25,108338,-2.2001412848994732485152781009674072265625,0.288403076536496882908977568149566650390625 +1991.5,108340,-2.638768178404689024318940937519073486328125,-0.02307284106109364074654877185821533203125 +1991.75,108325,-3.4529719240208578412421047687530517578125,-0.48256330578578854328952729701995849609375 +1992,108368,-4.481730106251461620558984577655792236328125,-1.173327223594014867558144032955169677734375 +1992.25,108721,-3.459264953640740714035928249359130859375,-1.044006499668512333300895988941192626953125 +1992.5,108966,-2.3260152821594601846300065517425537109375,-0.511692673554762222920544445514678955078125 +1992.75,109496,-1.993296964567207396612502634525299072265625,0.307332306882699413108639419078826904296875 +1993,109998,-1.05434258663672153488732874393463134765625,1.3002585111016742303036153316497802734375 +1993.25,110754,-0.66172145894370260066352784633636474609375,2.205555599759463802911341190338134765625 +1993.5,111451,-0.317558597507968443096615374088287353515625,2.83106021953381059574894607067108154296875 +1993.75,112312,0.7585352931591842207126319408416748046875,3.61447450436753570102155208587646484375 +1994,113248,1.6031753017668961547315120697021484375,4.404726169050491080270148813724517822265625 +1994.25,114246,1.80317861130379242240451276302337646484375,4.9569050480249643442220985889434814453125 +1994.5,115254,2.738050939039794684504158794879913330078125,5.6102481468415135168470442295074462890625 +1994.75,116164,2.83832890017538375104777514934539794921875,5.91149668363505043089389801025390625 +1995,116913,3.11681140878090445767156779766082763671875,6.0967884645242520491592586040496826171875 +1995.25,117294,2.617817144255923267337493598461151123046875,5.73720778015194809995591640472412109375 +1995.5,117887,2.66011178142844073590822517871856689453125,5.614150610413844333379529416561126708984375 +1995.75,118322,2.201887599558858710224740207195281982421875,5.212900890308674206607975065708160400390625 +1996,119002,1.910008904598726076073944568634033203125,4.956019552993211618741042912006378173828125 +1996.25,119774,1.745999569979403531760908663272857666015625,4.7252615526149384095333516597747802734375 +1996.5,120427,1.485712367177029591402970254421234130859375,4.39053717927527031861245632171630859375 +1996.75,121147,1.46277037913159801973961293697357177734375,4.20016985197389658424071967601776123046875 +1997,122000,1.68886917700410776888020336627960205078125,4.2590976279070673626847565174102783203125 +1997.25,122818,2.342653111589015679783187806606292724609375,4.6019981319795988383702933788299560546875 +1997.5,123605,2.045406057342688654898665845394134521484375,4.736445875058734600315801799297332763671875 +1997.75,124554,2.514951386433267543907277286052703857421875,5.132963523597709354362450540065765380859375 +1998,125177,2.2377971937376059941016137599945068359375,5.05884360266963994945399463176727294921875 +1998.25,126080,2.2325278178932421724312007427215576171875,5.1309992362921548192389309406280517578125 +1998.5,126774,2.534153711700355415814556181430816650390625,5.136221343385614090948365628719329833984375 +1998.75,127601,2.536366456815585479489527642726898193359375,5.190352360552196842036210000514984130859375 +1999,128244,2.177945193225468756281770765781402587890625,4.9913654597503409604541957378387451171875 +1999.25,129091,2.30072168952710853773169219493865966796875,4.981399724620814595255069434642791748046875 +1999.5,129791,2.305166286845860668108798563480377197265625,4.883446714399951815721578896045684814453125 +1999.75,130780,2.122532869417000256362371146678924560546875,4.8777165324418092495761811733245849609375 +2000,131608,2.647083091789454556419514119625091552734375,5.009907159743534066365100443363189697265625 +2000.25,132075,1.980591652864632123964838683605194091796875,4.645331694080823581316508352756500244140625 +2000.5,132377,1.828076139205450090230442583560943603515625,4.32479387410103299771435558795928955078125 +2000.75,132731,1.389021786729927043779753148555755615234375,3.941631583091975699062459170818328857421875 +2001,132752,1.048578456500536049134097993373870849609375,3.45480265911692185909487307071685791015625 +2001.25,132302,-0.13604919197359777172096073627471923828125,2.45696061425815059919841587543487548828125 +2001.5,131793,-0.919488592863899611984379589557647705078125,1.53070454602629979490302503108978271484375 +2001.75,131005,-2.500652553129611987969838082790374755859375,0.171896827857608514023013412952423095703125 +2002,130713,-3.15361858963433405733667314052581787109375,-0.6823727210858123726211488246917724609375 +2002.25,130684,-3.084009629013735320768319070339202880859375,-1.0587747664440030348487198352813720703125 +2002.5,130526,-3.448971578041664542979560792446136474609375,-1.408147176562806635047309100627899169921875 +2002.75,130505,-3.987698587318618592689745128154754638671875,-1.69129834964724068413488566875457763671875 +2003,130238,-3.93807367519139006617479026317596435546875,-1.911918005096367778605781495571136474609375 +2003.25,130195,-3.25428189678177659516222774982452392578125,-1.605386158530336615513078868389129638671875 +2003.5,130281,-3.040940346056231646798551082611083984375,-1.153885373025332228280603885650634765625 +2003.75,130618,-2.1437138765877534751780331134796142578125,-0.295845764529303778544999659061431884765625 +2004,131158,-2.1171358544806935242377221584320068359375,0.339862320254042060696519911289215087890625 +2004.25,131791,-1.8504384211400974891148507595062255859375,0.843513907019541875342838466167449951171875 +2004.5,132120,-1.054408655433917374466545879840850830078125,1.21381598877678698045201599597930908203125 +2004.75,132660,-0.690022480341212940402328968048095703125,1.6377923892387116211466491222381591796875 +2005,133169,0.12320998180666720145381987094879150390625,2.22554524161250810720957815647125244140625 +2005.25,133955,0.50550607832656169193796813488006591796875,2.847059607560595395625568926334381103515625 +2005.5,134593,0.7457416911138352588750422000885009765625,3.256175376090823192498646676540374755859375 +2005.75,135174,0.813397254295296079362742602825164794921875,3.42858046566470875404775142669677734375 +2006,136049,0.989678006744725280441343784332275390625,3.6612411654559764428995549678802490234375 +2006.25,136337,0.815433289503971536760218441486358642578125,3.39124274224241162301041185855865478515625 +2006.5,136883,1.392179276339675197959877550601959228515625,3.541594582877223729155957698822021484375 +2006.75,137266,1.014242569395946702570654451847076416015625,3.413118508980915066786110401153564453125 +2007,137785,0.978735584883224873919971287250518798828125,3.40755009567646993673406541347503662109375 +2007.25,138085,0.43656796956520338426344096660614013671875,3.036551491683212589123286306858062744140625 +2007.5,138116,0.211083562985777462017722427845001220703125,2.58385018633407526067458093166351318359375 +2007.75,138413,0.138154429292399072437547147274017333984375,2.36791319851408843533135950565338134765625 +2008,138268,-0.95959821195583572261966764926910400390625,1.6178715878950242768041789531707763671875 +2008.25,137708,-0.945980988253495524986647069454193115234375,1.0005739481466662255115807056427001953125 +2008.5,136781,-2.305217343946651453734375536441802978515625,-0.074543969775504592689685523509979248046875 +2008.75,134844,-4.02467520984146176488138735294342041015625,-1.7802094473454417311586439609527587890625 +2009,132527,-6.192175553145943922572769224643707275390625,-3.89081009916890252497978508472442626953125 +2009.25,131020,-7.370305607618547583115287125110626220703125,-5.25194542680264930822886526584625244140625 +2009.5,130260,-7.72636462813761681900359690189361572265625,-5.856145865982171017094515264034271240234375 +2009.75,129774,-8.7317913478264017612673342227935791015625,-6.444749336898212277446873486042022705078125 +2010,129896,-8.155431092805883963592350482940673828125,-6.24597005574969443841837346553802490234375 +2010.25,130528,-6.897272331198109895922243595123291015625,-5.354773822487686629756353795528411865234375 +2010.5,130372,-6.313047128043990596779622137546539306640625,-4.798920414391659505781717598438262939453125 +2010.75,130840,-3.86747478946927003562450408935546875,-3.01433520435830359929241240024566650390625 +2011,131295,-1.88679291045673380722291767597198486328125,-0.933969839965584469609893858432769775390625 +2011.25,131949,-1.603880166302360521513037383556365966796875,0.706550098861725928145460784435272216796875 +2011.5,132372,-1.392474945805361130624078214168548583984375,1.608368765698969582444988191127777099609375 +2011.75,132927,-0.312405178983453879482112824916839599609375,2.4005629316607155487872660160064697265625 +2012,133761,0.0218983204167670919559895992279052734375,2.93204951001871449989266693592071533203125 +2012.25,134038,-0.446917701330448835506103932857513427734375,2.653557870351733072311617434024810791015625 +2012.5,134552,1.270743847349194766138680279254913330078125,3.155883891544135622098110616207122802734375 +2012.75,135076,0.67272112767068392713554203510284423828125,3.186238032700885014492087066173553466796875 +2013,135712,0.65696747450829207082279026508331298828125,3.308829343967090608202852308750152587890625 +2013.25,136268,0.659959300192213049740530550479888916015625,3.220805061698001736658625304698944091796875 +2013.5,136862,1.066737078163669139030389487743377685546875,3.33569781159530975855886936187744140625 +2013.75,137387,0.9298065120810861117206513881683349609375,3.300165569128921561059542000293731689453125 +2014,138014,0.44127249792063594213686883449554443359375,3.130050390193673592875711619853973388671875 +2014.25,138843,1.52448961296477136784233152866363525390625,3.5220456527358692255802452564239501953125 +2014.5,139579,1.40375424064995968365110456943511962890625,3.6680007788017974235117435455322265625 +2014.75,140402,1.431144862696555719594471156597137451171875,3.867215350730475620366632938385009765625 +2015,140972,1.377280233447663704282604157924652099609375,3.802629580577331580570898950099945068359375 +2015.25,141724,1.625820747632360507850535213947296142578125,3.9257969357995534664951264858245849609375 +2015.5,142300,1.596020301481303249602206051349639892578125,3.896438620460912716225720942020416259765625 +2015.75,143146,1.858248492586426436901092529296875,4.1063327389174446580000221729278564453125 +2016,143733,1.7232058384824995300732553005218505859375,4.060228252759088718448765575885772705078125 +2016.25,144175,1.25752563741980338818393647670745849609375,3.768404113545329892076551914215087890625 diff --git a/quantecon/tests/test_filter.py b/quantecon/tests/test_filter.py index bf997380a..0f105737a 100644 --- a/quantecon/tests/test_filter.py +++ b/quantecon/tests/test_filter.py @@ -23,7 +23,7 @@ def test_hamilton_filter(): data['hamilton_cyc'], data['hamilton_trend'] = hamilton_filter(100*np.log(data['employment']), 8, 4) data['hamilton_cyc_rw'], data['hamilton_trend_rw'] = hamilton_filter(100*np.log(data['employment']), 8) assert_allclose(data['matlab_cyc'], data['hamilton_cyc'], - rtol = 1e-06, atol = 1e-06) + rtol = 1e-07, atol = 1e-07) assert_allclose(data['matlab_cyc_rw'], data['hamilton_cyc_rw'])