Option FanaticOptions, stock, futures, and system trading, backtesting, money management, and much more!

Time Spread Backtesting Concepts (Part 3)

Today I conclude this brief mini-series detailing background concepts about time spreads.

Theta is one parameter I found insidious in manual backtesting. 2020-2021 time spreads generally have a lot of “jump.” They seem to hit profit targets quickly and sometimes completely out of the blue (e.g. with PnL small or negative just a day or two beforehand). 2017 time spreads, in contrast, move very slowly. Weeks go by without any significant profit and loss is more common. Perhaps because I monitored the TD ratio per guidelines shown here, I did not think to track theta itself.

2017 volatility is extremely low and I eventually realized that position theta is extremely low with these guidelines, too. Over a given period, the market can be expected to move within a probability cone. When theta is much lower, profit will not accumulate to offset this movement. Without normalizing theta by adjusting spread width, these guidelines really describe entirely different strategies for 2017 and 2020/2021. As shown in the table here, width will affect MR, which can then be normalized as discussed in that final paragraph.

Eventually, I would like to do a study with no profit targets or stop-losses. Track MFE with DTE, MAE with DTE, and then visualize to check for optimal values. This should be done in walk-forward fashion to avoid generalized curve-fitting. Maybe every month I visualize a chart of MAE/MFE over the previous six months to see what values are optimal based on recent history. These values may or may not be stable going forward.

To get started, something simpler like backtesting with a straight 10% profit target and -20% max loss could be done. I should then try to generate a variety of combinations to verify the strategy as profitable in all cases. Other pairs could be 10%/-10%, 15%/-20%, 20%/-20%, 20%/-15%, etc. Of course, the higher the number the longer the trades. For this reason, some measure of PnL%/day also makes sense…

…and by now I have lost the “simpler” part. Keeping complexity out is certainly one of the larger challenges here.

Rewind: start with +10%/-20%. I can then compare strike selection from -5% to ATM to +5% by increments of 1%, 2%, or 2.5% to assess directional bias. Transaction fees should be included, and avoiding less-liquid strikes is a possibility.

As one last piece of theoretical complexity, I suspect an X% change in horizontal skew has less effect on PnL as DTE decreases. Lower DTE means less extrinsic value remains in the short option to be affected by IV change in the first place. Tracking horizontal skew % may therefore be misleading unless done with regard to DTE.

Time Spread Backtesting Concepts (Part 2)

Today I want to continue with background on time spreads before moving forward with Python backtesting.

How horizontal skew reacts to different types of market rallies and/or selloffs is hard to predict. In selloffs when fear spikes, traders tend to buy near-term options pressuring term structure toward backwardation (increasing horizontal skew). In theory, increased IV is good for vega-positive time spreads. If horizontal skew becomes more positive, then although the long leg increases in value (good) due to IV, short-leg value may increase more (bad). The overall effect on PnL depends on how decreased spread value from higher skew compares with increased spread value from higher long option prices.

You can imagine other permutations for cases where horizontal skew is initially positive or negative, becomes more positive or negative based on different magnitudes of rally/selloff, etc. I am interested to see if any significant association exists between [changes in] horizontal skew and profitability.

I am also interested to see if any significant association exists between IV and profitability. Conventional wisdom says vega-positive time spreads should be purchased when IV is low. Could horizontal skew have a significant interaction here?

Margin requirement (MR) varies from one time spread to another and I have had difficulty putting my finger on this. MR is proportional to IV. MR should be inversely proportional to DTE since all else being equal, time spread price increases over time and maximum potential risk is the cost. Width (days between expirations) is directly proportional to MR because for the same short option, long options farther out in time are more expensive. Horizontal skew should also be inversely proportional to MR because the higher skew means a more-expensive near-term option and lower overall cost.

To simplify things a bit:

Factors affecting spread MR (3-18-22)

Perhaps Python can aid with some analysis here.

With MR so variable, some consideration must be given to position sizing. One possibility is a fixed position size backtest where each trade is done with number of contracts (rounded down) equal to position size ($) / MR. Alternatively, a fixed percentage of the total account could be allocated. This would allow for compounding. Drawdowns across the equity curve could then be compared as percentages off the highwater mark to normalize for temporal sequence. This seems logical at first glance.

I will continue next time.

Practice Trades Cal 1.13

