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

Transaction Fees and Backtesting (Part 2)

My last post discussed reasons to cut back from my $26/contract transaction fee assessment. Today I want to finish up by discussing further implications of transaction fees.

A back-of-the-hand calculation suggests that if I cut transaction fees by Y then I can expect an average trade of X + Y where X was the average trade with transaction fees of $26/contract.

The relationship between transaction fees and PnL is more than linear, though. If I were to repeat the bullish iron butterfly (IBF) backtest with lower transaction fees then I could expect all the winners to remain winners. Days in trade would decrease, though, and this is the wild card.

Being in the trade for a shorter period of time reduces exposure to the IBF’s biggest enemy: big market moves. Some may argue IV spikes are the biggest enemy but the two are usually coincident.

Big market moves will damage prospects most for losing trades with highest MFE. MFE often occurs just before a big market move. In these cases, the move happens and the market never looks back thereby pushing these trades to max loss. Losing trades with MFE near the profit target have the best chance to become profitable given lower transaction fees. Confused? Consider the opposite extreme: losing trades with [lowest possible] MFE equal to initial PnL won’t have a chance regardless of transaction fees because these trades never get off the ground. For the IBF, initial PnL = -8 * transaction fees/contract.

Thought about differently, lower transaction fees means the initial PnL is greater, which means fewer days of theta decay required to reach the profit target. I could sort losing trades by MFE to approximate how many trades might benefit.

I need to make sure MFE is tracked correctly in order for this to be useful. I defined MFE as the highest intratrade PnL before expiration. I questioned this metric a couple times while backtesting. Once I suggested tracking MFE after profit target was hit could be useful. Another time I suggested tracking MFE before MAE was hit. If using stop-losses then it might be useful to know MFE before the stop-loss is hit (a better MFE afterward would be meaningless with the trade already closed).

All things considered, I think the MFE methodology is satisfactory given the need described above.

With the goal of cutting transaction fees significantly by being patient with trade entry, counting trades with MAE DTE equal to initial DTE will suggest what percentage of the time this could work. These would be the trades that recorded zero MAE (although as discussed in the last post, the opportunity would still exist to be filled intraday due to usual price volatility).

Transaction Fees and Backtesting (Part 1)

I began analyzing the data from my bullish iron butterfly (BIBF) backtest in the last post. The initial results were surprisingly poor so I want to detour and reopen the discussion about transaction fees.

Conservative assessment of transaction fees contributed to making this trade look worse than it might actually be. I also discussed this with regard to the dynamic iron butterfly. I set transaction fees to $26/contract or $208 for the whole trade. The average trade was about -$150; if I were able to do the trade for $6/contract (a nickel slippage per leg) in transaction fees then the average trade would improve to +$10. Suddenly this trade would be worth considering.

A case can be made for significantly less slippage upon exit. I spoke last time about how live trading a losing butterfly would result in significant savings: perhaps knocking transaction fees down from $104 to $30. Another example regards a profitable trade. As expiration approaches, the long legs usually decay to zero. In many cases they are worth only a nickel or dime when the profit target is hit. Rather than closing these at a cost of $26/contract, I would let them expire and save the difference.

Leaving the longs to expire also offers some end-of-cycle crash insurance were the market to make a huge move as expiration approaches. With the shorts already closed at the profit target, the longs remain risk-free. My backtesting does not take this into account. In order to see if the detail is material, I could look for big differences in maximum adverse [favorable] excursion with 2-4 DTE and the expiration PnL to get a sense of how often big moves occur in the final week.

Trade entry is another opportunity to mitigate slippage. A limit order placed at the midprice is likely to be filled within a few trading days due to the usual fluctuation in market prices. Studying MAE distribution would help to quantify this. Any trade that registers a MAE larger than -$416 is effectively a zero-slippage trade.

I am most interested to see what percentage of trades has MAE less than -$416 because these are the ones that may not fill. The risk of going unable is actually lower, though, because opportunity exists for intraday drawdowns to occur that also represent zero-slippage entries. Intraday backtesting is very time intensive so the best way to understand this is through live trading. Even if I were to use OptionVue for intraday backtesting, it only offers limited data (every 30 minutes).

Bullish Iron Butterflies (Part 1)

Today I begin my report on the bullish iron butterfly.

The structure of this trade is different from the dynamic iron butterfly. This trade was centered 2-3% above the money (split strikes were used if necessary). Also, this was a balanced (e.g. symmetrical) butterfly. The last backtest only included a few balanced butterflies [when the dynamic criterion so ordered].

