









Studia grazie alle numerose risorse presenti su Docsity
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Questa pagina non è visibile nell’anteprima
Non perderti parti importanti!










hort of the special and ultimately uninteresting case with perfect foresight, it is not possible to find a method that always sets the forecast equal to the outcome. A formal method for trading off potential forecast errors of different signs and magnitudes is therefore required. The loss function, L(·), describes in relative terms how costly it is to use an imperfect forecast, f, given the outcome, Y, and possibly other observed data, Z. This chapter examines the construction and properties of loss functions and introduces loss functions that are commonly used in forecasting. A central point in the construction of loss functions is that the loss function should reflect the actual trade-offs between different forecast errors. In this sense the loss function is a primitive to the forecasting problem. From a decision-theoretic perspective the forecast is the action that must be constructed given the loss function and the predictive distribution, which we discuss in the next chapter. For example, the Congressional Budget Office must provide forecasts of future budget deficits. Their loss function in providing the forecasts should be based on the relative costs of over- and underpredicting public deficits. Weather forecasters face very different costs from underpredicting the strength of a storm compared to overpredicting it. The choice of a loss function is important for every facet of the forecasting exercise. This choice affects which forecasting models are preferred as well as how their parameters are estimated and how the resulting forecasts are evaluated and compared against forecasts from competing models. Despite its pivotal role, it is common practice to simply choose off-the-shelf loss functions. In doing this it is important to choose a loss function that at least approximately reflects the types of trade-offs relevant for the forecast problem under study. For example, when forecasting hotel room bookings, it is hard to imagine that over- and underpredicting the number of hotel rooms booked on a particular day lead to identical losses because hotel rooms are a perishable good. Hence, using a symmetric loss function for this problem would make little sense. Asymmetric loss that reflects the larger loss from over- rather than underpredicting bookings would be more reasonable. There are examples of carefully grounded loss functions in the economics liter- ature. For example, sometimes a forecast can be viewed as a signal in a strategic game that is influenced by the forecast provider’s incentives. Studies such as Ehrbeck and Waldmann (1996), Hong and Kubik (2003), Laster, Bennett, and Geoum (1999), Ottaviani and Sørensen (2006), Scharfstein and Stein (1990) and Trueman (1994) suggest loss functions grounded on game-theoretical models. Forecasters are
14 •^ Chapter 2
assumed to differ in their ability to predict future outcomes. The chief objective of the forecasters is to influence forecast users’ assessment of their ability. Such objectives are common for business analysts or analysts employed by financial services firms such as investment banks or brokerages whose fees are directly linked to clients’ assessment of their forecasting ability. The chapter proceeds as follows. Section 2.1 examines general issues that arise in construction of loss functions. We discuss the mathematical setup of a loss function before relating it to the forecaster’s decisions and examining some general properties that loss functions have. Section 2.2 reviews specific loss functions commonly used in economic forecasting problems, assuming there is only a single outcome to predict, before extending the analysis in section 2.3 to cover cases with multiple outcome variables. Section 2.4 considers loss functions (scoring rules) for distributional forecasts, while section 2.5 provides some concrete examples of loss functions and economic decision problems from macroeconomic and financial analysis. Section 2. concludes the chapter.
Let Y denote the random variable describing the outcome of interest and let Y denote the set of all possible outcomes. For outcomes that are either continuous or can take on a very large number of possible values, typically Y is the real line, R. In some forecasting problems the set of possible outcomes, Y, can be much smaller, such as for a binary random variable where Y = { 0 , 1 }. For multivariate outcomes typically Y =Rk^ for some integer k, where k is the number of forecasts to be evaluated. Point forecasts are denoted by f and are defined on the set F. Typically we assume F = Y since in most cases it does not make sense to have forecasts that cannot take on the same values as Y or, conversely, have forecasts that can take on values that the outcome Y cannot. There are exceptions to this rule, however. For example, a forecast of the number of children per family could be a fraction such as 1.9, indicating close to 2 children, even though Y cannot take this value. We assume that the predictors Z (as well as the outcome Y and hence the forecast f ) are real valued. Formally, the loss function, L ( f, Y, Z), is then defined as a mapping L : Y × Y × Z → L, where L is in R^1 , and Z contains the set of possible values the conditioning variables, z, can take. Often L =R^1 +, the set of nonnegative real numbers. Alternatively, we could constrain the forecasts to lie in the convex hull of the set of all possible outcomes, i.e., F = conv(Y). We discuss this further below. A common assumption for loss functions is that loss is minimized when the forecast is equal to the outcome—min (^) f L( f, y, z) = L(y, y, z). The idea is that if we are to find a forecast that minimizes loss, then nothing dominates a perfect forecast. In cases where the loss function does not depend on Z, so L( f, Y, Z) = L( f, Y), it is natural to normalize the loss function so that it takes a minimum value at 0. This can be done without loss of generality by subtracting the loss associated with the perfect forecast f = y, i.e., L( f, Y) = L˜( f, Y) − L˜ (Y, Y) for any loss function, ˜L. For f = y to be a unique minimum we must have L( f, y) > 0 for all f = y. 1 More generally, when the loss function L( f, Y, Z) varies with Z, it may not be possible to
(^1) In binary forecasting this condition is often not imposed. This usually does not affect the analysis but only the interpretation of the calculated loss figures.
16 •^ Chapter 2
Academic studies often do not derive loss functions from first principles by referring to utility functions or fully specified decision-theoretic problems, though there are some exceptions. Loss functions that take the form of profit functions have been used to evaluate forecasts by Leitch and Tanner (1991) and Elliott and Ito (1999). West et al. (1993) compare utility-based and statistical measures of predictive accuracy for exchange rate models. Examples of loss functions derived from utility are provided in the final section of this chapter.
2.1.2 Common Properties of Loss Functions
Reasonable loss functions are grounded in economic decision problems. Under the utility-maximizing approach, loss functions inherit well-known properties from the utility function. Rather than deriving loss functions from first principles, however, it is common practice to instead use loss functions with a “reasonable shape.” For the loss function to be “reasonable,” a set of minimal properties should hold. Other properties such as symmetry or homogeneity may suggest broad families of loss functions with certain desirable characteristics. We cover both types of properties below. Trade-offs between different forecast errors when f = y are quantified by the loss function. To capture the notion that bigger errors imply bigger losses, often it is imposed that the loss is nondecreasing as the forecast moves further away from the outcome. Mathematically, this means that L( f 2 , y) ≥ L( f 1 , y) for either f 2 > f 1 > y or f 2 < f 1 < y for all real y. Nearly all loss functions used in practice have this feature. For loss functions that depend only on the forecast error, e = y − f , and thus take the form L ( f, y) = L(e), Granger (1999) summarized these requirements:
L (0) = 0 (minimal loss of 0); (2.3a)
L (e) ≥ 0 for all e; (2.3b)
L (e) is nonincreasing in e for e < 0 and nondecreasing in e for e > 0 : L (e 1 ) ≤ L (e 2 ) if e 2 < e 1 < 0 , L(e 1 ) ≤ L(e 2 ) if e 2 > e 1 > 0. (2.3c)
As in the case with more general loss, L( f, y), condition (2.3a) simply normalizes the loss associated with the perfect forecast (y = f ) to be 0. The second condition states that imperfect forecasts (y = f ) generate larger loss than perfect ones. Most common loss functions depend only on e; see section 2.2 for examples. Other properties of loss functions such as homogeneity, symmetry, differentiabil- ity, and boundedness can be used to define broad classes of loss functions. We next review these. Homogeneity can be used to define classes of loss functions that lead to the same decisions. Homogeneous loss functions factor in such a way that
L(a f, ay) = h(a)L( f, y), (2.4)
for some positive function h(a), where the degree of homogeneity does not matter. For loss functions that depend only on the forecast error, homogeneity amounts to L (ae) = h(a)L (e) for some positive function h(a). Homogeneity is a useful property when solving for optimal forecasts since the optimal forecast will be invariant to different values of h(a).
Loss Functions •^17
Symmetry of the loss function refers to symmetry of the forecast around y. It is the property that, for all f ,
L(y − f, y) = L(y + f, y). (2.5)
For loss functions that depend only on the forecast error, symmetry reduces to L (−e) = L (e), so that over- and underpredictions of the same magnitude lead to identical loss. 5 Most empirical work in economic forecasting assumes symmetric loss. This choice reflects the difficulties in putting numbers on the relative cost of over- and underpredictions. Construction of a loss function requires a deeper understanding of the forecaster’s objectives and this may be difficult to accomplish. Still, the implicit choice of MSE loss by the majority of studies in the forecasting literature seems difficult to justify on economic grounds. As noted by Granger and Newbold (1986, page 125), “an assumption of symmetry about the conditional mean... is likely to be an easy one to accept... an assumption of symmetry for the cost function is much less acceptable.” Differentiability of the loss function with respect to the forecast is again a regularity condition that is useful and helps simplify numerically the search for optimal forecasts. However, this condition may not be desirable and is certainly not required for a loss function to be well defined. In general, a finite numbers of points where the loss function fails to be differentiable will not cause undue problems at the estimation stage. However, when the loss function is extremely irregular, different methods are required for understanding the statistical properties of the loss function (see the maximum utility estimator in chapter 12). Finally, loss functions may be bounded or unbounded. As a practical matter, there is often no obvious reason to let the weight the loss function places on very large forecast errors increase without bound. For example, the squared error loss function examined below assigns very different losses to forecasts of, say, US inflation that result in errors of 100% versus 500% even though it is not obvious that the associated losses should really be very different since both forecasts would lead to very similar actions. Unbounded loss functions can create technical problems for the analysis of forecasts as the expected loss may not exist, so most results in decision theory are derived under the assumption of bounded loss. In practice, forecasts are usually bounded and extremely large forecasts typically get trimmed as they are deemed implausible.
2.1.3 Existence of Expected Loss
Restrictions must be imposed on the form of the loss function to make sense of the idea of minimizing the expected loss. Most basically, it is required that the expected loss exists. Suppose the forecast depends on data Z through a vector of parameters, β, which depends on the parameters of the data generating process, θ, so f = f (z, β). From the definition of expected loss, we have
E (^) Y [L ( f (z, β), Y)] =
L( f (z, β), y) p (^) Y (y|z, θ)dy, (2.6)
(^5) A related concept is the class of bowl-shaped loss functions. A loss function is bowl shaped if the level sets {e : L(e) ≤ c} are convex and symmetric about the origin.
Loss Functions •^19
the higher-order terms in (2.8) vanish is that the tail decay of the predicted variable is sufficiently fast relative to the weight on these terms implied by the loss function.
2.1.4 Loss Functions Not Based on Expected Loss
So far we have characterized the loss function L( f, Y) for a univariate outcome, and defined its properties with reference to a “one-shot” problem. This makes sense when forecasting is placed in a decision-theoretic or utility-maximization context. This approach to forecasting is internally consistent, from initially setting up the problem to defining the expected loss and conducting model estimation and forecast evaluation. Some loss functions that have been used in practice are based directly on sample statistics without relating the sample loss to a population loss function. In cases where such a population loss function exists and satisfies reasonable properties, this does not cause any problems. Basing the loss function directly on a sample of losses can, however, sometimes yield a loss function that does not make sense in population or for fully specified decision problems. Loss functions that do not map back to decision problems often have poor and unintended properties. We consider one such example below.
Example 2.1.2 (Kuipers score for binary outcome). Let f = { 1 , − 1 } be a forecast of the binary variable y = { 1 , − 1 } and let n (^) j,k , j, k ∈ {− 1 , 1 } be the number of observations for which the forecast equals j and the outcome equals k. The Kuipers score is given by
n 1 , 1 n 1 , 1 + n− 1 , 1
n 1 ,− 1 n 1 ,− 1 + n− 1 ,− 1
This is the positive hit rate, i.e., the proportion of times where y = 1 is correctly predicted less the “false positive rate,” i.e., the proportion of times where y = 1 is wrongly predicted. This can equivalently be thought of as
KuS =
n 1 , 1 n 1 , 1 + n− 1 , 1
n− 1 ,− 1 n 1 ,− 1 + n− 1 ,− 1
which is the hit rate for y = 1 plus the hit rate for y = − 1 minus a centering constant of 1. The Kuipers score is positive if the sum of the positive and negative hit rates exceeds 1. For a sample with a single observation, this definition makes no sense, as one of the denominators in (2.10) is 0 : either n 1 , 1 + n− 1 , 1 = 0 or n 1 ,− 1 + n− 1 ,− 1 = 0. For a single observation, this sample statistic does not follow from any obvious loss function. The first term in (2.10) is the sample analog of P [ f = 1 |Y = 1] and the second is the sample analog of P [ f = − 1 |Y = −1]. However, they do not combine to a loss function with this sample analog. This failure to embed the loss function into the expected loss framework results in odd properties for the objective. For example, the definition of KuS in (2.9) implies that the marginal value of an extra “hit,” i.e., a correct call, depends on the sample proportion of hits. To see this, consider the improve- ment in KuS from adding a single successfully predicted observation y = 1 , f = 1.
20 •^ Chapter 2
The resulting improvement in the hit rate is
KuS =
n 1 , 1 + 1 n 1 , 1 + 1 + n− 1 , 1
n 1 , 1 n 1 , 1 + n− 1 , 1
=
n− 1 , 1 (n 1 , 1 + n− 1 , 1 )(n 1 , 1 + 1 + n− 1 , 1 )
Thus the marginal value of a correct call depends on the total number of observations and the proportion of missed hits prior to the new observation. The Kuipers score’s poor properties arise from the lack of justification of its setup for a population problem.
We next review various families of loss functions that have been suggested in the fore- casting literature. The vast majority of empirical work on forecasting assumes that the loss function depends only on the forecast error, e = Y − f , i.e., the difference between the outcome and the forecast. In this case we can write L( f, Y, Z) = L(e). In general, loss functions can be more complicated functions of the outcome and forecast and take the form L( f, Y) or L( f, Y, Z).
2.2.1 Loss That Depends Only on Forecast Errors
The most commonly used loss functions, including squared error loss and absolute error loss, depend only on the forecast error. For such loss functions, L( f, Y, Z) = L (e), so the loss function takes a particularly simple form.
2.2.1.1 Squared Error Loss
By far the most popular loss function in empirical studies is squared error loss, also known as quadratic or mean squared error (MSE) loss:
L(e) = ae^2 , a > 0. (2.11)
This loss function clearly satisfies the three Granger properties listed in ( 2.3). When viewed as a family of loss functions—corresponding to different values of the scalar a—squared error loss forms a homogeneous class. 7 It is symmetric, bowl shaped, and differentiable everywhere and penalizes large forecast errors at an increasing rate due to its convexity in |e|. The loss function is not bounded from above. Large forecast errors or “outliers” are thus very costly under this loss function.
2.2.1.2 Absolute Error Loss
Rather than using squared error loss, which results in increasingly large losses for large forecast errors, the absolute error is preferred in some cases. Under mean absolute error (MAE) loss,
L(e) = a |e|^ , a > 0. (2.12)
(^7) While the scaling factor, a, does not matter to the properties of the optimal forecast, it is common to set a = 0. 5 , which removes the “2” that arises from taking first derivatives.
22 •^ Chapter 2
large errors are costlier under MSE loss. The top window assumes that α = 0 .25, so negative forecast errors are three times as costly as positive errors, reflected in the steeper slope of the loss curve for e < 0. In the bottom window, α = 0 .75 and so positive forecast errors are three times costlier than negative errors.
2.2.1.4 Linex Loss
Linear-exponential, or Linex, loss takes the form
L (e) = a 1 (exp(a 2 e) − a 2 e − 1), a 2 = 0 , a 1 > 0. (2.14)
Linex loss is differentiable everywhere, but is not symmetric. Varian (1975) used this loss function to analyze real estate assessments, while Zellner (1986a) used it in the context of Bayesian prediction problems. The parameter a 2 controls both the degree and direction of asymmetry. When a 2 > 0 , Linex loss is approximately linear for negative forecast errors and ap- proximately exponential for positive forecast errors. In this case, large underpre- dictions ( f < y, so e = y − f > 0) are costlier than overpredictions of the same magnitude, with the relative cost increasing as the magnitude of the forecast error rises. Conversely, for a 2 < 0, large overpredictions are costlier than equally large underpredictions. Although Linex loss is not defined for a 1 = 0, setting a 1 = 2 /a^22 and taking the limit as a 2 → 0, by L’Hôpital’s rule the Linex loss function approaches squared error loss:
lim a 2 → 0
L (e) = lim a 2 → 0
exp(a 2 e) − e 2 a 2
= lim a 2 → 0
e^2 exp(a 2 e) 2
e^2 2
Figure 2.2 plots MSE loss against Linex loss for a 2 = 1 (top) and a 2 = − 1 (bottom). Measured relative to the benchmark MSE loss, large positive (top) or large negative (bottom) forecast errors are very costly in these respective cases. This loss function has been used in many empirical studies on variables such as budget forecasts (Artis and Marcellino, 2001) and survey forecasts of inflation (Capistrán and Timmermann, 2009). Christoffersen and Diebold (1997) examine this loss function in more detail.
2.2.1.5 Piecewise Asymmetric Loss
A general class of asymmetric loss functions can be constructed by letting the loss function shift at a discrete set of points, {¯e 1 ,... , ¯e (^) n− 1 }:
L(e) =
L 1 (e) if e ≤ ¯e 1 , L 2 (e) if e¯ 1 < e ≤ ¯e 2 , .. .
L (^) n(e) if e > e¯ (^) n− 1.
Here ¯e (^) i− 1 < e¯ (^) i for i = 2 ,... , n − 1. It is common to set n = 2 , choose ¯e 1 = 0 and assume that both pieces of the loss function satisfy the usual loss properties so that the loss is piecewise asymmetric around 0 and continuous (but not necessarily
Loss Functions •^23
0
5
10
15
20
L (
e )
Right-skewed linex loss with a 2 = 1
0
5
10
15
20
L (
e)
Left-skewed linex loss with a 2 = –
MSE
Linex
MSE
Linex
Figure 2.2: MSE loss versus Linex loss for different values of the Linex parameter, a 2.
differentiable) at 0. Lin-lin loss in (2.13) is a special case of (2.15) as is the asymmetric quadratic loss function
L(e) =
(1 − α)e^2 if e ≤ 0 , αe^2 if e > 0 ,
considered by Artis and Marcellino (2001), Newey and Powell (1987) and Weiss (1996). A flexible class of loss functions proposed by Elliott, Komunjer, and Timmermann (2005) sets n = 2 and ¯e 1 = 0 in (2.15), while L 1 (e) = (1 − α)|e|p^ and L 2 (e) = α|e|p^ , where p is a positive integer, and α ∈ (0, 1). This gives the EKT loss function,
L(e) ≡ [α + (1 − 2 α) 1 (e < 0)]|e|p^ , (2.17)
where 1 (e < 0) is an indicator function that equals 1 if e < 0, otherwise equals
Loss Functions •^25
value for Y, then the binary loss function can be written as^8
L ( f, y) =
0 if f = y = 0 , (1 − c) if f = 0 , y = 1 , c if f = 1 , y = 0 , 0 if f = y = 1.
Here we have set the loss from a correct prediction to 0 and normalized the losses from an incorrect forecast to sum to 1 by dividing by their sum; see Schervish (1989), Boyes, Hoffman, and Low (1989), Granger and Pesaran (2000), and Elliott and Lieli (2013). For (2.18) to be a valid loss function, we require that 0 < c < 1. This ensures that the properties of the loss function listed in (2.3) hold. Notice that the binary loss function can be written as L(e), since the loss is equal to
L ( f, y) = c 1 (e < 0) + (1 − c) 1 (e > 0).
2.2.2 Level- and Forecast-Dependent Loss Functions
Economic loss is mostly assumed to depend on only the forecast error, e = Y − f. This is too restrictive an assumption for situations in which the forecaster’s objective function depends on state variables such as the level of the outcome variable Y. More generally, we can consider loss functions of the form L( f, y) = L(e). The most common level-dependent loss function is the mean absolute percentage error (MAPE), given by
L(e, y) = a
∣∣^ e y
Since the forecast and forecast error have the same units as the outcome, the MAPE is a unitless loss function. This is considered to be an advantage when constructing the sample analog of this loss function and employing it to evaluate forecast methods across outcomes measured in different units. If the loss function is well grounded in terms of the actual costs arising from the forecasting problem, dependence on units does not seem to be an important issue—comparisons across different forecasts with different units should be related not through some arbitrary adjustment but instead in a way that trades off the costs associated with the forecast errors for each of the outcomes. This is achieved by the multivariate loss functions examined in the next section. Scaling the forecast error by the outcome in (2.19) has the effect of weighting forecast errors more heavily when y is near 0 than when y is far from 0. This is difficult to justify in many applications. Moreover, if the predictive density for Y has nontrivial mass at 0, then the expected loss is unlikely to exist, hence invalidating many of the results from decision theory for this case. Nonetheless, MAPE loss remains popular in many practical forecast evaluation experiments. More generally, level- and forecast-dependent loss functions can be written as L( f, y) but do not reduce to L(e) or L(e, y). Although loss functions in this class
(^8) See chapter 12 for a comprehensive treatment of forecast analysis under this loss function.
26 •^ Chapter 2
are not particularly common, there are examples of their use. For example, Bregman (1967) suggested loss functions of the form
L (^) ( f, y) = φ (^) (y) − φ (^) ( f (^) ) − φ′^ ( f (^) ) (y − f (^) ) , (2.20)
where φ is a strictly convex function, so φ′′^ > 0. Squared error loss is nested as a special case of 2.20. Differentiating (2.20) with respect to the forecast, f , we get
∂ L ( f, y) ∂ f
= −φ′^ ( f ) − φ′′^ ( f ) (y − f ) + φ′^ ( f )
= −φ′′^ ( f ) (y − f ) ,
which generally depends on both y and f. This, along with the assumption that φ′′^ > 0, ensures that the conditional mean is the optimal forecast. Bregman loss is further discussed in Patton (2015). In an empirical application of level-dependent loss, Patton and Timmermann (2007b) find that the Federal Reserve’s forecasts of output growth fail to be optimal if their loss is restricted to depend only on the forecast error. Rationalizing the Federal Reserve’s forecasts requires not only that overpredictions of output growth are costlier than underpredictions, but also that overpredictions of output are particularly costly during periods of low economic growth. This finding can be justified if the cost of an overly tight monetary policy is particularly high during periods with low economic growth when such a policy may cause or extend a recession.^9
2.2.3 Loss Functions That Depend on Other State Variables
Under some simplifying assumptions we saw earlier that the binary loss function takes a particularly simple form. More generally, if the loss function depends on Z and the loss associated with a perfect forecast depends on the outcome Y, then the loss function for the binary problem becomes
L ( f, y, z) =
−u 1 , 1 (z) if f = 1 and y = 1 , −u 1 , 0 (z) if f = 1 and y = 0 , −u 0 , 1 (z) if f = 0 and y = 1 , −u 0 , 0 (z) if f = 0 and y = 0 ,
where u (^) i, j (z) are the utilities gained when f = i, y = j , and Z = z. In this general form, the loss function cannot be simplified to depend only on the forecast error. Again restrictions need to be imposed on the losses in (2.21). First, we require that u 0 , 0 (z) > u 1 , 0 (z) and u 1 , 1 (z) > u 0 , 1 (z) so that losses associated with correct forecasts are not higher than those associated with incorrect forecasts. We might also impose that min{u 0 , 0 (z), u 1 , 1 (z)} > max{u 1 , 0 (z), u 1 , 0 (z)} so that correct forecasts result in a lower loss (higher utility) than incorrect forecasts. Finally, it is
(^9) Some central banks desire to keep inflation within a band of 0 to 2% per annum. Inflation within this band might be regarded as a successful outcome, whereas deflation or inflation above 2% is viewed as failure. Again this is indicative of a nonstandard loss function; see Kilian and Manganelli (2008).