Extracted main text — title through conclusion, appendix excluded. This is what our citation measures are computed over, published so the extraction can be checked by eye.
94,404 characters · 17 sections · 68 citation commands
The Uncertainty of Machine Learning Predictions in Asset Pricing
\ifnum0=1 \else
\fi
\onehalfspacing \setcounter{page}{1}
\listoftodos
\onehalfspacing \setcounter{page}{1}
Pension funds, wealth advisors, and hedge funds worldwide employ predictive methods to forecast asset returns and construct optimal portfolios that aim to maximize client returns. Recently, machine learning (ML) models have gained prominence in predicting asset returns, selecting portfolios, and estimating stochastic discount factors, with significant success in these areas. ML techniques, by capturing complex and nonlinear relationships in financial data, are particularly well-suited for enhancing portfolio management decisions. For example, within the mean-variance portfolio framework, ML methods are increasingly used to estimate expected returns and (co)variances, often leading to more effective portfolio allocations. The literature consistently demonstrates the effectiveness of machine learning in these and other applications (e.g., \citet*{gu2020empirical,bianchi2021bond,cong2021alphaportfolio, kelly2021virtue,patton2022risk,didisheim2023complexity,filipovic2024joint}).
Despite the success of machine learning in asset pricing, existing literature typically treats ML predictions as point estimates and conducts asset pricing analyses as if they were true values, overlooking the associated uncertainty. This is surprising, given that uncertainty about input parameters is widely acknowledged as critical in portfolio selection (e.g., \citet*{demiguel2009optimal}), and \citet*{garlappi2007portfolio} show that incorporating forecast uncertainty in mean-variance portfolio allocation leads to distinct economic insights. However, quantifying prediction uncertainty in ML forecasts, particularly with neural networks, remains a complex challenge, limiting their broader application in asset pricing. This paper addresses this gap by rigorously quantifying uncertainty in ML predictions and incorporating it into portfolio selection, specifically by constructing forecast confidence intervals (FCIs) for return predictions from neural networks.
We provide two methods for constructing forecast confidence intervals: one based on closed-form approximations and the other on the bootstrap. A key theoretical contribution of this paper is our proof that ML-based forecast methods exhibit an asymptotic distribution independent of the specific ML model used to generate the forecast. For example, the asymptotic distribution of neural network forecasts is not specific to neural networks. This implies that, under appropriate technical conditions, simpler machine learning methods—such as Fourier series, particularly those with closed-form estimators—can be utilized to construct confidence intervals. These intervals can be applied to algorithmically more complex machine learning estimators, whose confidence intervals would otherwise be intractable. Building on this insight, we derive an analytic formula for the ML forecast standard error, which is straightforward to calculate and paves the way for constructing the FCI.
For the second method, we propose a novel $k$-step bootstrap approach to simulating the asymptotic distribution of the ML forecast. This method overcomes the substantial computational burden associated with conventional bootstrap procedures, which require repeatedly fully training multiple neural networks from scratch. In contrast, the $k$-step bootstrap, originally developed by davidson1999bootstrap and andrews2002higher, starts with the previously trained neural network and retrains it for additional $k$ steps on a bootstrap resample. Through the $k$-step method, a pre-trained neural network can achieve a high level of training accuracy as quantified by the validity of the FCIs' coverages, even if $k$ is relatively small. \andy{revisit the sentence above}
We verify that both methods give correct asymptotic coverage probabilities for ML forecasts of expected returns, while effectively addressing cross-sectional dependence. Empirically, the two methods produce qualitatively similar results. We recommend that researchers compare the two as robustness check. In some applications, it may also be prudent to follow a conservative approach and use the larger of the two standard errors. Furthermore, through extensive simulations, we demonstrate that alternative bootstrap approaches, such as bootstrapping across assets or jointly across assets and time series, fail to produce a valid forecast confidence interval for machine learning forecasts.
In the second part of the paper, we apply our methods for quantifying estimation uncertainty to two standard problems in portfolio selection. We adopt the view of an uncertainty-averse (UA) investor. In the first application, we build on the framework introduced by garlappi2007portfolio: we treat the expected return in the classic mean-variance optimization problem as an unknown parameter varying within a confidence interval. Then, we find the optimal portfolio weights for the worst-case scenario of the mean-variance utility, varying the mean within the given interval. Extending the characterization by garlappi2007portfolio to the machine learning context, we apply the proposed neural network FCI to forecast the expected return of the UA-portfolio. We show that the solution can be formulated as an $\ell_1$-penalized regression problem. Our results establish that portfolio weights exhibit a “non-participation" region for risky assets, meaning an uncertainty-averse investor may choose not to invest in a risky asset if uncertainty about the asset's expected value exceeds a certain level. In addition, this region expands as the investor's uncertainty about the expected value increases. In contrast, the non-participation region is not present in the standard mean-variance approach which treats the expected returns as known. This insight offers a clear rationale for employing shrinkage approaches in portfolio selection, as developed by \citet*{ao2019approaching} and \citet*{kozak2020shrinking}. Empirically, the behavior of UA-portfolio of individual stocks aligns closely with our theoretical characterization, and generates higher Sharpe ratios than benchmarks that disregard forecast uncertainty.
In our second application, we focus on selecting assets with statistically significantly positive expected returns and constructing long-only portfolios. This exercise is particularly relevant for mutual funds, which do not employ short positions and thus face exactly this challenge of building long-only portfolios. The forecast confidence interval facilitates the selection of individual securities with significantly positive expected returns while controlling the false discovery rate, thereby mitigating the multiple testing problem as documented by \citet*{barras2010false} and harvey2020false. Empirically, our long-only investment strategy, which accounts for forecast uncertainty, yields higher out-of-sample average returns and similar standard deviations compared to benchmark methods that select assets without considering forecast uncertainty. In addition, it yields economically significant alphas when regressing the returns on various risk factors.
Our result holds in a setting where the machine learning model is not over-parameterized. Recently, kelly2021virtue and didisheim2023complexity derive results about the out-of-sample properties of portfolios in the context of overparameterized models where the number of parameters far exceeds the sample size. They show the interesting virtue of complexity in asset pricing models. Developing forecast confidence intervals in the virtue of complexity regime is an important question which we leave for future research.
The literature on machine learning in asset pricing has grown rapidly in recent years, such as \citet*{kelly2019characteristics, kozak2020shrinking,freyberger2020, chen2020deep, baba2022factor} and \citet*{li2022real}. Recently, several papers in asset pricing have made progress in the theoretical analysis of machine learning predictions. \citet*{fan2022structural} and \citet*{jaganannthan2023robust} propose the so-called “period-by-period” ML and developed the FCI around the forecast indices, which relies on estimating latent risk factors. Period-by-period learning requires training the machine learning model each period. In this paper, we instead focus exclusively on the popular “pooled machine learning” approach, which is the most common in forecasting applications and does not involve estimating factors.\footnote{Pooled machine learning pools the data over the cross-sectional and time series dimension in estimation.}
allena2021confident is one of the first papers in asset pricing that formally develops confidence intervals for risk premia predicted using machine learning. He proposes a Bayesian ML approach that flexibly draws from posterior distributions of the predicted risk premia and demonstrates that it successfully yields a confidence-based strategy with insightful economic interpretations. The Bayesian approach leverages the fact that posterior distributions, deduced from properly specified priors, can provide valid confidence intervals. In this paper, we take a different approach. In particular, we do not pursue Bayesian estimation. One of the two methods we develop for the forecast confidence interval is based on a derived analytic formula for the ML standard error. Meanwhile, we move to expand the insights obtained by allena2021confident and garlappi2007portfolio. In the context of portfolio selection under uncertainty aversion, we show that machine learning confidence intervals lead to qualitatively different investment behavior relative to the standard mean-variance model.
Another strand of literature in asset pricing studies model uncertainty (e.g., avramov2002stock,anderson2016robust,bianchi2024takes). In this line of research, no stance is taken on the “correct model,” as the goal is often to achieve robust portfolio allocations and predictions via Bayesian model averaging. Researchers therefore usually specify a probability distribution over the different models but do not derive the forecast uncertainty within a given model.
In theoretical econometrics, research on machine learning uncertainty is still at a very early stage. There are, however, few papers that rigorously develop the forecast standard error in the i.i.d. setting. In a seminal paper, chen1999improved set the stage for a rigorous analysis of the distributional properties of neural network predictions. In the field of econometric program evaluation, there is a popular method known as “doubly robust ML inference", which aims to develop asymptotic confidence intervals for some structural parameters in econometric models (e.g., \citet*{chernozhukov2018double}). These methods develop sophisticated procedures that require so-called orthogonal moment conditions and cross-fitting, which are quite different from the typical implementation of ML models in asset pricing. In addition, both approaches rely on the assumption of i.i.d. (or weakly dependent) data, which is invalid in asset pricing due to the strong cross-sectional dependence driven by common risk factors. This dependence is at the heart of the theoretical challenge in asset pricing. This paper proposes new approaches that explicitly account for this dependence and develops forecast confidence intervals with frequentist guarantees.
Consider the excess return of a portfolio: $$ z_{t+1}= \sum_{i=1}^N w_i y_{i,t+1}, $$ where $y_{i,t+1}, i=1,...,N$ denote the excess return for base asset $i$ from $t$ to $t+1$, relative to the risk-free rate. The portfolio weights $w_i$ are assumed to be known at time $t$, but they may vary over time. This contains the special case of an individual asset, i.e., $z_{t+1}=y_{1, t+1}$, or a broad market index. At period $T$, the objective is to forecast the expected excess return of the portfolio: $$ z_{T+1|T} =\mathbb E(z_{T+1}|\mathcal F_{T}) $$ where $\mathcal F_T$ denotes the information set up to time $T$. To do so, researchers observe a matrix of asset-specific characteristics (features), $x_{t-1}=(x_{1,t-1},...,x_{N,t-1}),$ where $x_{i,t-1}$ is an $d$-dimensional vector of characteristics for asset $i$ at time $t-1$, such as momentum, volatility, financial liabilities. In this setting, machine learning regression, e.g. gu2020empirical,bianchi2021bond have become a very successful and popular methodology to obtain point predictions. ML regressions build on the nonparametric model, $$ y_{i,t} = g(x_{i,t-1}) + e_{i,t} $$ with an unknown function $g(\cdot): \mathbb R^d\to\mathbb R$, where $e_{i,t}$ is the error term. The unknown function is learned by {pooling} all observed data (cross-sectionally and over time) and solving a least squares problem:
where the optimal solution is searched for in a function space $\mathcal G$ that typically corresponds to a specific machine learning method. Once $\widehat g(\cdot)$ has been computed, the expected excess return is predicted by plugging in the most recent characteristic $x_{i,T}$ and constructing a portfolio:
This approach is widely used in both academic research and industry applications, making it the primary forecasting method analyzed in this paper.
The choice of the function space $\mathcal G$ corresponds to the specific ML method to forecast excess returns. For example, neural networks, random forests, boosted regression trees, or random feature regressions give rise to different $\mathcal G$'s. For the purpose of deriving confidence intervals, we focus on two types of machine learning methods, $$ \mathcal G = \text{either } \mathcal G_{\operatorname{DNN}} \text{ or } \mathcal G_B. $$ Here $\mathcal G_{\operatorname{DNN}} $ corresponds to the use of deep neural network (DNN) functions, which is a collection of all possible neural network functions with a predetermined architecture — specifying the width and depth of the layers and the activation functions for each neuron. Then by minimizing ((ref)), we find the optimal neuron biases and weights so that the neural network function $\widehat g(\cdot)$ optimally fits the in-sample data.
Alternatively, the more classic nonparametric regression gives rise to an alternative specification $\mathcal G=\mathcal G_B$, which uses a set of basis functions: $\Phi(x)= (\phi_1(x),...,\phi_J(x))$ such as the Fourier basis. Then, ((ref)) searches for the optimal function within a simpler space: $$ \mathcal G_B= \{\Phi(x)'\theta: \theta\in\mathbb R^J\}, $$ and the function $\widehat g(\cdot)$ is estimated by finding the best combination of the basis functions.
The crucial distinction between $\mathcal G_{\operatorname{DNN}}$ and $\mathcal G_{B}$ is that the estimators in $\mathcal G_B$ admit a closed-form representation, whereas $\mathcal G_{\operatorname{DNN}}$ does not. However, $\mathcal G_{\operatorname{DNN}}$ is more appealing in predicting expected returns in asset pricing leveraging the advantages of sophisticated machine learning methods, as documented in gu2020empirical and bianchi2021bond. The objective of this paper is to construct forecast confidence intervals for predictions made with neural networks $\mathcal G_{\operatorname{DNN}}$, but it will soon become clear that $\mathcal G_{B}$ also plays an important role in our construction. Throughout, we refer to $\mathcal G_{B}$ as the “closed-form ML", such as Fourier series regressions, B-Splines -- which are more classic nonparametric regression models.
Despite the great popularity and empirical success of machine learning predictions, little work has been devoted to understanding the structure and sources of predictability. However, understanding the structure of the prediction, $\widehat z_{T+1|T} $, is crucially important to quantifying the prediction uncertainty. Recently, fan2022structural provide a thorough analysis by bridging between the machine learning model and factor models. They suppose that excess returns follow a conditional factor model (also see \citet*{gagliardini2016time, zaffaroni2019factor}): $$ y_{i,t} = \alpha_{i,t-1} + \beta_{i,t-1}'f_t+ u_{i,t} $$ where $\alpha_{i,t-1}$ and $\beta_{i,t-1}$ are respectively the “alpha" and “beta" of the asset, $f_t$ is the set of (possibly latent) risk factors, and $u_{i,t}$ is the idiosyncratic return. In addition, suppose characteristics are informative about factor loadings (betas) and mispricing (alpha), i.e., there are functions $g_{\alpha}$ and $g_{\beta}$ so that we can rewrite alpha and beta as:\footnote{This formulation is formalizing the notion that asset characteristics are informative about risk exposures which is also documented in rosenberg1973prediction,jagannathan1996conditional,connor2012efficient,gagliardini2016time,kelly2019characteristics.} $$ \alpha_{i,t-1} = g_{\alpha}(x_{i,t-1}) ,\quad \beta_{i,t-1} = g_{\beta}(x_{i,t-1}). $$
We can thus rewrite the asset pricing model as
where $v_t:= f_t- \mathbb E f_t$. Both $v_t$ and $u_{i,t}$ are mean-zero processes contributing to the error term:
then the first term is the exposure to factor shocks, while the second term is the idiosyncratic shock. Under the assumption of constant prices of risk, i.e. $\lambda_f:=\mathbb Ef_t$ does not change over time, we can define
Then indeed, ((ref)) can be formulated as the ML model $y_{i,t} =g(x_{i,t-1}) + e_{i,t} $, with $g(\cdot)$ and $e_{i,t}$ defined in ((ref)) and ((ref)) respectively. Therefore, by applying ML regressions within the context of this model, fan2022structural show that $\widehat g(x)$ is estimating $g_{\alpha}(x)+ g_{\beta}(x)'\lambda_f$. More formally, they show that the ML function has the following (probability) limit: $$ \widehat z_{T+1|T}\to^P z_{T+1|T}=\sum_{i=1}^Nw_i[g_{\alpha}(x_{i,T})+ g_{\beta}(x_{i,T})'\lambda_f]. $$ This shows that the predictive ability of machine learning regressions arises from capturing mispricing and risk premia, i.e. both $\sum_{i=1}^Nw_i\alpha_{i,T}$ and $\sum_{i=1}^N w_i \beta_{i,T}'\lambda_f$ -- are key components of expected returns.
Understanding the properties of the predicted expected portfolio return, $\widehat z_{T+1|T}$, is an essential first step towards understanding machine learning predictability. Studying the uncertainty of ML forecasts is yet a challenging problem. Most statistical results are developed for i.i.d. or weakly dependent errors, however in asset pricing this is a tenuous assumption as explained by allena2021confident: we should expect to see strong cross-sectional dependence. The source of the cross-sectional dependence can be illustrated through the lens of the (characteristic-based) factor model. Recall the standard ML model:
The errors are strongly cross-sectionally dependent. Take two assets, $i$ and $j$, then we can characterize the covariance of their errors by using equation ((ref)):
We expect to see a strong correlation because the assets are exposed to the same sources of systematic risk. Hence, the regression model ((ref)) is not the usual ML model with i.i.d. errors. This is why new methods are needed to explicitly consider the strong cross-sectional dependence structure.\footnote{allena2021confident specified a novel prior to account for the strong dependences in the Bayesian framework. A possible alternative approach is to treat factors as “interactive fixed effects" as in bai09 and explicitly estimate them. However, the method in bai09 or freyberger2018non does not cover the case of sophisticated machine learning methods, nor is it the “standard" implementation in the applied forecasting literature. We will therefore not pursue this approach.} It is essential to stress that accounting for the dependence in the errors is not purely an econometric challenge. From (ref), it is clear that we vastly underestimate the risk associated with a prediction if we incorrectly assume i.i.d. errors. The Monte Carlo evidence in Section (ref) will illustrate that ignoring the cross-sectional dependences will vastly understate the prediction uncertainty.
We now discuss the intuition of our approach to computing the ML standard error. Recall that the expected excess return, $\widehat z_{T+1|T}$, is predicted using either neural networks (corresponding to $\mathcal G_{\operatorname{DNN}}$) or a closed-form ML method (corresponding to $\mathcal G_{B}$). The intuition of our constructed FCI is based on the following theorem, which is our first main result, showing that $\widehat z_{T+1|T}$ has the same asymptotic distribution regardless of which specific ML method is used.
The theorem has two important implications. First and foremost, fundamentally, the asymptotic distribution of ML forecasts does not depend on the specific machine learning model $\mathcal{G}$ in ((ref)). In the asymptotic expansion, $\mathcal B_{t-1}$ depends on a function $\zeta^*(\cdot)$. Although the closed-form expression for the function $\zeta^*(\cdot)$ is very difficult to derive for neural networks, it is entirely determined by the quantities of the asset pricing model ((ref)), but not by the specific choice of the ML method, which can be sophisticated machine learning prediction $\mathcal G_{\operatorname{DNN}}$ (neural networks) or closed-form prediction $\mathcal G_B$ (e.g., Fourier series regression). The main econometric intuition is that the predictor is obtained by minimizing a regular loss function -- it is the loss function rather than the choice of $\mathcal{G}$ that ultimately determines the asymptotic distribution.\footnote{Note that this result also allows for small shrinkage in penalized regressions. However, if models are strongly penalized, as with the Lasso, this induces a shrinkage bias, leading to different asymptotic phenomena ZhangZhang:CI. }
This insight forms the foundation of our approach to constructing confidence intervals for the expected return predicted by neural networks. As explained in more detail in Section (ref), one of the two proposed methods approximates the standard error of the neural network forecast using an analytic standard error from closed-form ML. The latter is straightforward to derive due to its closed-form nature.
The second implication of the theorem is that the prediction error $\mathcal B_{t-1}(f_t-\mathbb Ef_t)$ is only driven by the common factor shocks rather than the idiosyncratic errors. Thus, the rate of convergence is $O_P(1/\sqrt{T})$, which is much slower than $O_P(1/\sqrt{NT})$ for the usual panel data models. This aligns with the well-established asset pricing intuition that the factor risk premium can only be learned well over time, rather than cross-sectionally, due to the strong cross-sectional dependence. Therefore, the dominant source of uncertainty comes from the time series rather than the cross-sectional variation.
Theorem (ref) requires three technical assumptions, which are stated in the appendix. Assumption (ref) is a standard condition about the dependence of the data and the tail behavior. Assumptions (ref) and (ref) concern the complexity of the machine learning space. Essentially, it says that the complexity must be controlled and the models cannot be overparametrized. This is in contrast to the setting of kelly2021virtue and didisheim2023complexity, who derive appealing features of overparametrized models in portfolio construction. Developing distribution theory in such a setting is extremely challenging, but interesting and will be left for future work in theoretical econometrics.
Throughout the rest of the paper, we denote $\widehat z_{T+1|T}$ as the expected return predicted by neural networks, i.e. $\mathcal G_{\operatorname{DNN}}$. These models are among the most successful in asset pricing, as reviewed before. The objective is to construct its forecast confidence interval. Each of the two implications outlined in the previous subsection motivates a distinct method for this purpose. In the sequel, we introduce these two methods. We then later demonstrate the usefulness of these methods in asset pricing in Section (ref).
We first introduce a closed-form ML method, building on our main result in Theorem (ref). The asymptotic distribution ((ref)) derived in Theorem (ref) demonstrates that the asymptotic variance of $\widehat z_{T+1|T}$ is the same regardless of whether $ \mathcal G= \mathcal G_{\operatorname{DNN}}$ or $\mathcal G_{B}$. This intuition allows us to approximate the forecast standard error using that of the closed-form ML method, which is much easier to derive.
For the closed-form ML we set $\mathcal G=\mathcal G_B$ in ((ref)) and use Fourier series to make predictions. In this case, let $\Phi(x)$ be the vector of Fourier bases, and the regression model is:
Estimators using the Fourier series can be obtained in closed form because of their OLS-type analytic solution:
$$ \widehat g_B(\cdot )= \Phi(\cdot)' (\Psi'\Psi)^{-1}\sum_{i,t}\Phi(x_{i,t-1})y_{i,t}, $$ where $\Psi$ is the $NT\times J$ matrix stacking all $\Phi(x_{i,t-1})$. Therefore, we can easily derive its asymptotic standard error:
where $W=(w_1,...,w_N)$ are the portfolio weights, $\Phi_{t-1}=(\Phi(x_{1,t-1}),...,\Phi(x_{N,t-1}))$, and $H ' = W' \Phi_T (\Psi'\Psi)^{-1} .$ This is straightforward to estimate by:
where $\widehat e_{t}$ is the vector of residuals, $\widehat e_{i,t}:=y_{i,t}-\widehat g(x_{i,t-1})$.
It is important to note that we employ closed-form ML, $\widehat g_{B}(\cdot)$, only to compute the forecast standard error. The forecast itself, $\widehat g(\cdot)$ as in ((ref)), is still generated by a sophisticated neural network. This leverages our result that the two ML predictions have the same asymptotic standard error. It is therefore tempting to ask why we should employ more sophisticated neural networks in the first place. The answer is that the benefits of using neural networks or related methods do not arise from a smaller standard error, but from fewer constraints in handling highly nonlinear functions and the capability of approximating larger classes of asset pricing functions.
To be specific, Theorem (ref) shows that for both DNN and closed-form ML predicted $\widehat z_{T+1|T}$, $$ \widehat z_{T+1|T} - z_{T+1|T} =\frac{1}{T}\sum_{t=1}^T\mathcal B_{t-1}(f_t- \mathbb E f_t)+ o_P(T^{-1/2}). $$ The remainder error term $o_P(T^{-1/2})$ captures what is known as “approximation bias", which arises from approximating the unknown expected return function $g(x)$ using either machine learning method. While both methods exhibit a diminishing approximation bias, the rate of decay differs. Neural networks, due to the adaptivity to the intrinsic dimension of the input features, \footnote{See schmidt2020nonparametric,kohler2021rate and fan2022structural for detailed discussions on theoretical advantages of neural networks.} can flexibly approximate a broad class of nonlinear functions with a rapidly diminishing approximation bias. In contrast, the closed-form ML (e.g., Fourier series) is capable of approximating a much narrower class of functions, and its approximation bias decays at a slower rate as the number of input features increases, due to the well-known curse of dimensionality. This makes closed-form ML unsuitable for direct use in return prediction. However, its larger bias does not affect its asymptotic variance, which still provides a good approximation to the variance of the predicted returns from the neural network.
The following theorem is our second main result, which formally justifies the validity of $\widehat\operatorname{SE}(\widehat z_{T+1|T})$ as the standard error when $\widehat z_{T+1|T}$ is constructed using neural networks.
We propose an alternative method for constructing FCIs, based on the time-series bootstrap. The bootstrap computes the critical value by repeatedly resampling from the original data set and using the quantile of the neural network predictors recomputed from the resampled data. Unlike the method of analytic standard error, the bootstrap does not involve closed-form ML methods, and therefore requires weaker conditions.
However, the performance and validity of bootstrap depend critically on how the bootstrap data are generated. In the asset pricing context, the bootstrap data should properly capture the primary sources of uncertainty to predicted expected returns. Theorem (ref) shows that the forecast uncertainty is mainly driven by time series variation. Thus, we can cluster in time by applying the wild bootstrap to mimic the sampling distribution of $\widehat{z}_{T+1|T}$.\footnote{In the case of serial correlation, the block bootstrap (kunsch1989jackknife) or the stationary bootstrap (politis1994stationary) can be applied directly in our setting.} Specifically, let $\eta_t^*$ denote an i.i.d. sequence of standard normal random variables and let $\widehat{g}(\cdot)$ denote the learned function using neural networks. Define the bootstrap residuals as:
We then apply neural networks to the resampled excess return $y_{i,t}^* = \widehat g(x_{i,t-1}) + e_{i,t} ^*$ and $x_{i,t-1}$ to repredict the expected return, and repeat this step many times. The forecast critical value is given by the bootstrap quantile of the repeated predictions.
A potential limitation of the bootstrap procedure is the enormous computational burden. For example, estimating with 100 bootstrap iterations requires training 100 separate neural networks, one for each bootstrap sample. Fully training these neural networks is computationally very costly, limiting the applicability of bootstrap-based inference for larger machine learning models. To address this issue, we propose a $k$-step bootstrap method for neural network inference, which significantly reduces computational burden. The $k$-step bootstrap was initially proposed and studied by davidson1999bootstrap and andrews2002higher in the context of making inference for nonlinear models. The idea is that, instead of fully training the neural network for each bootstrap sample, we only train it iteratively for $k$ epochs, with a relatively small $k$ such as 10 or 20. This approach takes advantage of the observation that the fully trained function from the original data, $\widehat{g}(\cdot)$, provides an excellent starting point for training in the bootstrap data. Thus, for each bootstrap re-sample, we initialize with $\widehat{g}_0^*(\cdot) = \widehat{g}(\cdot)$ and then train the network for $k$ epochs.
The full algorithm is given as follows:
$k$-step Bootstrap Algorithm.
It is critical to note that we generate $\eta_t^*$ in Step 1, which only varies over time but not across individual assets. Hence, assets share the same $\eta_t^*$ at each period. This is because expression (ref) clearly shows that it is the time series variation that determines the sampling distribution of the ML model. In contrast, if the bootstrap sample were wrongly generated, such as independently from cross-sectional residuals by either generating $\eta^*_{it}$ (resampled idenpendently across time and firms, this corresponds to the standard bootstrap implementation) or $\eta_i^*$ (resampled indepdently across firms, but fixed over time) instead of $\eta_t^*$, it will not correctly capture the strong cross-sectional dependence, and will dramatically understate the forecast uncertainty. We illustrate this in simulation in Section (ref).
Theorem (ref) formally justifies the proposed bootstrap confidence interval for predicted expected returns.
We conduct Monte Carlo simulations to assess the constructed confidence intervals, using a data generating process calibrated to excess return data; the monthly returns of 3184 assets listed in NYSE and Nasdaq from January 2015 through December 2017 (calibrated period). Simulated data are generated from a conditional three–factor model, with $d$ characteristics as follows: for $k=1,...,d$, $$ x_{i,t,k}= \frac{1}{N}\text{rank}( \bar x_{i,t,k}),\quad \bar x_{i,t,k} =0.7 \bar x_{i,t-1,k} + 0.5\epsilon_{i,t,k},\quad \epsilon_{i,t,k}\sim \mathcal N(0, 1). $$ The characteristics are generated via AR(1), then normalized by taking the cross-sectional ranking. Characteristics within asset $i$ have strong temporal dependence over time, but they are independent across assets. The $\beta$-functions are generated as follows:
The three factors are generated from a multivariate normal distribution whose mean vector and covariance matrix are calibrated from the monthly return of Fama-French-three factors in the calibrated period. Finally, the idiosyncratic error is generated from a heteroskedastic normal distribution: $u_{i,t}\sim\mathcal N(0,s_{i}^2\sigma^2)$, and $s_i\sim\text{Unif}[0.1,0.9]$. Here we set $\sigma$ so that Median$(s_i^2\sigma^2/\operatorname{Var}(y_{i,t}))=50\%$. Therefore, the idiosyncratic variances are determined so that the overall signal to noise ratio is fifty percent.
Throughout we fix $N=500$ assets, $T=240$ periods and $d=80$ characteristics. The goal is to forecast $z_{T+1}:=\frac{1}{N}\sum_iy_{i,T+1}$ using a pooled neural network and examine the forecast distribution using the proposed methods. We train three-layer feedforward neural networks with 4 neurons on each layer. The training algorithm is Adam with learning rate 0.01 and conducted over 500 epochs.
To quantify the forecast uncertainty, we compute the forecast standard error of the neural network predictions, using both of the proposed methods. For method I closed-form ML, we compute the t-statistic $$ \frac{\widehat z_{T+1|T}- z_{T+1|T}}{\widehat{\text{SE}}(\widehat z_{T+1|T})}, $$ where the standard error $\widehat{\text{SE}}(\widehat z_{T+1|T})$ has an analytical form ((ref)). Here we use five Fourier bases for $\Phi(x)$. For method II “$k$-step bootstrap", we generate the wild residual $\eta_t$ from the standard normal, bootstrap 100 times, and implement the $k$-step DNN bootstrap with $k=10.$ Then we compute the interquartile range of bootstrap, defined as $$ \sigma^* := \frac{q^*_{0.75}-q^*_{0.25}}{z_{0.75}- z_{0.25}} $$ where $q^*_{\alpha} $ denotes the $\alpha$-quantile of bootstrap samples $ \sum_i w_i\widehat g^{*,b}(x_{i,T})- \widehat z_{T+1|T} $, and $z_{\alpha}$ denotes the $\alpha$-quantile of the standard normal distribution. Then we also compute the t-statistic using $\sigma^*$ in place of $\widehat{\text{SE}}(\widehat z_{T+1|T})$. The interquantile range is a good proxy for the standard error obtained using bootstrap distribution, which is often used instead of the usual bootstrap standard error, because the former is guaranteed to be consistent but the latter is not.
The top two panels of Figure (ref) plot the histograms of the $t$ statistics over 1000 simulations and the standard normal density function. The $t$-statistics are standardized by either $\widehat{\text{SE}}(\widehat z_{T+1|T})$ (left panel) or $\sigma^*$ (right panel). We see that although there are only 100 replications, the histograms of the t-statistics fit well to the standard normal density. Hence both proposed methods for quantifying the forecast uncertainty seem promising.
It is critical to apply the bootstrap guided by theory. In particular, the resampling must reflect the dominant source of uncertainty, namely the factor shocks from the time series. To illustrate this, we show the distribution one would obtain if the standard bootstrap were applied, i.e. the bootstrap is applied incorrectly. The bottom two panels of Figure (ref) are the histograms of the bootstrap $t$-statistics (standardized by the bootstrap interquartile range), but the bootstrap residual is generated as $ e_{i,t} ^*= (y_{i,t}- \widehat g(x_{i,t-1})) \eta_i^* $ (the bottom left panel) and $ e_{i,t} ^* = (y_{i,t}- \widehat g(x_{i,t-1})) \eta_{i,t}^* $ (the bottom right panel), where $\eta_i^*, \eta_{i,t}^*\sim \mathcal N(0,1)$. These bootstraps mistreat the forecast uncertainty as driven by the cross-sectional variation (because $\eta_i^*$ and $\eta_{i,t}^*$ both vary across $i$). Figure (ref) clearly shows that the misuse of bootstrap vastly understates the uncertainty.
In this section, we outline two applications in which the confidence intervals developed for machine learning predictions can be used. The first one leads to a sparse portfolio implementation, which features a region of “non-participation” (dow1992uncertainty) in portfolio allocation. In this region, the investor does not invest in a risky asset if the associated uncertainty is too large. In the second application (Section (ref)), we show how the derived FCI can be used to select asset with significantly positive expected returns via multiple hypothesis testing. In addition, in the Appendix ((ref)), we also study a robust optimization approach building on hansen2008robustness.
In the first application, we apply our developed FCI to portfolio allocation. Classic portfolio theory assumes that the investor knows the population moments determining her portfolio decisions. One of the major challenges in operationalizing this theory has been that these parameters need to be estimated and that estimation errors can often dominate portfolio decisions. This issue has long been recognized, for example, the early analysis in klein1976effect and michaud1989markowitz. These shortcomings have sometimes led researchers to question whether portfolio theory can be useful for applications as pointed out in demiguel2009optimal and spurred a subsequent quest to address some of these shortcomings as in jagannathan2003risk,kan2007optimal,tu2011markowitz,yuan2023naive.
In a seminal paper, garlappi2007portfolio introduce a disciplined way to confront the estimation uncertainty in portfolio selection by introducing an uncertainty-averse investor. Their formulation builds on a large literature in economic theory such as ellsberg1961risk, gilboa1989maxmin, epstein1994intertemporal that carefully distinguished the effects of risk vs. uncertainty aversion. In the context of portfolio selection, a risk-averse, expected utility investor behaves as if she knows the expected return and (co)variances. An uncertainty-averse investor, however, considers estimation uncertainty and integrates it into the portfolio selection problem. Implementing this approach requires the investor to be able to characterize the uncertainty, i.e. have a forecast confidence interval for the expected returns.
chopra2013effect show that the effect of uncertainty in means on portfolio selection is much larger than the effect of uncertainty in variances. Our analysis therefore focuses on the effect of means. A machine learning-based estimation of covariances and their effect on portfolio selection is left for future research. Indeed, many early studies have struggled to implement mean-variance portfolio theory because means are notoriously difficult to estimate from time series. In our study, we leverage the benefits of forecasts of expected returns obtained from neural networks and also incorporate the associated estimation uncertainty. In the following, we briefly recall the main definitions of garlappi2007portfolio.
We consider the allocation among $R$ risky assets, denoting their multivariate, conditional expected excess return as $z_{T+1|T}=(z_{1,T+1|T},...,z_{R, T+1|T})'$ and its prediction from neural networks as $\widehat z_{T+1|T}=(\widehat z_{1,T+1|T},...,\widehat z_{R, T+1|T})'$. These basis assets may be factor portfolios. In addition, we also consider the case in which the basis assets are individual asset returns. We denote the covariance matrix, $\Sigma_T$, which can be either for individual assets or factor portfolios. Throughout, we will denote the portfolio weights, which we aim to solve for as $\mbox{\boldmath $\omega$}=(\omega_1,...,\omega_R)'$. We can now describe the portfolio selection problems.\\
The Mar, i.e. standard mean-variance (MV) problem is given as:
where $\gamma > 0$ is the coefficient of risk aversion. In this problem, $\widehat{z}_{T+1|T}$ is taken as given without accounting for its associated estimation uncertainty. In contrast, the uncertainty-averse formulation explicitly considers the estimation uncertainty. It takes a “max-min” form. It can be interpreted as finding the best portfolio in the worst case for the expected return, i.e.
where $\text{FCI}$ is the forecast confidence interval for the expected return. The forecast confidence interval takes the following form:
$$ \text{FCI}= [\widehat z_{1,T+1|T} - q_{1,\alpha},\widehat z_{1,T+1|T} + q_{1,\alpha} ]\times\cdots \times [\widehat z_{R,T+1|T} - q_{R,\alpha},\widehat z_{R,T+1|T} + q_{R,\alpha} ], $$ where $q_{i,\alpha}$ is the critical value for $\widehat z_{i,T+1|T}-z_{i,T+1}$ under significance level $\alpha$ obtained using either the analytic forecast standard error or bootstrap. For instance, using the analytic standard error, we can take
$$ q_{i,\alpha}= \widehat \operatorname{SE}(\widehat z_{i,T+1|T}) \times \epsilon_{\alpha}, $$ where $\epsilon_{\alpha}$ corresponds to the level uncertainty aversion. If the bootstrap is used to obtain a forecast confidence interval, we can use $$ q_{i,\alpha}= q^*_{i,\alpha}, $$ which is the $1-\alpha$ quantile of the bootstrap distribution of $ \widehat z_{i,T+1|T}$. In applications, particularly when multiple assets are considered, controlling for the Type I error rate for multiple testing is also desirable. A simple adjustment is the Bonferroni correction, i.e. setting $\alpha = 0.05/R$.
While the intuition of problem (ref) is clear, it may appear hard to solve because of the inner maximization. garlappi2007portfolio characterize each element of the solution as a function of other elements. Our contribution in this framework, is in the following theorem, which shows that the UA-MV problem can be reformulated as a $\ell_1$- penalized optimization problem, known as Lasso.
This result offers an economic justification for using penalized shrinkage portfolio selection, as developed by ao2019approaching and kozak2020shrinking. Furthermore, it justifies that the penalization parameter should be explicitly chosen as $q_{\alpha,i}$, the quantile of the ML forecast error. The following remarks provide additional guidance for implementation in different cases.
The $\ell_1$-penalized formulation facilitates the economic interpretation of the behavior of uncertainty-averse investors compared to that of mean-variance investors. To gain the intuition, in below we study a simple case of a single risky asset:
where $q_{\alpha}$ denotes the $(1-\alpha)$-quantile for the predicted expected return. Corollary (ref) provides a closed-form solution and allows for a comparison with the mean-variance solution in which the effect of estimation uncertainty can be seen directly. In the following, we denote $(x)_+ = \max\{x,0\}$ and $\operatorname{sgn}(x)$ as the sign of $x$.
In the above theorem, $\omega^{\operatorname{MV}}$ is the classic mean-variance portfolio without uncertainty constraints, i.e. the solution to $$ \max_{\omega} \omega \widehat z_{T+1|T} -\frac{\gamma}{2} \omega^2\sigma^2. $$ The corollary directly illustrates why the UA-MV problem yields possible non-participation. For a fixed coefficient of risk aversion ($\gamma$) and variance ($\sigma^2$), an investor will choose not to invest in the risky asset if the estimation uncertainty ($q_{\alpha}$) is too large. More importantly, this result provides a direct economic interpretation of the UA-MV problem. The solution captures investor behavior in which she tests the following null hypothesis: $$ H_0:\quad z_{T+1|T} = 0. $$
On the one hand, when she does not reject the null hypothesis, $|\widehat{z}_{T+1|T} | \leq q_{\alpha}$, the investor finds the predicted excess return not significantly different from zero as the level of uncertainty is too large. In this case, she will hold no position in the risky asset and $\omega^{\operatorname{UA}} = 0$. Her optimal portfolio is then solely holding the risk-free asset. At first glance, this may seem like excessively conservative behavior. However, bessembinder2018stocks performs an extensive empirical investigation of this hypothesis and finds that many stocks do not outperform treasuries ex-post in a significant way.
On the other hand, when the investor predicts that the expected return of the risky asset is significantly different from the risk-free rate, which happens if $|\widehat{z}_{T+1|T} | > q_{\alpha}$, she then starts investing in the risky asset. The decision of whether to short or long the risky asset (the sign of $\omega^{\operatorname{UA}}$) is determined by the sign of $\widehat{z}_{T+1|T}$. However, even in this case, the investor will still invest more cautiously in the risky asset by shrinking her investment towards the risk-free rate. For instance, suppose the investor finds that $\widehat{z}_{T+1|T} > q_{\alpha}$, then her allocation in the risky asset is $$ \omega^{\operatorname{UA}} = \omega^{\operatorname{MV}} - \frac{q_{\alpha}}{\gamma \sigma^2} > 0. $$ Instead of adopting the classic mean-variance portfolio, she reduces her allocation to the risky asset, and the amount of reduction, $q_{\alpha}/(\gamma \sigma^2)$, reflects her tolerance towards uncertainty, which is closely linked to risk aversion.
We illustrate the optimal solution to the UA-MV problem in Figure (ref). The upper panel of Figure (ref) plots the optional min-max weight, $\omega^{\operatorname{UA}}$, against the classic MV portfolio. Here we fix the level of forecast standard error (FSE) and thus $q_{\alpha}$. As we can see, $\omega^{\operatorname{UA}}$ is zero for small magnitudes of $|\omega^{\operatorname{MV}}|$, i.e., the investor does not allocate towards this asset. The allocation toward the risky assets starts to increase but with constant shrinkage relative to the MVE as the latter deviates from zero. The lower panel of Figure (ref) plots $\omega^{\operatorname{UA}}$ as a function of the forecast standard error for a fixed $\omega^{\operatorname{MV}}$. As the forecast standard error increases, her position in the risky asset decays linearly and eventually becomes zero.
In the case of two risky assets and no risk-free asset, we also provide an explicit solution and discuss its properties in (ref).
In the second application, we apply the FCI to security selection. The literature often considers long-short portfolios sorted on characteristics or return predictions typically ignoring short-sale costs. In a recent study muravyev2022anomalies obtain implied short-sale costs from the equity options markets and find that many anomalies are no longer profitable after accounting for short-selling fees. Moreover, several major market participants such as mutual funds are either prohibited from short-selling or do not engage in shorting for other reasons. chen2013first document that fewer than 10% of mutual funds engage in short-selling and in general do not have large short positions. More generally, and in particular in the light of the findings of bessembinder2018stocks, it is natural to ask whether expected returns are indeed significantly positive. In an intriguing analysis, he documents that the US equity premium is indeed highly concentrated and can be attributed to about 5% of stocks. While it is unlikely that our forecast confidence intervals (or any other method) can extract all ex-post winners, the use of machine learning FCI, as we describe below, highlights a good way of finding securities with positive expected returns.
In the following, we consider a long-only mutual fund manager. She needs to build a portfolio with $K$ stocks. Rather than merely allocating her funds toward the $K$ stocks with the highest predicted returns, she aims to allocate toward securities for which she has stronger conviction, i.e. those that have significantly positive predictions. So for each security under consideration, she conducts a hypothesis test $$ H_0^i: z_{i,T+1|T} = 0,$$ versus the one-sided alternative $$ H_a^i: z_{i,T+1|T} > 0 $$ for each $i=1,..., R,$ i.e., she aims to detect which stocks have significantly and positively predicted expected returns. Given that there may be a large number of securities under consideration, this is a multiple hypotheses testing problem. Alternatively, one might consider testing if an expected excess return is significantly larger than the transaction costs associated with trading the security. We leave this extension for future research.\footnote{jensen2024machine highlight the importance of transaction costs in the context of machine learning portfolios.}
We compute the t-statistics of the neural network predicted excess return for each asset: $$ t_i= \frac{\widehat z_{i,T+1|T}}{\widehat\operatorname{SE}(\widehat z_{i,T+1|T})}. $$ Let $p_i$ denote the corresponding p-value. We then determine a cutoff value $c_0>0$ so that $H_0^i$ is rejected if $p_i<c_0$. The cutoff value should be determined to adjust for the type I error under the multiple testing setup. One of the widely used multiple testing adjustments is based on the false discovery rate, defined to be the expected value of $\mathcal F/\mathcal R$, where $$ \mathcal F=\sum_{i=1}^N1\{i\leq R: p_i<c_0,\text{ but } z_{i,T+1|T}=0 \} =\sum_{i=1}^N1\{H_0^i \text{ is falsely rejected}\} $$ and $$ \mathcal R=\sum_{i=1}^N1\{i\leq R: p_i<c_0 \} =\sum_{i=1}^N1\{H_0^i \text{ is rejected}\} $$ We follow the benjamini1995controlling procedure, who first sort the p-values $p_{(1)}\leq\cdots \leq p_{(R)}$ and determine $$ c_0= p_{(K)},\quad \text{where } K = \max\{i: p_i\leq \alpha i/R \} $$ where $\alpha$ is the desired significance level such as 0.05. Then the false discovery rate can be controlled to be below $\alpha$, and is robust to cross-sectional dependence among tests (see benjamini2001control).
As illustrated by sullivan1999data, barras2010false and harvey2020false, multiple testing is a valuable tool for mitigating data-snooping bias in performance evaluation and for selecting assets that are both statistically and economically significant. In our empirical study, we apply the outlined procedure at the individual stock level, where excess returns are predicted using neural networks. Our results demonstrate that selecting assets based on ML t-statistics, when adjusted by the forecast standard errors, delivers improved performance compared to naive selections that do not account for prediction uncertainty.
We take the dataset of jensen2022there as our starting point. It uses stock returns, volume, and price data from the Center for Research in Security prices (CRSP) monthly stock file. Our sample starts in January 1955 and ends in December 2021. The total number of stocks is slightly over 23,000 and the average number of stocks per month is approximately 3,663. Following standard conventions in the literature, we restrict the analysis to common stocks of firms incorporated in the US trading on NYSE, Nasdaq or Amex. Balance sheet data are obtained from Compustat. In order to avoid potential forward-looking biases, we lag all characteristics that are built on Compustat annually by at least six months and all that build on Compustat quarterly by at least four months. In order to mitigate a potential back-filling bias as noted by banz1986sample, we discard the first 24 months for each firm. We impute missing data using the method of freyberger2024missing. Table (ref) in the Appendix provides an overview of the 123 characteristics we employ. We obtain the 1-month T-Bill rate from Kenneth French's data library.
Following gu2020empirical we split the sample into 18 years of training (1955 - 1972), 10 years of validation (1973 - 1982) and use the remaining years (1983 - 2021) for out-of-sample testing. We re-train the model every 12 months and increase the training sample by 1 year, keeping the validation sample fixed at 10 years, but we roll it forward so that the most recent 12 months are included. For the neural network model, we use a three-layer feedforward neural network with 32, 16 and 8 neurons on the hidden layers.\footnote{Section (ref) in the Appendix gives an overview of the tuning parameters.}
After fitting the neural network, we substitute in the firm level characteristics $x_{i,T}$, and predict the individual stocks for month $T+1$ as $$ \widehat y_{i,T+1|T} = \widehat g(x_{i,T}). $$ From the previous step, we obtain predictions for each firm $i$. We then either use the predictions for individual firms in portfolio selection. We use the expected returns and their confidence intervals obtained through the machine learning models.
To compute forecast confidence intervals, we implement both the closed-form ML approximation and the $k$-step bootstrap. For the bootstrap, we set $k=10$, i.e. we re-train the models on each bootstrap sample for 10 epochs. The closed-form ML approximation uses a Fourier basis expansion $\phi(x)= (\sin(j\pi x/4), \cos(j\pi x/4), j=1...3)$. We then obtain the standard error for individual assets or portfolios following Section (ref) for use in applications.
We implement both the mean-variance efficient portfolio (problem (ref)) and the uncertainty averse portfolio ((ref)) for the 500, 750 and 1,000 largest stocks.\footnote{In the early parts of the sample, we encounter a few months in which fewer firms are available. In these cases, we use all the available stocks with a 240-month history.} Throughout, we use a 240-month estimation window to estimate the covariance matrix using the POET estimator POET. By conditioning on large firms with a 240 months history, we deliberately create a sample of very large firms to mitigate concerns over small and illiquid stocks. In the context of cross-sectional anomalies, patton2020you show that transaction cost play an important role and in the machine learning setting, avramov2023machine argue that standard implementations often concentrate the predictability on small and illiquid securities. Figure (ref) plots the median effective normalized size for three scenarios, 500, 750 and 1000 largest firms with a 240-month history. The normalized size ranks the market equity of all firms each month $t$, the ranks are then divided by the number of stocks each period so that the largest firm has a normalized size of 1 and the smallest firm has a normalized size of $1/N_t$, where $N_t$ is the number of firms each period.
Predictions for expected returns are obtained from the neural network model. To incorporate estimation uncertainty, we can either obtain standard errors from the closed-form ML approximation, the bootstrap, or use the more conservative of the two. The latter connects well with the max-min nature of the uncertainty-averse portfolio selection approach. Table (ref) shows the results for the most conservative version of the standard error.\footnote{Table (ref) and (ref) in the appendix show results for the analytical and bootstrap standard error, respectively.} We compare the UA portfolio with three benchmarks: the mean-variance efficient portfolio (MVE), the equal-weighted portfolio (EW), and the global minimum-variance portfolio (GMVP). For the MVE, we use a coefficient of risk-aversion of one ($\gamma=1$). As we are using excess returns, there is no automatic constraint on the magnitude of the portfolio weights, we therefore normalize the standard deviation of the in-sample returns to 20% annualized for the MVE and apply this constant also to the UA portfolios; we apply a different normalizing constant for the GMVP since the weights are of different magnitude.
Table (ref) shows that the MVE achieves an admirable annualized Sharpe ratio of 1.15, 1.07 and 1.16 for the three cases. This is notable since the result is achieved on a set of very large firms that are likely not subject to large liquidity frictions. It also considerably outperforms the equal-weighted portfolio and the global minimum-variance portfolio in all cases. The uncertainty-averse MV portfolio (UA 25, UA 50, and UA 75) often achieves better Sharpe ratios than the MVE. This is particularly interesting, as these portfolios are not formed to maximize the Sharpe ratio, whereas the MVE is formed to do precisely that. However, even a mean-variance investor can often achieve higher utility through the UA portfolios. The higher Sharpe ratios of the UA portfolios are achieved by reducing the standard deviation more strongly than average excess returns. Figure (ref) shows the cumulative returns for the case of the 500 largest firms for the six portfolios. We can clearly see that the UA portfolios decrease less during recession periods, highlighting the mechanism of lower downside risk.
As we increase the confidence level, however, the rate of “non-participation" increases, resulting in many weights of zero as predicted by our theory. In Figure (ref) we show the empirical analogue to Figure (ref) for the case of the largest 500 firms. In the figure we contrast the weights of the mean-variance efficient portfolio and the UA portfolio for two dates. Clearly, we can see that the forecast uncertainty varies over time. For the example of November 1987, we set many more weights to zero in the UA portfolio, whereas we set fewer weights to zero in March 2021. In addition, we can see that the portfolio becomes more conservative as we increase the confidence level. Intuitively, the region of non-participation is proportional to the width of the confidence interval and as the confidence level increases, the region of non-participation also increases resulting in more weight of zero. Overall, the plot in Figure (ref) demonstrates that the empirical results align closely with the theoretical predictions of UA-behavior outlined in Corollary (ref).
The classic characteristic-based anomalies are typically studied in the form of “high minus low” zero-investment portfolio. However, many large investors in the market do not engage in short-selling. Mutual funds are among the largest investors in the US equity markets and only very rarely enter into a short position. It is therefore of interest if a long-only investor could also benefit from expected returns obtained from neural networks and if the developed forecast confidence intervals are useful in their portfolio decisions. We will therefore consider a long-only mutual fund manager. The manager uses neural networks to obtain predictions for expected returns and then aims to buy the stocks with the highest predicted expected excess returns.
We will study three versions of this portfolio strategy. First, the manager conducts multiple tests: $$ H_0^i: \mathbb E [y_{i,T+1}|\mathcal F_T] = 0,$$ versus the one-sided alternative $$ H_a^i: \mathbb E [y_{i,T+1}|\mathcal F_T] > 0 $$ for each $i=1,..., R.$ Therefore, the manager wants to focus on stocks whose expected return is significantly positive. In this setup, she uses the developed FCI to test hypotheses about the expected return predictions from neural networks. She carries out a multiple hypothesis testing adjustment using the false discovery rate as outlined in Section (ref). The fund manager then longs the $K$ stocks with the highest predicted expected returns stocks that are also significantly positive and forms an equally weighted portfolio. We will refer to this strategy as “FCI-FDR”.
For comparison, a benchmark method is to conduct multiple tests using a $t$-test from average realized returns and their standard error, i.e. $$ t_i^N = \frac{\bar y_{i}}{\widehat \operatorname{SE}(\bar y_{i})}, $$ where $\bar y_i$ is the average realized return and $\widehat \operatorname{SE}$ is the conventional standard error. We will refer to this strategy as “Naive-FDR”. Finally, consider the simplest implementation, where the fund manager simply goes long the $K$ stocks with the highest predicted expected returns using neural networks and forms an equal weighted portfolio. We will refer to this strategy as “Highest-$K$”. In our application, we will vary the size of the portfolio ($K$) between 100, 200 and 500.
It has been well documented that the features that are used in the neural network have good predictive power, and our sample necessarily covers a period during which they were particularly successful. It is therefore important to focus on relative comparisons. The upper panel of Table (ref) shows the results when all firms are considered as potential investments. We see that the “Highest-$K$” portfolio achieves an annualized excess return of about 66% with a standard deviation of about 49% annually. When we compare the strategy with “Naive-FDR”, which uses realized returns to assess statistical significance, we see a non-trivial drop in average returns to 41.39% per annum. Notably, this drop is not accompanied by an equal drop in standard deviation, so that the Sharpe ratio also drops in comparison. The FCI-FDR strategy that employs the FCI for neural networks achieves an even higher average return with 67% per year with a smaller standard deviation, thus achieving the highest Sharpe ratio.
As we move from the concentrated portfolio of 100 stocks to a portfolio of 500 stocks, the average returns are lower. However, when we compare the portfolios among each other, we see the same ranking, i.e. the FCI-FDR strategy outperforms the other two in terms of risk-adjusted returns, but the magnitudes become stronger. The return difference between the FCI-FDR and the Highest-$K$ is now almost 6% per year, with a slightly lower standard deviation. The Sharpe ratio is thereby strongly improved.
In Panel B, we repeat the analysis, but only for stocks whose market capitalization is about the 25th percentile at the time of portfolio formation. This selection further mitigates liquidity concerns. Throughout panel B, we see lower average returns than in Panel A. However, the standard deviation is also lower, so that Sharpe ratios are still fairly large and often above one per year. This again confirms previous findings that the majority of cross-sectional predictability is concentrated in small firms. As we turn to the relative comparison of the three strategies, we find that the differences are now becoming more pronounced. The differences in Sharpe ratios now range between 0.2 and 0.3 per year. Interestingly, in this analysis the Naive-FDR portfolio sometimes even achieves a higher Sharpe ratio than the Highest-$K$ portfolio. Throughout the FCI-FDR portfolio achieves the highest average returns. Since FCI-FDR portfolio is not directly targeting standard deviation, it is not surprising that the standard deviations are sometimes higher than those of the other two portfolios. However, the FCI-FDR portfolio also generally displays lower drawdown, which suggests that the higher standard deviation is not due to a disproportional increase in downside risk.
In the following analysis, we compare the risk-adjusted returns of the strategies. In Table (ref) we show the monthly alphas in percentage for the FCI-FDR, Highest-$K$ and the Naive-FDR strategies. We again split the analysis between using all firms and only firms above the 25th quantile of market equity. The results are consistent with and even stronger than those in Table (ref). The difference in alphas between the FCI-FDR and the Highest-$K$ (and the Naive-FDR) is larger than the return spreads. It is noteworthy that often the alphas get larger when we add the momentum factor. For example, when we move from the fama1993common three-factor model (FF3) to the FF4 (FF3 + momentum) model, the alpha increases. This happens because many of these portfolios have negative exposure to the momentum factor, which in turn has a positive risk premium. For the case of all firms (Panel A), we see that the difference in alpha between the FCI-FDR portfolio and the Highest-$K$ is of the same magnitude as the difference in returns.
For the case of the larger firms in Panel B of Table (ref), we see that the level of alphas is lower than in the upper panel. However, many alphas are larger than 1% per month and still strongly significant -- all alphas in Table (ref) pass the $t$-stat 3 hurdle proposed by harvey2016and. In all cases, the FCI-FDR strategy achieves higher alphas than the highest-$K$ strategy. The difference is more pronounced for larger portfolios. The results therefore underscore the importance of accounting for forecast uncertainties in constructing portfolios.
The asset pricing literature has long recognized that machine learning uncertainty should be explicitly considered in making portfolio decisions. The framework of uncertainty aversion provides a disciplined way to incorporate such uncertainty about input parameters. This however requires a (asymptotic) distribution theory of the parameters. Although machine learning methods have shown great progress in forecasting expected returns, considering their estimation uncertainty in portfolio choice has remained an open problem due to a lack of distribution theory.
We introduce new methods to quantify prediction uncertainty in machine learning forecasts of asset returns. We show that neural network forecasts of expected returns share the same asymptotic distribution as classic nonparametric methods such as Fourier series, enabling a closed-form expression for their standard errors. We also propose a $k$-step bootstrap that simulates the asymptotic distribution without repeatedly retraining networks, thus dramatically reducing computational costs. We then incorporate these forecast confidence intervals into an uncertainty-averse investment framework. This leads to “non-participation” in assets when uncertainty exceeds a threshold, providing an economic rationale for shrinkage for portfolio selection. Empirically, our methods improve out-of-sample performance while mitigating multiple testing problems.
We have illustrated two areas of application; the distribution theory is general and can be used in other applications. An interesting analysis might be to consider “real-time” machine learning in cross-sectional asset pricing as in li2022real to examine pre- vs. post publication effects. We leave this application for future research.