introduction to 'the smoothing of time series' · tfie smoothing of time series 23 tion...

15
This PDF is a selection from an out-of-print volume from the National Bureau of Economic Research Volume Title: The Smoothing of Time Series Volume Author/Editor: Frederick R. Macaulay Volume Publisher: NBER Volume ISBN: 0-87014-018-3 Volume URL: http://www.nber.org/books/maca31-1 Publication Date: 1931 Chapter Title: Introduction to "The Smoothing of Time Series" Chapter Author: Frederick R. Macaulay Chapter URL: http://www.nber.org/chapters/c9360 Chapter pages in book: (p. 17 - 30)

Upload: others

Post on 17-May-2020

12 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to 'The Smoothing of Time Series' · TFIE SMOOThING OF TIME SERIES 23 tiOn whi'h is fourth in the list of the sc-yen used in obtaining the particular moving average value.1

This PDF is a selection from an out-of-print volume from theNational Bureau of Economic Research

Volume Title: The Smoothing of Time Series

Volume Author/Editor: Frederick R. Macaulay

Volume Publisher: NBER

Volume ISBN: 0-87014-018-3

Volume URL: http://www.nber.org/books/maca31-1

Publication Date: 1931

Chapter Title: Introduction to "The Smoothing of Time Series"

Chapter Author: Frederick R. Macaulay

Chapter URL: http://www.nber.org/chapters/c9360

Chapter pages in book: (p. 17 - 30)

Page 2: Introduction to 'The Smoothing of Time Series' · TFIE SMOOThING OF TIME SERIES 23 tiOn whi'h is fourth in the list of the sc-yen used in obtaining the particular moving average value.1

INTRODUCTION

I'his little 1)00k grew out of an investigationinto the history of interest rates and security pricesin the United States since January, 1857. In han-dling the various series of monthly data preparedduring that investigation, the problem arose ofhow comparisons between the series should bemade. The relations between tile different monthlyseries might have been analyzed by many statis-tical methods. 'We chose one of the simplest. 'We"smoothed'' each data series in such a manner thatrelations between the larger movements of the

The object of smoothing the series included in the study ofinterest rates and security prices was to compare the ''cyclical" move-nients of the various series. We wished to eliminate the multitudeof minor movements, as we felt that their presence would obscurethe picture of the major illoveinents. I'or the discussion of the minormovements we relied l)ri1111r1l)' upon the raw data. However, forpurposes other than ours, the investigator might wish to smooth hismaterial in such a manner as to eliminate seasonal fluctuations andat the sanie time preserve not oniv the larger but most of the snial Icrmovements of the data. The handling of such a problem is illus-trated and discussed in Appendix I.

Any graduation of economic time series must, almost inevitably,be for a particular PUPOSC only. The graduations presented in thestudy of interest rates and security prices are intended to supplementthe data. They are not intended to replace the data. In this, theydiffer from adjustments made oil physical observations in order toeliminate errors of nicaslireinent. They also differ from graduationswhich are intended to estimate the "universe" from a sample. Thegraduation of a mortality table is of this latter type.

17

Page 3: Introduction to 'The Smoothing of Time Series' · TFIE SMOOThING OF TIME SERIES 23 tiOn whi'h is fourth in the list of the sc-yen used in obtaining the particular moving average value.1

