Risky Proposition (Part 2)
Posted by Mark on January 29, 2016 at 06:50 | Last modified: February 1, 2016 11:25I believe we should always be thinking about the likelihood of history to repeat before concluding too much from historical backtesting. Usually, the answer is “unlikely to repeat” and Monte Carlo simulation to randomize trade sequence seems like a logical solution. Studying only one historical equity curve introduces selection bias to the system development process.
Lines 4-6 in the last post suggested dividing initial equity by the maximum drawdown (DD) to best understand trading system risk. This prevents someone from inflating potential returns by advantageously changing the backtesting start date. Certainly when developing my own system I also want to avoid underestimating risk. In live trading if I lose much more than expected then the result could be catastrophic.
Lines 1-3 address accurate assessment of DD risk. I love to see an equity curve grow exponentially but the way to do that is by increasing position size along the way. DDs occurring later in the trade sequence will be proportional to position size and this can distort our understanding of risk. For example, which year has the worst DD for each system shown below?
Clearly the 2010 DD is twice that of 2008 for each system. Does the additional information shown below change your perception?
The 2010 DD is worse for system 1, the 2008 DD is worse for system 3, and the DDs are equivalent for system 2. I now can better understand how DD should be understood in terms of position size.
Using a constant position size during development of a trading system helps remove the bias produced by order-dependent testing results. We may already have a selection bias introduced by choosing an equity curve that is better than the mean. Do not compound that by adding artificial equity growth due to trade sequences not likely to be repeated.
Put in simpler terms, when analyzing DDs I need to keep position size constant to ensure apples-to-apples comparison.
Categories: System Development | Comments (0) | PermalinkA Brief Glimpse into Theoretical Physics
Posted by Mark on January 26, 2016 at 04:07 | Last modified: December 10, 2015 09:45Last time I mentioned a concept arguably more suitable for a theoretical physics blog than a blog on option trading:
> To say “calculate [drawdown] as if it happened on Day 1” is to
> say any ordering of events is equally likely. A 2011-type
> correction could have just as well happened in 2002 and a 9/11
> could have just as well happened in 2008, etc.
Understanding our current reality as a cumulative result of historical events/decisions is a controversial interpretation amounting to fate and destiny. While many people do understand the world in these causal terms, cognitive psychology suggests the human brain works unconsciously to identify causation even where none actually exists. This is adaptive: living in a logical world is certainly less stressful than living in a world where utter chaos lurks around every corner.
How robust is our current reality? Is it like a sequence of dominoes where toppling of just one can affect everything that comes after? Is it more like Jenga where many previous decisions may be altered before the present is affected?
Trekkies will always remember the words of Jean-Luc Picard in “Yesterday’s Enterprise:” “Who is to say that this history is any less proper than the other?”
Another good description of the infinite realities concept is shown here from time index 07:00 to 09:45.
For all these reasons, I mentioned “overstated conclusion” in the final paragraph. I do not want to make the mistake of basing trading decisions on the shape of a backtested equity curve. People commonly ask to see these historical equity curves without realizing that these are just one possible path a trading system may follow through time. A slight alteration in the trade sequence may result in worse drawdowns, losing periods instead of profitable ones, etc.
Gaining that “broader perspective” by numerous Monte Carlo simulation runs can decrease the chance of falling prey to this sort of curve-fitting.
Categories: System Development | Comments (0) | PermalinkRisky Proposition (Part 1)
Posted by Mark on January 25, 2016 at 07:03 | Last modified: December 8, 2015 15:38Continuing on with a previous discussion about normalizing risk:
> Position sizing should be held constant throughout the [1]
> [duration of in-sample backtesting]… This allows for
> an apples-to-apples comparison of PnL changes [3]
> throughout… A drawdown (DD) at any point should be
> evaluated as if it occurred from Day 1; this is one [5]
> way of interpreting maximum risk.
I will start by describing the concept in lines 4-6 and then cover lines 1-3.
Risk tolerance may be used to determine position size. Suppose the max DD I can psychologically withstand is 10%. Based on the oft-quoted trading adage “the worst DD is always ahead of you,” I should select a smaller position size such as one corresponding to a max DD of 5%. If I now encounter something 2x worse in live trading, my psychology can [hopefully] tolerate it thereby avoiding the potentially catastrophic result of abandoning ship at the darkest moment.
Sticking with the conservative theme, I should also calculate DD as a percentage of initial equity because this will give a larger DD value and a smaller position size. For a backtest from 2001-2015, 2008 was horrific but as a percentage of total equity it might not look so bad if the system had doubled initial equity up to that point.
To say “calculate DD as if it happened on Day 1” is to say any ordering of events is equally likely. A 2011-type correction could have just as well happened in 2002 and a 9/11 could have just as well happened in 2008, etc. In case this is true, I prefer not to trade real money based on the overstated conclusion that a DD occurring later was destined to occur later. Monte Carlo simulation can randomize the trades to generate a large number of potential trade sequences for a trading system. I can then look at averages and standard deviations for things like net income and max DD to get a broader perspective of what to expect in live trading.
Categories: System Development | Comments (3) | PermalinkChallenges to Option Backtesting (Part 2)
Posted by Mark on January 13, 2016 at 06:18 | Last modified: November 17, 2015 16:51Earlier this year I had an e-mail correspondence about difficulties with option backtesting. My pasted excerpts made points about how stale quotes may produce misleading data, how software mechanics may lead to unreliable backtesting, and how proficiency (or lack thereof) with trade execution may affect backtesting results.
I had one particularly memorable experience with the latter point about slippage. I backtested a calendar trade over two years with and without slippage. In the former case, the trade made huge money. In the latter case, the account was ground into minced meat. This was a night/day difference between a trade I would jump to put on every single month versus a trade I would never even wish on my worst enemy.
I try to be particularly cognizant of transaction fees when I backtest. I would rather estimate transaction fees too high than too low when looking at a trade I might actually do with real money.
One thing I have learned in the years since studying that calendar trade is the profound effect of sample size. I believe minor inaccuracies (also known as “random error”) here and there will be averaged out with a large number of occurrences. Put a different way, the more occurrences I have to study, the larger will be the signal-to-noise ratio. If a trade has worked in the past then I will be more likely to detect it.
As long as I am reasonable with regard to slippage, backtested results will give me the confidence to trade with real money. No methodology to trading system development will ever be perfect. At the end of the day, the ultimate goal must therefore be having the necessary confidence to trade it live and to stick with it during expected drawdowns to emerge profitable on the other side.
Categories: Backtesting | Comments (0) | PermalinkChallenges to Option Backtesting (Part 1)
Posted by Mark on January 12, 2016 at 05:18 | Last modified: November 13, 2015 15:28I had an exchange with another trader some months ago about option backtesting. I wanted to copy and paste parts of my last response because they are good things to keep in mind:
“Greeks do lie sometimes… I was just on the phone
with OptionVue (OV) discussing a position I was
studying… between 10:30 AM and 11 AM yesterday.
Greeks suggested a market rally and volatility
contraction would increase cash flow when cash
flow significantly decreased. The back month
option in the spread had no volume change over
that 30 minutes so without any volume that may
have been a stale quote. This is another
potential contaminant to accurate backtesting…
One thing that has frustrated me over the years
with OV is that I can open a matrix and get
identical prices but different greeks simply by
refreshing the data, which I suppose forces the
program to recalculate modeled values. If I’m
looking to sell nothing greater than a 10 delta,
for example, then a 10.4 versus 9.8 delta
simply as a result of refreshing the data means
the backtest is not reliable: one option may
land a winner and the other a loser. This is
another argument in favor of a large sample
size because if small then the difference
between a winning trade and a losing one can
be very significant in the totality of results…
Just this morning I was reading a trading forum
and I found this post:
> I have found backtesting options strategies
> to be very difficult mainly due to the large
> bid/ask spread.
> If, in your backtest, you always use the
> worst price, the strategy will never
> make money. If you use the best price
> then your probability of success is
> artificially inflated.
> Backtesting options strategies is very
> hard, and the results given by most
> websites and/or software seems to always
> show the best case scenario. Most of the
> time this is not happening
This really hit home. I’ve encountered this for
years and I totally agree.”
I’ll finish up with the next post.
Categories: Backtesting | Comments (0) | Permalink