Cal 1.13 (guidelines here) begins 2/18/20 (87 DTE) with SPX 3370 and trade -$168 (-2.6%). TD = 1, MR $6,498 (two contracts), IV 11.9%, horizontal skew -0.85%, NPD 6.8, and NPV 231.

What jumps out at you when looking at the initial risk graph?

Risk graph Cal 1.13 (0 DIT) (3-10-22)

This is the second Cal example where the same strike is unavailable in the back month (see Cal 1.4 here). Placing the long leg lower gives the trade a bullish bias, which is something discussed in the fifth paragraph here.

Notice that a bullish bias is achieved whether I diagonalize the long leg (lower) or whether I raise the calendar strike. The former preserves profit potential at current underlying price at the cost of raising MR. Each has pros and cons.

As mentioned in the third paragraph here, I may want to come up with some alternative downside management since TD = 1 at inception unless I plan to let it go to ML.

On 84 DTE, trade -4.4% with market down 0.85 SD in three days.

Exit 81 DTE for loss of $1,478 (-22.8%). This is the 4.33 SD down day, which comes without warning. Over 6 days, SPX down 2.73 SD with IV up 83%. Horizontal skew has increased slightly to -0.62%. TD = 0 (rounded).

Unlike Cal 1.2, SOH to see how the market “shakes out” would be a terrible decision here:

Price Action Cal 1.13 (3-10-22)

Highlighted is my first opportunity to exit at max loss (with market far outside profit tent and TD 0 unlike third paragraph here where Cal 1.12 is still well-positioned with TD strong). I have to take the loss immediately: no reason not to.

HEED WARNING DISCRETIONARY TRADERS!

I think one of the biggest risks of discretionary trading is the tendency to see something that seems to work while conveniently forgetting other instances where it does not. You may be confident in something that, on the whole, adds no benefit (or worse). A large-sample-sized systematic backtest to assess strategy guidelines can prevent this from happening.

Practice Trades Cal 1.12 (Part 2)

I left off questioning whether I should exit Cal 1.12 at max loss despite being well-positioned inside the profit tent.

From a systematic, programming standpoint, I don’t see how to do breakeven (BE) estimation with time spreads without Black-Scholes and/or volatility skew modeling. This precludes implementation of a Python backtester.

From an “art of trading” standpoint, my gut says “no way no how” do I take max loss when I am well inside the profit tent (strongly supportive of a high TD) like this.* To convince me otherwise, I will be on the lookout for cases where I remain in such trades only to meet a horrific demise.

Exit two trading days later at 73 DTE for profit of $552 (15.3%). SPX is up 0.13 SD to 3011 with IV up 5.9% over the 5 days, TD = 96, and horizontal skew remaining at +1.8%.

Part of me wonders if it might require extraordinary discipline to exit still being positioned near the center with TD so high.

If I stayed in, then when would I look to exit?

Moving ahead to 11 DTE:

Risk graph Cal 1.12 (67 DTE) (2-24-22)

I am now approaching the downside BE. While still 140 points away, I am certainly getting to the “slim pickins'” portion of the graph compared to what lies to the right. TD is 10 at this point and trade is +42.5%, which would be an absurd amount to lose should the market continue lower.

This would be a decent time to exit. I may not be able to code this discretionary interpretation, but said “art of trading” still seems alluring as a viable tool.

Finally, I’m a bit curious about the margin requirement (MR). I mentioned in this third paragraph that high IV may cause time spreads to be expensive. Such is not the case with Cal 1.12. I will grant that Cal 1.12 IV (~35%) is nowhere near that seen in Cal 1.3, but it still seems relatively high whereas MR seems relatively low. With starting DTE, horizontal skew, and [average] IV [proprietarily calculated over the whole option matrix in ONE] all potential contributing factors, how can this be explained?

I will pick up here next time.

* — This is 31.3% of the way between BEs.

Practice Trades Cal 1.12 (Part 1)

Cal 1.12 (guidelines here) begins 2/27/20 (78 DTE) with SPX 2995 and trade -$168 (-4.3%). MR is $3,608 (two contracts), TD 53, IV 35.2%, horizontal skew +1.8%, NPD 0.8, and NPV 224.

“Conventional wisdom” (see second paragraph) would probably suggest skipping this day for entry given a crazy market down 3.1 SD! I can imagine a volatile, whipsaw market causing hefty slippage, but looked at another way if I place a limit order and just wait, then I can imagine having a good chance to be filled precisely because of the market’s wild movement.

The positive horizontal skew provides me with a little extra bonus compensation for the risk taken in a volatile market.