iS 'l'Ii I; S\IOO'i'IILN( 01" ii \i 1: SFRIFS

various series i)ec'ame imnie( ii a ft l )arcn t wheflthe Sflll)Ot}) ciir\'c \V(F(' ) I ittcd On a ('hart. Theparticular method (it snloot}i i fl F1( Iua ti11''01'

which We uSed. cli minates from (l(1l hOtonly ml nor emit K' iliovemen ts but also month! vseasonal fluctuations. 'Flue resulting smooth (ur\rtsswill appear in the stud of interest flites afl(l S('('ijr-it)' prices.

A l)rief chapter on the problem of SEllOUt ilmg wasprepared for mc] usion in that study. It Coveredlittle more than a description of theally used. 'Ihe manuScript was read by a fcw fel-low statisticians. () mail)' questions \\'erc thenasked that the chapter \VS expanded. More clues-tions were asked. Further eXj)aflsion followed.What was original ft designed as little more thana memorandum On a particular method grew intoa rather general treatment of the whole problemof smoothing. It soon became apparent that areally simple treatment of even the elements ofthe subject required more space than a short chap-ter. As a long chapter on smoothing seemed some-what of a digression, if included in an investiga-tion of tile history of interest rates and securityprices, the National Bureau of Lconomjc Researchdecided to publjsh this study separately

An attempt has been made to present this intri-cate problem in a srnple a manner as possible.This introductj0n is intended for the reader who

Page 4: Introduction to 'The Smoothing of Time Series' · TFIE SMOOThING OF TIME SERIES 23 tiOn whi'h is fourth in the list of the sc-yen used in obtaining the particular moving average value.1

S

I

THE SMOOThING OF TIME SERIES 19

wants merely a brief description of the nature ofti'e smoothing process accomj)anied by some 1llustrations of a few simple gra(ivations and directionsfor computing them. The more systematic discus-SiOfl is contained in the hod' of the 1)00k.

A smooth curve iiiay be dCSCril)ed as one which(hOeS not change its slope in a sudden or erraticmanner. 1 Smooth curves are not necessarily repre-sentable by simple mathematical equations. Indeedthe expression, in its narrower sense, has often beenreserved for curves which arc not SO represefltal)le.lo suggest an adequate definition of smoothnessis difficult. hut it is still more difficult to suggestan adequate measure. 'ihe most commonly usedmathematical measure of smoothness is based onthe smallness of the sum of the squares of the thirddifferences of successive points on the curve. Thiscriterion amounts to measuring the smoothness ofa curve by measuring how closely successive groupsof four consecutive points can be described bysecond-degree parabolas. lhioiigh such a conceptmay l)e useful, it certainly is not entirely logical.It implies that no curves are perfectly smooth ex-cept straight lines and second-degree parabolas.

1 The niatliernatician may feel that this definition of smoothnessties up too (lehnitelv to mere second differences. However, do not thewords ''sudden or erratic nianner'' iniph more than mere seconddifferences ?

110 t( I , Ia ge 54.

Page 5: Introduction to 'The Smoothing of Time Series' · TFIE SMOOThING OF TIME SERIES 23 tiOn whi'h is fourth in the list of the sc-yen used in obtaining the particular moving average value.1

20 'rilE sMOOTIIIN(; OF TiME SERIES

The fitting of a fliatIiCifl1ticil curve to j)llVsicalol)servations may be i ratU)nai operation ; the"smoothing" of ecOnomic time series isalinostinevitably pumly empirical. A mathematical curvehtte(l to observations made on bodies falling in aactnni may be a statement of a law; the result of

smoothing average monthly rates for Time MoneyOn the New York Stock Exchange can hardly bemore than a picture of what such rates would havebeen had they been unaffected I)y seasonal anderratic factors. It constitutes no law. FIovevcr, inspite of the absence of any even hypotheticallyrational law, smoothing or graduation'' seemsuseful for many PUII)OSCS and therefore quitelegitimate.

