<?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>Archives Loss functions - OpenForecast</title>
	<atom:link href="https://openforecast.org/tag/loss-functions/feed/" rel="self" type="application/rss+xml" />
	<link>https://openforecast.org/tag/loss-functions/</link>
	<description>How to look into the future</description>
	<lastBuildDate>Fri, 28 Aug 2026 10:38:03 +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>Archives Loss functions - OpenForecast</title>
	<link>https://openforecast.org/tag/loss-functions/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Multistep loss functions: Geometric Trace MSE</title>
		<link>https://openforecast.org/2024/06/04/multistep-loss-functions-geometric-trace-mse/</link>
					<comments>https://openforecast.org/2024/06/04/multistep-loss-functions-geometric-trace-mse/#respond</comments>
		
		<dc:creator><![CDATA[Ivan Svetunkov]]></dc:creator>
		<pubDate>Tue, 04 Jun 2024 09:05:56 +0000</pubDate>
				<category><![CDATA[Social media]]></category>
		<category><![CDATA[Theory of forecasting]]></category>
		<category><![CDATA[Univariate models]]></category>
		<category><![CDATA[ARIMA]]></category>
		<category><![CDATA[estimators]]></category>
		<category><![CDATA[ETS]]></category>
		<category><![CDATA[extrapolation methods]]></category>
		<category><![CDATA[Loss functions]]></category>
		<category><![CDATA[statistics]]></category>
		<guid isPermaLink="false">https://openforecast.org/?p=3594</guid>

					<description><![CDATA[<p>While there is a lot to say about multistep losses, I&#8217;ve decided to write the final post on one of them and leave the topic alone for a while. Here it goes. Last time, we discussed MSEh and TMSE, and I mentioned that both of them impose shrinkage and have some advantages and disadvantages. One ... <a title="Multistep loss functions: Geometric Trace MSE" class="read-more" href="https://openforecast.org/2024/06/04/multistep-loss-functions-geometric-trace-mse/" aria-label="Read more about Multistep loss functions: Geometric Trace MSE">Read more</a></p>
<p>Message <a href="https://openforecast.org/2024/06/04/multistep-loss-functions-geometric-trace-mse/">Multistep loss functions: Geometric Trace MSE</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>While there is a lot to say about multistep losses, I&#8217;ve decided to write the final post on one of them and leave the topic alone for a while. Here it goes.</p>
<p>Last time, we discussed <a href="/2024/05/25/recursive-vs-direct-forecasting-strategy/">MSEh</a> and <a href="/2024/06/01/multistep-loss-functions-trace-mse/">TMSE</a>, and I mentioned that both of them impose shrinkage and have some advantages and disadvantages. One of the main advantages of TMSE was in reducing computational time in comparison with MSEh: you just fit one model with it instead of doing it h times. However, the downside of TMSE is that it averages things out, and we end up with model parameters that minimize the h-steps-ahead forecast error to a much larger extent than those that are close to the one-step-ahead. For example, if the one-step-ahead MSE was 500, while the six-steps-ahead MSE was 3000, the impact of the latter in TMSE would be six times higher than that of the former, and the estimator would prioritize the minimization of the longer horizon one.</p>
<p>A more balanced version of this was introduced in <a href="/2023/08/09/multi-step-estimators-and-shrinkage-effect-in-time-series-models/">our paper</a> and was called &#8220;Geometric Trace MSE&#8221; (GTMSE). The main idea of GTMSE is to take the geometric mean or, equivalently, the sum of logarithms of MSEh instead of taking the arithmetic mean. Because of that, the impact of MSEh on the loss becomes comparable with the effect of MSE1, and the model performs well throughout the whole horizon from 1 to h. For the same example of MSEs as above, the logarithm of 500 is approximately 2.7, while the logarithm of 3000 is 3.5. The difference between the two is much smaller, reducing the impact of the long-term forecast uncertainty. As a result, GTMSE has the following features:</p>
<ul>
<li>It imposes shrinkage on models parameters.</li>
<li>The strength of shrinkage is proportional to the forecast horizon.</li>
<li>But it is much milder than in case of MSEh or TMSE.</li>
<li>It leads to more balanced forecasts, performing well on average across the whole horizon.</li>
</ul>
<p>In that paper, we did extensive simulations to see how different estimators behave, and we found that:</p>
<ol>
<li>If an analyst is interested in parameters of models, they should stick with the conventional loss functions (based on one-step-ahead forecast error) because the multistep ones tend to produce biased estimates of parameters.</li>
<li>On the other hand, multistep losses kick off the redundant parameters faster than the conventional one, so there might be a benefit in the case of overparameterized models.</li>
<li>At the same time, if forecasting is of the main interest, then multistep losses might bring benefits, especially on larger samples.</li>
</ol>
<figure id="attachment_3595" aria-describedby="caption-attachment-3595" style="width: 290px" class="wp-caption aligncenter"><a href="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/06/2024-06-04-Multistep-Example.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/2024/06/2024-06-04-Multistep-Example-300x200.png&amp;nocache=1" alt="ETS(A,A,A) estimated using different loss functions applied to the data with multiplicative seasonality" width="300" height="200" class="size-medium wp-image-3595" srcset="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/06/2024-06-04-Multistep-Example-300x200.png&amp;nocache=1 300w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/06/2024-06-04-Multistep-Example-1024x681.png&amp;nocache=1 1024w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/06/2024-06-04-Multistep-Example-768x511.png&amp;nocache=1 768w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/06/2024-06-04-Multistep-Example.png&amp;nocache=1 1049w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-3595" class="wp-caption-text">ETS(A,A,A) estimated using different loss functions applied to the data with multiplicative seasonality</figcaption></figure>
<p>The image above shows an example from our paper, where we applied the additive model to the data, which exhibits apparent multiplicative seasonality. Despite that, we can see that multistep losses did a much better job than the conventional MSE, compensating for the misspecification.</p>
<p>Message <a href="https://openforecast.org/2024/06/04/multistep-loss-functions-geometric-trace-mse/">Multistep loss functions: Geometric Trace MSE</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://openforecast.org/2024/06/04/multistep-loss-functions-geometric-trace-mse/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Multistep loss functions: Trace MSE</title>
		<link>https://openforecast.org/2024/06/01/multistep-loss-functions-trace-mse/</link>
					<comments>https://openforecast.org/2024/06/01/multistep-loss-functions-trace-mse/#respond</comments>
		
		<dc:creator><![CDATA[Ivan Svetunkov]]></dc:creator>
		<pubDate>Sat, 01 Jun 2024 11:29:12 +0000</pubDate>
				<category><![CDATA[Social media]]></category>
		<category><![CDATA[Theory of forecasting]]></category>
		<category><![CDATA[Univariate models]]></category>
		<category><![CDATA[estimators]]></category>
		<category><![CDATA[extrapolation methods]]></category>
		<category><![CDATA[Loss functions]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[theory]]></category>
		<guid isPermaLink="false">https://openforecast.org/?p=3586</guid>

					<description><![CDATA[<p>As we discussed last time, there are two possible strategies in forecasting: recursive and direct. The latter aligns with the estimation of a model using a so-called multistep loss function, such as Mean Squared Error for h-steps-ahead forecast (MSEh). But this is not the only loss function that can be efficiently used for model estimation. ... <a title="Multistep loss functions: Trace MSE" class="read-more" href="https://openforecast.org/2024/06/01/multistep-loss-functions-trace-mse/" aria-label="Read more about Multistep loss functions: Trace MSE">Read more</a></p>
<p>Message <a href="https://openforecast.org/2024/06/01/multistep-loss-functions-trace-mse/">Multistep loss functions: Trace MSE</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>As we discussed <a href="/2024/05/25/recursive-vs-direct-forecasting-strategy/">last time</a>, there are two possible strategies in forecasting: recursive and direct. The latter aligns with the estimation of a model using a so-called multistep loss function, such as Mean Squared Error for h-steps-ahead forecast (MSEh). But this is not the only loss function that can be efficiently used for model estimation. Let&#8217;s discuss another popular option.</p>
<p>But before that, let&#8217;s take a step back to recap what we are talking about. All the multistep losses imply that we fit the model to the data in the conventional way and then produce recursively 1 to h-steps-ahead point forecasts from each in-sample observation, from the very first to the very last one. We can then calculate the forecast errors and collect them in a matrix with observations in rows and horizon in columns, as shown in the image below, generated using the <code>rmultistep()</code> function from the <code>smooth</code> package in R:</p>
<figure id="attachment_3587" aria-describedby="caption-attachment-3587" style="width: 290px" class="wp-caption aligncenter"><a href="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/06/2024-06-01-multistep-matrix.png&amp;nocache=1"><img decoding="async" src="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/06/2024-06-01-multistep-matrix-300x185.png&amp;nocache=1" alt="An example of a matrix of multistep forecast errors" width="300" height="185" class="size-medium wp-image-3587" srcset="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/06/2024-06-01-multistep-matrix-300x185.png&amp;nocache=1 300w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/06/2024-06-01-multistep-matrix-768x475.png&amp;nocache=1 768w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/06/2024-06-01-multistep-matrix.png&amp;nocache=1 791w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-3587" class="wp-caption-text">An example of a matrix of multistep forecast errors</figcaption></figure>
<p>After that, we can calculate any of the multistep loss functions. MSEh, for example, would simply be the mean of squared errors in the last column of that matrix.</p>
<p>One of the most straightforward modifications of MSEh is a loss function that can be called &#8220;Trace MSE&#8221;, which is the sum of MSEs of each of the columns in that matrix. It has some advantages and disadvantages in comparison with MSEh. Here are some:</p>
<ul>
<li>Because we sum up MSEs for different horizons, those closer to h will tend to be higher than those close to 1, simply because typically, with an increase of the horizon, uncertainty increases as well.</li>
<li>The previous point means that the model estimated via TMSE will care less about short-term forecasts and will focus more on longer ones.</li>
<li>But at least it will not be as myopic as a model estimated with a specific MSEh.</li>
<li>You do not need to estimate h models; you can estimate just one, and it will be optimized for the entire horizon from 1 to h.</li>
<li>This means that you save on computations, making the estimation and forecasting roughly h times faster than in the case of MSEh.</li>
<li><a href="https://doi.org/10.1016/j.ijpe.2019.107597">Kourentzes et al. (2019)</a> showed that TMSE slightly outperformed MSE1 and MSEh. In fact, in one of the early versions of that paper, <a href="https://kourentzes.com/forecasting/2015/08/10/true-models-trace-optimisation-and-parameter-shrinkage-2/">Kourentzes &#038; Trapero</a> showed how well TMSE performs in the example of solar irradiation forecasting with ETS.</li>
<li>TMSE imposes shrinkage on parameters of dynamic models, which makes them less reactive and avoids overfitting.</li>
<li>But the shrinkage is not as strong as in the case of MSEh.</li>
</ul>
<p>This is discussed in <a href="/2023/08/09/multi-step-estimators-and-shrinkage-effect-in-time-series-models/">the paper</a> I wrote together with Nikolaos Kourentzes and Rebecca Killick</p>
<p>Some examples of application of TMSE are provided in <a href="/adam/multistepLosses.html">Section 11.3 of ADAM</a>.</p>
<p>Also, Peter Laurinec did an independent exploration of multistep losses and wrote <a href="https://petolau.github.io/Multistep-loss-optimized-forecasting-with-ADAM/">this nice post</a>.</p>
<p>Message <a href="https://openforecast.org/2024/06/01/multistep-loss-functions-trace-mse/">Multistep loss functions: Trace MSE</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://openforecast.org/2024/06/01/multistep-loss-functions-trace-mse/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Recursive vs Direct Forecasting Strategy</title>
		<link>https://openforecast.org/2024/05/25/recursive-vs-direct-forecasting-strategy/</link>
					<comments>https://openforecast.org/2024/05/25/recursive-vs-direct-forecasting-strategy/#respond</comments>
		
		<dc:creator><![CDATA[Ivan Svetunkov]]></dc:creator>
		<pubDate>Sat, 25 May 2024 15:03:36 +0000</pubDate>
				<category><![CDATA[Social media]]></category>
		<category><![CDATA[Theory of forecasting]]></category>
		<category><![CDATA[Univariate models]]></category>
		<category><![CDATA[estimators]]></category>
		<category><![CDATA[extrapolation methods]]></category>
		<category><![CDATA[Loss functions]]></category>
		<category><![CDATA[statistics]]></category>
		<guid isPermaLink="false">https://openforecast.org/?p=3579</guid>

					<description><![CDATA[<p>Have you heard about the recursive vs direct forecasts? There&#8217;s literature about them in the areas of both ML and statistics. What&#8217;s so special about them? Here is a short post. The term &#8220;recursive&#8221; forecasting refers to the approach, when we produce one-step-ahead forecast first, then use it to produce two-steps-ahead, three-steps-ahead, and so on. ... <a title="Recursive vs Direct Forecasting Strategy" class="read-more" href="https://openforecast.org/2024/05/25/recursive-vs-direct-forecasting-strategy/" aria-label="Read more about Recursive vs Direct Forecasting Strategy">Read more</a></p>
<p>Message <a href="https://openforecast.org/2024/05/25/recursive-vs-direct-forecasting-strategy/">Recursive vs Direct Forecasting Strategy</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Have you heard about the recursive vs direct forecasts? There&#8217;s literature about them in the areas of both ML and statistics. What&#8217;s so special about them? Here is a short post.</p>
<p>The term &#8220;recursive&#8221; forecasting refers to the approach, when we produce one-step-ahead forecast first, then use it to produce two-steps-ahead, three-steps-ahead, and so on. This process is iterative, fitting the model to the data based on one-step-ahead forecasts, starting from the first observation to the last in the sample. This is the default approach for all the standard dynamic models for forecasting, such as ARIMA or ETS.</p>
<p>The &#8220;direct&#8221; forecasting means producing a specific h-steps-ahead forecast (e.g., 12 months ahead), skipping intermediate steps. To do this, when fitting the model, we calculate the error between the one-step-ahead forecast and the actual value h steps ahead. This changes how we estimate the model, as our loss function is now based on the h-steps-ahead forecast error, and our one-step-ahead forecast starts acting as the h-steps-ahead one. Because of that, our one-step-ahead forecast now acts as the h-steps-ahead one. This way we don&#8217;t need to produce forecasts recursively, but, if we need all forecasts between 1 and h steps ahead, we must fit h models.</p>
<p>Both strategies are shown in the following image:</p>
<figure id="attachment_3580" aria-describedby="caption-attachment-3580" style="width: 290px" class="wp-caption aligncenter"><a href="/wp-content/uploads/2024/05/2024-05-25-multistep.png"><img decoding="async" src="/wp-content/uploads/2024/05/2024-05-25-multistep-300x201.png" alt="Recursive vs Direct forecasting strategies" width="300" height="201" class="size-medium wp-image-3580" srcset="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/05/2024-05-25-multistep-300x201.png&amp;nocache=1 300w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/05/2024-05-25-multistep-1024x687.png&amp;nocache=1 1024w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/05/2024-05-25-multistep-768x515.png&amp;nocache=1 768w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2024/05/2024-05-25-multistep.png&amp;nocache=1 1401w" sizes="(max-width: 300px) 100vw, 300px" /></a><figcaption id="caption-attachment-3580" class="wp-caption-text">Recursive vs Direct forecasting strategies</figcaption></figure>
<p>The literature tells us that the direct forecasting strategy is equivalent to the so called multistep ahead loss function in model estimation (e.g. <a href="https://doi.org/10.1111/j.1467-6419.2007.00518.x">Chevillon, 2007</a>). The standard &#8220;direct&#8221; forecasting strategy will give the same results as if we apply ARIMA/ETS to the data, produce h steps ahead recursive forecasts in-sample, starting from the first observation till the very last, and then minimise the Mean Squared h-steps-ahead forecast error (MSEh). This strategy has some advantages and disadvantages in comparison with the conventional one-step-ahead (see <a href="https://doi.org/10.1007/s00180-023-01377-x">the introduction of our paper</a>):</p>
<p>1. The specific h-steps-ahead forecast tends to be more accurate than in case of the standard estimation methods;<br />
2. Although some papers show this isn&#8217;t universally true;<br />
3. Parameter estimates tend to be less efficient than with one-step-ahead losses;<br />
4. It&#8217;s more computationally expensive than standard estimators, especially for multiple-step forecasts.</p>
<p>So, there are accuracy benefits, but they come with a computational cost. Moreover, <a href="https://doi.org/10.1016/j.ijpe.2019.107597">Kourentzes et al. (2020)</a> found that the forecasting accuracy of MSEh was higher than the one of conventional loss functions, but this didn&#8217;t translate to better inventory performance.</p>
<p>Still, it wasn&#8217;t clear why this strategy is better, and <a href="/2023/08/09/multi-step-estimators-and-shrinkage-effect-in-time-series-models/">we showed</a> that applying MSEh to a dynamic model regularises its parameters. In ETS, this leads to parameters shrinkage toward zero proportionally to the forecast horizon used in the loss, making models more conservative and &#8220;slow.&#8221;</p>
<p>This is also discussed in <a href="/adam/multistepLosses.html">Section 11.3 of ADAM</a>.</p>
<p>Message <a href="https://openforecast.org/2024/05/25/recursive-vs-direct-forecasting-strategy/">Recursive vs Direct Forecasting Strategy</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://openforecast.org/2024/05/25/recursive-vs-direct-forecasting-strategy/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Multi-step Estimators and Shrinkage Effect in Time Series Models</title>
		<link>https://openforecast.org/2023/08/09/multi-step-estimators-and-shrinkage-effect-in-time-series-models/</link>
					<comments>https://openforecast.org/2023/08/09/multi-step-estimators-and-shrinkage-effect-in-time-series-models/#respond</comments>
		
		<dc:creator><![CDATA[Ivan Svetunkov]]></dc:creator>
		<pubDate>Wed, 09 Aug 2023 10:14:59 +0000</pubDate>
				<category><![CDATA[ARIMA]]></category>
		<category><![CDATA[ETS]]></category>
		<category><![CDATA[Package smooth for R]]></category>
		<category><![CDATA[Papers]]></category>
		<category><![CDATA[R]]></category>
		<category><![CDATA[Univariate models]]></category>
		<category><![CDATA[extrapolation methods]]></category>
		<category><![CDATA[Loss functions]]></category>
		<category><![CDATA[papers]]></category>
		<category><![CDATA[theory]]></category>
		<guid isPermaLink="false">https://openforecast.org/?p=3142</guid>

					<description><![CDATA[<p>Authors: Ivan Svetunkov, Nikos Kourentzes, Rebecca Killick Journal: Computational Statistics Abstract: Many modern statistical models are used for both insight and prediction when applied to data. When models are used for prediction one should optimise parameters through a prediction error loss function. Estimation methods based on multiple steps ahead forecast errors have been shown to ... <a title="Multi-step Estimators and Shrinkage Effect in Time Series Models" class="read-more" href="https://openforecast.org/2023/08/09/multi-step-estimators-and-shrinkage-effect-in-time-series-models/" aria-label="Read more about Multi-step Estimators and Shrinkage Effect in Time Series Models">Read more</a></p>
<p>Message <a href="https://openforecast.org/2023/08/09/multi-step-estimators-and-shrinkage-effect-in-time-series-models/">Multi-step Estimators and Shrinkage Effect in Time Series Models</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>Authors</strong>: Ivan Svetunkov, <a href="http://kourentzes.com/forecasting/">Nikos Kourentzes</a>, <a href="https://www.lancaster.ac.uk/maths/people/rebecca-killick">Rebecca Killick</a></p>
<p><strong>Journal</strong>: <a href="https://www.springer.com/journal/180">Computational Statistics</a></p>
<p><strong>Abstract</strong>: Many modern statistical models are used for both insight and prediction when applied to data. When models are used for prediction one should optimise parameters through a prediction error loss function. Estimation methods based on multiple steps ahead forecast errors have been shown to lead to more robust and less biased estimates of parameters. However, a plausible explanation of why this is the case is lacking. In this paper, we provide this explanation, showing that the main benefit of these estimators is in a shrinkage effect, happening in univariate models naturally. However, this can introduce a series of limitations, due to overly aggressive shrinkage. We discuss the predictive likelihoods related to the multistep estimators and demonstrate what their usage implies to time series models. To overcome the limitations of the existing multiple steps estimators, we propose the Geometric Trace Mean Squared Error, demonstrating its advantages. We conduct a simulation experiment showing how the estimators behave with different sample sizes and forecast horizons. Finally, we carry out an empirical evaluation on real data, demonstrating the performance and advantages of the estimators. Given that the underlying process to be modelled is often unknown, we conclude that the shrinkage achieved by the GTMSE is a competitive alternative to conventional ones.</p>
<p><strong>DOI</strong>: <a href="https://doi.org/10.1007/s00180-023-01377-x">10.1007/s00180-023-01377-x</a>.</p>
<p><a href="http://dx.doi.org/10.13140/RG.2.2.17854.31043">Working paper</a>.</p>
<h2>About the paper</h2>
<p><b>DISCLAIMER 1</b>: To better understand what I am talking about in this section, I would recommend you to have a look at the <a href="https://openforecast.org/adam/">ADAM monograph</a>, and specifically at <a href="https://openforecast.org/adam/ADAMETSEstimation.html">the Chapter 11</a>. In fact, <a href="https://openforecast.org/adam/multistepLosses.html">Section 11.3</a> is based on this paper.</p>
<p><b>DISCLAIMER 2</b>: All the discussions in the paper only apply to pure additive models. If you are interested in multiplicative or mixed ETS models, you&#8217;ll have to wait another seven years for another paper on this topic to get written and published.</p>
<h3>Introduction</h3>
<p>There are lots of ways how dynamic models can be estimated. Some analysts prefer likelihood, some would stick with Least Squares (i.e. minimising MSE), while others would use advanced estimators like Huber&#8217;s loss or M-estimators. And sometimes, statisticians or machine learning experts would use multiple steps ahead estimators. For example, they would use a so-called &#8220;direct forecast&#8221; by fitting a model to the data, producing h-steps ahead in-sample point forecasts from the very first to the very last observation, then calculating the respective h-steps ahead forecast errors and (based on them) Mean Squared Error. Mathematically, this can be written as:</p>
<p>\begin{equation} \label{eq:hstepsMSE}<br />
	\mathrm{MSE}_h = \frac{1}{T-h} \sum_{t=1}^{T-h} e_{t+h|t}^2 ,<br />
\end{equation}<br />
where \(e_{t+h|t}\) is the h-steps ahead error for the point forecast produced from the observation \(t\), and \(T\) is the sample size.</p>
<p>In my final year of PhD, I have decided to analyse how different multistep loss functions work, to understand what happens with dynamic models, when these losses are minimised, and how this can help in efficient model estimation. Doing the literature review, I noticed that the claims about the multistep estimators are sometimes contradictory: some authors say that they are more efficient (i.e. estimates of parameters have lower variances) than the conventional estimators, some say that they are less efficient; some claim that they improve accuracy, while the others do not find any substantial improvements. Finally, I could not find a proper explanation of what happens with the dynamic models when the estimators are used. So, I&#8217;ve started my own investigation, together with Nikos Kourentzes and Rebecca Killick (who was my internal examiner and joined our team after my graduation).</p>
<p>Our investigation started with the single source of error model, then led us to predictive likelihoods and, after that &#8211; to the development of a couple of non-conventional estimators. As a result, the paper grew and became less focused than initially intended. In the end, it became 42 pages long and discussed several aspects of models estimation (making it a bit of a hodgepodge):</p>
<ol>
<li>How multistep estimators regularise parameters of dynamic models;</li>
<li>That multistep forecast errors are always correlated when the models&#8217; parameters are not zero;</li>
<li>What predictive likelihoods align with the multistep estimators (this is useful for a discussion of their statistical properties);</li>
<li>How General Predictive Likelihood encompasses all popular multistep estimators;</li>
<li>And that there is another estimator (namely GTMSE &#8211; Geometric Trace Mean Squared Error), which has good properties and has not been discussed in the literature before.</li>
</ol>
<p>Because of the size of the paper and the spread of the topics throughout it, many reviewers ignored (1) &#8211; (4), focusing on (5) and thus rejecting the paper on the grounds that we propose a new estimator, but instead spend too much time discussing irrelevant topics. These types of comments were given to us by the editor of the Journal of the Royal Statistical Society: B and reviewers of Computational Statistics and Data Analysis. While we tried addressing this issue several times, given the size of the paper, we failed to fix it fully. The paper was rejected from both of these journals and ended up in Computational Statistics, where the editor gave us a chance to respond to the comments. We explained what the paper was really about and changed its focus to satisfy the reviewers, after which the paper was accepted.</p>
<p>So, what are the main findings of this paper?</p>
<h3>How multistep estimators regularise parameters of dynamic models</h3>
<p>Given that any dynamic model (such as ETS or ARIMA) can be represented in the Single Source of Error state space form, we showed that the application of multistep estimators leads to the inclusion of parameters of models in the loss function, leading to the regularisation. In ETS, this means that the smoothing parameters are shrunk to zero, with the shrinkage becoming stronger with the increase of the forecasting horizon relative to the sample size. This makes the models less stochastic and more conservative. Mathematically this becomes apparent if we express the conditional multistep variance in terms of smoothing parameters and one-step-ahead error variance. For example, for ETS(A,N,N) we have:</p>
<p>\begin{equation} \label{eq:hstepsMSEVariance}<br />
	\mathrm{MSE}_h \propto \hat{\sigma}_1^2 \left(1 +(h-1) \hat{\alpha} \right),<br />
\end{equation}<br />
where \( \hat{\alpha} \) is the smoothing parameter and \(\hat{\sigma}_1^2 \) is the one-step-ahead error variance. From the formula \eqref{eq:hstepsMSEVariance}, it becomes apparent that when we minimise MSE\(_h\), the estimated variance and the smoothing parameters will be minimised as well. This is how the shrinkage effect appears: we force \( \hat{\alpha} \) to become as close to zero as possible, and the strength of shrinkage is regulated by the forecasting horizon \( h \).</p>
<p>In the paper itself, we discuss this effect for several multistep estimators (the specific effect would be different between them) and several ETS and ARIMA models. While for ETS, it is easy to show how shrinkage works, for ARIMA, the situation is more complicated because the direction of shrinkage would change with the ARIMA orders. Still, what can be said clearly for any dynamic model is that the multistep estimators make them less stochastic and more conservative.</p>
<h3>Multistep forecast errors are always correlated</h3>
<p>This is a small finding, done in bypassing. It means that, for example, the forecast error two steps ahead is always correlated with the three steps ahead one. This does not depend on the autocorrelation of residuals or any violation of assumptions of the model but rather only on whether the parameters of the model are zero or not. This effect arises from the model rather than from the data. The only situation when the forecast errors will not be correlated is when the model is deterministic (e.g. linear trend). This has important practical implications because some forecasting techniques make explicit and unrealistic assumptions that these correlations are zero, which would impact the final forecasts.</p>
<h3>Predictive likelihoods aligning with the multistep estimators</h3>
<p>We showed that if a model assumes the Normal distribution, in the case of MSEh and MSCE (Mean Squared Cumulative Error), the distribution of the future values follows Normal as well. This means that there are predictive likelihood functions for these models, the maximum of which is achieved with the same set of parameters as the minimum of the multistep estimators. This has two implications:</p>
<ol>
<li>These multistep estimators should be consistent and efficient, especially when the smoothing parameters are close to zero;</li>
<li>The predictive likelihoods can be used in the model selection via information criteria.</li>
</ol>
<p>The first point also explains the contradiction in the literature: if the smoothing parameter in the population is close to zero, then the multistep estimators will give more efficient estimates than the conventional estimators; in the other case, it might be less efficient. We have not used the second point above, but it would be useful when the best model needs to be selected for the data, and an analyst wants to use information criteria. This is one of the potential ways for future research.</p>
<h3>How General Predictive Likelihood (GPL) encompasses all popular multistep estimators</h3>
<p>GPL arises when the joint distribution of 1 to h steps ahead forecast errors is considered. It will be Multivariate Normal if the model assumes normality. In the paper, we showed that the maximum of GPL coincides with the minimum of the so-called &#8220;Generalised Variance&#8221; &#8211; the determinant of the covariance matrix of forecast errors. This minimisation reduces variances for all the forecast errors (from 1 to h) and increases the covariances between them, making the multistep forecast errors look more similar. In the perfect case, when the model is correctly specified (no omitted or redundant variables, homoscedastic residuals etc), the maximum of GPL will coincide with the maximum of the conventional likelihood of the Normal distribution (see <a href="https://openforecast.org/adam/ADAMETSEstimationLikelihood.html">Section 11.1 of the ADAM monograph</a>).</p>
<p>Accidentally, it can be shown that the existing estimators are just special cases of the GPL, but with some restrictions on the covariance matrix. I do not intend to show it here, the reader is encouraged to either read the paper or see the brief discussion <a href="https://openforecast.org/adam/multistepLosses.html#multistepLossesGPL">in Subsection 11.3.5</a> of the ADAM monograph.</p>
<h3>GTMSE &#8211; Geometric Trace Mean Squared Error</h3>
<p>Finally, looking at the special cases of GPL, we have noticed that there is one which has not been discussed in the literature. We called it Geometric Trace Mean Squared Error (GTMSE) because of the logarithms in the formula:<br />
\begin{equation} \label{eq:GTMSE}<br />
	\mathrm{GTMSE} = \sum_{j=1}^h \log \frac{1}{T-j} \sum_{t=1}^{T-j} e_{t+j|t}^2 .<br />
\end{equation}<br />
GTMSE imposes shrinkage on parameters similar to other estimators but does it more mildly because of the logarithms in the formula. In fact, what the logarithms do is make variances of all forecast errors similar to each other. As a result, when used, GTMSE does not focus on the larger variances as other methods do but minimises all of them simultaneously similarly.</p>
<h2>Examples in R</h2>
<p>The estimators discussed in the paper are all implemented in the functions of the smooth package in R, including <code>adam()</code>, <code>es()</code>, <code>ssarima()</code>, <code>msarima()</code> and <code>ces()</code>. In the example below, we will see how the shrinkage works for the ETS on the example of Box-Jenkins sales data (this is the example taken from ADAM, <a href="https://openforecast.org/adam/multistepLosses.html#an-example-in-r-2">Subsection 11.3.7</a>):</p>
<pre class="decode">library(smooth)

adamETSAANBJ <- vector("list",6)
names(adamETSAANBJ) <- c("MSE","MSEh","TMSE","GTMSE","MSCE","GPL")
for(i in 1:length(adamETSAANBJ)){
    adamETSAANBJ[[i]] <- adam(BJsales, "AAN", h=10, holdout=TRUE,
                              loss=names(adamETSAANBJ)[i])
}</pre>
<p>The ETS(A,A,N) model, applied to this data, has different estimates of smoothing parameters:</p>
<pre class="decode">sapply(adamETSAANBJ,"[[","persistence") |>
	round(5)</pre>
<pre>          MSE MSEh TMSE   GTMSE MSCE GPL
alpha 1.00000    1    1 1.00000    1   1
beta  0.23915    0    0 0.14617    0   0</pre>
<p>We can see how shrinkage shows itself in the case of the smoothing parameter \(\beta\), which is shrunk to zero by MSEh, TMSE, MSCE and GPL but left intact by MSE and shrunk a little bit in the case of GTMSE. These different estimates of parameters lead to different forecasting trajectories and prediction intervals, as can be shown visually:</p>
<pre class="decode">par(mfcol=c(3,2), mar=c(2,2,4,1))
# Produce forecasts
lapply(adamETSAANBJ, forecast, h=10, interval="prediction") |>
# Plot forecasts
    lapply(function(x, ...) plot(x, ylim=c(200,280), main=x$model$loss))</pre>
<p>This should result in the following plots:</p>
<figure id="attachment_3162" aria-describedby="caption-attachment-3162" style="width: 1190px" class="wp-caption aligncenter"><a href="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2023/07/ADAMBJSalesLosses.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/2023/07/ADAMBJSalesLosses.png&amp;nocache=1" alt="ADAM ETS on Box-Jenkins data with several estimators" width="1200" height="700" class="size-full wp-image-3162" srcset="https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2023/07/ADAMBJSalesLosses.png&amp;nocache=1 1200w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2023/07/ADAMBJSalesLosses-300x175.png&amp;nocache=1 300w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2023/07/ADAMBJSalesLosses-1024x597.png&amp;nocache=1 1024w, https://openforecast.org/wp-content/webpc-passthru.php?src=https://openforecast.org/wp-content/uploads/2023/07/ADAMBJSalesLosses-768x448.png&amp;nocache=1 768w" sizes="auto, (max-width: 1200px) 100vw, 1200px" /></a><figcaption id="caption-attachment-3162" class="wp-caption-text">ADAM ETS on Box-Jenkins data with several estimators</figcaption></figure>
<p>Analysing the figure, it looks like the shrinkage of the smoothing parameter \(\beta\) is useful for this time series: the forecasts from ETS(A,A,N) estimated using MSEh, TMSE, MSCE and GPL look closer to the actual values than the ones from MSE and GTMSE. To assess their performance more precisely, we can extract error measures from the models:</p>
<pre class="decode">sapply(adamETSAANBJ,"[[","accuracy") |>
	round(5)[c("ME","MSE"),]</pre>
<pre>         MSE    MSEh    TMSE    GTMSE    MSCE     GPL
ME   3.22900 1.06479 1.05233  3.44962 1.04604 0.95515
MSE 14.41862 2.89067 2.85880 16.26344 2.84288 2.62394</pre>
<p>Alternatively, we can calculate error measures based on the produced forecasts and the <code>measures()</code> function from the <code>greybox</code> package:</p>
<pre class="decode">lapply(adamETSAANBJ, forecast, h=10) |>
    sapply(function(x, ...) measures(holdout=x$model$holdout,
                                     forecast=x$mean,
                                     actual=actuals(x$model)))</pre>
<p>A thing to note about the multistep estimators is that they are slower than the conventional ones because they require producing 1 to \( h \) steps ahead forecasts from every observation in-sample. In the case of the <code>smooth</code> functions, the time elapsed can be extracted from the models in the following way:</p>
<pre class="decode">sapply(adamETSAANBJ, "[[", "timeElapsed")</pre>
<p>In summary, the multistep estimators are potentially useful in forecasting and can produce models with more accurate forecasts. This happens because they impose shrinkage on the estimates of parameters, making models less stochastic and more inert. But their performance depends on each specific situation and the available data, so I would not recommend using them universally.</p>
<p>Message <a href="https://openforecast.org/2023/08/09/multi-step-estimators-and-shrinkage-effect-in-time-series-models/">Multi-step Estimators and Shrinkage Effect in Time Series Models</a> first appeared on <a href="https://openforecast.org">OpenForecast</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://openforecast.org/2023/08/09/multi-step-estimators-and-shrinkage-effect-in-time-series-models/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