How much compensation, you ask?

Risk graph Cal 1.12 (2-24-22)

I admittedly zoomed in to make this look super large. However, what is no joke is 460 points between expiration breakevens (BE)—a full 15% of the underlying’s current price. If volatility tanks then the graph will move down and BEs will narrow, but as the positive skew reverts, T+0 will rise. Lots of moving parts here.

Surprisingly [to me], the official max loss (-$728, -20.2%) is hit the very next day with market down 1.1 SD:

Risk graph Cal 1.12 (1 DIT) (2-24-22)

Should I exit this trade?

The market is down 59 points, but I still have 166 points to downside BE. Distance between expiration BEs has increased to 530 points with IV now at 45.4%. Horizontal skew has increased and I still expect a reversion to negative horizontal skew to follow (recall last paragraph here). TD 25 also suggests solid potential for profit potential going forward.

I will continue next time.

Practice Trades Cal 1.11A

Look back at the previous two practice trades (guidelines here unless otherwise stated). Both start out with negative skew, but Cal 1.10A requires a bullish bias (-0.65 delta) to profit. To be fair, I should also look at Cal 1.11 with a bullish bias.

Cal 1.11A begins 5/11/20 (67 DTE) with SPX 2934 and 3060 puts -$168 (-2.6%). MR is $6,418 (two contracts), TD 2, IV 22.0%, horizontal skew -0.2%, NPD 8.8, and NPV 262.

With TD starting at 2, a different management plan may be advised as trade begins very close to an adjustment point. ML may also need tweaking since it can arrive sooner with directional bias. I haven’t been monitoring data on this (and don’t intend to), but the ONE model currently shows T+0 100 points above downside ML and only 20 points from downside expiration breakeven (BE). I would guess these numbers to be less than a NTM time spread with TD starting much higher.

Whatever management thresholds I choose, no right answer(s) may exist because any will have its pros and cons. Even more difficult is determining something consistent between historical backtesting and future live trades.

Getting back to the current Cal 1.11A, MDD is -$1,188 (-18.5%) on 2 DIT: just a stone’s throw away from ML. This is a case in point, although the quick loss does come on the heels of back-to-back 1+ SD down days: a rarity.

Exit trade 52 DTE for profit of $802 (12.5%). SPX up 0.42 SD with IV up 5.9% over the 15 days. Horizontal skew has decreased to -1.2%, which is not good for getting into the trade but can be very good while in the trade. TD = 5 at PT.

A study of MFE would be interesting to determine whether any sort of PT is optimal. 1.11A goes on to gain $1,662 (25.9%) at 43 DTE before slipping back to +$642 (10%) with TD 5 the next trading day after that. PnL dips the next trading day (39 DTE) to 7.7% (TD 5) before soaring to +45.7% three trading days later at 36 DTE on a 4.6 SD downmove (see price chart here).

I would be interested to collect MFE data in a Python program (as mentioned in the third paragraph here).

Bottom line for today: like Cal 1.10, a bullish bias in this negatively skewed Cal 1.11 ends up profitable as well.

Practice Trades Cal 1.10 – 1.11

Cal 1.10 (guidelines here) begins 5/4/20 (74 DTE) with SPX 2838 and 2840 puts -$168 (-2.4%). MR is $7,128 (two contracts), TD 29, IV 31.4%, horizontal skew -0.02%, NPD 1.4, and NPV 216.

MDD is -$1,048 (-14.7%) on 44 DTE.

Exit trade 42 DTE for loss of $2,158 (-30.3%). SPX up 1.3 SD to 3190 with IV down 40% over the 32 days. Horizontal skew up to +0.6%. This trade exits on that same big up day as Cal 1.9 with a 2.2 SD one-day rally.

Anecdotally speaking (since I’ve only backtraded 10 so far), the last two calendars have not had the snap seen in some earlier ones. With the high IV “juice” and/or [significant] positive skew, perhaps it’s not unusual for calendars to reach PT in sudden, unexpected fashion. In contrast, this trade (and the second half of Cal 1.9) faces a market steadily grinding higher.

What if I placed Cal 1.10 at -0.65 delta rather than the first 10-point strike above the money?

Cal 1.10A begins 5/4/20 (74 DTE) with SPX 2838 and 3000 puts (roughly -0.65 delta) -$168 (-2.4%). MR is $6,578 (two contracts), TD 3 (expectedly lower being farther ITM), IV 31.4%, horizontal skew -0.6%, NPD 7.7, and NPV 241.