In the han(ls of a jerson Who is thoroughly ac-quain ted with all aspects of the data, freehand (orFrench curve) smoothing would seem to havemuch to recommend it. The most commonly ad-vanced argument for freehand or graphic smooth-ing is that it saves time. As a matter of fact, oneof the chief weaknesses of the metho(l is theamount of time requiredif the smoothing is toattain the object desired. If a curve be requiredwhich shall (i ) 1)e smooth. (2) give a good fit,and ('i) eliminate seasonal fluctuations, the

I The terms smoo(h,u1 and qrah,a/jo;i are commoni v thought ofas not quite Synonymous WLtII Cll1' jilt mu. Ho eXj)rSSiOn murr'eft/hug should, perhaps, be reserved for the t'i ft i ig to data ot a curverepresentable by a mathematical equation.

Page 6: Introduction to 'The Smoothing of Time Series' · TFIE SMOOThING OF TIME SERIES 23 tiOn whi'h is fourth in the list of the sc-yen used in obtaining the particular moving average value.1

THE Sr\EOOTHING 01" TUvIE SERIES 21

ainmint of time used in correcting and rccorrcctingthe freehand curve often becomes 1)rohil)itive.

Moreover Iflost of the work must l)C (lone by the

investigator luimscf. It is not the type of operationwhich can be delegated to a computer. Finally, theinvestigator himself ma easily go astray. Judg-nient is, at best, a variable quantity. Unless the

mathematical checks are so detailed that the free-

hand fitting practically amounts to a mathematicaltitling by SUCCtSSiVC approximatiOns the investi-

gator may easily describe the same data by dis-

tinctly different smooth curves if he does thefitting twicewith a month's time l)etwccn opera-

tions. Most persons are incapable of good freehandsmoothing. I do not hesitate to say, after having

worked with many hundreds of students, that any

fairly good mathematical method will, in at leastnine cases out of ten, give better results than anymethod which requires much judgment.

Perhaps the best theoretical case for freehandsmoothing can be made when there are reasons for

suspecting that the underlying ideal curve is itself

not smooth. If the underlying curve have cusps

or be discontinuous, any continuous "smoothing''

whether mathematical or freehandwill, ofcourse, somewhat obscure such characteristics. But

the freehand method can easily smooth by partsintroducing any cusps or discontinuities which the

investigator may wish in the "smooth curve. For

Page 7: Introduction to 'The Smoothing of Time Series' · TFIE SMOOThING OF TIME SERIES 23 tiOn whi'h is fourth in the list of the sc-yen used in obtaining the particular moving average value.1

22 TIlE SMOC'I'JIiNG OF TIME SERIES

examj)1e, quotations or (all lone Hates oi Bond\ields, behire, duiing and aher a linaticial pnjc,might be SITh)OtIIed u) the liii!'' and 'down thelull'' l)lit not over the toj) of the hill. Of COurse,one of the (langers in such a I)1o((1t1re, for pur-poses of comparison l)etwccn various series, is thatdifferent draftsmen, or even the same (Iraftsmanat different times, will 'vary in their judgment asto when ''over the top of the lii U" should not besmoothed. Theoretically, freehand smoothing isideal. Practically, it is a little like the faith of a

mystic. It is conclusive evidence to the FCCiiCnt ofthe vision alone.'

The simplest of purely mathematical methodsof smoothing data is to take a moving average ofthe data and center that moving average. For ex-ample, a moving average, each value of which isthe average of seven consecutive observations(which are equally spaced in time) , may be usedas a smoothed or theoretical value for the observa-

Smoothing for purposes of comparing var!olIs series with oneanother is often useful even when the smoothing process has notdescribed both series in a completely satisfactory nlanner. For ex-ample, the use of any time unit implicitly involves the use of oneof the crudest and least adequate of mathematical smoothing proc.essesthe simple moving average. Jo compare the annual protluc.don of pig iron during successive 'ais with the annual volume ofbank clearings during the same successive 'tears is to compareselected points twelve months apart) on the 12-mflOfl(/Z5 movingaverage of the moitt/ily production of pig iron with correspondingselected points on the 12- molt /h niov ing ave rage of the me,, (h/vVolume of bank clearings.

Page 8: Introduction to 'The Smoothing of Time Series' · TFIE SMOOThING OF TIME SERIES 23 tiOn whi'h is fourth in the list of the sc-yen used in obtaining the particular moving average value.1

C

TFIE SMOOThING OF TIME SERIES 23

tiOn whi'h is fourth in the list of the sc-yen used

in obtaining the particular moving average value.1

Such a method of smoothing involves only ex-tremely easy computatiolL It has, however, serious

drawbacks. The resulting curve is seldom verysmooth and it will not give a perfect fit to dataexcept in ranges whjch can be adequately describedby a straight line.2 For example, a simple moving

average, if appl led to data whose underlying trend

is of a second-degree 1)arabollc type, falls alwayswithin instead of on the parabola. If applied todata whose underlying trend is of a sinusoidaltype, it falls too low at maximum points and toohigh at minimum points. When applied to suchdata it cuts off tops and l)ottoms, usually resulting

in a decidedly poor fit.In general, if a type of smoothing be desired

which shall, when applied to monthly data, elimi-

nate seasonal and erratic fluctuations and at the

same time give a smooth curve adequately describ-

