<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>OpenForecast</title>
	<atom:link href="https://openforecast.org/feed/" rel="self" type="application/rss+xml" />
	<link>https://openforecast.org/</link>
	<description>How to look into the future</description>
	<lastBuildDate>Tue, 18 Aug 2026 13:40:20 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>

<image>
	<url>https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/07/cropped-of-logo-short-1-32x32.png&amp;nocache=1</url>
	<title>OpenForecast</title>
	<link>https://openforecast.org/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Five things that determine your safety stock</title>
		<link>https://openforecast.org/2026/08/18/five-things-that-determine-your-safety-stock/</link>
					<comments>https://openforecast.org/2026/08/18/five-things-that-determine-your-safety-stock/#respond</comments>
		
		<dc:creator><![CDATA[Ivan Svetunkov]]></dc:creator>
		<pubDate>Tue, 18 Aug 2026 13:40:20 +0000</pubDate>
				<category><![CDATA[Inventory Management]]></category>
		<category><![CDATA[inventory]]></category>
		<category><![CDATA[safety stock]]></category>
		<category><![CDATA[service level]]></category>
		<category><![CDATA[theory]]></category>
		<guid isPermaLink="false">https://openforecast.org/?p=4573</guid>

					<description><![CDATA[<p>One of the most common questions we get from companies is &#8220;How much safety stock should we hold?&#8221; Companies usually want simple solutions, but the honest answer is that there is no universal number and no universal formula &#8211; depending on what you sell, how often you sell, how your operations are setup etc, you ... <a title="Five things that determine your safety stock" class="read-more" href="https://openforecast.org/2026/08/18/five-things-that-determine-your-safety-stock/" aria-label="Read more about Five things that determine your safety stock">Read more</a></p>
<p>Message <a href="https://openforecast.org/2026/08/18/five-things-that-determine-your-safety-stock/">Five things that determine your safety stock</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>One of the most common questions we get from companies is &#8220;How much safety stock should we hold?&#8221; Companies usually want simple solutions, but the honest answer is that there is no universal number and no universal formula &#8211; depending on what you sell, how often you sell, how your operations are setup etc, you will get a different optimal solution. But that does not mean that the answer to this question does not have a structure. Whatever your product and industry is, the answer is always shaped by the same five elements:</p>
<ol>
<li>the forecast,</li>
<li>the variability of sales,</li>
<li>the target service level,</li>
<li>the lead time,</li>
<li> and the assumed demand distribution.</li>
</ol>
<p>Get any of them wrong, and you either overstock or end up with stockouts.</p>
<p>I have written up <a href="/resources/what-is-a-good-amount-of-safety-stock/">a longer answer to this question</a>, explaining how these five elements impact the safety stock formula, and provided a short example of an abstract calculation for an FMCG product.</p>
<p>Message <a href="https://openforecast.org/2026/08/18/five-things-that-determine-your-safety-stock/">Five things that determine your safety stock</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://openforecast.org/2026/08/18/five-things-that-determine-your-safety-stock/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Website redesign</title>
		<link>https://openforecast.org/2026/08/17/website-redesign/</link>
					<comments>https://openforecast.org/2026/08/17/website-redesign/#respond</comments>
		
		<dc:creator><![CDATA[Ivan Svetunkov]]></dc:creator>
		<pubDate>Mon, 17 Aug 2026 11:43:34 +0000</pubDate>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[stories]]></category>
		<guid isPermaLink="false">https://openforecast.org/?p=4552</guid>

					<description><![CDATA[<p>Good news, everyone! I&#8217;ve turned my website into a company. But first, some history that explains why&#8230; Back in 1990, Robert Fildes joined Lancaster University and established the Centre for Marketing Analytics and Forecasting (called &#8220;Lancaster Centre for Forecasting&#8221; back then). The main idea of the centre was to bridge the gap between academia and ... <a title="Website redesign" class="read-more" href="https://openforecast.org/2026/08/17/website-redesign/" aria-label="Read more about Website redesign">Read more</a></p>
<p>Message <a href="https://openforecast.org/2026/08/17/website-redesign/">Website redesign</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Good news, everyone! I&#8217;ve turned my website into a company. But first, some history that explains why&#8230;</p>
<p>Back in 1990, Robert Fildes joined Lancaster University and established the Centre for Marketing Analytics and Forecasting (called &#8220;Lancaster Centre for Forecasting&#8221; back then). The main idea of the centre was to bridge the gap between academia and practice in demand forecasting. The academic world rarely listens to the things that bother business, thinking that those problems are boring, while business usually finds &#8220;hacks&#8221; to the problems rather than proper solutions. Robert wanted to listen to what business has to say and to use rigorous scientific methods in solving the problems. And while this has been a challenging road, I think it was wildly successful. As Robert says himself, for many years it was a journey of a man and a dog (and we all know who that man was). But after a decade of work, the centre started growing and attracting such smart people as Sven Crone, Kostas Nikolopoulos, Juan Ramon Trapero, Fotios Petropoulos, Devon Barrow, Nikos Kourentzes, John Boylan and many others. If you pick a random person working in forecasting in academia, chances are they have some connection with the CMAF and Robert Fildes.</p>
<p>The centre has evolved, it has grown, and after some time, for some of us it was time to move on. Nikos left Lancaster University back in 2019, I left it in August 2026. Over the last couple of years, the CMAF has changed, and we feel that Robert&#8217;s legacy should continue, OpenForecast being one of the potential ways forward. And I&#8217;m glad to say that Robert has agreed to join OpenForecast as an advisor.</p>
<p>So, I have started building the OpenForecast company, following the same principles that Robert built CMAF on. I have updated my website, which has worked as my personal blog for the last 10 years or so, to explain what the company does and how we can help. This is now the website of a company offering demand forecasting and inventory consultancy, and practitioner training. The books (e.g. ADAM and the Statistics lecture notes) are still there, all the resources are still there, and the packages that I have developed together with my colleagues are still open source and will stay that way. And most importantly, the blog is still there — <a href="/blog/">it just lives in a different place now</a>.</p>
<p>What&#8217;s changed is that the whole website now has a company around it. So, if your company keeps running out of stock, faces over-ordering, or relies on a system nobody understands, get in touch. And stay tuned — I plan to write more posts on the topic.</p>
<p>Message <a href="https://openforecast.org/2026/08/17/website-redesign/">Website redesign</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://openforecast.org/2026/08/17/website-redesign/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>ISF2026: PTS Taxonomy of Multiple Source of Error State Space Models for Demand Forecasting</title>
		<link>https://openforecast.org/2026/07/06/isf2026-pts-taxonomy-of-multiple-source-of-error-state-space-models-for-demand-forecasting/</link>
					<comments>https://openforecast.org/2026/07/06/isf2026-pts-taxonomy-of-multiple-source-of-error-state-space-models-for-demand-forecasting/#respond</comments>
		
		<dc:creator><![CDATA[Ivan Svetunkov]]></dc:creator>
		<pubDate>Mon, 06 Jul 2026 11:15:48 +0000</pubDate>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[MUSE]]></category>
		<category><![CDATA[presentations]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[R]]></category>
		<guid isPermaLink="false">https://openforecast.org/?p=4164</guid>

					<description><![CDATA[<p>This time, at ISF2026, I presented the paper that I have worked on together with Juan Ramon Trapero and Diego Pedregal. The idea of the paper is to introduce a taxonomy of the models in the Multiple Sources of Error (MSOE) framework. In the Single Source of Errors one, there is ETS, in the MSOE, ... <a title="ISF2026: PTS Taxonomy of Multiple Source of Error State Space Models for Demand Forecasting" class="read-more" href="https://openforecast.org/2026/07/06/isf2026-pts-taxonomy-of-multiple-source-of-error-state-space-models-for-demand-forecasting/" aria-label="Read more about ISF2026: PTS Taxonomy of Multiple Source of Error State Space Models for Demand Forecasting">Read more</a></p>
<p>Message <a href="https://openforecast.org/2026/07/06/isf2026-pts-taxonomy-of-multiple-source-of-error-state-space-models-for-demand-forecasting/">ISF2026: PTS Taxonomy of Multiple Source of Error State Space Models for Demand Forecasting</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>This time, at ISF2026, I presented the paper that I have worked on together with Juan Ramon Trapero and Diego Pedregal. The idea of the paper is to introduce a taxonomy of the models in the Multiple Sources of Error (MSOE) framework. In the Single Source of Errors one, there is ETS, in the MSOE, there is nothing. So, we have united the existing research in one taxonomy of &#8220;Power transform, Trend, and Seasonal&#8221; model &#8211; analogue of ETS, but in the MSOE world. We are now finalising the paper about this, hoping to submit to a peer reviewed journal soon.</p>
<p><strong>Abstract</strong>: State space models for time series forecasting have been dominated by the single source of error (SSOE) framework, most notably the ETS family of models. The idea of SSOE is to use the same error across all equations in the model. Multiple source of error (MSOE) models, by contrast, assign independent stochastic disturbances to each component &#8211; level, trend, and seasonality &#8211; offering a richer and more flexible representation of uncertainty, yet they lack a systematic, unifying taxonomy. This paper introduces the PTS taxonomy, a structured classification of MSOE state space models tailored to the specific properties of the MSOE setting. The taxonomy organises models along three dimensions: P (Power transform, based on the Box-Cox transformation), T (Trend, with options for none, local, global, or damped), and S (Seasonality, with options for none, discrete, or trigonometric), yielding up to 24 well-defined model variants. All models are cast within a general state space system and estimated via the Kalman filter using maximum likelihood, with model selection performed through standard information criteria. The framework also incorporates a robust outlier detection procedure covering additive outliers, level shifts, and slope changes, as well as natural handling of missing observations through the Kalman smoother. We illustrate the practical utility of the taxonomy through empirical experiments on the real life dataset, demonstrating that the PTS family is both theoretically coherent and empirically competitive with established alternatives.</p>
<p><a href="https://openforecast.org/wp-content/uploads/2026/07/2026-ISF-Svetunkov-PTS.pdf">Slides are here</a>.<br />
Package that implements PTS: <a href="https://github.com/config-i1/muse">muse</a></p>
<p>Message <a href="https://openforecast.org/2026/07/06/isf2026-pts-taxonomy-of-multiple-source-of-error-state-space-models-for-demand-forecasting/">ISF2026: PTS Taxonomy of Multiple Source of Error State Space Models for Demand Forecasting</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://openforecast.org/2026/07/06/isf2026-pts-taxonomy-of-multiple-source-of-error-state-space-models-for-demand-forecasting/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>stick function for the EDA in time series</title>
		<link>https://openforecast.org/2026/06/26/stick-function-for-the-eda-in-time-series/</link>
					<comments>https://openforecast.org/2026/06/26/stick-function-for-the-eda-in-time-series/#respond</comments>
		
		<dc:creator><![CDATA[Ivan Svetunkov]]></dc:creator>
		<pubDate>Fri, 26 Jun 2026 11:24:43 +0000</pubDate>
				<category><![CDATA[Applied forecasting]]></category>
		<category><![CDATA[greybox in Python]]></category>
		<category><![CDATA[Package greybox for R]]></category>
		<category><![CDATA[Social media]]></category>
		<category><![CDATA[EDA]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[R]]></category>
		<category><![CDATA[time series]]></category>
		<guid isPermaLink="false">https://openforecast.org/?p=4157</guid>

					<description><![CDATA[<p>You have probably seen my post about the STI classification of Hans Levenbach (this one). Well, I&#8217;ve decided to implement it, and it has landed in the greybox package for R/Python. What&#8217;s greybox? It is a package for statistical modelling focusing on forecasting and time series analysis. I created it back in 2018 to split ... <a title="stick function for the EDA in time series" class="read-more" href="https://openforecast.org/2026/06/26/stick-function-for-the-eda-in-time-series/" aria-label="Read more about stick function for the EDA in time series">Read more</a></p>
<p>Message <a href="https://openforecast.org/2026/06/26/stick-function-for-the-eda-in-time-series/">stick function for the EDA in time series</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>You have probably seen my post about the STI classification of Hans Levenbach (<a href="/2026/05/18/hans-levenbach-s-classification-scheme-for-trend-seasonal-components/">this one</a>). Well, I&#8217;ve decided to implement it, and it has landed in the greybox package for R/Python.</p>
<p>What&#8217;s greybox? It is a package for statistical modelling focusing on forecasting and time series analysis. I created it back in 2018 to split the static models (such as linear regression) from the dynamic ones that landed in the smooth package. Greybox has evolved since then, and now has linear regression (alm), regression selection (stepwise) and combinations (calm), a variety of tools for feature generation, diagnostics, forecast evaluation (e.g. rolling origin) etc. You can <a href="https://github.com/config-i1/greybox/wiki">read more about it here</a>. Originally, the package was available for R only, but Claude and I ported its main functions to Python back in February.</p>
<p>The Exploratory Data Analysis techniques for time series fit the package quite well, although I don&#8217;t have many of those yet. So, I&#8217;ve implemented the main idea of the STI of Hans Levenbach in a function called &#8220;stick&#8221; (Seasonal, Trend, Irregular Contribution Kit) in the greybox package for R/Python. The idea is straightforward: apply stick to a time series, it will use ANOVA, and give you the strength of each component. Here, for example, is how to apply the function to the AirPassengers data (everyone&#8217;s favourite toy time series) in R:</p>
<pre class="decode">library(greybox)
stick(AirPassengers)</pre>
<p>and in Python:</p>
<pre class="decode">from fcompdata import AirPassengers
from greybox import stick

result = stick(AirPassengers.y, lags=12)
print(result)</pre>
<p>which gives exactly the same result:</p>
<pre>Strength of the components:
seasonal12      trend  irregular
    0.1061     0.8613     0.0326</pre>
<p>So, trend dominates the time series, explaining 86.13% of its variability, meaning that if you capture it correctly, you solve a big chunk of the problem. This split also gives you a rough idea about the structure-versus-noise breakdown in the time series, although it assumes that the seasonal component does not evolve over time.</p>
<p>The function supports several seasonal components, and I might extend it to include external information (e.g. promotions) in the future if there is demand for it.</p>
<p>Message <a href="https://openforecast.org/2026/06/26/stick-function-for-the-eda-in-time-series/">stick function for the EDA in time series</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://openforecast.org/2026/06/26/stick-function-for-the-eda-in-time-series/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>smooth in python: Non-normal distributions in ETS/ARIMA</title>
		<link>https://openforecast.org/2026/05/27/smooth-in-python-non-normal-distributions-in-ets-arima/</link>
					<comments>https://openforecast.org/2026/05/27/smooth-in-python-non-normal-distributions-in-ets-arima/#respond</comments>
		
		<dc:creator><![CDATA[Ivan Svetunkov]]></dc:creator>
		<pubDate>Wed, 27 May 2026 14:17:46 +0000</pubDate>
				<category><![CDATA[ETS]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[smooth for Python]]></category>
		<category><![CDATA[Social media]]></category>
		<category><![CDATA[ADAM]]></category>
		<category><![CDATA[extrapolation methods]]></category>
		<category><![CDATA[smooth]]></category>
		<guid isPermaLink="false">https://openforecast.org/?p=4152</guid>

					<description><![CDATA[<p>So, you know quite well that the normal distribution is one of the most popular distributions in statistics. The reasons are manifold, including convenience for the academic community and the fact that it is taught in every single statistics course in the world. But what if we don&#8217;t want to be normal? There are situations ... <a title="smooth in python: Non-normal distributions in ETS/ARIMA" class="read-more" href="https://openforecast.org/2026/05/27/smooth-in-python-non-normal-distributions-in-ets-arima/" aria-label="Read more about smooth in python: Non-normal distributions in ETS/ARIMA">Read more</a></p>
<p>Message <a href="https://openforecast.org/2026/05/27/smooth-in-python-non-normal-distributions-in-ets-arima/">smooth in python: Non-normal distributions in ETS/ARIMA</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>So, you know quite well that the normal distribution is one of the most popular distributions in statistics. The reasons are manifold, including convenience for the academic community and the fact that it is taught in every single statistics course in the world. But what if we don&#8217;t want to be normal?</p>
<p>There are situations where non-normal distributions fit considerably better. The main candidate for substitution is the conditional distribution of the response variable. For example, sales of engines cannot follow the normal distribution by definition: they are intermittent and integer-based — you cannot sell 1.78 engines. More generally, while demand can be fractional, it cannot be negative. It is therefore only logical to use distributions that support positive values only in these situation. Examples include Log-Normal, Gamma, and Inverse Gaussian, among many others.</p>
<p>In my last paper with John Boylan (<a href="/2024/01/10/staying-positive-challenges-and-solutions-in-using-pure-multiplicative-ets-models/">this one</a>), we discussed how ETS can be extended to use these three distributions instead of the normal one. I implemented this functionality (together with the others, such as Laplace and Generalised Normal) in ADAM. It supports any of these distributions with any ETS/ARIMA/regression model, for both additive and multiplicative error terms. There is some maths involved, which you can find <a href="https://openforecast.org/adam/ADAMETSAdditiveDistributions.html">here</a> and <a href="https://openforecast.org/adam/ADAMETSMultiplicativeDistributions.html">here</a>.</p>
<p>Why bother? The main is in the predictive distribution. If the data is not normal, we may end up with poorly calibrated forecasts and misleading prediction intervals. Using a more appropriate distribution can resolve this.</p>
<p>But how do we choose the right distribution for our data?</p>
<p>A possible solution (similar to selecting ETS components) is to fit models with different distributions and pick the one with the lowest information criterion. This is implemented in the ADAM function from the smooth package. We can do this manually, or use AutoADAM (called auto.adam in R) to select the most suitable distribution based on AICc automatically:</p>
<pre class="decode">from fcompdata import AirPassengers
from smooth import AutoADAM

model = AutoADAM(lags=[12], h=12, holdout=True, orders=None, verbose=True)
model.fit(AirPassengers.y)
model.summary()</pre>
<p>The <code>orders=None</code> line stops the function from trying different ARIMA orders &#8211; something we will come back to in a future post. For this example, the output is:</p>
<pre>Model estimated using ADAM() function: ETS(MAM)
Response variable: y
Distribution used in the estimation: Normal
Loss function type: likelihood; Loss function value: 523.2756
Coefficients:
       Estimate  Std. Error  Lower 2.5%  Upper 97.5%   
alpha    0.7575      0.0895      0.5807       0.9343  *
beta     0.0000      0.0080      0.0000       0.0158   
gamma    0.0000      0.0503      0.0000       0.0994   
Error standard deviation: 0.0358
Sample size: 144
Number of estimated parameters: 4
Number of degrees of freedom: 140
Information criteria:
      AIC     AICc       BIC      BICc
1054.5512 1054.839 1066.4305 1067.1455</pre>
<p>Boring&#8230; the function found that the Normal distribution has the lowest AICc among those tested &#8211; the Air Passengers data is too well-behaved.</p>
<p>Oh, and don&#8217;t forget to produce the forecasts:</p>
<pre class="decode">model.predict(h=18, interval="prediction")</pre>
<p>Smooth forecasting!</p>
<p>Install smooth: <code>pip install smooth</code></p>
<p>Message <a href="https://openforecast.org/2026/05/27/smooth-in-python-non-normal-distributions-in-ets-arima/">smooth in python: Non-normal distributions in ETS/ARIMA</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://openforecast.org/2026/05/27/smooth-in-python-non-normal-distributions-in-ets-arima/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Hans Levenbach&#8217;s classification scheme for trend/seasonal components</title>
		<link>https://openforecast.org/2026/05/18/hans-levenbach-s-classification-scheme-for-trend-seasonal-components/</link>
					<comments>https://openforecast.org/2026/05/18/hans-levenbach-s-classification-scheme-for-trend-seasonal-components/#respond</comments>
		
		<dc:creator><![CDATA[Ivan Svetunkov]]></dc:creator>
		<pubDate>Mon, 18 May 2026 08:01:28 +0000</pubDate>
				<category><![CDATA[Social media]]></category>
		<category><![CDATA[Statistics]]></category>
		<category><![CDATA[Theory of forecasting]]></category>
		<category><![CDATA[EDA]]></category>
		<category><![CDATA[Seasonality]]></category>
		<category><![CDATA[time series]]></category>
		<guid isPermaLink="false">https://openforecast.org/?p=4145</guid>

					<description><![CDATA[<p>Here is a curious idea: if we can somehow estimate the importance of trend/seasonal components for your data, you can use this in model building and forecasting. But how can we do this first step? Hans Levenbach has an answer with his simple EDA technique. Let me explain. The core idea is simple and neat. ... <a title="Hans Levenbach&#8217;s classification scheme for trend/seasonal components" class="read-more" href="https://openforecast.org/2026/05/18/hans-levenbach-s-classification-scheme-for-trend-seasonal-components/" aria-label="Read more about Hans Levenbach&#8217;s classification scheme for trend/seasonal components">Read more</a></p>
<p>Message <a href="https://openforecast.org/2026/05/18/hans-levenbach-s-classification-scheme-for-trend-seasonal-components/">Hans Levenbach&#8217;s classification scheme for trend/seasonal components</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Here is a curious idea: if we can somehow estimate the importance of trend/seasonal components for your data, you can use this in model building and forecasting. But how can we do this first step? Hans Levenbach has an answer with his simple EDA technique. Let me explain.</p>
<p>The core idea is simple and neat. For this example, I’ll use monthly data, like the time series in this image:</p>
<figure id="attachment_4147" aria-describedby="caption-attachment-4147" style="width: 290px" class="wp-caption aligncenter"><a href="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/05/2026-05-13-Hans-Levenbach-and-STI-01.png&amp;nocache=1"><img fetchpriority="high" decoding="async" src="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/05/2026-05-13-Hans-Levenbach-and-STI-01-300x180.png&amp;nocache=1" alt="" width="300" height="180" class="size-medium wp-image-4147" srcset="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/05/2026-05-13-Hans-Levenbach-and-STI-01-300x180.png&amp;nocache=1 300w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/05/2026-05-13-Hans-Levenbach-and-STI-01-768x461.png&amp;nocache=1 768w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/05/2026-05-13-Hans-Levenbach-and-STI-01.png&amp;nocache=1 1000w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-4147" class="wp-caption-text">Series N2568 from the M3 dataset</figcaption></figure>
<p>You can see that the data has strong seasonality, and we can qualitatively say that capturing that seasonal component correctly will probably solve the main problem in capturing the structure. But how can we quantify this?</p>
<p>All you need to do is put the data in a &#8220;wide&#8221; format, with months in rows and years in columns. Then, as Hans proposed, run a two-way ANOVA with &#8220;month&#8221; and &#8220;year&#8221; to capture variability due to year (trend) and due to month (seasonality). Roughly, we take row/column means to get mean seasonal profiles and mean annual changes (trend), as in the following two images:</p>
<figure id="attachment_4149" aria-describedby="caption-attachment-4149" style="width: 290px" class="wp-caption aligncenter"><a href="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/05/2026-05-13-Hans-Levenbach-and-STI-02.png&amp;nocache=1"><img decoding="async" src="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/05/2026-05-13-Hans-Levenbach-and-STI-02-300x180.png&amp;nocache=1" alt="Seasonal profile of the data" width="300" height="180" class="size-medium wp-image-4149" srcset="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/05/2026-05-13-Hans-Levenbach-and-STI-02-300x180.png&amp;nocache=1 300w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/05/2026-05-13-Hans-Levenbach-and-STI-02-768x461.png&amp;nocache=1 768w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/05/2026-05-13-Hans-Levenbach-and-STI-02.png&amp;nocache=1 1000w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-4149" class="wp-caption-text">Seasonal profile of the data</figcaption></figure>
<figure id="attachment_4148" aria-describedby="caption-attachment-4148" style="width: 290px" class="wp-caption aligncenter"><a href="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/05/2026-05-13-Hans-Levenbach-and-STI-03.png&amp;nocache=1"><img decoding="async" src="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/05/2026-05-13-Hans-Levenbach-and-STI-03-300x180.png&amp;nocache=1" alt="Trend profile" width="300" height="180" class="size-medium wp-image-4148" srcset="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/05/2026-05-13-Hans-Levenbach-and-STI-03-300x180.png&amp;nocache=1 300w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/05/2026-05-13-Hans-Levenbach-and-STI-03-768x461.png&amp;nocache=1 768w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/05/2026-05-13-Hans-Levenbach-and-STI-03.png&amp;nocache=1 1000w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-4148" class="wp-caption-text">Trend profile</figcaption></figure>
<p>The former has no trend, the latter has no seasonality, so they can be analysed separately. Then we calculate the sums of squares of these means from the global mean to estimate variation due to months (seasonality) and years (trend). We can also calculate the sum of squares of the irregular component (what is left), giving three elements that add up to the total sum of squares.</p>
<p>Next step is trivial and straightforward: calculate the shares of each component in the total sum of squares. For our example, using <code>aov()</code> in R and then computing the total:</p>
<pre>Seasonal:  292,307,558
Trend:     176,308,365
Irregular:  33,618,630

Total:     502,234,552</pre>
<p>So, the seasonal contribution is 292,307,558 / 502,234,552 ≈ 58.2%, the trend contribution is 35.1%, and the irregular component is 6.69%.</p>
<p>Why bother? This simple EDA technique tells you roughly what to focus in forecasting. In this example, capturing seasonality correctly is roughly 60% of the story, with trend being second in importance. Hans goes further in his derivations, see <a href="https://www.linkedin.com/pulse/sticlass-scheme-classification-framework-model-levenbach-phd-cpdf-va7ae/">his LinkedIn post</a>. He also analysed M3 results at some point, explaining why some methods performed better (trend dominated the data).</p>
<p>It is worth pointing out that this approach assumes that the seasonal component does not evolve over time, which is reasonable but not always correct. And the model behind this is essentially a regression with dummy variables for year and month. Nonetheless, it is a great starting point for EDA.</p>
<p>P.S. Hans Levenbach passed away on 7 April 2026. I wasn’t sure whether to write about it and what to write about him, but I had several nice discussions with him, and I have admired his approach to forecasting: first explore the data, then build a model. His passing is a loss for the forecasting community.</p>
<p>P.P.S. You can read a bit about him on <a href="https://forecasters.org/blog/2026/04/10/hans-levenbach-1940-2026/">the IIF website</a>.</p>
<p><a href="https://youtu.be/bjXTF7gKXA8?si=m1Ym5FBDeUWbftv7">CMAF had a webinar with Hans a couple of years ago</a>. We had technical issues, but he managed to explain his idea well.</p>
<p>Message <a href="https://openforecast.org/2026/05/18/hans-levenbach-s-classification-scheme-for-trend-seasonal-components/">Hans Levenbach&#8217;s classification scheme for trend/seasonal components</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://openforecast.org/2026/05/18/hans-levenbach-s-classification-scheme-for-trend-seasonal-components/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>smooth in python: multiple seasonal ETS</title>
		<link>https://openforecast.org/2026/05/11/smooth-in-python-multiple-seasonal-ets/</link>
					<comments>https://openforecast.org/2026/05/11/smooth-in-python-multiple-seasonal-ets/#respond</comments>
		
		<dc:creator><![CDATA[Ivan Svetunkov]]></dc:creator>
		<pubDate>Mon, 11 May 2026 08:08:38 +0000</pubDate>
				<category><![CDATA[ETS]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[smooth for Python]]></category>
		<category><![CDATA[Social media]]></category>
		<category><![CDATA[extrapolation methods]]></category>
		<category><![CDATA[smooth]]></category>
		<guid isPermaLink="false">https://openforecast.org/?p=4140</guid>

					<description><![CDATA[<p>Another interesting case in demand forecasting is the high frequency data. For example, if you work with demand on daily level, you might notice that demand increases every Monday but also exhibits proper seasonal fluctuations (e.g. decline every Winter). What do you do in this case? One of the solutions (old but gold) is the ... <a title="smooth in python: multiple seasonal ETS" class="read-more" href="https://openforecast.org/2026/05/11/smooth-in-python-multiple-seasonal-ets/" aria-label="Read more about smooth in python: multiple seasonal ETS">Read more</a></p>
<p>Message <a href="https://openforecast.org/2026/05/11/smooth-in-python-multiple-seasonal-ets/">smooth in python: multiple seasonal ETS</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Another interesting case in demand forecasting is the high frequency data. For example, if you work with demand on daily level, you might notice that demand increases every Monday but also exhibits proper seasonal fluctuations (e.g. decline every Winter). What do you do in this case?</p>
<p>One of the solutions (old but gold) is the multiple seasonal ETS model, which was originally developed by James Taylor (<a href="https://doi.org/10.1057/palgrave.jors.2601589">2003</a>) for the pure additive exponential smoothing. The idea was quite simple: to model multiple seasonal cycles, one can add multiple seasonal components, i.e. to capture the day-of-week (frequency 7) and the day-of-year (frequency 365) effects. While it worked fine for some examples, the main issue with it has been its computational speed (or rather slowness): the original ETS needs to estimate all smoothing parameters + all the initial values for seasonal indices and other components. Both ADAM and ES in the smooth package support multiple seasonalities and avoid the whole issue by using a different model initialisation called &#8220;backcasting&#8221;.</p>
<p>Here is a classical example from James&#8217; paper on the half-hourly electricity demand (see the image in the post). It is clear that there is a half-hour-of-day and the day-of-week effects. In ES, this means that we need to provide the vector for the lags variable:</p>
<pre class="decode">from smooth import ES
from fcompdata import taylor

# Fit ES with automatic ETS model selection
model = ES(lags=[48, 336], h=336, holdout=True)
model.fit(taylor.y)
model.predict(h=336)
print(model)</pre>
<p>This is the output I get from the function:</p>
<pre>Time elapsed: 2.03 seconds
Model estimated using ES() function: ETS(MNM)
With backcasting initialisation
Distribution assumed in the model: Normal
Loss function type: likelihood; Loss function value: 25391.1773
Persistence vector g:
 alpha gamma1 gamma2
0.2899 0.1283 0.5270
Sample size: 3696
Number of estimated parameters: 4
Number of degrees of freedom: 3692
Information criteria:
      AIC      AICc       BIC      BICc
50790.3546 50790.3654 50815.2146 50815.2591

Forecast errors:
ME: 829.1195; MAE: 942.1447; RMSE: 1065.1127
sCE: 941.5012%; Asymmetry: 9.2%; sMAE: 3.1841%; sMSE: 0.1296%
MASE: 1.4491; RMSSE: 1.1286; rMAE: 0.1408; rRMSE: 0.1300</pre>
<p>The computational time on this data was only 2.03 second. In this time, the function tried several possible ETS models and selected the best one based on the AICc value. The resulting best model is ETS(M,N,M), which makes perfect sense for this data.</p>
<p>Is there a way to improve this model? Yes! Taylor mentions that adding AR(1) to the cocktail tends to improve the accuracy in case of multiple seasonal series. We can try that if we switch to ADAM:</p>
<pre class="decode">from smooth import ADAM

# Fit ADAM ETS(MNM)+AR(1) model
model = ADAM(model="MNM", ar_orders=1, lags=[48, 336], h=336, holdout=True)
model.fit(taylor.y)
print(model)
model.plot(7)</pre>
<p>Here is the output:</p>
<pre>Time elapsed: 1.04 seconds
Model estimated using ADAM() function: ETS(MNM)+ARIMA(1,0,0)
With backcasting initialisation
Distribution assumed in the model: Gamma
Loss function type: likelihood; Loss function value: 24157.2473
Persistence vector g:
 alpha gamma1 gamma2
0.1097 0.2225 0.3481
ARMA parameters of the model:
             Lag 1
AR(1)       0.6852
Sample size: 3696
Number of estimated parameters: 5
Number of degrees of freedom: 3691
Information criteria:
      AIC      AICc       BIC      BICc
48324.4947 48324.5109 48355.5697 48355.6365

Forecast errors:
ME: 276.4061; MAE: 462.5092; RMSE: 588.5957
sCE: 313.8711%; Asymmetry: 2.1%; sMAE: 1.5631%; sMSE: 0.0396%
MASE: 0.7114; RMSSE: 0.6237; rMAE: 0.0691; rRMSE: 0.0719</pre>
<p>The resulting model has lower AICc, but also produces more accurate point forecasts (compare RMSSE values) for the holdout set. The following image shows the data and the point forecasts for it:</p>
<figure id="attachment_4142" aria-describedby="caption-attachment-4142" style="width: 290px" class="wp-caption aligncenter"><a href="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/05/2026-04-17-smooth-posts-04-Multiple-seasonal-ETS-02.png&amp;nocache=1"><img loading="lazy" decoding="async" src="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/05/2026-04-17-smooth-posts-04-Multiple-seasonal-ETS-02-300x214.png&amp;nocache=1" alt="Double seasonal ETS(M,N,M) applied to the half-hourly electricity demand data" width="300" height="214" class="size-medium wp-image-4142" srcset="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/05/2026-04-17-smooth-posts-04-Multiple-seasonal-ETS-02-300x214.png&amp;nocache=1 300w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/05/2026-04-17-smooth-posts-04-Multiple-seasonal-ETS-02.png&amp;nocache=1 700w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-4142" class="wp-caption-text">Double seasonal ETS(M,N,M) applied to the half-hourly electricity demand data</figcaption></figure>
<p>What else can we do here? Actually, quite a lot: multistep losses, seasonal ARIMA, explanatory variables &#8211; things can get only more complicated from here. Have a look <a href="https://openforecast.org/adam/ADAMMultipleFrequenciesExamples.html">at this</a>.</p>
<p>Do I hear someone shouting &#8220;TBATS&#8221;? TBATS is the exponential smoothing with additional bells and whistles (ETS + adapted Fourier terms + ARMA errors). I don&#8217;t have it as a separate function in the smooth just yet, but you can reproduce it, for example, <a href="https://openforecast.org/adam/ETSXMultipleSeasonality.html">like this</a>.</p>
<p>So, what are you waiting for? Dive in and see how it works for yourself!</p>
<p>Install smooth: pip install smooth</p>
<p>Message <a href="https://openforecast.org/2026/05/11/smooth-in-python-multiple-seasonal-ets/">smooth in python: multiple seasonal ETS</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://openforecast.org/2026/05/11/smooth-in-python-multiple-seasonal-ets/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>smooth in python: ETS with explanatory variables</title>
		<link>https://openforecast.org/2026/05/05/smooth-in-python-ets-with-explanatory-variables/</link>
					<comments>https://openforecast.org/2026/05/05/smooth-in-python-ets-with-explanatory-variables/#respond</comments>
		
		<dc:creator><![CDATA[Ivan Svetunkov]]></dc:creator>
		<pubDate>Tue, 05 May 2026 08:03:37 +0000</pubDate>
				<category><![CDATA[ETS]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[smooth for Python]]></category>
		<category><![CDATA[Social media]]></category>
		<category><![CDATA[extrapolation methods]]></category>
		<category><![CDATA[smooth]]></category>
		<guid isPermaLink="false">https://openforecast.org/?p=4128</guid>

					<description><![CDATA[<p>We continue our series of posts on the functions from the smooth package for Python/R. Today we will see how to enhance your exponential smoothing with explanatory variables. What? Yes, you heard me! Let&#8217;s dive in! We all know that in real life sales don&#8217;t just evolve over time on their own. Any univariate model, ... <a title="smooth in python: ETS with explanatory variables" class="read-more" href="https://openforecast.org/2026/05/05/smooth-in-python-ets-with-explanatory-variables/" aria-label="Read more about smooth in python: ETS with explanatory variables">Read more</a></p>
<p>Message <a href="https://openforecast.org/2026/05/05/smooth-in-python-ets-with-explanatory-variables/">smooth in python: ETS with explanatory variables</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>We continue our series of posts on the functions from the smooth package for Python/R. Today we will see how to enhance your exponential smoothing with explanatory variables. What? Yes, you heard me! Let&#8217;s dive in!</p>
<p>We all know that in real life sales don&#8217;t just evolve over time on their own. Any univariate model, such as ARIMA or ETS is just a way to approximate a complex reality. In practice, there are many factors affecting the demand for your product. What would happen if the price on your product increases? What if you run a promotion (e.g. &#8220;Buy One, Get One Free&#8221;)? Your competitor&#8217;s strategy impacts the demand for your product as well&#8230; There&#8217;s lots of different factors, and some of them can be quite useful in demand forecasting. But can we join the dynamic univariate models with regression?</p>
<p>Yes, we can! Although ETS is thought as a pure univariate model, it is easy to extend to include explanatory variables. There are several great papers showing how it works (e.g. <a href="https://doi.org/10.1016/j.ijpe.2015.09.011">Kourentzes &#038; Petropoulos, 2016</a>), and in fact the <code>es()</code> function from the smooth package for R was used as a benchmark in <a href="https://doi.org/10.1016/j.ijforecast.2021.11.013">the M5 competition</a>.</p>
<p>So, consider a situation where you have weekly sales of a product with some recorded promotions (encoded as dummy variables). We will use a time series from the fcompdata package for Python. The first image shows how the series looks, the vertical lines show when promotions happen. The series itself seems to be seasonal, roughly repeating peaks and troughs every 52 observations (every year). Also, we see that there are two types of promotions, and when they happen sales tend to increase. So, including them should improve the model fit, and if the company decides to run promotions again, the model will forecast demand better. I will start by fitting the ETS(M,N,M) to the data:</p>
<pre class="decode">from smooth import ES
from fcompdata import PromoData

y = PromoData.y

model = ES(model="MNM", lags=52, holdout=True, h=13)
model.fit(y)
model.predict(h=13)
model.plot(7)</pre>
<p><strong>NOTE</strong>: PromoData has a specific structure with several attributes. PromoData.x contains the in-sample data, PromoData.xx has the holdout &#8211; this is consistent with the Mcomp package for R. The new features in python are:</p>
<ul>
<li>PromoData.y &#8211; concatenated training and test sets,</li>
<li>PromoData.xregx &#8211; matrix of explanatory variables for the training set,</li>
<li>PromoData.xregxx &#8211; matrix of explanatory variables for the test set,</li>
<li>PromoData.xreg &#8211; the full (concatenated) matrix of explanatory variables.</li>
</ul>
<p>The following image shows the model fit and the point forecasts from the ETS(M,N,M):</p>
<figure id="attachment_4132" aria-describedby="caption-attachment-4132" style="width: 290px" class="wp-caption aligncenter"><a href="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/05/2026-04-17-smooth-posts-03-ETSX-02.png&amp;nocache=1"><img loading="lazy" decoding="async" src="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/05/2026-04-17-smooth-posts-03-ETSX-02-300x214.png&amp;nocache=1" alt="ETS(M,N,M) fit and forecast for the promotional data example" width="300" height="214" class="size-medium wp-image-4132" srcset="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/05/2026-04-17-smooth-posts-03-ETSX-02-300x214.png&amp;nocache=1 300w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/05/2026-04-17-smooth-posts-03-ETSX-02.png&amp;nocache=1 700w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-4132" class="wp-caption-text">ETS(M,N,M) fit and forecast for the promotional data example</figcaption></figure>
<p>As expected, because the model does not take promotions into account, it fits the data as best as it can and produces forecasts that are oblivious of the potential external effects on sales. We can improve it by including the promotional dummies:</p>
<pre class="decode">X_train = PromoData.xreg
X_test =  PromoData.xregxx

model = ES(model="MNM", lags=52, holdout=True, h=13)
model.fit(y, X_train)
model.predict(h=13, X=X_test)
model.plot(7)</pre>
<figure id="attachment_4131" aria-describedby="caption-attachment-4131" style="width: 290px" class="wp-caption aligncenter"><a href="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/05/2026-04-17-smooth-posts-03-ETSX-03.png&amp;nocache=1"><img loading="lazy" decoding="async" src="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/05/2026-04-17-smooth-posts-03-ETSX-03-300x214.png&amp;nocache=1" alt="ETS(M,N,M) with explanatory variables" width="300" height="214" class="size-medium wp-image-4131" srcset="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/05/2026-04-17-smooth-posts-03-ETSX-03-300x214.png&amp;nocache=1 300w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2026/05/2026-04-17-smooth-posts-03-ETSX-03.png&amp;nocache=1 700w" sizes="auto, (max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-4131" class="wp-caption-text">ETS(M,N,M) with explanatory variables</figcaption></figure>
<p>The image above shows the fit and the point forecasts from the ETSX(M,N,M) model that now takes the promotions into account. This is quite an improvement in comparison with the previous one. Furthermore, if we can control when to have promotions and what types of promotions to run, we can change the values in the `X_test` matrix and see what demand to expected in that situation. So, this gives an analyst a tool for a more advanced sensitivity analysis.</p>
<p>Read more about the ETSX <a href="https://openforecast.org/adam/ADAMX.html">here</a>.<br />
Install smooth: <code>pip install smooth</code><br />
<a href="https://github.com/config-i1/smooth/wiki/Explanatory-Variables">ETSX wiki on github</a>.</p>
<p>Message <a href="https://openforecast.org/2026/05/05/smooth-in-python-ets-with-explanatory-variables/">smooth in python: ETS with explanatory variables</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://openforecast.org/2026/05/05/smooth-in-python-ets-with-explanatory-variables/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>smooth in python: ETS forecast combination</title>
		<link>https://openforecast.org/2026/04/27/smooth-in-python-ets-forecast-combination/</link>
					<comments>https://openforecast.org/2026/04/27/smooth-in-python-ets-forecast-combination/#respond</comments>
		
		<dc:creator><![CDATA[Ivan Svetunkov]]></dc:creator>
		<pubDate>Mon, 27 Apr 2026 08:01:30 +0000</pubDate>
				<category><![CDATA[ETS]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[smooth for Python]]></category>
		<category><![CDATA[Univariate models]]></category>
		<category><![CDATA[ADAM]]></category>
		<category><![CDATA[extrapolation methods]]></category>
		<category><![CDATA[smooth]]></category>
		<guid isPermaLink="false">https://openforecast.org/?p=4121</guid>

					<description><![CDATA[<p>Last time we saw how to do automated model selection using the ES function from the smooth package. Now I want to show how to produce combined forecasts from ETS. Why bother? There is a vast body of literature on forecast combinations (read this great review). The main idea is that you should not put ... <a title="smooth in python: ETS forecast combination" class="read-more" href="https://openforecast.org/2026/04/27/smooth-in-python-ets-forecast-combination/" aria-label="Read more about smooth in python: ETS forecast combination">Read more</a></p>
<p>Message <a href="https://openforecast.org/2026/04/27/smooth-in-python-ets-forecast-combination/">smooth in python: ETS forecast combination</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Last time we saw how to do automated model selection using the ES function from the smooth package. Now I want to show how to produce combined forecasts from ETS.</p>
<p>Why bother?</p>
<p>There is a vast body of literature on forecast combinations (read <a href="https://doi.org/10.1016/j.ijforecast.2022.11.005">this great review</a>). The main idea is that you should not put all your eggs in one basket — the safer strategy is to combine forecasts from different models instead of selecting just one. Yes, it is more computationally expensive, but the trade-off is higher accuracy on average.</p>
<p>For ETS, a great solution was proposed by <a href="https://doi.org/10.1016/j.ijforecast.2010.04.006">Stephan Kolassa in his 2011 paper</a>: extract AIC values, calculate AIC weights (giving the highest weight to the best-performing model and lower ones to the rest), then combine the forecasts. The resulting forecasts tend to be more robust, because in practice it might be hard to tell the difference between, for example, ETS(M,A,M) and ETS(M,Md,M). So why choose one when you can have all? I implemented this mechanism in the smooth package for R years ago, and now it is also available in Python.</p>
<p>Here is how it works on an example using an M3 time series. I picked this specific one because it is seasonal, but the trend is not very well pronounced. The series is shown in the first image.</p>
<pre class="decode">from smooth import ES
from fcompdata import M3

series = M3[1687]
y = series.y
freq = series.period

# Fit ETS models, combine forecasts
model = ES(model="CXC", lags=series.period, h=18, holdout=True)
model.fit(y)
model.predict(h=18)</pre>
<p>The code above tells ES to fit all ETS models with additive and no trend (&#8220;X&#8221; in the middle), calculate AIC weights, produce forecasts from each one of them, and then combine them. The resulting point forecast is the weighted combination of the individual forecasts. If a prediction interval is required, the specific quantiles are combined directly (see the paper by <a href="https://doi.org/10.1287/mnsc.1120.1667">Lichtendahl et al., 2013</a>). This is inevitably slower than the default model selection mechanism, but is a safer approach. The point forecast and the prediction interval (grey lines) are shown in the attached image.</p>
<p>Note that the user can regulate the pool of combined models via the &#8220;model&#8221; parameter of the function. <a href="https://github.com/config-i1/smooth/wiki/ADAM#ets-models">This wiki explains all the accepted options</a>.</p>
<p>So why not go ahead and try it yourself, and see how it works for your data?</p>
<p>🔗 Install smooth: pip install smooth<br />
📖 More on <a href="https://openforecast.org/adam/ADAMCombinations.html">forecasts combination in ADAM</a>.</p>
<p>Message <a href="https://openforecast.org/2026/04/27/smooth-in-python-ets-forecast-combination/">smooth in python: ETS forecast combination</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://openforecast.org/2026/04/27/smooth-in-python-ets-forecast-combination/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>smooth in python: ETS with model selection</title>
		<link>https://openforecast.org/2026/04/22/smooth-in-python-ets-with-model-selection/</link>
					<comments>https://openforecast.org/2026/04/22/smooth-in-python-ets-with-model-selection/#respond</comments>
		
		<dc:creator><![CDATA[Ivan Svetunkov]]></dc:creator>
		<pubDate>Wed, 22 Apr 2026 00:06:43 +0000</pubDate>
				<category><![CDATA[ETS]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[smooth for Python]]></category>
		<category><![CDATA[Social media]]></category>
		<category><![CDATA[ADAM]]></category>
		<category><![CDATA[extrapolation methods]]></category>
		<category><![CDATA[smooth]]></category>
		<guid isPermaLink="false">https://openforecast.org/?p=4111</guid>

					<description><![CDATA[<p>As some of you have heard, the smooth package is now on PyPI. So, I&#8217;ve decided to write a series of posts showcasing how some of its functions work. We start with the basics, ETS. ETS stands for the &#8220;Error-Trend-Seasonal&#8221; model or ExponenTial Smoothing. It is a statistical model that relies on time series decomposition ... <a title="smooth in python: ETS with model selection" class="read-more" href="https://openforecast.org/2026/04/22/smooth-in-python-ets-with-model-selection/" aria-label="Read more about smooth in python: ETS with model selection">Read more</a></p>
<p>Message <a href="https://openforecast.org/2026/04/22/smooth-in-python-ets-with-model-selection/">smooth in python: ETS with model selection</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>As some of you have heard, the smooth package is now on PyPI. So, I&#8217;ve decided to write a series of posts showcasing how some of its functions work. We start with the basics, ETS.</p>
<p>ETS stands for the &#8220;Error-Trend-Seasonal&#8221; model or ExponenTial Smoothing. It is a statistical model that relies on time series decomposition and updates the unobserved states (level/trend/seasonal) based on the mistakes it makes. In a way, you can call it an adaptive model that changes its forecast based on the most recent available information. It is relatively simple to explain and work with, and it has performed well in a variety of competitions (M3, M4, M5, for example).</p>
<p>The smooth package implements an advanced form of ETS in the ADAM and a more basic one in the ES classes. In fact, ES is just a wrapper of ADAM, it is the conventional model, with just some tuning. Both support all 30 ETS models, have automated model selection and forecast combination, allow producing point forecasts and a variety of prediction intervals types. In fact, if you want a straightforward robust implementation of ETS, give ES a try.</p>
<p>Here&#8217;s how to use it in Python:</p>
<pre class="decode">from smooth import ES
from fcompdata import M3

# Pick a series from the M3 competition for demonstration
series = M3[2568]
y = series.x
freq = series.period

# Fit ES with the automatic model selection
model = ES(lags=freq, h=18, holdout=True)
model.fit(y)
print(model)</pre>
<p>Running this produces output similar to this:</p>
<pre>Time elapsed: 0.4 seconds
Model estimated using ES() function: ETS(MAM)
With backcasting initialisation
Distribution assumed in the model: Normal
Loss function type: likelihood; Loss function value: 724.8524
Persistence vector g:
 alpha   beta  gamma
0.0065 0.0000 0.0000
Sample size: 98
Number of estimated parameters: 4
Number of degrees of freedom: 94
Information criteria:
      AIC      AICc       BIC      BICc
1457.7047 1458.1348 1468.0446 1469.0306

Forecast errors:
ME: -580.9985; MAE: 604.0204; RMSE: 710.5457
sCE: -149.9347%; Asymmetry: -2.5%; sMAE: 8.6598%; sMSE: 1.0378%
MASE: 0.2653; RMSSE: 0.2452; rMAE: 0.2555; rRMSE: 0.2163</pre>
<p>A few things worth noting from the output:</p>
<ul>
<li>ES automatically selected ETS(MAM) based on the AICc value &#8211; a multiplicative error, additive trend, multiplicative seasonality model &#8211; as the best fit</li>
<li>It used backcasting for the model initialisation (default), which speeds up the process and requires fewer parameters to estimate</li>
<li>It kept the last 18 observation for the holdout, produced autoforecasts for it and calculated several forecast errors. This is handy if you want to directly compare different smooth models on a time series.</li>
</ul>
<p>But why are we here? We want to forecast! So, here it is:</p>
<pre class="decode">
model.predict(h=18, interval="prediction")
model.plot(7)
</pre>
<p>This should produce an image similar to the one attached to the post. As simple as that.</p>
<p>Now it&#8217;s your turn! :)</p>
<p>🔗 Install smooth: pip install smooth<br />
📖 <a href="https://github.com/config-i1/smooth/wiki">smooth wiki</a></p>
<p>Message <a href="https://openforecast.org/2026/04/22/smooth-in-python-ets-with-model-selection/">smooth in python: ETS with model selection</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://openforecast.org/2026/04/22/smooth-in-python-ets-with-model-selection/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
