2022-08-24

Forecast

  • Forecast is part of humanity since they beginning of our civilization

  • Sometimes being considered a sign of divine inspiration, and sometimes being seen as a criminal activity

  • Some forecasts were based on residuals of tea cups (like Harry Potter), distribution of maggots, etc

  • Some people still believe that they can forecast someone’s personality based on the day that they were born ( I am Leo)

  • Forecasting is obviously a difficult activity, and businesses that do it well have a big advantage

Forecast

  • We will focus on reliable methods for producing forecast, and not by looking at a crystal ball

-I don't practice Santeria, I ain't got no crystal ball. Well, I had a million dollars but I'd, I'd spend it all

What can we forecast?

  • daily electricity demand in 3 days time

  • time of sunrise this day next year

  • Google stock price tomorrow

  • Google stock price in 6 months time

  • maximum temperature tomorrow

  • exchange rate of $US/R$ next week

  • total sales of iphones in the US next month

Which is easiest to forecast?

  • daily electricity demand in 3 days time

  • time of sunrise this day next year

  • Google stock price tomorrow

  • Google stock price in 6 months time

  • maximum temperature tomorrow

  • exchange rate of $US/R$ next week

  • total sales of iphones in the US next month

Which is easiest to forecast?

  1. time of sunrise this day next year
  2. maximum temperature tomorrow
  3. daily electricity demand in 3 days time
  4. total sales of iphones in the US next month
  5. Google stock price tomorrow
  6. exchange rate of $US/R$ next week
  7. Google stock price in 6 months time

Which is easiest to forecast?

  • How can we define which variable is easy to forecast and which variable is hard to forecast?

  • The predictability of an event depend on several factors such as:

  1. how well we understand the factors that contribute to it;
  2. how much data is available;
  3. how similar the future is to the past;
  4. whether the forecasts can affect the thing we are trying to forecast.

Example: Short-term natural gas demand

  • Forecasting of short-term natural gas demand can be quite accurate
    • factors: temperatures, stock level, economic conditions
    • data: there is plenty of data of natural gas consumption by state, county, etc
    • For short-term forecasting (up to a few weeks), it is safe to assume that demand behavior will be similar to what has been seen in the past.
    • For most residential users, the price of natural gas is not dependent on demand, and so the demand forecasts have little or no effect on consumer behavior.

Example - exchange rate of $US/R$ next week

  • What conditions are satisfied to forecast exchange rates?

    • There is plenty of data!!
    • There are several factors that impact exchange rate, and we do not have a full picture of them
    • If there are well-publicized forecasts that the exchange rate will increase, then people will immediately adjust the price they are willing to pay and so the forecasts are self-fulfilling

Example - exchange rate of $US/R$ next week

  • Forecasting whether the exchange rate will rise or fall tomorrow is about as predictable as forecasting whether a tossed coin will come down as a head or a tail (50%)

  • Hence, forecasters need to be aware of their own limitations, and not claim more than is possible.

  • Good forecasts capture the genuine patterns and relationships which exist in the historical data, but do not replicate past events that will not occur again.

Forecasting, Goasl and Planning

  • Forecasting is useful to inform people/firms regarding decisions about production, transportation, planning, goals, etc.

  • Forecasting should be an integral part of the decision-making activities of management important role in many areas of a company.

  • We can implement forecasts in different time horizons (short, medium and long-term)

  • The appropriate forecasting methods depend largely on what data are available.

  • Qualitative forecasting - When there is no data available (these are not guesswork - chapter 6)

  • Quantitative forecasting:

    1. historical data is available
    2. Some aspects of the past will continue into the future
  • Most quantitative forecasting use either time series data (collected at regular intervals over time) or cross-sectional data (collected at a single point in time).

Time series (TS) forecasting

  • Anything that is observed sequentially over time is a time series.

  • We will only consider time series that are observed at regular intervals of time (e.g., hourly, daily, weekly, monthly, quarterly, annually).

  • When forecasting time series data, the aim is to estimate how the sequence of observations will continue into the future.