ing the remaining cyclical and trend factors, some-

thing much more delicate than a smple 12-months

1 If a i 2.rflOflthS niov ing average of irionthly data be takeii, any

regular seasonal fluctuation in the data will, of course, be eliminated.

Such a i 2-monthS average shOUl(l logically be centered between the

sixth and seventh months. If a 2.months moving average of this12.monthS moving average be taken, such average may be centered

at the seventh month.2 Each point on a i 2-months moving average, for example, is the

middle point of a straight line fitted to 12 observations by the method

of least squares.

Page 9: Introduction to 'The Smoothing of Time Series' · TFIE SMOOThING OF TIME SERIES 23 tiOn whi'h is fourth in the list of the sc-yen used in obtaining the particular moving average value.1

I/24 'rilE SMOOTIIIN; 01' 'l'IME SERIES

moving average niut be used. The i 2-montlimoving average of any adequate graduationShould appro irna te. or he a rd a ti 'elv good fit to,the 1 2-months loving il vcragc of ti ie originaldata. In other words, the snioothi curve should notitself be a I 2-months moving average of the data.but a curve whose i 2-months moving average issimilar to the 1 2-months moving average of thedata.1

Charts TV and V illustrate this chlaract-erjstjcChart IV shows a set of data (ninety-seven con-secut ye months of Call i\ loney Rates on theNew York Stock Exchange) and two smoothingsor graduations. The two graduations are (i ) aI 2-months moving average of the original data.and (2) a 43-term smooth curve htted by a formulawhich we have used throughout our study of inter-est rates and security prices.2 It is immediately

1 \Vllenever the I 2-!]lonths moving average of the data exactlyequals the correspondizlg 12-months moving average of the smoothCurve, the sum of 12 CousedfltjyC ordinates of the Sillootil curve, ofcourse, exactly equals the sum of i 2 consecutive ordinates of thedata.

