A Robust Transferable Deep Learning Framework for Cross-sectional Investment
Strategy
Kei Nakagawa1 , Masaya Abe1 , and Junpei Komiyama2 .
1

Nomura Asset Management Co., Ltd.
2
New York University.
k-nakagawa, m-abe@nomura-am.co.jp, junpei.komiyama@stern.nyu.edu.

Abstract
Stock return predictability is an important research theme
as it reflects our economic and social organization, and significant efforts are made to explain the dynamism therein.
Statistics of strong explanative power, called “factor” (Famaand French 1992) have been proposed to summarize theessence of predictive stock returns. Although machine learning methods are increasingly popular in stock return prediction (Rasekhschaffe and Jones 2019), an inference of thestock returns is highly elusive, and still most investors, if
partly, rely on their intuition to build a better decision making.
The challenge here is to make an investment strategy that is
consistent over a reasonably long period, with the minimum
human decision on the entire process. To this end, we propose
a new stock return prediction framework that we call Ranked
Information Coefficient Neural Network (RIC-NN). RIC-NN
is a deep learning approach and includes the following threenovel ideas: (1) nonlinear multi-factor approach, (2) stopping
criteria with ranked information coefficient (rank IC), and (3)deep transfer learning among multiple regions.

Introduction
Stock return predictability has been an important research
theme as it reflects our economic and social organization. Although the dynamic nature of our economic activity makes it harder to predict the future returns of thestocks, significant efforts are made to explain the dynamism
therein. Statistics of strong explanative powers, called “factor” (Fama and French 1992), are proposed to summarize
the essence of predictive stock returns, and a large portionof investors develop their portfolio strategies based on thesefactors.
Machine learning is an increasingly popular tool for
predicting unknown target variables; the last decades saw
many attempts to apply machine learning algorithms to
support smart decision-making in different financial segments (Atsalakis and Valavanis 2009; Cavalcante et al. 2016;
Rasekhschaffe and Jones 2019). Still, its highly elusive nature makes it harder to make a consistent inference: Most
investors, if partly, rely on their intuition to build a better
Copyright c 2020, Association for the Advancement of Artificial
Intelligence (www.aaai.org). All rights reserved.

decision-making. The challenge in this paper is to make an
investment strategy that is consistent over a fairly long period, with the smallest human intervention on the entire process.
Due to the dynamic nature of our economic activity, naive
use of the off-the-shelf machine learning tool easily overfits the existing data, and thus it fails to predict the future
stock returns. For example, (Chong, Han, and Park 2017)
applied deep learning to stock market prediction: They reported that the advantage of a deep learning model over a linear autoregressive model has mostly disappeared in the test
set. We show that the proposed RIC-NN consistently outperforms other methods based on off-the-shelf machine learning algorithms. Our framework involves three novel ideas(Figure 1): Namely, (1) we propose a deep learning multifactor approach that enables cross-sectional prediction, and(2) the approach involves a novel training method of neural network based on the rank IC. Moreover, we further
propose a (3) deep multi-task learning framework that enables inter-regional learning. We conducted a comprehensive evaluation of our approach based on the stocks in theMorgan Stanley Capital International (MSCI) indices. Ourevaluation demonstrated that a neural network with a standard training method performs poorly, whereas our RICNN alleviates overfitting and outperformed linear models
and ensemble-based models. (3) We furthermore considered
an information aggregation among several different markets
in MSCI indices: Namely, a transfer learning between the
North America (NA) region and the Asia Pacific (AP) region. The experimental results imply that one can utilize theNA data to predict the future returns of the AP market, but
not vice versa. The results align with the idea of the asymmetric structure between the two markets (Rejeb and Arfaoui 2016).

Related Work
There are two major strategies in stock trading: Namely,
the one based on time-series analysis (Cavalcante et al.
2016) and the one based on cross-sectional analysis (Subrahmanyam 2010).
The methods of the latter strategy, which include the workin this paper, perform a regression analysis using cross-(3) Deep Transfer Learning(1) Multi-factor DL Approach
Input

Output

Input

Stock

Time step t
Loss

Score

(2) Weight Initialization and Stopping
Time step t-1
Loss
Stop

OutputFactor

Stock

Score

Stock

North America

Factor

Source Domain

Transfer
Target Domain

Stop
Input

rank IC
Epoch

Stock
Stock

Score

𝒗𝒊 𝒗𝒇

OutputFactor

Stock

𝒗𝒊 𝒗𝒇

Initialization

Asia PacificInitialization

