Questions and Answers on Tme Series Modeling


Questions and Answers on Tme Series Modeling

Author
Message
root4unc
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: Forum Members
Posts: 1, Visits: 1

I've received my final transcript. So, my project was accepted! I used one of the periods of data and graphed the series (and first differences). I calculated the autocorrelations of the series (and first differences). I did Bartlett's test, calculated the Box and Pierce Q statistic, etc. I did a regression to determine the slope and intercept coefficients of an AR(1) model. I computed the residuals from the fitted and actual data. I did another regression for an AR(2) model. The residuals for this one were much higher. So, I concluded that an AR(1) model best fit the data.
Jacob: Is this the correct answer to the student project?

Rachel: There is no correct answer. You can do the student project a thousand ways. This candidate compared an AR(1) model and an AR(2) model using the statistical tests from the time series course. The purpose of the student project is to see if you can apply the concepts to an actual time series, not if you get the same conclusion as the authors of the textbook.

Jacob: Must we use the Durbin-Watson statistic, or is Bartlett’s test and the Box-Pierce Q statistic enough?

Rachel: The Durbin-Watson statistic is the best statistic for an AR model. It is covered in the regression analysis course, not the time series course, so it is not required.

Jacob: If the three tests indicate that the residuals are not white noise, must we find the correct ARIMA model?

Rachel: That depends on the test results and the objective of the student project. If the objective is to construct an ARIMA model and the test statistics are highly significant (not white noise), continue searching for a better model. If the test statistics suggest the residuals are close to white noise (but not completely white noise), or if you have already examined models of order 2 or less and you have examined seasonality and first and second differences, you are done. Not every time series can be perfectly modeled by an ARIMA process.

Jacob: This candidate says the residuals from the AR(2) model were much higher than those from the AR(1) model. Does that make sense?

Rachel: Some candidates assume an AR(2) model means a simple linear regression on the value lagged two periods back. This often gives higher residuals. The AR(2) model actually means a multiple regression on both one period and two period lags. This give lower residuals. Many candidates make this error. Initially, we are not rejecting student projects that have this error, since multiple regression is not taught in the time series course.

Jacob: Will the standards for the student project change over time?

Rachel: As we explain common errors and provide more illustrative Excel spreadsheets and explanations of the proper techniques, we will require more accurate student projects.


n2thornl
Junior Member
Junior Member (19 reputation)Junior Member (19 reputation)Junior Member (19 reputation)Junior Member (19 reputation)Junior Member (19 reputation)Junior Member (19 reputation)Junior Member (19 reputation)Junior Member (19 reputation)Junior Member (19 reputation)

Group: Forum Members
Posts: 20, Visits: 1

OK, so, I'm stupid. I don't understand how to calculate the sample autocorrelation function so that I can plot a correlogram. Realize, I've forgotten most of this subject matter... I've pored over my notes and my book, but I can't find where it explains this. I found a formula in chapter 16 for the sample autoc., but I don't know how to put it into Excel. I don't understand what the sums are actually of...

Can somebody please help me out? Hust pointing me to the textbook section, or NEAS post, that you used to understand it would save me.

By the way, something I did that is helping... I googled the rate I'm using (Moody's AAA) and am using my understanding of what it is in my explanation of my process.

Jacob: If I don’t know how to calculate a sample autocorrelation function, can I still do a student project?

Rachel: The sample autocorrelation function is the core of the time series course. The student project should show that you know how to calculate the sample autocorrelations, form a correlogram, and construct an ARIMA model.

Jacob: What is the sample autocorrelation function?

Rachel: Suppose the time series has N elements: {1, 2, 3, …, N}. The sample autocorrelation of lag k is the correlation of the elements {1, 2, 3, …, N-k} with the elements {k+1, k+2, …, N}.

Jacob: Do we compute the sample covariance and divide by the products of the sample standard deviations?

Rachel: Excel has a built-in correl function. Excel has built-in functions for many of the statistical techniques.

Jacob: How do we compute the sample autocorrelation for all lags?

Rachel: Excel has many ways of doing this: index and offset functions, relative and absolute references, and VBA macros. We show simple code to form a correlogram on an illustrative worksheet on the web site.


JoeyR
Junior Member
Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)Junior Member (11 reputation)

Group: Forum Members
Posts: 11, Visits: 1

I'm not sure that that is correct.  I would think that the core of the course is to understand how to conduct a time series analysis - the semantics of programming into Excel are not a requirement of understanding nor does it go far in helping you become a "better" actuary.  I think there is far more gained by grasping the concept of the autocorrelation function than testing whether or not you can program the function into Excel.  This is, after all, a statistics course, not a computer science course.

[NEAS: The SOA is clear: To receive VEE credit, candidates must show they can apply the statistical techniques to actual data with statistical software packages or functions. Book knowledge is not enough for VEE credit. Excel is the simplest statistical software; applying the methods in SAS, "R", or another package is more difficlut.]

Jacob: What if we don’t know Excel? What if we understand the statistics but we can’t do the coding?