Trades were held until a 10% profit target was hit on an EOD (3:30 PM ET) basis or until expiration Thursday. I assessed my usual [arguably excessive] transaction fees.

Here are the initial results:

Bullish butterfly raw statistics (5-23-17)

Aside from the ugly profit factor, the first thing I noticed was a max loss of -140.5%. In live trading, the worst loss I would incur on this trade would be a case where one spread goes DITM. OptionVue often shows these spreads to be worth more than their width. While this could potentially happen under low-volume, illiquid conditions, I would never actually close such a spread. Rather, I would hold it until expiration and pay two assignment fees. With this totaling $30 (or less) and the minimum margin requirement ever recorded of $400, the worst loss I could ever technically incur would be -108% ($430 / $400).

For this reason, I went back and changed the max loss on any trade to -108%:

Bullish butterfly raw statistics with cleaned expiration PnL (5-23-17)

The effect of the changes was minimal. 176 additional trades showed a loss between -108% and -115% but based on the minor impact from mitigating the most extreme losses, I don’t think it’s worthwhile going back to change the others.

I’m just getting started with this backtesting analysis but I do not think this is an optimistic start! Between 2001 and 2017, I backtested the bullish iron butterfly through many market environments and conditions. While I will separate some of these out and compare in an attempt to identify differences, part of me believes a robust trade should backtest profitably on the whole. This clearly did not.

Hello!

Not that you’d realize but I haven’t typed a blog post in a really long time!

Once I get going on a backtest I tend to get caught up in it. The 2-3 hours of backtesting I can handle daily represent an attention-demanding task that wears on my brain. It burns to the extent that I usually spend the balance doing more passive tasks like watching webinars or reading. Blogging—another concentration-intensive task—tends to get pushed aside.

Once the backtest is over I sometimes experience a complete loss of motivation. This describes the last couple weeks, which were punctuated by my seventh marathon. After the backtest is done I can finally proceed with the data analysis. This makes it somewhat inconvenient that my brain wants to take a vacation.

It is what it is.

I have now finished my second butterfly backtest. This time I looked at a classic butterfly. Data analysis is imminent.

Starting with today’s brief post, I will consolidate efforts to get back into the blogging groove.

I’m starting to feel butterflies!

Musings on Naked Puts in Retirement Accounts (Part 4)

If a vertical spread lowers the standard deviation (SD) of returns and max drawdown (DD) compared to a naked put (NP) then its résumé is bolstered as an alternative candidate for retirement accounts. This was an unlikely result in the first example studied.

Rather than quintupling position size for the vertical spread, what if I double it? The potential return would be $4 (rather than $10), which is a 33% increase over the NP. The NP risk is now cut by 80% (rather than 50%) to $20K, which is the breakeven for both trades.

The risk graph now looks like this:

Naked put vs. put vertical risk graph (unequal contract sizes example 2) (4-3-17)

Like the previous example, the vertical spread outperforms if the market rises or if the market falls less than 7%. If the market falls between 7% and 20% then the naked put outperforms. If the market falls more than 20% then the vertical spread outperforms. A market correction over 20% is more likely than a market correction over 50% and this is where the risk metrics (SD of returns and max DD) would be improved by the vertical spread.

Of course, the vertical spread could be traded in equal position size to the NP. This would generate the first graph shown in Part 3. In that case, no gap of underperformance exists for the vertical spread and any market correction over 10% would generate better risk metrics for the vertical spread.

So going back to my statement in Part 1, does the vertical spread actually improve risk metrics?

The largest market crashes (e.g. fall 2008) will give rise to a lower SD of returns and a lower max DD for vertical spreads.

Unfortunately, these severe crashes occur so rarely that it’s hard to plan a trading strategy around them. The vertical spreads may or may not yield improved risk metrics depending on whether the market corrects, how often it corrects, and the exact magnitude of corrections during the time interval studied.

Compared to NP’s, vertical spreads may improve risk metrics. This is far from guaranteed, however.

Musings on Naked Puts in Retirement Accounts (Part 3)

Today I resume discussion of vertical spreads instead of naked puts (NP) in retirement accounts. I mentioned previously that [OTM] vertical spreads don’t usually affect standard deviation (SD) of returns or maximum drawdown (DD). In case of a significant market downturn, however, they certainly can.

