APPENDIX

Proof That Detrending Is Equivalent to Benchmarking Based on Position Bias

In order to compensate for market bias interacting with long-short bias, one should compute the expected return of a random system with the same long-short bias, and subtract this bias-related return from the return of the candidate system.

The expected value of a single raw return drawn from the population of historical raw returns is, by definition, the mean of these returns.

image

Let Pi signify the position of a trading system at opportunity i. This will be long, short, or neutral. The expected return of a trading system in which positions are random is:

image

The total return of the candidate system is the sum of the raw returns at those times when the candidate system is long, minus the sum of the raw returns when the system is short:

image

The total return of the candidate system (Equation (A.3)) is corrected for long/short prejudice by subtracting the expectation of a similarly prejudiced random system (Equation (A.2)). Subtraction distributes over the summation, giving:

image

Notice that the corrected return of Equation ...

Get Evidence-Based Technical Analysis: Applying the Scientific Method and Statistical Inference to Trading Signals now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.