forecasting
Download
Skip this Video
Download Presentation
Forecasting

Loading in 2 Seconds...

play fullscreen
1 / 94

Forecasting - PowerPoint PPT Presentation


  • 127 Views
  • Uploaded on

Forecasting. JY Le Boudec. Contents. What is forecasting ? Linear Regression Avoiding Overfitting Differencing ARMA models Sparse ARMA models Case Studies. 1. What is forecasting ?. Assume you have been able to define the nature of the load

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Forecasting' - odina


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
forecasting

Forecasting

JY Le Boudec

1

contents
Contents
  • What is forecasting ?
  • Linear Regression
  • Avoiding Overfitting
  • Differencing
  • ARMA models
  • Sparse ARMA models
  • Case Studies

2

1 what is forecasting
1. What is forecasting ?
  • Assume you have been able to define the nature of the load
  • It remains to have an idea about its intensity
  • It is impossible to forecast without error
  • The good engineer should
    • Forecast what can be forecast
    • Give uncertainty intervals
  • The rest is outside our control

3

2 linear regression
2. Linear Regression
  • Simple, for simple cases
  • Based on extrapolating the explanatory variables

5

estimation and forecasting
Estimation and Forecasting
  • In practice we estimate  from y, …, yt
  • When computing the forecast, we pretend  is known, and thus make an estimation error
  • It is hoped that the estimation error is much less than the confidence interval for forecast
  • In the case of linear regression, the theorem gives the global error exactly
    • In general, we won’t have this luxury

9

we saw this already
We saw this already
  • A case where estimation error versus prediction uncertainty can be quantified
  • Prediction interval if model is known
  • Prediction interval accounting for estimation (t = 100 observed points)

11

3 the overfitting problem
3. The Overfitting Problem
  • The best model is not necessarily the one that fits best

12

prediction for the better model
Prediction for the better model
  • This is the overfitting problem

13

how to avoid overfitting
How to avoid overfitting
  • Method 1: use of test data
  • Method 2: information criterion

14

background on filters appendix b
Background On Filters (Appendix B)
  • We need to understand how to use discrete filters.
  • Example: write the Matlab command for

24

a simple filter
A simple filter
  • Q: compute X back from Y

26

how is this prediction done
How is this prediction done ?
  • This is all very intuitive

34

prediction intervals
Prediction Intervals
  • A prediction without prediction intervals is only a small part of the story
    • The financial crisis might have been avoided if investors had been aware of prediction intervals

37

compare the two
Compare the Two

Linear Regression with 3 parameters + variance

Assuming differenced data is iid

40

5 using arma models
5. Using ARMA Models
  • When the differenced data appears stationary but not iid

42

fitting an arma process
Fitting an ARMA Process
  • Called the Box-Jenkins method
  • Difference the data until stationary
  • Examine ACF to get a feeling of order (p,q)
  • Fit an ARMA model using maximum likelihood

51

fitting an arima model
Fitting an ARIMA Model

Apply Scientific Method

1. make stationary and normal (how ?)

2. bound orders p,q

3. fit an ARMA model to Yt - 

i.e. Yt -» ARMA

4. compute residuals and verify white noise and normal

Fitting an ARMA modelPb is :

given orders p,q

given (x1, …xn) (transformed data)

compute the parameters of an ARMA (p,q) model that maximizes the likelihood

Q:What are the parameters ?

A: the mean , the polynomial coefficients k and k , the noise variance 2

52

this is a non linear optimization problem
This is a non-linear optimization problem
  • Maximizing the likelihood is a non-linear optimization problems
  • Usually solved by iterative, heuristic algorithms, may converge to a local maximummay not converge
  • Some simple, non MLE, heuristics exist for AR or MA models
    • Ex: fit the AR model that has the same theoretical ACF as the sample ACF
  • Common practice is to bootstrap the optimization procedure by starting with a “best guess”
    • AR or MA fit, using heuristic above

53

forecasting with arma
Forecasting with ARMA
  • Assume Yt is fitted to an ARMA process
  • The prediction problem is: given Y1=y1,…,Yt=yt find the conditional distribution of Yt+h
  • We know it is normal, with a mean that depends on (y1,…,yt) and a variance that depends only on the fitted parameters of the ARMA process
  • There are many ways to compute this; it is readily done by Matlab

59

forecasting formulae for arima
Forecasting Formulae for ARIMA
  • Y = original data
  • X = differenced data, fitted to an ARMA model
    • Obtain point prediction for X usingwhatwejustsaw
    • Apply Proposition 6.4.1 to obtain point prediction for Y
    • Apply formula for predictioninterval
  • There are severalothermethods, but theymay have numericalproblems. Seecomments in the lecture notes afterprop 6.5.2

62

improve confidence interval if residuals are not gaussian but appear to be iid
Improve Confidence Interval If Residuals are not Gaussian (but appear to be iid)
  • Assume residuals are not gaussian but are iid
  • How can we get confidence intervals ?
  • Bootstrap by sampling from residuals

64

slide66

Withbootstrapfromresiduals

  • With gaussian assumption

66

6 sparse arma models
6. Sparse ARMA Models
  • Problem: avoid many parameters when the degree of the A and C polynomials is high, as in the previous example
  • Based on heuristics
    • Multiplicative ARIMA, constrained ARIMA
    • Holt Winters

67

slide78

Sparse models give less accurate predictions but have much fewer parameters and are simple to fit.

Constrained ARIMA

(corrected or not)

78

slide92

log

h = 1

92

conclusion
Conclusion
  • Forecasting is useful when savings matter; for example
    • Save money on server space rental
    • Save energy
  • Capturing determinism is perhaps most important and easiest
  • Prediction intervals are useful to avoid gross mistakes
  • Re-scaling the data may help
  • … à vous de jouer.

93

slide94

Joyeuses

Pâques !

94

ad