Let’s begin with the risk graph comparison posted earlier:

Naked put vs. put vertical risk graph (3-13-17)

Notice how the green line (vertical spread at expiration) goes horizontal once the market drops ~16% to 419. That is where max loss is hit. The farther the market drops beyond that point, the more the NP (purple line) loses relative to the vertical spread. This represents a lower SD of returns and a lower max DD for the outperforming vertical spread.

This analysis assumes equal position size and offers an important distinction between ROI and gross PnL. In percentage terms, the vertical spread loses more than the NP if market falls the 16%: 100% for the vertical spread versus [under] 16% [buffered by initial premium collected] for the NP. In terms of gross dollars, the NP and vertical spread lose similar amounts until the vertical spread has lost 100% at which point the NP continues to lose more. 16% is the loss threshold beyond which the vertical spread delivers a lower SD of returns and a lower max DD than the NP.

Now let’s reconsider the naked 1000 put example I presented here. If I sell a 1000 put for $3.00 then [gross] risk is $100,000. If I buy the 900 put for $1.00 then I cut risk by 90%. I could, therefore, trade five times as many verticals while still halving the NP risk. Potential ROI on the vertical spread would be 6.7-fold greater.

Here are the risk graphs of the vertical spread (red line) and NP (blue line):

Naked put vs. put vertical risk graph (unequal contract sizes) (3-30-17)

The problem with the vertical spread is the possibility of losing the entire $50K should the market fall from 1000 to 900 (10%). For the NP to lose $50K the market would have to fall to 500 (50%), which is circled in red. In this case, the vertical spread outperforms if the market rises or if the market falls less than 7%. If the market falls between 7% and 50% then the NP outperforms. If the market falls more than 50% then the vertical spread outperforms.

Because a fall over 50% is so unlikely, this particular vertical spread position would probably post a larger SD of returns and a larger max DD than the NP were the market to enter a meaningful correction.

In the next post I will compare a different vertical spread position to see how it measures up.

End-of-Day Versus Intraday Trading (Part 2)

As I mentioned last time, a big part of the debate between end-of-day (EOD) and intraday trading involves the difference between the probabilities of touching and expiring. The markets are often regarded as random (Brownian motion). When a particular price level is reached, the market then has a 50/50 chance of moving higher or moving lower. The probability of expiring beyond that level is therefore less than the probability of touching it.

For intraday trading, this may be both an advantage and disadvantage. More winners can be exited intraday, which is an advantage. More losers—some of which would otherwise go on to be winners—will also be exited intraday, which is a disadvantage. On trend days, exiting losers (winners) intraday will avoid (preclude) what could otherwise be larger EOD losses (profits), which is an advantage (disadvantage).

This debate is not getting any easier.

Price action aside, another disadvantage to intraday trading is the need to be available and/or take action more than once and possibly whenever the market is open. This takes a lot of flexibility out of the workday.

The biggest disadvantage to intraday trading is arguably a much more complex (or impossible) backtesting proposition. OptionVue (OV) provides data every half hour. If I am going to “trade like I backtest” (mentioned here and here) then I must monitor trades every 30 minutes. Such backtesting would more than quintuple my current 2-5 months per backtest. Continuous market monitoring represents another magnitude of complexity because significant volatility can occur even between 30-minute prints. Backtesting this trading time frame would therefore require a much more granular database.*

As a net seller of option premium, I find time decay to be more certain than typical [random] price action. Every 24 hours an option gets one day closer to expiration. Implied volatility increase can offset time decay in the short-term but this only happens in some instances of down markets, which is [significantly] less than 50% of the time.

Given this additional reasoning, my gut instinct is to give the nod to EOD over intraday trading. A trade is more likely to be exited at an intraday stop-loss for the additional reason that option decay into the close may improve the PnL. Being directionally long also favors EOD trading by giving more time to allow for positive drift. The observations that many trades have small MAEs and only a select few have huge MAEs is additional evidence in favor of longer trade duration (EOD).

For me, the exponential complexity or impossibility of backtesting is the proverbial nail in the coffin for intraday trading. These restrictions actually make me wonder whether the perceived benefit of enhanced intraday opportunity is more illusion than anything else.

* – Any discretionary strategy that uses alerts to signal entries, exits, or adjustments implies this sort of intraday, continuous-monitoring approach.

End-Of-Day Versus Intraday Trading (Part 1)