MDD is -$448 (-6.8%) on 65 DTE.

Exit trade 56 DTE for profit of $742 (11.3%). SPX up 0.58 SD with IV down 24% over the 18 days. Horizontal skew has decreased to -1.0%, which is not good for getting into the trade but can be very good while in the trade.

In this instance, leaning bullish rewrites history. Whether this accurately reflects a larger sample size remains to be seen.

Cal 1.11 begins 5/11/20 (67 DTE) with SPX 2934 and 2940 puts -$168 (-2.4%). MR is $7,128 (two contracts), TD 19, IV 22.0%, horizontal skew -0.9%, NPD 1.6, and NPV 233.

MDD is -$1,378 (-19.3%) on 39 DTE: just a slight breeze shy of ML.

Exit trade 36 DTE for profit of $2,282 (32.0%). SPX up 0.38 SD with IV up 80% over the 31 days. Horizontal skew has increased to +1.3%. The underlying price action behind this trade is as follows:

Price chart Cal 1.11 (2-22-22)

The gradual, grinding-higher market resulted in two consecutive losers. This is almost the third. MDD occurs on the highlighted bar, which is just three days before a 4+ SD downmove carries home the W. The highlighted bar presses the market well into the second SD of the probability cone: an extreme I suspect usually does not persist [but most certainly can].

Trading’s version of Bruce Willis (apologies in advance) is mean reversion with a vengeance.

Practice Trades Cal 1.7 – 1.9

Cal 1.7 (guidelines here) begins 4/13/20 (67 DTE) with SPX 2762 and 2770 puts -$168 (-2.9%). MR is $5,738 (two contracts), TD 34, IV 37.1%, horizontal skew +0.7%, NPD 1.3, and NPV 178.

On 66 DTE, MDD hit with trade -$308 (-5.4%).

Exit trade 59 DTE for profit of $692 (12.1%). SPX down 0.18 SD with IV up 11% over the eight days. Horizontal skew has increased to +0.9%.

Cal 1.8 begins 4/20/20 (60 DTE) with SPX 2828 and 2830 puts -$168 (-2.7%). MR is $6,288 (two contracts), TD 45, IV 37.3%, horizontal skew +0.8%, NPD 1.2, and NPV 191.

Exit trade 43 DTE for profit of $632 (10.1%). SPX up 0.23 SD with IV down 29% over the 17 days. Horizontal skew has decreased to -0.1%.

Cal 1.9 begins 4/27/20 (81 DTE) with SPX 2882 and 2890 puts -$168 (-2.4%). MR is $6,978 (two contracts), TD 21, IV 27.6%, horizontal skew -0.4%, NPD 1.5, and NPV 211.

MDD (before exit) is -$388 (-5.6%) on 44 DTE.

Exit trade 42 DTE for loss of $1,528 (-21.9%). SPX up 1.2 SD to 3190 with IV down 31% over the 39 days. Horizontal skew up to +0.4%. SPX rallying 2.2 SD on the last trading day was the coup de grâce:

Price chart Cal 1.8 (2-18-22)

This trade would fare better were it placed more bullish. Horizontal skew < 0 at trade inception. Both of these statements strike me as "usual." We will find most calendars to begin with negative skew. Stocks traditionally move up more often than down. Whether negative horizontal skew can be used as an indicator in this way will require a larger sample to determine.

Practice Trades Cal 1.3 – 1.6

The following four practice trades are backtested over the following market price action:

Price chart Cals 1.3 - 1.6 (2-15-22)

Conventional wisdom would label this a bad time to place time spreads with IV so high. How do you think things will turn out?

Cal 1.3 (guidelines here) begins 3/16/20 (60 DTE) with SPX 2409 and 2410 puts -$168 (-2.3%). MR is $7,268 (two contracts), TD 85, IV 78.5%, horizontal skew +7.2%, NPD 1.5, and NPV 196. Some of these numbers are staggering: IV, horizontal skew, and MR (probably due to the options being packed with so much extrinsic value).

MDD is the very next day with SPX up 1.35 SD, IV 70%, and trade -$178 (-2.5%).

One day later at 58 DTE, exit trade for profit of $1,472 (20.3%). SPX down 0.19 SD with IV down 5% over the two days. Horizontal skew has decreased to +5.3%, which has certainly contributed to the end result.