Rachel: Almost all candidates can handle the coding for the basic statistical functions, such as correlations and graphs. Excel has built-in functions and chart wizards for these items.

Jacob: Why doesn’t NEAS give us the Excel code for these items?

Rachel: If we gave you the Excel code with instructions on how to use it, we would be writing most of the student project. The goal is for you to think through the concepts and use the basic Excel functions to complete the student project. We are now posting Excel code for the basic ARIMA computations, though we are careful that candidates can not use them as cookbooks methods to complete the student project.

Jacob: Don’t candidates proficient at Excel has an advantage?

Rachel: Candidate proficient at Excel have an advantage in all actuarial work, not just statistics. A candidate who is good at Excel can do all actuarial tasks faster. The Excel code is a minor part of the student project.

Jacob: Can we discuss the Excel coding on the discussion forum?

Rachel: Yes, we encourage you to discuss the Excel code. We don’t want to tell you a specific line to write, but you can surely discuss how to form correlations and charts in Excel. You may use index and offset statements to form the correlograms. If you are not proficient at Excel, it may take you half an hour longer to form the needed correlations and charts. It is fine to discuss how to use these functions. We show a simple correlogram using the offset statement and the chart wizard.


NewTubaBoy
Forum Member
Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)

Group: Forum Members
Posts: 25, Visits: 1

I disagree.  I'm not saying it's a computer science course, but what use is learning the material if you cannot apply it to your job?  Part of being a good actuary is being able to take the material you learned on exams/VEE etc and applying it to your job.  I think that if you completely understand WHAT the sample autocorrellation is that you should be able to program it in excel. 

I wasn't trying to imply that doing it in excel was the point of the course.  I was trying to imply that understanding autocorrelations is key to the time series course and that if you truly undestand it that you should be able to do it in Excel. 


Chesters Mom
Junior Member
Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)

Group: Forum Members
Posts: 14, Visits: 1

White Noise Testing--

I have a series that looks stationary after first-differenced. For the white noise tests, specifically, for Bartlett's test, do I apply it to the regression residuals' autocorrelations or the series' sample autocorrelations? And what if the three tests (DW, BP's Q, and Bartlett's) give conflicting information? Right now I have DW saying white noise and the other two saying not white noise.

Thanks.

Jacob: Does it make sense for the Durbin-Watson statistic to indicate white noise and the other two tests (Bartlett’s test and the Box-Pierce Q statistic) to indicate not white noise?

Rachel: These are statistical tests. They give confidence intervals, not absolute answers. The Box-Pierce Q statistic and Bartlett’s test are more strict; they are less likely to suggest that the residuals are white noise.


NewTubaBoy
Forum Member
Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)

Group: Forum Members
Posts: 25, Visits: 1

I'm confused.  Why do you have regression residuals?  I guess there are two times in this project where you would apply a white noise process.  First, looking at a stationary series is that stationary series white noise?  You would apply this directly to the sample autocorrelations of the series.  The second time you would use it would be after you fit the ARIMA model.  If the model is a "good fit" then the residuls between the actual and the modeled data should form a white noise process. 

As far as the three tests I'm not completely sure what to tell you.  Could you possibly be performing the DW test wrong or on the wrong residuals?  I think they mention in the book that you could have some that say white noise and some not which would make you use the third test... or something like that.  I guess it doesn't give you complete confidence that it isn't white noise, but you have a good idea since two of the three tests show it to be so. 

Jacob: Suppose we take first differences to convert a random walk to white noise. Can we use the Durbin-Watson statistic or the Box-Pierce Q statistic to test for white noise, or must we first fit an ARIMA model?

Rachel: Examine the residuals using the Durbin-Watson statistic or the Box-Pierce Q statistic. If you have not fit an ARIMA model, the residuals are the first differences minus the mean.

Jacob: Is the mean zero?

Rachel: If the random walk has a drift of zero, the mean of the first differences is zero. Otherwise, the mean of the first differences is the drift of the random walk.

Jacob: How do we form the Durbin-Watson statistic in Excel? Is there is built-in function?

Rachel: Excel has no built-in function for this, but the formula is simple; see below.

Jacob: The formula uses the residuals. How do we calculate the residuals? We can do this from the equations in the textbook, but it would take a while. Is there a simple method?

Rachel: The Excel regression add-in calculates the residuals. The add-in computes the ordinary least squares estimators and the residuals. You can copy the formula for the Durbin-Watson statistic from the illustrative spreadsheet on the NEAS web site.

Jacob: Can you give an example?

Rachel: We form an AR(1) model from the last 3½ years of Treasury bill interest rates: January 1997 through June 2000. The correlogram indicates that this time series is a random walk, which is not stationary. Your student project might use first differences, not the interest rates themselves. But we start with the interest rates and compute the Durbin-Watson statistic to see if any serial correlation is significant. We also compute the slope coefficient and use the t statistic to test if it is significantly different from one.

Jacob: How do we use the regression add-in?