2 'J'his 43-term smooth curve is calettlated as follows 'l'ake ac-months moving total of a 5-months moving total of an 8-iiioithmoving total of a 1 1-months moving total of the data. To the resultsappl tile following simnie weights -f- , - tO, 0, 0, 0, 0, 0, 0, -- 10,0, 0, 0, 0, 0, 0, - 10, -j-7. l)ivide tile lina! results by 9600. See pages73, 74, 7_c.Ihougli the above procedure may SC(fI1 conlplicat('d, it can easilyhe followed by ally Computer Capable of taking :t Il-months mov-ing average. It takes about three and a ha If tiri1es as long to CoOl-pute as a siriiple 12-months moving average.

Page 10: Introduction to 'The Smoothing of Time Series' · TFIE SMOOThING OF TIME SERIES 23 tiOn whi'h is fourth in the list of the sc-yen used in obtaining the particular moving average value.1

'l'HE SMOOThING OF TIME SERIES

apparent that the 4'?)-tcrm graduation is muchsmoother than the 1 2-months inov iug average. ihedifference in qoo'/ness of lit is shown ill ChartV where a 12-months moving average of the datais compared with a 1 2-months moving average ofeach of the graduations. The reader will noticethat the 12-months moving average of the 43-ternigraduation gives a much better tit to the 1 2-mOnthsmoving average of the data than does the 12-

months moving average of the 12-months movingaverage graduation. Ihe 43-teflhl graduation notonly is much smoother but gives a much 1)etter fit.

As 43 months are needed to obtain one pointon the -term graduation, there are necessarily 2 1

months at each end of the data which are not coy-ercd by the smooth curve, just as 6 months at each

end of the data are not covered by the i 2-monthssimple moving average. Such smoothings have tobe extended, if they are to cover the entire rangeof the data. In the Call Money illustration above,this difflculty has been overcome by using data of

the period before JanuarY 1886 and data of theperiod after January 1894. In the study of interestrates and security prices, each series was smoothedfor the entire period January i8ç to date. Exten-sion backwards in time was accomplished by usingin each case the best data obtainable for the pre-ceding 21 months. Forward in time, the gradua-tiOflS might have been InathelTlatically extended

2 ç

Page 11: Introduction to 'The Smoothing of Time Series' · TFIE SMOOThING OF TIME SERIES 23 tiOn whi'h is fourth in the list of the sc-yen used in obtaining the particular moving average value.1

26 TIlE SMOOThING 01" TIME SERIES

vithoiit using a n1,T ftirtlicr data, real OF iivpothetj_cal.1 However, the easiest, :111(1 general 1v the bcst,way tO extend a graduation forward in time isto apply it to hypothetical extrapolated (tat:' Thismethod l)aS been used Hi the StII(ly Of 1111 Crest ratesand SecUrity prices. Ihe dillictiltics ahl(1 dangers ofsuch a procedure are distinctly less than the diHicultics an (1 dangers invol ve(1 in freehand or otherextrapolation of the smooth curves themselves.The tail end of any curve has necessarily a largeprobable error, and tIu)rOUgIlly adequate resultswhich would be Ii kclv to ('heck with later data,when receivedare generall quite improbable.'l'his is just as true of graduations such as theWhi ttaker-Hcnderson. which need no extrapolaflon, as of graduations which rcqure extrapolation. Moreover, mathematical extrapolation doesnot solve this difficulty.

The reader must not suppose that the particular43-term formula emphasized in tIlls 1)00k is )1'e-sented as any 1nal word Ofl the subject of smooth-ing. It is primari lv a method which is adapted tograduating monthly data in such a manner as toeliminate seasonal and erratic fluctuations and atthe same time save all trend and the non-seasonalcyclical swings. It is not laborious. However, ifthe reader wishes to reduce the computation still

For the (let:n k of the proced ore to he used for such ma theiiiaticaiextenSion of the graduation, see pages 113, 114. II c.

Page 12: Introduction to 'The Smoothing of Time Series' · TFIE SMOOThING OF TIME SERIES 23 tiOn whi'h is fourth in the list of the sc-yen used in obtaining the particular moving average value.1

'i'iil: SMOOTIIIX(; OF TIME SERIES 27

further and yet obtain as good results as possibleunder such circumstances, lie may use a simplerformula involving fewer steps. An example of sucha formula would be : Take a 4-months movingtotal of a 7-months moving total of the data. Sub-tract a i6-months moving total of the data. Takea 3-months moving total of a 12-months movingtotal of the result. 1)ivide by 432.' Twenty-nineobservations are required to obtain one point onthe graduated curve. The amount of computationis less than that involved in calculating the 43-term graduation. The formula vil1 give compara-tively good fits to a large range of sine curves.It gives a comparatively good fit to our CallMoney data, as may be seen by reference to colunm14 of the table in Appendix VIII. It eliminates12-months seasonal fluctuations. It is a fairly goodformula for the investigator who wants a simplesubstitute for a 2-months moving average of a 12-months moving average. It takes little more thantwice as long to compute as such a 2-months mov-ing average of a i 2-months moving average.

This 29-term formula falls an appreciable dis-tance ouls,dc the parabola y x2, when applied

This formula may also be applied as follows: Take a 14-monthsmoving total of the data with the following simple weights : 1, 0,0, 0, + 1, -F- 1, + 1, -i-- 1, + 1, ± 1,0, 0,0, 1. Take a 3-monthsmoving total of a 3-months moving total of a I 2-months movingtotal of the results. Divide by 432.

2 See formula number 14 in Appendices IV, VII and VIII.

Page 13: Introduction to 'The Smoothing of Time Series' · TFIE SMOOThING OF TIME SERIES 23 tiOn whi'h is fourth in the list of the sc-yen used in obtaining the particular moving average value.1

28 'Ff1 E s\100'FIIIN(; ()l''Fl ME Si;RIEs

to pj1ts on that parabola. 11 t he iii \'t'st igdtor j)tCIcis a loini u Li htl Ii hg )j )FUX iiiia tt'l V OH the paiib-ola y x, lie may use the 29-term formii Ia de-scribed on page 9. If lie furthermore insists uponan absolutely iFFcdIiCil)l(' minilmin] of labor, lemust use a forinu I a wit Ii a poorly shaped weightdiagram. br example, a :27-term formula, whichwill eliminate nionthft seasonal fluctuations, andgive a distinctly better fit and smoother graduationthan a 1 2-mon tlis Iflovilig average, bitt not as gooda fit or smooth a graduation as can be obtainedby using inure COnii)hic:ited formulas. niav he ap-plied as fol lows : 'l'ake a i 6-months moving totalof the data with the following simple weights- -L . - -- .L J -L1,0,0,0, I, 1, I, 1.. , , 1,o, 0, -- 1 . Take a I 2-months rnov itig total of thisweighted i 6-months moving total. 1 )i Vj de each ofthe final results by 72.l It is seldom advisable touse such an extremely simple formula.4 A verylittle more labor will give distinctly better results.5

