Backtesting, art or science?

Back-testing. I hate it –- it's just optimizing over history. You never see a bad back-test. Ever. In any strategy. - Josh Diedesch [-@Diedesch2014] CalSTRS

Every trading system is in some form an optimization. - Emilio Tomasini [-@Tomasini2009]

Moving Beyond Assumptions

Many system developers consider "I hypothesize that this strategy idea will make money" to be adequate.

Constraints and Objectives

Constraints

Benchmarks

Objectives

Building a Hypothesis

Essentially, all models are wrong, but some are useful. - George Box [-@Box1987]

\columnsbegin \column{.35\textwidth}

\column{.65\textwidth}

To create a testable idea (a hypothesis), we need to:

\par

\par

\columnsend

Building Blocks

\columnsbegin \column{.67\textwidth}

\begin{center} Separating the strategy into components aids testing, and increases productivity. \end{center}

\column{.33\textwidth}

\columnsend

Definitions

\fontsize{8}{1.5}\selectfont

Filters

Indicators

Signals

Rules

Test the System in Pieces, or, How to Screw Up Less

Far better an approximate answer to the right question, which is often vague, than an exact answer to the wrong question, which can always be made precise. - John Tukey [-@Tukey1962] p. 13

\vfill

\begin{center} Fail quickly, think deeply, or both? \end{center}

\vfill

No matter how beautiful your theory, no matter how clever you are or what your name is, if it disagrees with experiment, it’s wrong. - Richard P. Feynman [-@Feynman1965]

Things to Watch Out For, or, Types of Overfitting

Look Ahead Bias

Data Mining Bias

Data Snooping

Measuring Indicators

A good indicator is describing some measurable aspect of reality: a theoretical "fair value" price, or the impact of a factor on that price, or turning points of the series, or slope.

If your indicator doesn't have testable information content, throw it out and start over.

Measuring Signals

\columnsbegin \column{.45\textwidth}

Signals make predictions; all the literature on forecasting is applicable:

\column{.65\textwidth}

source:gamlss

\columnsend

Measuring Rules

\begin{center} If your signal process doesn't have predictive power, stop now. \end{center}

Parameter Optimization

\columnsbegin \column{.5\textwidth}

\column{.5\textwidth}

\columnsend

Walk Forward

\columnsbegin \column{.5\textwidth}

\column{.5\textwidth}

\columnsend

\begin{center} Proper formulation of your business objective is critical to results. \end{center}

Beware of Rule Burden

Measuring the Whole System

Net profit as a sole evaluation method ignores many of the characteristics important to this decision. - Robert @Pardo2008

\vfill

\columnsbegin \column{.7\textwidth}

\columnsend

Using Trade Statistics

\fontsize{11}{1.5}\selectfont

All trading and backtesting platforms (should) provide trade statistics:

Dangers of aggregate statistics:

Using Returns

Sample Analyses:

Asset Allocation

Did we over do it?

A big computer, a complex algorithm and a long time does not equal science. - Robert Gentleman

Detecting Backtest Overfitting

Conclusion & Questions

Thanks

\vfill

\begin{center} Thank You for Your Attention \end{center}

\vfill

Thanks to my team, and my family, who make it possible.

\columnsbegin \column{.5\textwidth}

©2014 Brian G. Peterson brian@braverock.com

\column{.1\textwidth} \columnsend

\vfill

Code to apply the techniques discussed here may be found in the R quantstrat, PerformanceAnalytics, and PortfolioAnalytics packages. [@quantstrat2014; @perfa2014; @porta2014]

\vfill

All remaining errors or omissions should be attributed to the author. All views expressed in this presentation are those of Brian Peterson, and do not necessarily reflect the opinions or policies of DV Trading or DV Asset Management.

Resources

\fontsize{4.5}{.75}\selectfont



cloudcell/quantstrat documentation built on May 13, 2019, 8:03 p.m.