One thing that came to mind from my recent blog series on backtesting frustration was the distinction between end-of-day (EOD) and intraday trading.

The most important aspect of EOD trading for me is once daily. This is much different from intraday trading where I could be watching the market continuously. For the sake of this discussion I will assume EOD takes place at the close but I really feel the exact time is arbitrary as long as it is consistent (e.g. 10:30 AM, 3:35 PM, etc.).

EOD trading has pluses and minuses. Checking in on the market once daily is a plus. This makes for a very flexible work schedule. Another plus is the opportunity to realize windfall profits in excess of my target. On the other hand, I believe the biggest minus is the potential to realize windfall losses. If the loss at trading time is beyond my stop then I must take it no matter how bad it is.

One advantage of intraday trading is a greater opportunity to exit trades at a price target. This is because the probability of touching a certain profit level exceeds the probability of closing at that level. Suppose I am up 8% on a long stock trade with a 10% profit target. A small amount of market volatility the next day will likely push the trade to +10%. To close at +10%, though, the market has to have an up day. In this case I would not be able to capitalize on so many of the choppy days where the market is higher intraday before closing lower.

Another advantage to intraday trading is the opportunity to realize tighter stops. Suppose my trade with a 15% stop-loss closed down 14% yesterday. As an EOD trader, should the downtrend continue today then who knows how far beyond -15% the trade might be when I have to exit at the close? Were I trading intraday, I could likely exit much closer to that -15%.

This is also a disadvantage to intraday trading, however. I may sometimes get stopped out for a loss on trades that briefly fall below my stop only to see them reverse higher as they ride off into the sunset without me, never looking back.

EOD or intraday? This is a tough, tough deliberation.

I will continue next time.

Backtesting Frustration (Part 6)

This has been a very beneficial exercise in expository writing because at the outset I was not sure I would ever get through. One question remains: why bother backtesting 2001 – 2003 if this part of the database has so many holes?

2001 – 2003 presents a critical sampling of different market environments. The 9/11 crash is followed by a sharp bullish reversal into January 2002. From April 2002 to July 2002 the market fell 29% before falling 20% from August 2002 to October 2002. The market then rallied 63% from March 2003 through December 2003. These may be the only occurrences in the database of such wide-ranging action at low market prices. And even if they weren’t the only occurrences, the total number of occurrences is small enough to make each one critically important.

I feel better having gotten all of this frustration out in writing.

With regard to the abandoned butterfly backtest, I think I will simply the column headers and take it a smaller chunk at a time. As mentioned earlier, I am trying to accept that my backtesting will take much longer than it probably should. This will be one of those cases but at least it will get done and hopefully from it I will get some very insightful analysis.

Backtesting Frustration (Part 5)

Given everything I said about spotty/flawed data, and the occasional need to manually add additional strike prices, starting later would probably be better. This presents another set of backtesting problems that I will discuss today.

Starting the backtest where I know the database is more complete (e.g. 2005) would result in fewer workarounds, fewer holdups, and faster overall progress. By shifting the hardest work to the end, this would serve as an effective antidote for much of the frustration I have been discussing in this blog mini-series.

Unfortunately, in order to generate an equity curve I need to start at the beginning. The process records account value every trading day to allow any errors to be immediately identified and fixed, which preserves integrity of the curve. Also as a cumulative summation to date, an equity curve does not even make sense without all previous trades being logged.

In order to get through, I have just been trying to accept that the research will take much longer than it probably should. I go through the 16-year database once to perform the backtrades. I then go through the database again to record equity values. I can’t do it all together when my attention is split in so many different directions trying to keep up with what statistics to record (dictated by the column headers), filling in missing data, and sometimes reviewing for data accuracy. The harsh reality is that a second time through can easily add 2-4 weeks on top of what has already been 2-4 months.

Backtesting stop-losses presents a similar conundrum. This is what inspired the current blog series after frustration forced me to abandon my last butterfly backtest. I tried to include stops in the column headers so I could watch for them every trading day. I was monitoring two profit targets, two stop-loss levels, and MAEs for multiple open trades in a spotty portion of the database. My cognitive capability was simply overwhelmed.

One could argue the most accurate way to collect stop-loss information is to first record MAE for all backtrades and then filter by different stop levels (e.g. 1x, 2x, 3x) to later go back and retest only those trades reaching the different levels to determine the actual end-of-day losses.

While it may be accurate, it certainly is not efficient or fast. I hope OptionVue can help me more with that as time goes by.