This is usual iv an advantage with cvci k'al data.2 The reader vil I, of course, note that for ca ten! ation tile niiddle

set of units is treated as a simple 8-months moving total.If applied to points on the parabola v x2, the graduation will

fail of a unit inside the j .tho!a.Except in the case of the measuremciit of average Seasonal flue-

tuatioris by means of Operations on the deviations of the data froma graduated curve. For that purpose it is not necessary that thegraduation be more than roughi v adequate. See Appeiidi x I.

For example, tIle use of tile following 27-term for:niila lake a10-months moving total of the data with the following sirnf)leweights: i, o, 0, + , + , + i, + i, 0, 0, 1. '1ak a 7-months

L I

Page 14: Introduction to 'The Smoothing of Time Series' · TFIE SMOOThING OF TIME SERIES 23 tiOn whi'h is fourth in the list of the sc-yen used in obtaining the particular moving average value.1

TilE SMOOi'lIIN( OF TI ME SERiES 29

If the elimination of seasonal fluctuations is ofvery minor importance and if the short time fluc-tuations of the data are not too large (when com-pared with the amplitude of the longer time cycli-cal fluctuations) , some of the well-known third-degree parabolic ' summation formulas may beused without introducing any large element oferratic fluctuation. For example, Kenchington's

-term formula,3 if applied to such a series asRailroad Stock Prices, gives fairly good results. Ifthe investigator desires to follow his data some-what more closely than Kenchington's formulapermits, he may use such a formula as Spencer's

moving total of a 12-months moving total of the results. l)ivide byi68. The resulting graduation will be distinctly smoother and thefit better than with the slightly less laborious 27-term formula de-cribed in the text. The graduation faIls i % outside the parabola

y = x2.By a "third-degree parabola" we mean an equation of the form

y =A + Bx ± Cx2 ± Dx2 Third-degree parabolic formulas always introduce some element

of error in cyclical material. See pages 49. 50.A 5-months moving total of a 7-months moving total of an 11-

months moving total of a 7-months moving total with the followingsimple set of weights - 1, 0, + 1, -{- 1, -.j- i, 0, - i. Result dividedby 385.

A 27-term formula which is easier to compute than Kenchington'sand which gives appreciably closer hts to sine curves of short peri-ods, with almost as close fits to sine curves of long periods, maybe applied as follows Take an u-months moving total of the datawith the following simple weights - j, 0, 0, + 1, + 1, -1-1, + 1,+ 1, 0, 0, i Take an 3-months roovmg total of a i o-monthsmoving total of the results. Divide by 240. Tile weight diagram isonly a little less smooth than Kenchington's. When applied to theparabola y = x2 the formula gives a curve falling % inside.

Page 15: Introduction to 'The Smoothing of Time Series' · TFIE SMOOThING OF TIME SERIES 23 tiOn whi'h is fourth in the list of the sc-yen used in obtaining the particular moving average value.1

FLIE SJOYUiJINt 01' '1'11E Si:RIEs

21 tcrin formula.' However, the Spcneer 2 1-termformula IS very poorly adapted to smoothing sucha series as Call Money Rates, where there is a largeseasonal fluctuation and where the short-time fluc-tuations are large when compared with the cyclicalfluctuations.

The advantages and disadvantages of tile 43-term formula emphasized iii this 1)00k arid of anumber of other methods of fitting are discussedin the text. Ior certain particular types of prob-1cm, the Whittaker-Henderson nietliod of gradua-tiOn, when jU(liCiOUsly used, is almost ideal. TheHenderson method of computing this smooth curveis one of the most elegant contributions which haveever been made to thc literature of tile subject.

See pages ç, 2, 53.

-I