Chapter 1
Wall Street is notorious for not learning from its mistakes.
Maybe machines can do better.
– Letting the Machines Decide
Investments in financial markets comprise fundamental and challenging tasks in both
financial academia and industry. For example, mutual funds invest the raised cap-
ital among a collection of investment opportunities so as to create value for the
fund investors; insurance companies invest the premiums among the financial mar-
ket so as to satisfy the insurance claims in future. Typically, investors analyze and
explore investment opportunities via fundamental and technical analyses using vari-
ous instruments and tools, often done in manual ways. To meet the rapid development
of investment opportunities (cf., three challenges in Section 1.1), quantitative analysis
has been emerging as a new way for investment analysis and automated trading.
Computational finance (CF), which leverages financial theory via computational
techniques, has been emergingand evolving rapidly in recent years. One of the heavily
studied areas in CF is the investment, as the computer helps to automate various tasks
and make decision in investments. For example, by using advanced computational
tools, investment analysts can analyze huge amount of data and identify the under-
priced stocks. Besides, investment strategists can back-test and compare strategies
using historical data so that they have confidence of the strategy in an unknown
One crucial investment task is the allocation of capital, or so-called “portfolio
selection” (Markowitz 1952). Despite the theoretical perfectness, estimation errors
in their models have constrained their application in real investment. According
to DeMiguel et al. (2009), a naive
strategies can outperform various portfolio
selection models. Such estimation errors lead to portfolio strategies without estima-
tion, or the online portfolio selection (OLPS) pioneered by Cover (1991). We further
follow this approach and study the problem of OLPS.
This chapter first introduces the background of OLPS and briefly outlines the
contents to be covered in this book.
T&F Cat #K23731 — K23731_C001 — page 3 — 9/28/2015 — 21:04
1.1 Background
The financial investment management industry often faces various challenges and
requires new solutions for the task. Below we introduce three representative
challenges and briefly propose how to tackle these challenges using machine-learning
1.1.1 Challenge 1: Voluminous Financial Instruments
One recent challenge is the increasing number of financial instruments,
in terms of
both categories and assets in each category. On the one hand, financial innovations
(Miller 1986) in the past decade created various types of financial instruments, such
as interest rate swaps, credit default swaps, and options. On the other hand, with the
development of global economy, thousands of companies and trading instruments
are listed on various exchanges.
The “big data” generated by these instruments and
companies make it very hard for human investors to process and analyze.
1.1.2 Challenge 2: Human Behavioral Biases
The second challenge is humans behavioral biases in decision making (Barberis and
Thaler 2003). Due to humans’ subjective nature, many traditional investment strate-
gies suffer from these biases and release sub-optimal decisions when greed and fear
interact. Actually, exploiting consistent biases in markets is one source of profits for
many traders (Reinganum 1983; Dimson 1988; Jegadeesh 1990). Thus, for an individ-
ual investor or institution, it is better to avoid such behavioral biases or even exploit
other biases, which is hard for most human investors.
1.1.3 Challenge 3: High-Frequency Trading
The development of information technology has significantly speed up the trading
industry. One example is the high-frequency trading (HFT) (Aldridge 2010), which
completes the buy and sell within a time ranging from seconds to one day. On the one
hand, intraday data are much more voluminous and fast than low-frequency data and,
thus, require high-speed tools and methodologies. On the other hand, due to the high
speed, HFT requires a quick response to the market behaviors, otherwise the oppor-
tunities will disappear. While sometimes human investors can spot the opportunities,
they are too slow to open trade positions. Both characteristics of HFT call for new
tools and methodologies.
1.1.4 Algorithmic Trading and Machine Learning
To tackle the above three challenges, algorithmic trading techniques, which assist
investment activities via computational techniques, have emerged. However, with
Financial instruments refer to any tradable assets, such as stocks, futures, and bonds.
Exchanges provide services,such astrading financial instruments,for tradersand brokers. Forexample,
New York Stock Exchange (NYSE) is a stock exchange.
T&F Cat #K23731 — K23731_C001 — page 4 — 9/28/2015 — 21:04
the advance of computational techniques, nowadays machines can handle a much
larger quantity of instruments and companies than humans do. It also processes the
data in a much higher speed than humans do and is thus suited for HFT scenarios.
On the other hand, the machine is free from human behavioral biases and produces
exactly the same results if the inputs are the same. There are mainly two areas of
algorithmic trading (Harris 2003), one is on the sell side
and the other is on the
buy side.
The sell side algorithmic trading (Bertsimas and Lo 1998; Almgren and
Chriss 2000; Nevmyvaka et al. 2006; Bayraktar 2011) concerns automatically slicing
a large order to smaller ones, such that the market impacts incurred by the large order
are minimized, while the buy side algorithmic trading (Qian et al. 2007; Chan 2008;
Durbin 2010; Kearns et al. 2010) makes intelligent investment decisions to achieve
certain targets, such as profit maximization, risk minimization, or both.
Machine learning (Mitchell 1997), a scientific discipline of designing algorithms
that can identify complex relationships among huge amounts of historical data and
make intelligent decisions upon new data, has been successfully applied to a variety
of areas (Manning and Schütze 1999; Baldi and Brunak 2001), including algorithmic
trading in finance. For the sell side, there are several patterns among the submitted
orders (Harris 2003). To optimally execute one client’s large order, machine-learning
techniques (Nevmyvaka et al. 2006; Agarwal et al. 2010; Ganchev et al. 2010) can
take advantage of the patterns and submit smaller time/volume weighted orders to
exchanges, such that the market impacts are minimized. For the buy side, several
patterns in financial markets (or, in jargon, “market anomalies”) (Dimson 1988; Cont
2001), such as calendar anomalies (Haugen and Lakonishok 1987),
anomalies (Fama and French 1992),
and technical anomalies (Bondt and Thaler
1985; Chan et al. 1996),
are well documented. To generate profits from these patterns,
several machine-learning algorithms (El-Yaniv 1998; Yan and Ling 2007; Györfi et al.
2012) have been proposed for buy-side algorithmic trading. Their basic idea is to
identify the patterns via machine-learning techniques and obtain profit by trading the
1.2 What Is Online Portfolio Selection?
This book studies a core problem in the buy-side algorithmic trading named “Online
Portfolio Selection” (Cover 1991; Ordentlich and Cover 1996), which sequentially
allocates capital among a set of assets aiming to maximize the final return of invest-
ment in the long run. OLPS plays a crucial role in a wide range of financial investment
Sell side often refers to investment banks that sell investment services, such as routing orders to
exchanges, to asset management firms.
Buy side usually refers to the asset management firms that buy the services from the sell side. For
example, Citadel, an asset management firm (buy side), may send their purchase orders via Goldman Sachs,
an investment bank (sell side).
Calendar anomalies refer to the patterns in asset returns from year to year, or month to month. One
famous example is the January effect.
Fundamental anomaliesare the patterns in asset returns relatedto the fundamental values of a company,
such as size effect and value effect.
Technical anomalies are patterns related to historical prices, such as momentum, and contrarian.
T&F Cat #K23731 — K23731_C001 — page 5 — 9/28/2015 — 21:04
applications, such as automated wealth management, hedge fund management, and
quantitative trading. In the following, to better understand the idea, we begin by
introducing a concrete example of real-life OLPS applications.
Suppose Bin, a 30-year-old man, has a capital of $10,000, and he wants to increase
the capital to $1,000,000
when he retires at 60 years old, such that he can maintain
his current living standards.Assume he has no extra income for investment and purely
relies on the initial capital. He would like to achieve this target via the investments
in financial markets. Assume that his investment consists of three assets, including
Microsoft (stock, symbol: “MSFT”), Goldman Sachs (stock, symbol: “GS”), and
Treasury bill.
All historical records on the three assets, mainly price quotes, are
publicly available. Then, every month,
Bin receives updated information about the
three assets and has to face a crucial challenge of decision making, that is, “How
to allocate (rebalance) his capital
among the three assets every month such that his
capital will be more likely increased in the future?” The idea of exploring OLPS
technology is to help Bin automate the sequences of allocation/rebalancing decisions
so as to maximize his investment return in the long run.
In literature, there are two major schools of principles and theories for portfolio
selection: (i) Markowitz’s mean variance theory (Markowitz 1952, 1959) that trades
off between the expected return (mean) and risk (variance) of a portfolio, which is
suitable for single-period portfolio selection and (ii) capital growth theory (or Kelly
investment) (Kelly 1956; Breiman 1961; Thorp 1971; Finkelstein and Whitley 1981)
that aims to maximize the expected log return of a portfolio and naturally addresses
multiple-period investment. Due to the sequential nature of a real-world portfolio
selection task, many recent OLPS techniques often design algorithms by following
the second family of principles and theories.
Note that this book is focused on the algorithmic aspects, rather than the the-
ory (Breiman 1960; Thorp 1969, 1997; Hakansson 1970, 1971; MacLean et al. 2011).
Our study is often concerned with investment management involving multiple types
of assets, which may include fixed income securities, equities, and derivatives. Our
study is also different from another great body of existing work, which attempted to
forecast financial time series by applying computational intelligence techniques and
conduct single-stock trading (Katz and McCormick 2000; Huang et al. 2011), such as
reinforcement learning (Moody et al. 1998; Moody and Saffell 2001), online predic-
tion (Koolen and Vovk 2012), boosting and expert weighting (Creamer 2007, 2012;
Creamer and Freund 2007, 2010; Creamer and Stolfo 2009), neural networks (Kimoto
et al. 1993; Dempster et al. 2001), decision trees (Tsang et al. 2004), and support
vector machines (Tay and Cao 2001; Cao and Tay 2003; Lu et al. 2009). Finally,
we emphasize the nature of “online” algorithms for addressing the portfolio selec-
tion problem, in which the algorithms must be computationally efficient enough
Here, one million is an arbitrary number; of course, the more the better.
Treasury bill is often regarded as a risk-free asset, earning a guaranteed risk-free return. Once he does
not want to buy any stocks, he can put all money in Treasury bills, instead of cash.
Here, “month” represents a period, which can be one day, one week, or one month, etc.
For example, he may buy $5000 MSFT stock, $3000 GS stocks, and $2000 Treasury bills.
T&F Cat #K23731 — K23731_C001 — page 6 — 9/28/2015 — 21:04
for handling large-scale applications (e.g., high-frequency trading), although our
algorithms are not restricted to high-frequency trading.
1.3 Methodology
OLPS for real-world trading tasks is challenging in that the market information
(mainly the market data) arrives sequentially, and a portfolio manager has to make a
decision immediately based on the known information. The problem is endogenously
online. Two types of machine-learning methodologies have been explored to design
strategies for this task.
The first methodology is batch learning, where the model is trained from a
batch of training instances. In this way, we assume that all price information (and
maybe other information) is complete at one decision point, and thus one can deploy
batch-learning methods to learn the portfolios. In this mode, one decision is always
irrelevant to previous decisions. In particular, we adopt such a mode in one proposed
algorithm, which deploys nonparametric learning (or instance-based learning, or
case-based learning; Aha 1991; Aha et al. 1991; Cherkassky and Mulier 1998). With
an effective trading principle, such a mode can achieve the goal of our project.
The second methodology is online learning (or incremental learning), where the
model is trained from a single instance in a sequential manner (Shalev-Shwartz 2012;
Loveless et al. 2013). Online learning is the process of solving a sequence of prob-
lems, given (maybe partial) the solutions to previous problems and possibly additional
side information. This definition naturally fits our problem, which is innately online.
Contrary to the batch mode, in this mode, one decision is often connected to previous
decisions. In particular, in the remaining three of the four algorithms, we adopt two
types of online learning techniques (Crammer et al. 2006, 2008, 2009; Dredze et al.
2008) to solve the problem. Besides, to achieve the target of our project, it is also
important to exploit an effective trading principle when designing a specific strategy.
In this book, we will introduce a variety of classical and modern trading principles
that are commonly used for designing OLPS strategies.
After designing a trading strategy, we need to evaluate the effectiveness of the
proposed strategy using a back-test methodology. In particular, we feed the historical
market data into the testbed to evaluate the strategy and examine how it performs.
Through an extensive set of evaluation and analysis of the back-testing performance,
we can decide how likely the proposed trading strategy may survive in real-life appli-
cations. In thisbook,wedeveloped an open-source back-testing system, named Online
Portfolio Selection, which allows us to benchmark empirical performances of differ-
ent strategies and algorithms on the same platform. Throughout the book, all the
algorithms and strategies will be evaluated on this platform.
1.4 Book Overview
This book consists of four parts, including introduction, principles, algorithms, and
empirical studies. Figure 1.1 gives an overview of the book organization of different
parts and chapters. The major contents to be covered in each part and each chapter
are given below.
T&F Cat #K23731 — K23731_C001 — page 7 — 9/28/2015 — 21:04
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.