Figure 1: Our approach: RIC-NN.
sectional data of corporate attributes. Such a strategy aims
to build a portfolio for investing as a subset of a large bucketof stocks and is applied to a practical quantitative investment
strategy. The Fama-French (Fama and French 1992) argued
that the cross-sectional structure of the stock price can be explained by three factors: Namely, the beta (market portfolio),
the size (market capitalization), and the value (Book-value toprice ratio; BPR). This argument inspires many subsequent
research papers that propose more sophisticated versions offactors: See (Harvey, Liu, and Zhu 2016) for the history of
the proposed factors.
Machine learning approaches, which can capture the nonlinear relationship among multiple factors, are recently applied to a cross-sectional analysis. (Chinco, Clark-Joseph,and Ye 2019) applied the LASSO (Tibshirani 1996) in the
U.S. stock market, (Heaton, Polson, and Witte 2016) applied an auto-encoder based nonlinear model into a U.S.
biotechnology market, and (Abe and Nakayama 2018; Sugitomo and Minami 2018; Nakagawa, Uchida, and Aoshima2018) applied deep learning in the Japanese stock market.
However, these results are not universal: their experiments
are performed only in a single market. Note also that, theneural nets by (Abe and Nakayama 2018; Sugitomo and Minami 2018; Nakagawa, Uchida, and Aoshima 2018) adopted
epoch-based stopping, which is sensitive to the number of
epochs.

MethodCross-sectional Investment
We consider a medium-term investment cycle, where an
investment is done on a monthly basis. Namely, let t =1, . . . , T be the time step, and each step corresponds tothe end of a month between December 1994 and December 2018. We use the term “stock universe” (or simply universe) Ut to represent all the stocks of interest at time step t:
In the case of the North America stock market, the numberof stocks in the each Ut is about 700. Note that Ut gradually changes over the time step to reflect economic activities
among different sectors. At each time step, let i ∈ Ut be anindex denoting each stock in the universe. Let Ri,t ∈ R bethe (unit) return of the stock i between the time step t − 1
and t. Let xi,t ∈ R20 be the 20 factors associated with thestock i at t.
We consider an equally-weighted (EW) long portfolio,
which is simple yet sometimes outperforms more sophisticated alternatives (Demiguel, Garlappi, and Uppal 2009).
The long portfolio strategy considered here buys the top
quintile (i.e., one-fifth) of the stocks with equal weightaiming to outperform the average return of all the stocks.
Namely, let Lt ⊂ Ut : |Lt | = 1/5|Ut | be the long portfolio. The return from the portfolio
is defined as the averageP
return of Lt : RtL = |L1t | i∈Lt Ri,t . We build this portfolio by ranking the stocks in terms of their expected return.
Namely, let ot ∈ N|Ut | be the ground-truth ranking with its
element oi,t ∈ {1, 2, . . . , |Ut |} denotes the corresponding
place for each i ∈ Ut . At each round t, we build the estimated ranking ôt and choose Lt on the basis of ôt . Ranked
information coefficient (rank IC), which is also referred as
the Spearman’s correlation coefficient, between two rankings ot , ôt is defined asP
6 i∈Ut (oi,t − ôi,t )2
rank IC(ot , ôt ) = 1 −,|Ut |(|Ut |2 − 1)which takes the value in [−1, 1]. The larger the value of therank IC is, the better a portfolio strategy is.
We consider a rolling-horizon setting: At each time step t,
we estimate the ranking of the next time step ôt+1 . The following sections introduce RIC-NN, our DL-based method tobuild ôt+1 .

Feature Augmentation
The normalized rank of the stock i at time step t is denoted
as ri,t ∈ R: Namely, we rank the stocks in accordance with
their return {Ri,t } and normalize them so that ri,t ∈ [0, 1](i.e., ri,t for the stock of the largest return at each t is 1,
whereas ri,t for the stock of the median return is 0.5).
At each time step t, we build an estimator r̂i,t of ri,t
by using the following augmented feature vector vi,t ∈R180 : Given that many of the factors are updated in quarterly basis (i.e., each 3 time steps), we define vi,t =(xi,t , xi,t−3 , ..., xi,t−12 , xi,t /R xi,t−3 , ..., xi,t /R xi,t−12 ) ∈R180 using the past five time steps, where x/R y over two
vectors x and y denotes an element-wise differentiation operator (Rosenberg and McKibben 1973) with its each element is defined by 2 × (x − y)/(|x| + |y|).

Loss Function and Optimization
We adopt the standard mean squared error (MSE) as the loss
function and train our deep learning model by using the dataof the latest 120 time steps from the past 10 years. Namely,


t−1


X
X
1
(ri,t0 +1 − f (vi,t0 ; θ t ))2 ,MSEt =
K0
t =t−N i∈Ut0(1)
where N = 120 (i.e., ten years) is the size of sliding winPt−1
dow to consider and K = t0 =t−N |Ut0 | is the number ofall training examples. For the class of functions f (·, θ), we
adopt a seven-layer feed forward neural network with Rectified linear function (ReLU) activation function and denote
its weight parameter as θ. Details on the hypeparameters arein our preprint (Nakagawa, Abe, and Komiyama 2019).