Time series (TS) forecasting

  • The simplest time series forecasting methods use only information on the variable to be forecast - no attempt to discover the factors that affect its behavior.

  • Extrapolate trend and seasonal patterns, but they ignore all other information

Predictor variables and TS forecasting

  • Predictor variables are often useful in time series forecasting - including factors that might impact the forecast of a variable.

  • Since there will always be a factor that cannot be accounted, we will end up with an error term that explains random variation and the effects of relevant variables that are not included in the model.

  • Those models are usually called dynamic regression models or panel data models.

  • An explanatory model is useful because it incorporates information about other variables than only historical values of the variable to be forecast.

Predictor variables and TS forecasting

  • However there are reasons to work with time series models instead:
  1. First, the relationship between variables might not be understood

  2. it is necessary to know or forecast the future values of the various predictors in order to be able to forecast the variable of interest, and this may be too difficult.

  3. the main concern may be only to predict what will happen, not to know why it happens.

  4. the time series model may give more accurate forecasts than an explanatory or mixed model.

Random futures

  • The thing we are trying to forecast is unknown, so we can think of it as a random variable.

  • For very short-term forecast, we might have a very good idea what is the next value ahead - More precise.

  • However, for longer future values, the uncertainty of the future value increases.

  • For forecasting, we can imagine many possible futures, each yielding a different value.

  • Next, we will forecast the number of visitor in Australia in the next 48 months.

Random futures

Random futures

  • A forecast is an estimate of the probabilities of possible futures - In this case we use an ETS model.

Random futures

Random futures

Random futures

Random futures

  • 1,000 simulation based on a ETS Model

Random futures

Random futures

  • To obtain a forecast, we are estimating the middle of the range of possible values the random variable could take (average/median) - point forecast.

  • Also, a forecast comes with a prediction interval - giving a range of values the random variable could take with relatively high probability.

  • For example, a 95% prediction interval contains a range of values which should include the actual future value with probability 95%.

Random futures

  • prediction interval - 95% and 80%(darker shade area)

Random futures

Random Futures

Statistical forecasting

  • Thing to be forecast: a random variable, \(y_t\).
  • Forecast distribution: If \({\cal I}\) is all observations, then \(y_{t} |{\cal I}\) means “the random variable \(y_{t}\) given what we know in \({\cal I}\).
  • The “point forecast” is the mean (or median) of \(y_{t} |{\cal I}\)
  • The “forecast variance” is \(\text{var}[y_{t} |{\cal I}]\)
  • A prediction interval or “interval forecast” is a range of values of \(y_t\) with high probability.
  • With time series, \({y}_{t|t-1} = y_t | \{y_1,y_2,\dots,y_{t-1}\}\).
  • \(\hat{y}_{T+h|T} =\text{E}[y_{T+h} | y_1,\dots,y_T]\) (an \(h\)-step forecast taking account of all observations up to time \(T\)).

Difference between CI and PI

The prediction interval predicts in what range a future individual observation will fall, while a confidence interval shows the likely range of values associated with some statistical parameter of the data, such as the population mean.

Difference between CI and PI

The basic steps in a forecasting task

  1. Problem definition - It requires an understanding of the way the forecasts will be used, who requires the forecasts, and how the forecasting function fits within the organisation requiring the forecasts

  2. Gathering information - statistical data, and the accumulated expertise of the people who collect the data and use the forecasts

  3. Preliminary (exploratory analysis) - Always start by graphing the data to observe patterns, trend, etc.

  4. Choosing and fitting models - The best model to use depends on the availability of historical data, the strength of relationships between the forecast variable and any explanatory variables, and the way in which the forecasts are to be used

  5. Using and evaluating a forecasting model - Once a model has been selected and its parameters estimated, the model is used to make forecasts.

Semester-long Assignment

  • Please give a point forecast and 80% prediction interval for the following variable:

        Tesla closing stock price on November 10th.
  • Prize: $50 Amazon gift card

Semester-long Assignment

Y = actual, F= point forecast, [L,U] = prediction interval

Point forecast: Absolute Error = |Y-F|

Prediction Interval: Interval Score = (U-L)+10(L-Y)+10(Y-U)

The student with the lowest sum of the absolute error and interval score will win !!!