A backtest of a signal built from quarterly earnings and daily prices looks profitable when it runs on the database as it stands today. Was each number in that database actually published by the date on which the backtest used it, does the sample still contain the companies that failed along the way, and do the returns follow a holder’s wealth through splits and dividends? This lesson makes the timing precise with timestamps and an information set, uses point-in-time records and as-of queries to handle data revisions, and works through small constructed examples of survivorship bias and corporate action adjustment.
Key terms
Timestamp
Definition A timestamp records when something happened, and one observation in a financial dataset usually carries several. The economic date, or reference period, says which period the number describes. The availability time of observation is the first time a user of the data could have read its value, including any publication and processing delay. A revision time is the availability time of a later replacement value. A trade in a backtest adds the decision time and the execution time , and it is consistent with the timestamps only if
for every observation that the decision uses, and if the fill price could actually have been traded at time . A sampling rule says when observations are taken. Clock-time sampling takes them at fixed calendar intervals, trade-time sampling at each trade and event-time sampling after each event of a specified kind.
In plain words Writing the quarter-end date beside a quarterly figure does not make the figure known at the quarter end. A decision may use a value only after it has arrived, and the order it produces can be filled only afterward, at a price someone could have traded at. The sampling rule decides which moments the data represent. A run of identical quotes may only mean that the quote is stale, not that the value was certain over that time.
Example Suppose the closing price of a day is set by a closing auction. An order filled at that close must be entered before the closing price exists, so a signal computed from the close cannot be the basis of an order filled at the same close. Putting both on the same calendar date hides the wrong order of events. In a constructed backtest that trades only at auctions, the earliest consistent fill is the next day’s open. For sampling, take a constructed hour with trades in the first ten minutes and trades in the remaining fifty. Sampling once a minute gives observations, of which fall in the busy period, while sampling at every trade gives observations, of which fall in it.
Information set
Definition Fix a probability space and observations , each with a real value and an availability time , both random variables, so that a fixed release date is a special case. The information set at decision time is the sigma algebra
generated by whether each observation has arrived by each time and by the value of each observation that has arrived. The indicator separates an observation that arrived with value from one that has not arrived. If , then , so the information sets form a filtration. A feature is admissible at when
that is, when is -measurable. When is generated by a finite partition of , this means that is constant on each cell of the partition. The sigma algebras and partitions used here are those of Probability spaces and conditional information.
In plain words The information set lists the yes or no questions about the world that can be answered with what had arrived by time . Two states of the world that look the same at must lead to the same admissible decision, however differently they turn out later. Release times are part of the information, so the same values released later give an information set at a given date that is no larger.
Example Take two constructed states and , so . A first observation is released at time with value in both states, and a second is released at time with value in and in . Every generator of takes the same value in both states, so , and a feature equal to the second observation is not admissible at time , because it differs between two states that cannot tell apart. At time the second value separates the states, is the power set of , and the same feature is admissible.
Data revision
Definition A data revision is a later value for the same item, the same variable for the same entity and economic period, that replaces a value published earlier. Write the versions of one record as pairs for , with availability times . For the as-of value is
and for the record is not yet available. When the versions and their availability times are among the observations that generate , the as-of value is -measurable. The final value used at a time is in general not, because it is information that arrived later.
In plain words An as-of query asks for the latest version that was available at the decision time, not the latest version available now. Replacing history with the final corrected numbers can leave every calculation correct and still feed the model numbers that had not been published yet, so the experiment describes a different information set from the one it claims.
Example A constructed record has the value published at time , replaced by at time and corrected to at time . A decision at time uses . At time the value is available but its correction is not, so the decision uses , and at time it uses . A table that keeps only the final value supplies at all three times. At time that is a number not yet released, and at time a correction not yet made.
Point-in-time data
Definition A dataset is point-in-time if, for every time in its range, it can reproduce exactly what a user could have known at . For that it stores each value with its economic period, its availability time and its version, keeps revisions as new rows instead of overwriting old ones, and records the membership of every security universe with dated entries and exits. The as-of view at , the latest version of every record whose availability time is at most , then generates the information set of the recorded observations. A dataset that keeps only the latest revision, or lists only the securities that exist today, cannot reproduce , so a study built on it uses a different information set from the one it describes.
In plain words A point-in-time database answers the question of what was known on a given date, and not only what is known now. Its extra columns are the record of when each number could first have entered a decision.
Example A constructed earnings figure for the quarter ending on day is first released on day as per share and revised on day to . A point-in-time table holds both versions with their availability times, so an as-of query returns no value for this quarter on day , the value on day and on day . A table keyed only by the quarter holds the single row , and joining it to prices on the quarter-end date hands that value to every decision from day on, thirty days before any figure for the quarter was public and seventy-five days before this one was.
Survivorship bias
Definition Fix an initial universe of securities chosen at time with information in , invest in each, and hold to time without rebalancing. Let be the total return of holding . It includes the cash or replacement securities a holder receives if the security is delisted, merged or liquidated, and it equals if the holding becomes worthless. Terminal wealth is , so the portfolio return is exactly
Survivorship bias is the error from computing a return or another statistic only over the subset of securities that still exist at . Survival is a future event that can depend on the return itself. In a probability model for the return of one security and the event that it survives to , with and ,
because . So the bias has the sign of the covariance between return and survival, and it can be positive, negative or zero. When is the uniform draw of one name from , the mean is and is the survivor average. A strategy that trades a changing universe is a different and equally legitimate object, but it needs a dated membership rule and an account of the trades made when membership changes.
In plain words A list of securities downloaded today often contains only those that still trade. Averaging over that list answers how the survivors did, which is not how the portfolio chosen at the start did. Deleting a failed security’s row does not return its holders’ money. A missing delisting return is something to look up, not a gap to fill with zero or to drop.
Example A constructed universe has three securities with total returns , and , the last one worthless at . Investing currency units in each turns into , so the portfolio return is , the simple average of the three returns. The two survivors average , about percentage points higher, and the whole difference comes from the choice of sample. Under the uniform draw and , and the identity gives , the same gap.
Corporate action adjustment
Definition A corporate action changes the shares or the cash attached to a holding, for example a split, a reverse split, a cash dividend, a spin-off or a merger, and a corporate action adjustment makes a return measure the change in the holder’s wealth through it. Consider shares bought at the ex-dividend price and held without trading to time , with shares after the corporate actions, the price per share at time , and cash distributions held as cash without interest. The total return is
For a -for- split, , where describes a reverse split. With a dividend per post-split share paid after the split, and
which compares post-split amounts with the adjusted starting price . The split-adjusted price return leaves out the dividend, and the raw price return compares shares that represent different fractions of the company. Reinvesting the dividends instead of holding the cash would need their reinvestment dates and prices as further data.
In plain words Count what the holder owns at the end, the shares at their price plus the cash received, and compare it with what was paid. A split changes the price per share but not the value of the holding, so a raw comparison of per-share prices across a split mistakes a change of unit for a gain or a loss.
Example One share is bought at currency units, and the company then splits -for-, so just after the split there are two shares worth each if nothing else changes. Later each share is worth and pays a dividend of , held as cash. Terminal wealth is , so the total return is . In adjusted per-share units the same return is . The split-adjusted price return is , and the raw price return reports a loss of almost half the investment for a holder who gained.
Check yourself
- A constructed record of one quarter’s sales is first released as at time , revised to at time and revised again to at time . Which value may a decision use at times , , and , and what would a table that keeps only the latest revision supply at those times?
Show the answer
At time no version has arrived, so the record is not available and the decision cannot use it. At time the latest version with availability time at most is , at time it is and at time it is . The latest-revision table supplies at all four times. At time that is a figure that had not been released at all, and at times and it is a revision that did not exist yet. Only at time does it agree with the as-of value.
- You buy shares at currency units each. The company then splits -for-, and later each new share is worth and pays a dividend of , which you hold as cash. Find the terminal wealth and the total return, and compare them with the raw price return and the split-adjusted price return.
Show the answer
After the split you hold shares, worth , and the dividends add in cash, so terminal wealth is against the paid. The total return is
In adjusted per-share units the starting price is , and gives the same value. The split-adjusted price return leaves out the dividend. The raw price return compares one new share with one old share, although each old share became three, so it reports a large loss for a holder who gained about percent.
- A constructed equal-weighted buy-and-hold portfolio puts currency units into each of four securities chosen at time . Over the period A returns and B returns . C is delisted after a bankruptcy and its holders recover percent of their investment, and D is acquired for cash at a price that gives a return of . A database downloaded at lists only A and B. Compute the portfolio return, the survivor mean and the mean a colleague gets by filling the two missing returns with zero. Is survivorship bias always upward?
Show the answer
The return of C is . Terminal wealth is from , so the portfolio return is , the average of the four returns. The survivor mean is , which is percentage points too high. Filling the missing returns with zero gives , also wrong, because it records a percent loss and a percent gain as no change. The bias is not always upward. If the database had instead dropped only the acquired name D, the average of A, B and C would be , about percentage points too low, because the missing name had the highest return. The sign follows the covariance between return and remaining in the data, so the actual terminal outcomes of C and D have to be found.