Читать книгу Quantitative Portfolio Management - Michael Isichenko - Страница 10

Оглавление

Chapter 1 Market Data

1.1 Tick and bar data

Perhaps the most useful predictor of future asset prices are past prices, trading volumes, and related exchange-originated data commonly referred to as technical, or price-volume data. Market data comes from quotes and trades. The most comprehensive view of the equity market includes exchange-specific limit order book by issue, which is built from limit orders forming buy and sell queues at different price depths, market orders, and their crossing (trades) per exchange rules such as price/time priority. In addition to the full depth of book tick stream, there are simplified datafeeds such as Level 2 (low-depth order book levels and trades), Level 1 (best bid and offer and trades), minute bars (cumulative quote and trade activity per discrete time intervals), and daily summary data (open, close, high, low, volume, etc).

Depth of book data is primarily used by high frequency trading (HFT) strategies and execution algos provided by brokers and other firms, although one can argue that a suitable analysis of the order book could detect the presence of a big directional trader affecting a longer-term price movement. Most non-HFT quant traders utilize either daily or bar data—market data recorded with certain granularity such as every 5 minutes—for research and real-time data for production execution.1

Major financial information companies such as Thompson Reuters and Bloomberg offer market data at different levels of granularity, both historical and in real time. A quant strategy needs the history for research and simulation (Chapter 7) and real time for production trading. Historical simulation is never exactly the same as production trading but can, and must, be reasonably close to the modeled reality, lest research code have a lookahead bug, that is, violate the causality principle by using “future-in-the-past” data. As discussed in Chapter 2, highly competitive and efficient financial markets keep the predictability of future price movements at a very low level. As a result even a subtle lookahead (Sec. 2.1.1) in a quant trading simulator can be picked up by a sensitive machine learning (ML) algorithm to generate a spurious forecast looking great in simulation but never working in production.

1.2 Corporate actions and adjustment factor

Compute the products:

From a quant interview

Equities as an asset class are subject to occasional corporate actions (“cax”) including dividends, splits, spin-offs, mergers, capital restructuring, and multi-way cax. Maintaining an accurate historical cax database is a challenge in itself. Failure to do so to a good approximation results in wrong asset returns and real-time performance not matching simulation (Sec. 7.1). For alpha research purposes it is generally sufficient to approximate each cax with two numbers, dividend and split .2 The dividend can be an actual dividend paid by the issue in the universe currency such as US dollar (USD) or the current total value of any foreign currency dividend or stock spin-off.

_____________

1 Sometimes even real-time trading is done on bar data. The author has observed peculiar periodic pnl fluctuations of his medium-frequency US equity portfolio. The regular 30-minute price spikes indicated a repetitive portfolio rebalancing by a significant market participant whose trades were correlated with the author's positions.

Security return for day is defined as the relative change in the closing price from previous day to current day :

(1.1)

To account for corporate actions, the prices are adjusted, that is, multiplied by an adjustment factor so (1.1) give a correct return on investment after the adjustment. In general, a multi-day return from day to day equals

(1.2)

The adjustment factor is used only in a ratio across days and is therefore defined up to constant normalizing coefficient. There are two ways of price adjustment: backward and forward. The backward adjustment used, for example, in the Bloomberg terminal is normalized so today's adjustment factor equals one and changes by cax events going back in time. On a new day, all values are recomputed.

Another way is forward adjustment, in which scheme starts with one on the first day of the security pricing history and then changes as

(1.3)

Cax events are understood as those with or . The past history of the forward adjustment is not changed by new entries. Therefore, the forward adjustment factor can be recorded and incrementally maintained along with price-volume data. If backward adjustment factor is desired as of current date, it can be computed as

(1.4)

_____________

2 This is clearly not enough for updating an actual trading portfolio for newly spun off regular or when-issued stock. For this, portfolio managers usually rely on maintenance performed by the prime broker.