Initialization and Stopping Criteria
To avoid overfitting, we initialize and terminate the training
in the following criterion ((2) in Figure 1): Namely, we define the initialization rank IC vi ∈ [0, 1] and stopping rank
IC vs ∈ [0, 1], and conducts the training as follows. Let θ t,v
is the weights of the RIC-NN at time step t during the training when the average from rank IC in the training window
reaches v. We used (i) θ t−1,vi as the initial parameters totrain model at time step t and (ii) adopts θ t,vs as the final
model parameter θ t . We estimate ôt+1 by ranking the stocks
in accordance with f (vi,t ; θ t ), which, combined with thelong or the long-short portfolio, defines our RIC-NN.

Performance Measures
We use the following measures that are widely used in thefield of finance (W. Brandt 2010). These measures evaluate
not only the actual return of the portfolio but also the magnitude of the risk taken.
The annualized return is the excess return (Alpha) against
the average return of all stocks in the universe, the risk
(tracking error; TE) is calculated as the standard deviationof Alpha and risk-normalized return is measured by information ratio (IR).
Alpha =TY

(1 + αt )12/T − 1

(2)

t=1

r

12
× (αt − µα )2(3)
T −1
IR = Alpha/TE,
(4)
P
P
T
where αt = RtL − |U1t | i∈Ut Ri,t , µα = (1/T ) t=1 αt .
TE =Experiments
We prepare a stock dataset corresponding to Morgan Stanley Capital International (MSCI) North America and MSCI
Pacific Indices. These MSCI indices comprise the large andmid-cap segments of the North America (NA) and Asia Pacific (AP) markets respectively, and are widely used as abenchmark for the institutional investors (Chen et al. 2019).
We use 20 popular factors. Details of the data aggregation
process and machine-learning models are in our preprint(Nakagawa, Abe, and Komiyama 2019).

Comparison with Off-the-Shelf Models
We compare the performance of RIC-NN with major offthe-shelf machine learning algorithms. Namely: LASSO regression (LASSO) model (Tibshirani 1996), random forest(RF), and standard Neural Network (NN). LASSO and RF
are implemented with scikit-learn, and NN is implemented
with TensorFlow. These methods are used to learn the relation between vi,t and ri,t+1 . NN adopted the same framework as our RIC-NN, except for the fact that NN stops thetraining at Epoch 56 in MSCI North America and 46 in
MSCI Pacific1 .
Table 1 compares the algorithms in the MSCI NA dataset.
RIC-NN outperforms all of the LASSO, RF, and NN in bothof the risk and the return measures.A notable finding is that
RF and NN have smaller returns compared with LASSO.
Our hypothesis is that the highly non-stationary nature of thestocks has lead to the overfitting of these nonlinear models.
Table 2 shows the results in the MSCI Pacific dataset. Although LASSO yields a larger return than RIC-NN by taking a larger risk, in terms of a risk-normalized return, whichis the prominent measure of investment strategy, RIC-NN
outperforms the other methods.

Comparison between NA and AP markets
The value of Alpha (Eq. (2)) indicates the advantage of thelong strategy over the average return in the universe, whichenables us to infer the possible advantage we can obtain byusing machine learning algorithms.
Comparing the Alpha in Table 1 and 2, machine learningalgorithms has a smaller advantage in the NA market thanthey do in the AP market: A portfolio strategy of a higher return essentially exploits the gap between the market value ofthe stocks and the true valuation of the companies. In otherwords, the result implies the efficiency of the NA market
compared with the AP market.

Transfer Learning
To exploit the interdependency between the markets, we further apply transfer learning to our RIC-NN. Namely, we use
the weights of the first four layers that are trained in thesource region as the initial weight of the target region.
Table 1 shows that the transfer from AP to NA is notvery successful, whereas 2 shows the transfer from NA to
AP is quite successful. In other words, NA as a source domain is quite informative to enhance the performance of AP,
not vice versa. Those results are consistent with the market movements propagate from the NA stock market to the
AP stock market (Rejeb and Arfaoui 2016). The experiment here demonstrates the capability of RIC-NN to exploit
highly non-trivial causal structure among multiple markets.

Comparison with Actual Investment Funds
Furthermore, we also compared the performance of RIC-NN
with major funds where the investments involve decisionmaking by human experts and verified the return of RIC-NN
outperforms the averaged return of these funds. We selectthe top 5 funds in terms of the total assets (US dollar) excluding index funds. In both of the NA and AP regions, thecorrelation coefficient between the performance of the averaged funds above and the MSCI index is larger than 0.9,
which implies these funds are based on the long strategy.
Due to the space limitation, we omit the results of the experiments: See our preprint (Nakagawa, Abe, and Komiyama2019) for the details. In other words, RIC-NN outperforms
major funds that define the expected return of the markets.
1
These epochs are chosen so that the rank IC reaches 0.20 during the training of the first time step.