Rachel: Copy the January 1997 through June 2000 Treasury bill rates to a new worksheet. Place these in cells B11:B52 and also in cells C12:C53. Column B is the Y values and Column C is the X values. We don’t use the values in B11 or C53.

On the illustrative worksheet, we eliminate rows 53 and 11, getting rid of the original cell B11 and cell C53. This gives a matrix of B11:C51 for the regression analysis.

If we use an AR(2) model, we also place these rates in cells D13 : D54. Column B is the Y values, Column C is the X1 values, and Column D is the X2 values. We don’t use the values in B11, B12, C12, C53, D53, or D54.

Jacob: What do we choose on the regression menu for the AR(1) model?

Rachel: The dependent variable is in cells B11:B51, after eliminating the original cell B11. The independent variable is in cells C11:C51. You can place the output on the same sheet or a new sheet. Ask for residuals. You don’t need the standardized residuals since the interest rates are all about the same value in this scenario. If interest rates change greatly over the time series, we would examine standardized residuals.

The residual output shows the observation number, the fitted Y value, and the residual. In a new worksheet, these are in Columns A, B, and C. We placed the output on the same worksheet starting in cell A61.

In column D, place the square of the residual. For cell D85, write =C85^2. Copy this formula to cells D86 : D125.

In column E, place the difference of successive residuals. For cell E86, write =D86-D85. Copy this formula to cells E87:E125.

In Column F, place the square of the difference of successive residuals. For cell F86, write =E86^2. Copy this formula to cells F87:F125.

Use Excel’s quick sum function to add the numbers in Columns D and F. Place the cursor in cell D126 and click on the quick sum icon. Do the same for cell F125. The Durbin-Watson statistic is the sum in cell F125 divided by the sum in cell D126. We place the Durbin-Watson statistic in cell G126.

Jacob: What do we expect to find?

Rachel: A Durbin-Watson statistic of 2 indicates no serial correlation. This example gives a Durbin-Watson statistic of 2.10, which is not significantly different from 2. The autocorrelation of lag 1 on the residuals is –0.06289 (cell C127), which is not significantly different from zero.

Other time periods show significant serial correlation. Your student project should explain the meaning of your results.


NewTubaBoy
Forum Member
Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)Forum Member (25 reputation)

Group: Forum Members
Posts: 25, Visits: 1

No, you can use Box-Pierce for the first differenced stationary series.  If you look at page 496 of the text it gives you the formula for the Box-Pierce statistic.  You know T and if you know the autocorrellations (of the first difference) then you can calculate it pretty easily I think.  There may be another format of this formula using residuals.  I did not use the Durbin Watson statistic for that part. 

Later in the project when I had residuals I used all three to test the series. 


Chesters Mom
Junior Member
Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)Junior Member (14 reputation)

Group: Forum Members
Posts: 14, Visits: 1

It all makes sense now.  The Box-Pierce test first appears in Chapter 16 in the context of just sample autocorrelation (of the series).  It then reappears in Chapter 18 in the context of residual's sample autocorrelations.  So, I am with you that during the first-round white noise test, we can use both Box-Pierce & Bartlett's tests; then once we start fitting, we can use all three tests to see if the fitted model is a good one.


n2thornl
Junior Member
Junior Member (19 reputation)Junior Member (19 reputation)Junior Member (19 reputation)Junior Member (19 reputation)Junior Member (19 reputation)Junior Member (19 reputation)Junior Member (19 reputation)Junior Member (19 reputation)Junior Member (19 reputation)

Group: Forum Members
Posts: 20, Visits: 1

It's kind of off topic, but why not...

I agree with BOTH JoeyR and Tuba.  In theory, we really do want to apply this VEE stuff to our jobs.  However, I personally don't need to know this stuff for my job.  I'm a retirement consultant.  I know most of what we do here in my dept, and nobody uses Time Series knowledge, not really.  Most of what I need to know to do my job is in the Interest Theory Exam, about half of Exam 3/whatever letter it is, and the Fellowship stuff.  The rest is just what I have to suffer through to get my raises.

I also think Tuba is just a real sharp guy, and remembers this material better than most of us.  That's not meant to belittle the rest of us, though.  Personally, I had to cram the material in over 10 days, spit it back out on the exam, and then get back to work.  I simply didn't have the luxury of spending the time I would need to really, honestly learn it. 


PayMeBack
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: Forum Members
Posts: 2, Visits: 1

Thanks TUBA, JR, Roots, etc. for your posts...I've gotten to the point of regressing the series (I assumed that this regression is done on the y(t)'s not the differenced values) and have come up with a slope and intercept for my AR(1).  The slope is close to 1 and the intercept close to 0 which leads me to believe the series is similar to a random walk. Roots, you mention looking at the AR(2), next. I'm confused in how to proceed using EXCEL for this step.  A little clarification....?  Thanks.


GO
Merge Selected
Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

  • Login with twitter
  • Login with twitter
Select a Forum....













































































































































































































































Neas-Seminars

Search