The rationale for Eq. (1.3) is as follows. Dividend and split for day are always known in advance. One perfectly logical, if impractical, way to reinvest a dividend (including a monetized spin-off) per share is to borrow cash to buy additional shares of the same stock at the previous day close and then return the loan the morning after from the dividend proceeds. To stay fully invested, the total dividend amount must equal the loan amount , therefore

(1.5)

In terms of value at hand, this manipulation is equivalent to a stock split. If there is also a post-dividend split , one-day adjustment factor equals

(1.6)

and formula (1.3) follows.3

Some quant shops have used a similar reinvestment logic of buying shares of stock at the new closing price resulting in a somewhat simpler day adjustment factor,

(1.7)

This formula is fine as far as only daily data is concerned, but applying this adjustment to intraday prices results in a lookahead (Sec. 2.1.1) due to using a future, while intraday, closing price . Intraday forecast features depending on such adjustment factor can generate a wonderful forecast for dividend-paying stocks in simulation, but production trading using such forecasts will likely be disappointing. Formula (1.6) differs from the “simple” Eq. (1.7) by a typically small amount but is free from lookahead.

Dividend (including any spin-off) values found in actual historical data can occasionally reach or exceed the previous close value causing trouble in Eq. (1.3). Such conditions are rare and normally due to a datafeed error or a major capital reorganization warranting a termination of the security and starting a new one via a suitable entry in the security master (Sec. 2.1.2), even if the entity has continued under the same name.

_____________

3 Eqs. (1.3) and (1.6) apply to the convention that a dividend is paid on a pre-split (previous day) share. A post-split dividend convention is used by some data vendors and requires a straightforward modification of the adjustment factor. Simultaneous dividends and splits are infrequent.

Price adjustment is also used for non-equity asset classes. Instead of corporate actions, futures contracts have an expiration date and must be “rolled” to continue position exposure. The roll is done by closing an existing position shortly before its expiration and opening an equivalent dollar position for the next available expiration month. For futures on physical commodities, such as oil or metals, the price of a contract with a later expiration date is normally higher than a similar contract with an earlier expiration due to the cost of carry including storage and insurance. The monthly or quarterly rolling price difference can be thought of as a (possibly negative) dividend or a split and handled by a backward or forward adjustment factor using Eq. (1.3). Brokers provide services of trading “continuous futures,” or automatically rolled futures positions.

1.3 Linear vs log returns

Given a list of consecutive daily portfolio pnls, compute, in linear time, its maximum drawdown.

From a quant interview

The linear return (1.1), also known as simple or accounting return, defines a daily portfolio pnl through dollar position :

(1.8)

Here boldface notation is used for vectors in the space of portfolio securities. For pnl computation, the linear returns are cross-sectionally additive with position weights. Risk factor models (Sec. 4.2) add more prominence to the cross-sectional linear algebra of simple returns.

It is also convenient to use log returns

(1.9)

which, unlike the linear returns, are serially additive, for a fixed initial investment in one asset, across time periods. In quant research, both types of return are used interchangeably.

Over short-term horizons of order one day, stock returns are of order 1%, so the difference between the linear and the logarithmic return

(1.10)

is of order , or a basis point (bps), which is in the ballpark of the return predictability (Sec. 2.3.3). The expectation, or forecast, of the log return (1.10) is

(1.11)

where is the volatility (standard deviation) of the return. Due to the negative sign of the correction in (1.11), its effect can be meaningful even for a slightly non-dollar-neutral or volatility-exposed portfolio. Volatility is one of commonly used risk factors (Sec. 4.3).

The difference between linear and log returns affects forecasting (Chapter 2), especially over longer horizons, because the operators of (linear) expectation and (concave) log do not commute. Even though statistical distribution of log returns may have better mathematical properties than those of linear returns, it is the linear return based pnl that is the target of portfolio optimization (Chapter 6). On the other hand, the log return plays a prominent role in the Kelly criterion (Sec. 6.9).

Quantitative Portfolio Management

Подняться наверх