IntroductionForecasting is part of planning for any business. To plan ahead, a company has to estimate what it will need and what actions to take. Sales forecasts inform targets, material purchasing budgets, inventory limits, safety stock, staffing, working capital and much more. Since no one can know exactly what will happen, we need a method for making those estimates.Two terms are worth distinguishing. Forecasting, as used here, projects past patterns into the future: it looks at historical data and extends the pattern. Prediction anticipates changes and new factors that will affect demand, such as a competitor opening nearby or a change in the law.Forecast horizonHow far ahead a forecast looks depends on the planning horizon:Long term (one year or more): launching a new product line or determining the capacity of new facilities.Medium term (months): planning staffing levels, inventory needs and raw material purchases.Short term (weeks): setting machine capacity, assessing cash needs, adjusting inventory and scheduling work hours.The higher a decision sits in the organization, the longer its planning horizon. Senior management focuses on long-term strategy, such as new products and facilities; operations managers handle shorter-term needs, such as fulfilling orders over the coming weeks.What all forecasts have in commonNo forecast is perfect.The longer the horizon, the less accurate the estimate.Forecasting demand for a product family is more accurate than forecasting each product separately, because individual errors partly cancel out.Every forecasting system needs a way to address deviations: set a threshold for the gap between forecast and actual demand, beyond which the model must be reviewed. We will look at how to measure that error at the end of the lesson.The components of demandA sales history usually combines four elements:Level: the average value around which demand fluctuates.Trend: the upward or downward movement over time.Seasonality: fluctuations that recur in a cycle, usually within a year (ice cream in summer, school supplies in January and February, chocolate at Easter).Random variation: the unexplained remainder, which makes every forecast imperfect.The methods in this lesson are well suited to estimating the level. Trends call for methods covered in the next lesson, while seasonality can be handled with an index.Seasonal indexA simple way to measure seasonality is as a percentage: a month with above-average sales has an index greater than 100%; a month with below-average sales has an index below 100%.Monthly seasonal index = demand for the month ÷ average monthly demandIf several years of data are available, use the average for that month across those years as the numerator. Here is an example of monthly indexes:Month123456789101112Index90%100%102%110%98%95%105%100%90%90%120%100%The twelve indexes average 100%, as they should: above-average months offset below-average ones. To forecast a particular month, multiply its index by the forecast average monthly demand (forecast annual demand ÷ 12). If the company expects to sell 24,000 units next year (an average of 2,000 per month), the forecast for November is 1.20 × 2,000 = 2,400 units.Demand in January was 270 units in a year when the company sold 5,400 units in total. If it expects to sell 6,000 units next year, what is the forecast for January?Answer: 300 units — average monthly demand was 5,400 ÷ 12 = 450, so January's index is 270 ÷ 450 = 0.6. The forecast monthly average is 6,000 ÷ 12 = 500, and 0.6 × 500 = 300. Multiplying the index by annual demand (0.6 × 6,000 = 3,600) overlooks the need to divide by 12; 500 is the monthly average without the seasonal adjustment.Forecasting modelsForecasting models fall into two broad groups.Qualitative methods rely mainly on experts' experience and judgment. They are used when little data is available or the situation is new, as with the launch of a product or technology. Examples include:combining sales estimates from the sales team;the Delphi method: experts answer a series of questions anonymously, receive a summary of the group's responses and revise their answers over successive rounds until their views converge;customer surveys or market research;drawing an analogy with a similar product already launched.Quantitative methods use historical data, on the assumption that the past offers useful information about the future, within limits. The main approaches are the naive method (future demand equals the most recent demand), time-series methods (moving averages, exponential smoothing and trend projection), and causal models such as linear regression. This lesson covers the first two; weighted moving averages, exponential smoothing and least squares are reserved for the next lesson, on demand forecasting II.Last-period methodThis is the simplest method, also called the naive method: the forecast for the next period equals actual demand in the most recent period.Forecast for month t+1 = actual demand in month tIf 4,900 units were sold in July, the forecast for August is 4,900. It may seem simplistic, but it responds immediately to change, making it a useful benchmark: a more sophisticated method that performs worse than the last-period method is not helping. Its drawback is that it also carries forward random variation: an unusual month becomes the forecast for the next one.Simple moving average“Moving” means that the window of data used in the calculation advances over time: each new period adds the latest observation and drops the oldest. The forecast is the average of the last n periods:Forecast for period t+1 = (D(t) + D(t−1) + … + D(t−n+1)) ÷ nwhere D is actual demand in each period and n is the number of periods in the average.Averaging smooths out random variation: an unusual month accounts for only 1/n of the forecast. The technique assumes that any slight upward or downward trend is small relative to random fluctuations.Example. Using the consumption figures below, what is the forecast for month 13 with a 12-month moving average?Month123456789101112Consumption99100102989996102101104969998D13 = (99 + 100 + … + 99 + 98) ÷ 12 = 1,194 ÷ 12 = 99.50There is no need to add everything up again to update the average: subtract the observation leaving the window and add the new one.New average = previous average + (new observation − observation dropped) ÷ nIf actual consumption in month 13 is 100, the forecast for month 14 drops month 1 (99) and includes month 13 (100): D14 = 99.50 + (100 − 99) ÷ 12 = 99.58.How should you choose n?A large n produces a stable forecast that is less sensitive to random fluctuations, but it is slow to reflect a real change. A small n responds quickly but is more easily swayed by unusual months. When demand is trending, a moving average always lags behind: it underestimates rising demand and overestimates falling demand. The chart illustrates this using demand at a processed-meat factory.Actual demand and forecasts using 3- and 5-month moving averages: with demand trending upward, both forecasts fall below actual demand, and the 5-month average lags further behindFor data with a clear trend, use the methods in the next lesson, which correct for this lag.A factory sold 105, 106, 110, 110, 114, 121, 130, 128 and 137 units in months 1 through 9. What are the forecasts for month 10 using a 3-month moving average and a 5-month moving average, respectively?Answer: 131.7 and 126.0 — the 3-month average uses 130, 128 and 137 (395 ÷ 3 = 131.7); the 5-month average uses 114, 121, 130, 128 and 137 (630 ÷ 5 = 126.0). Because demand is rising, the longer average falls further behind the current level.Measuring forecast errorA forecast is useful only if you track how far off it is. The error for each period is the difference between actual and forecast demand:Error = actual demand − forecastPositive errors (forecasts below actual demand) and negative errors cancel out when simply added together. To measure the size of the errors, use mean absolute deviation (MAD): the average of the errors with their signs removed.MAD = sum of |errors| ÷ number of periodsExample. A factory sold 4,100, 3,800, 3,800, 4,000, 4,100, 4,200 and 4,900 units from January through July. Compare the last-period method with a 3-month moving average for the months when both methods produce forecasts (April through July):MonthActualLast periodError3-month moving averageErrorApr4,0003,8002003,900.0100.0May4,1004,0001003,866.7233.3Jun4,2004,1001003,966.7233.3Jul4,9004,2007004,100.0800.0MAD275.0341.7In this rising series, the naive method made smaller errors than the moving average because the average lagged behind the trend. The lesson: no method is best in every case. The best one is the one that makes the smallest errors on your data, and MAD gives you a way to compare them. If you use Python, you can calculate the moving average in pandas in one line: vendas.rolling(3).mean().shift(1) (the shift(1) ensures that a month's forecast uses only earlier months).The size of the error also matters for inventory: the greater the forecast error, the more safety stock is needed, as we will see in the lesson on lead time and safety stock.Two methods were tested over the same 4 months. Method A had errors of +50, −50, +50 and −50; method B had errors of +10, +20, +30 and +40. Which conclusion is correct?Answer: Method B is better, with a MAD of 25 versus 50 for A, although it tends to underestimate actual demand — A's MAD = 200 ÷ 4 = 50; B's MAD = 100 ÷ 4 = 25. Method A's zero sum is the trap: errors with opposite signs cancel out, which is why absolute values are used. B's consistently positive errors reveal a bias worth correcting.References[1] GONÇALVES, Paulo Sérgio. Administração de materiais. Rio de Janeiro: Elsevier. Chapter on demand forecasting.[2] CORRÊA, H. L.; GIANESI, I. G. N.; CAON, M. Planejamento, programação e controle da produção: MRP II/ERP. São Paulo: Atlas.ExercisesEasy1) Demand for a product was 620 units three months ago, 570 two months ago and 545 last month.a) What is the forecast for this month using a 3-month simple moving average?b) If actual demand this month is 560 units, what is the forecast for next month?2) Demand for product X in the first quarter of last year was 1,260 units, and total demand for the year was 4,200 units. What was the seasonal index for the first quarter?3) Your distributor calls on the first day of each month to find out how much to deliver. Sales in June, July and August were 260, 290 and 310 units. Using a 3-month moving average, what is the forecast for September? And for October, using the September forecast in place of the actual figure?4) A store sold 320, 350 and 380 units in January, February and March. What is the forecast for April using the last-period method and using a 3-month moving average? Which of the two is closer to the recent behavior of sales?5) Over four months, actual demand was 100, 110, 90 and 105 units, and the forecast had been 95, 100, 100 and 100. Calculate the error for each month and the mean absolute deviation (MAD).6) Name the component of demand (level, trend, seasonality or random variation) that explains each situation:a) panettone sales triple every year in November and December;b) subscriptions to an app have grown about 3% a month for two years;c) on one Saturday, a store's umbrella sales doubled because of unforecast rain;d) a bakery sells, on average, about 800 loaves a day.Hard7) (Logistics exam, CEFET/RJ, 2018) From January through July, a parts manufacturer sold 4,100, 3,800, 3,800, 4,000, 4,100, 4,200 and 4,900 units of product AM. Find the forecast for August:a) using the last-period method;b) using a moving average with n = 3.c) Using the August forecast from item b as if it were the August figure, what is the forecast for September, with n = 3?8) A processed-meat company uses a moving average to forecast demand for the following month. Demand in months 1 through 9 was: 105, 106, 110, 110, 114, 121, 130, 128 and 137.a) Calculate the forecast for month 10 with a 5-month moving average.b) And with a 3-month moving average.c) Which of the two would you use, and why?9) (Logistics exam, CEFET/RJ, 2018) In 2017, January demand for a product was 100 units. Annual demand was 1,200 units in 2015, 1,100 in 2016 and 1,000 in 2017. Using the three-year moving average to forecast annual demand for 2018 and the seasonal index for January 2017, what is the forecast for January 2018?10) A company recorded demand by quarter over two years:QuarterYear 1Year 21200240230033032502704450560a) Calculate the seasonal index for each quarter, using the quarter's average over the two years in the numerator.b) The company expects to sell 1,600 units in year 3. What is the forecast for each quarter?11) Weekly demand for a product over the last 7 weeks was: 50, 54, 51, 55, 53, 57 and 54.a) For weeks 3 through 7, calculate the forecasts using the last-period method and a 2-week moving average.b) Calculate the MAD of each method over those five weeks.c) Which method would you use, and what is its forecast for week 8?Answer key1) a) (620 + 570 + 545) ÷ 3 = 1,735 ÷ 3 = 578.3.b) The oldest figure (620) drops out and the new one (560) comes in: (570 + 545 + 560) ÷ 3 = 1,675 ÷ 3 = 558.3. Using the updating formula: 578.3 + (560 − 620) ÷ 3 = 578.3 − 20 = 558.3.2) 1.2 (or 120%). Average demand per quarter was 4,200 ÷ 4 = 1,050, and 1,260 ÷ 1,050 = 1.2: the first quarter sells 20% above average. Dividing 1,260 by 4,200 gives 0.3, which is the quarter's share of the year, not the index.3) September: (260 + 290 + 310) ÷ 3 = 860 ÷ 3 = 286.7, or about 287 units. October: June drops out and the September forecast comes in: (290 + 310 + 286.7) ÷ 3 = 886.7 ÷ 3 = 295.6, or about 296 units.4) Last period: 380 (March sales). 3-month moving average: (320 + 350 + 380) ÷ 3 = 1,050 ÷ 3 = 350. Sales are rising by 30 a month; the last period (380) is closer to that behavior, while the average (350) lags behind, equal to February's sales.5) Error = actual − forecast: 100 − 95 = +5; 110 − 100 = +10; 90 − 100 = −10; 105 − 100 = +5. MAD = (5 + 10 + 10 + 5) ÷ 4 = 30 ÷ 4 = 7.5 units.6) a) Seasonality: it recurs every year at the same time.b) Trend: consistent growth over time.c) Random variation: an event with no pattern that does not recur predictably.d) Level: the average value around which demand fluctuates.7) a) 4,900, July's sales.b) (4,100 + 4,200 + 4,900) ÷ 3 = 13,200 ÷ 3 = 4,400.c) (4,200 + 4,900 + 4,400) ÷ 3 = 13,500 ÷ 3 = 4,500. The forecast stands in for the actual figure because August has not happened yet; once the actual August figure is available, redo the calculation with it.8) a) Months 5 through 9: (114 + 121 + 130 + 128 + 137) ÷ 5 = 630 ÷ 5 = 126.0.b) Months 7 through 9: (130 + 128 + 137) ÷ 3 = 395 ÷ 3 = 131.7.c) The 3-month one, because the series has a clear upward trend and the shorter average lags less. Better still would be a method that handles the trend, such as those in the next lesson.9) 110 units.Forecast annual demand for 2018: (1,200 + 1,100 + 1,000) ÷ 3 = 1,100, or 1,100 ÷ 12 = 91.67 per month.January index in 2017: 2017 monthly average = 1,000 ÷ 12 = 83.33; index = 100 ÷ 83.33 = 1.2.Forecast: 1.2 × 91.67 = 110.Notice that annual demand has been falling by 100 a year, and the moving average forecasts 1,100 for 2018, above the 1,000 of 2017: that is the average lagging behind the trend.10) a) Average of each quarter over the two years: Q1 = (200 + 240) ÷ 2 = 220; Q2 = (300 + 330) ÷ 2 = 315; Q3 = (250 + 270) ÷ 2 = 260; Q4 = (450 + 560) ÷ 2 = 505. Overall quarterly average: (1,200 + 1,400) ÷ 8 = 2,600 ÷ 8 = 325. Indices: Q1 = 220 ÷ 325 ≈ 0.68; Q2 = 315 ÷ 325 ≈ 0.97; Q3 = 260 ÷ 325 = 0.80; Q4 = 505 ÷ 325 ≈ 1.55. The average of the four indices is 1, as it should be.b) Forecast quarterly average: 1,600 ÷ 4 = 400. Q1 = 0.677 × 400 ≈ 271; Q2 = 0.969 × 400 ≈ 388; Q3 = 0.80 × 400 = 320; Q4 = 1.554 × 400 ≈ 622. (The sum is 1,601 because of rounding; without rounding, it is exactly 1,600.)11) a) and b)WeekActualLast periodError2-week moving averageError35154−3(50 + 54) ÷ 2 = 52.0−1.045551+4(54 + 51) ÷ 2 = 52.5+2.555355−2(51 + 55) ÷ 2 = 53.00.065753+4(55 + 53) ÷ 2 = 54.0+3.075457−3(53 + 57) ÷ 2 = 55.0−1.0MAD16 ÷ 5 = 3.27.5 ÷ 5 = 1.5c) The 2-week moving average, whose error was less than half that of the last period (MAD 1.5 versus 3.2). The series goes up and down from one week to the next, and the last period copies each fluctuation; the average smooths it out. Forecast for week 8: (57 + 54) ÷ 2 = 55.5.
Emoji-reacties
0
0 Reacties
Be the first to comment
Nothing here yet.