Cal 1.4 begins 3/23/20 (88 DTE) with SPX 2254 and trade -$168 (-3.5%). Only 25-point strikes are available in the back month, which does not fit the guidelines. I will therefore add the additional guideline to buy back month at the first strike OTM if same strike unavailable. MR is $4,828 (two contracts), TD 17, IV 60.9%, horizontal skew +2.2%, NPD 2.4, and NPV 126.

On 85 DTE, trade -$788 (-16.3%) with SPX at 2632.

Exit trade at 79 DTE for profit of $642 (13.3%). Over 9 days, SPX up 1.02 SD with IV down 8%. Horizontal skew has increased to +2.8%. TD 146 suggests market could move around quite a bit before hitting adjustment point.

Cal 1.5 begins 3/30/20 (81 DTE) with SPX 2629 and trade -$168 (-4.3%). MR is $3,948 (two contracts), TD 62, IV 52.8%, horizontal skew +2.5%, NPD 0.8, and NPV 156.

Exit trade at 76 DIT for profit of $532 (13.5%). Over 3 days, SPX down 0.83 SD with IV down 11%. Horizontal skew has decreased to +1.4%. TD 13.

Cal 1.6 begins 4/6/20 (74 DTE) with SPX 2671 and trade -$168 (-3.2%). MR is $5,208 (two contracts), TD 31, IV 38.6%, horizontal skew +0.7%, NPD 1.2, and NPV 165.

MDD is hit next trading day at -$308 (-5.9%) with SPX nearly unchanged at 2672.

Exit trade at 59 DTE for profit of $1,182 (22.7%). Over 15 days, SPX up 0.30 SD with IV up 7%. Horizontal skew has increased to 1.3%. TD 362.

Horizontal skew can be confusing. Based on numbers alone, I would ideally like to buy it positive. Once in the trade, I want horizontal skew to decrease, which means the long leg remains expensive relative to the short leg.

Practice Trades Cal 1.2

Building off this practice trade, let’s be random and backtest one year earlier.

Cal 1.2 begins 5/15/17 (67 DTE) with SPX 2403 and 2410 puts -$168 (-6.4%). MR is $2,618 (two contracts), TD 2, IV 7.03, horizontal skew -1.01%, NPD 2.1, and NPV 157.2.

I’m not sure why TD is so low:

Risk graph Cal 1.2 at inception (2-7-22)

With the calendar less than 10 points above the money, positioning seems fine and I would expect TD to be higher. I’ll keep an eye on this as I look at more example trades.

At 65 DTE, the market is down 3.94 SD to 2358 and trade -$288 (-11%) with TD near zero. Adjustment increases MR to $2,811 and puts trade down 13.2%. TD ~ 1.25 is not very encouraging. Horizontal skew is unchanged.

By 58 DTE, market has completely recovered to 2405 with trade -$442 (-15.7%) and TD = 1 again. Adjustment increases MR to $3,144 and puts trade down $526 (-16.7%). TD 8 is nice, but we’re getting close to ML. Also 4/5 T+x lines are underwater, which means the market will have to trade sideways for a while in order to see profits.

Under current guidelines, I should realize the loss right here.

If not, then I would exit trade by 50 DTE for a loss of $631 (-20.1%).

One thing I find encouraging about this strategy is the limited loss resulting from outsized moves lower. The long vega should hedge provided horizontal skew is unchanged (as it is here). At 65 DTE with the huge move lower, this trade is only -11% after being -5.3% the previous day:

Risk graph Cal 1.2 after 4 SD downmove (2-7-22)

A 4 SD downmove makes this anything but usual. I could exit for a loss immediately. Alternatively, I could just wait (SOH) and see if the market settles over the next couple of days.

SOH would outperform in this particular case. After the market recovers, an upside adjustment is needed at 49 DTE with trade down $422 (14.8%) and MR increasing to $2,846.

Trade -$542 (-19%) on 32 DTE with TD 2. From here, despite some bigger moves up and down, the trade does recover to +$5 at 8 DTE. I don’t have a time stop but I probably should—no later than 9 DTE to be safe? Alternatively, given what I’ve been through on this trade maybe I lower PT to zero and be happy with that.

The very next day, trade -$54 as TD = 1. This would be an adjustment point, but if guidelines dictate exit by 7 DTE anyway, I should close here and book the small loss (-1.9%).

Lots of discretionary ideas here fall under the “art of trading” umbrella. I certainly want to see how the existing guidelines perform over a large sample size of examples before implementing any of them.