Table 1: Experimental Results of Long portfolio in MSCI North America. Bold characters indicate the best ones among eachcategory. Alpha measures return, TE measures risk, and IR measures a risk-normalized return.
LinearNonlinearLong
RIC-NN
LASSO
RFNN
RIC-NN(TF from AP)
Alpha
0.62% 0.79% 0.82%
1.23%
1.20%
TE
5.40% 5.14% 4.48%
4.14%
4.43%
IR
0.11
0.13
0.18
0.30
0.27
Table 2: Experimental Results of Long portfolio in MSCI Pacific.
LinearNonlinearLong
RIC-NN
LASSO
RFNN
RIC-NN(TF from NA)
Alpha
5.35% 3.79% 4.34%
5.25%
5.78%
TE
5.17% 5.75% 4.18%
4.20%
3.95%
IR
1.04
0.66
1.04
1.25
1.46

Conclusion
In this paper, we have proposed a new stock price prediction
framework called RIC-NN by introducing three novel ideas:(1) a nonlinear multi-factor approach, (2) a stopping criteria
based on rank IC and (3) deep transfer learning.
RIC-NN is conceptually simple yet universal: The identical NN architecture and RankIC stopping value yielded aconsistently good return for a long timescale and the twodifferent markets of very different structures. Experimental
comparison showed that RIC-NN outperforms off-the-shellmachine learning methods.

References
Abe, M., and Nakayama, H. 2018. Deep learning for forecasting stock returns in the cross-section. In PAKDD, 273–
284. Springer.
Atsalakis, G. S., and Valavanis, K. P. 2009. Surveying stock
market forecasting techniques–part ii: Soft computing methods. Expert Systems with Applications 36(3):5932–5941.
Cavalcante, R. C.; Brasileiro, R. C.; Souza, V. L.; Nobrega,
J. P.; and Oliveira, A. L. 2016. Computational intelligenceand financial markets: A survey and future directions. Expert
Systems with Applications 55:194–211.
Chen, H.-L.; Shiu, C.-Y.; Wei, H.-S.; et al. 2019. Price effectand investor awareness: Evidence from msci standard index
reconstitutions. J. of Empirical Finance 50(C):93–112.
Chinco, A.; Clark-Joseph, A. D.; and Ye, M. 2019. Sparse
signals in the cross-section of returns. J. of Finance74(1):449–492.
Chong, E.; Han, C.; and Park, F. C. 2017. Deep learning
networks for stock market analysis and prediction: Methodology, data representations, and case studies. Expert Systems
with Applications 83:187–205.
Demiguel, V.; Garlappi, L.; and Uppal, R. 2009. Optimal
versus naive diversification: How inefficient is the 1/n portfolio strategy? Rev. of Financial Studies 22.

Fama, E. F., and French, K. R. 1992. The cross-section of
expected stock returns. J. of Finance 47(2):427–465.
Harvey, C. R.; Liu, Y.; and Zhu, H. 2016. . . . and thecross-section of expected returns. Rev. of Financial Studies
29(1):5–68.
Heaton, J. B.; Polson, N. G.; and Witte, J. H. 2016. Deep
portfolio theory. CoRR abs/1605.07230.
Nakagawa, K.; Abe, M.; and Komiyama, J. 2019. A robusttransferable deep learning framework for cross-sectional investment strategy. CoRR abs/1910.01491.
Nakagawa, K.; Uchida, T.; and Aoshima, T. 2018. Deepfactor model. In ECML PKDD 2018 Workshops, 37–50.
Springer.
Rasekhschaffe, K. C., and Jones, R. C. 2019. Machinelearning for stock selection. Financial Analysts Journal
75(3):70–88.
Rejeb, A. B., and Arfaoui, M. 2016. Financial market interdependencies: A quantile regression analysis of volatility
spillover. Research in International Business and Finance
36:140–157.
Rosenberg, B., and McKibben, W. 1973. The prediction ofsystematic and specific risk in common stocks. J. of Financial and Quantitative Analysis 8(2):317–333.
Subrahmanyam, A. 2010. The cross-section of expected
stock returns: What have we learnt from the past twentyfive years of research? European Financial Management16(1):27–42.
Sugitomo, S., and Minami, S. 2018. Fundamental factor
models using machine learning. J. of Mathematical Finance
8:111–118.
Tibshirani, R. 1996. Regression shrinkage and selection via
the lasso. JRSS: Series B 58(1):267–288.
W. Brandt, M. 2010. Portfolio choice problems. Handbookof Financial Econometrics, Vol 1 1.