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

Automated Backtester Research Plan (Part 4)

Today I continue with the research plan for naked calls.

As discussed with puts, I think naked call trades should be normalized for notional risk.

I would like to see a distribution of naked call losers in time and in magnitude. Date can be on the x-axis with underlying closing price (line graph) on the right y-axis and trade PnL (histogram) on the left y-axis. It certainly makes sense to do these graphs for expiration. We can also do these graphs for managing winners at 50% (and/or 25%?) and for managing losers.

I suggested managing trades early (i.e. exiting at 7-21 DTE by increments of seven or exiting at 20-80% initial DTE by increments of 15%) for naked puts, but I did not mention it for calls. This is because in backtesting naked calls down to 7 DTE, I am not sure what kind of time stop makes sense. Four, three, and two DTE correspond to expiration Monday, Tuesday, and Wednesday respectively—any of which would seem to be an extremely short time to hold these trades. They could be repeated every week, though. This is subject for debate.

When the market rips higher, naked calls can lose quickly because they are closer to the money. This almost makes me more reluctant to trade naked calls than puts, which is counterintuitive because traditional wisdom says naked puts are most at risk. Naked puts are vulnerable to directional moves—equity markets tend to crash down farther (and faster) than they crash up—and extremely vulnerable to volatility explosion. If volatility affects naked calls at all on strong upside moves then it generally benefits them (going from inflated IV on a pullback to normal/low IV after the rebound). The culprit hiding in the shadows is vertical skew, which makes OTM calls cheap compared to OTM puts.

This line of discussion makes me curious to know how time stops can reduce risk of naked calls despite the above discussion of why they were not mentioned in the previous post. I would be interested in seeing a histogram of PnL (y-axis) by DTE (DIT): high (low) to low (high) moving from left to right along the x-axis. This plot would be for unmanaged trades. I would expect to find that earlier exits mitigate the most extreme losses—but at what cost?

The vertical skew discussion also implies that [if implemented then] naked calls should be traded in a smaller position size than naked puts. I would like the backtest to provide some insight about reasonable position sizing. I want to study the rolling (out or up and out) adjustment and how many rolls have been historically required during the sharpest and most sustained upside moves. As an example of how this could be relevant, suppose risk management is to roll into double the position size when premium increases by 100%. If we don’t think this will happen for more than three consecutive months, then maybe position size for naked calls should be 13% (or less) that of naked puts.

I will continue next time.

Automated Backtester Research Plan (Part 3)

Finishing up the discussion on filters, some can probably be tested on the underlying alone without the automated backtester. By looking just at underlying price we can plot trade distribution (looking for consistent vs. lumpy). Maximum adverse excursion can also be studied to see whether this improves with filter application. This type of analysis may lend itself more to spreadsheet work and macros. I have numerous research questions that would fit in this category.

Back to the automated backtester, I would like to study rolling as a trade management tool. We can roll naked puts [down and] out to the next month when a short strike is tested or when the trade is down 2-5x initial credit. We can also roll naked puts down to same original delta in the same or next month if strike gets tested.

Some thought may need to be given to calculate days in trade (DIT) for rolling adjustments. If rolling out doubles DIT, for example, then annualized ROI is halved. This may not be the best result. If I’m not looking to calculate [annualized] ROI then this may be a moot point, but we should be aware that for breakeven or normal profit, rolling will significantly increase DIT.

As an overlay, another adjustment I am interested in testing is the addition of an ATM short call to manage NPD.

Parts 1 and 2 of this research plan primarily addressed naked puts. The plan is similar for naked calls.

The first phase of naked call backtesting involves overlapping trades. We can study trades entered every day between 7-42 DTE. We can choose the first strike under 0.10 to 0.50 delta by increments of 0.10. We can hold to expiration or manage winners at 25% (ATM options only?) or 50%. We can manage losers at 2x, 3x, 4x, and 5x initial credit. I’d like to track and plot maximum adverse (favorable) excursion (no management) for the winners (losers) along with final PnL and total number of trades. I want to monitor winning percentage, average win, average loss, largest loss, profit factor, average trade (PnL), PnL per day, standard deviation of winning trades, standard deviation of losing trades, average DIT, average DIT for winning trades, and average DIT for losing trades.

My gut leans away from studying longer-term naked calls because of vertical index skew. With the market generally drifting higher and naked calls being cheaper than put counterparts (thereby implying NTM call sales for equivalent premium to farther OTM puts), my bias is toward shorter-term holdings. On the other hand, a 30-64 DTE backtest would allow for an apples-to-apples naked put comparison. This is subject for debate.

I will continue next time.

Automated Backtester Research Plan (Part 2)

Last time I discussed backtesting naked puts by opening one trade every day.

A final piece to managing winners is total number of trades. In a serial scenario, total trades would be greater for managing winners than holding to expiration whereas in a daily/overlapping trade scenario, total trades would be equal despite average daily notional risk being less for managing winners. It might make sense to track daily notional risk as a proxy for actual buying power reduction, which would be significantly less in a [portfolio] margin account and perhaps too complex (or not worth the effort) to build into the automated backtester.

The research plan continues with backtesting naked puts in a serial manner by having only one trade open at a time.

For the serial approach, I would like to tabulate several different statistics. These include total number of trades, winning percentage, compound annualized growth rate (CAGR), maximum drawdown, risk-adjusted return (RAR), and profit factor (PF). Equity curves will represent just one potential sequence of trades and some consideration could be given to Monte Carlo simulation. We can plot equity curves for different account allocations such as 10% to 70% of initial account value by increments of 5% or 10% for a $50M account. A 30% allocation (for example) would then be $15M per trade. Trade size should be held constant throughout in order to maintain apples-to-apples comparison of drawdowns throughout the backtesting interval.

The general principle behind filters is to achieve more profit (PnL per trade—sometimes as a result of decreasing drawdown or, in this case, a higher winning percentage) despite fewer trades. My preference is not to see a lumpy equity curve where a vast majority of trades occur on a small percentage of days. This gets away from trading as a business to pay the monthly living expenses. When studying filters, it will therefore be important to look at number of trades and the slope of the equity curves under different filters to determine consistency of profit. RAR and PF will also be useful.

Examples of filters to be tested are numerous. We can look at trades taken at 5-20-day highs (lows) by increments of five. Trades can be taken only when a short-term MA is above (below) a longer-term MA.* Trades can be avoided when the underlying is under the 20-, 50-, or 200-day MA. IV at an X-day high may be a useful inclusion or exclusion filter (always minding sufficient sample size at extreme parameter values). Trade entry can be filtered by IV rank (perhaps 25% or 50% with a period of 30, 180, or 365 days). A volatility stop could be implemented to exit losing trades if IV increases by 30-100% using increments of 10%.

I will continue next time.

* Some thought would have to be given to period determination. I do not want to get into an extensive optimization game
   since I’m more a believer in Occam’s Razor (i.e. K.I.S.S.).

Automated Backtester Research Plan (Part 1)

Today I begin outlining a research plan for the automated backtester.

I want to start with naked puts because they employ the least leverage.

We can study trades entered every day between 30-64 DTE. We can choose the first strike under -0.10 to -0.50 delta by increments of -0.10. We can hold to expiration, manage winners at 25% (ATM options only?) or 50%, or exit at 7-21 DTE by increments of seven. We can also exit at 20-80% of the original DTE by increments of 15%. We can manage losers at 2x, 3x, 4x, and 5x initial credit. I’d like to track and plot maximum adverse (favorable) excursion (no management) for the winners (losers) along with final PnL and total number of trades. I want to monitor winning percentage, average win, average loss, largest loss, profit factor, average trade (average PnL), PnL per day, standard deviation of winning trades, standard deviation of losing trades, average days in trade (DIT), average DIT for winning trades, and average DIT for losing trades.

Return on investment (ROI) does not seem relevant for naked puts because of the large notional risk. At the moment, I cannot think of a need to track buying power reduction, but this is something I will keep in mind.

Speaking of notional risk, unless normalized the average win/loss can vary significantly based on underlying price (and option prices). We can apply a fixed position size (e.g. $5M) and calculate number of contracts for each trade. If I am selling a 1500 put, for example, then $5M divided by $150,000 (notional risk) is 33 contracts ($4,950,000) and change (truncate). If I sell a 1000 put then 50 contracts would amount to $5M notional risk. Regardless of underlying price, this will give a variable number of contracts to keep notional risk relatively constant thereby keeping profits and losses commensurate.

If we don’t normalize for notional risk then we would get numbers that don’t make as much sense. With the underlying at 1000 vs. 2000, for example, the contribution to the total PnL would be roughly twice as large at the higher prices. The overall contribution should not significantly vary based on an arbitrary factor.

I want to briefly discuss the relative constancy around target position size. I mentioned that $4,950,000 is 1% less than $5,000,000. As discussed here, I would expect this error to be inversely proportional to number of contracts because the percentage difference between consecutively decreasing integers increases (e.g. 19 is 5% lower than 20 whereas 9 is 10% lower than 10). If we deem this error to be too large—especially for lower-priced underlyings like RUT—then the target position size can be increased (e.g. from $5M to $10M).

I would like to see a distribution of losers in time and in magnitude. Date can be on the x-axis with underlying closing price (line graph) on the right y-axis and trade PnL (histogram) on the left y-axis. It certainly makes sense to do these graphs for expiration. We can also do the graphs for managing winners at 50%. I think it also makes sense to do these graphs for managing early (e.g. 7-21 DTE or X% of the original DTE) as well as managing losers.

I will continue next time.

One Last Misadventure

My last misadventure was not of the Meetup variety but rather a Yahoo! Group I started in 2015.

This was an online group called “AmiBroker User’s List.” I was able to find six people who were interested in joining my online group to be focused on learning and using AmiBroker. Locally, I met a seventh who indicated interest in learning to invest directionally with options. I told him about AmiBroker, he said he was interested, and he joined the group in March 2015. I followed up after two months because I didn’t hear from him or anyone else in the group. He said he was studying options a little, but work had gotten busy to the tune of 60-80 hours/week.

Two weeks later, I sent the seventh this message:

     > That group is a bust. I’m about to close it down. I don’t
     > blame you but rather everyone in general (including
     > myself). Bottom line: we’re just not interested enough
     > in it to make things happen.
     >
     > For me, I have my bread and butter trading and the
     > trading I’m trying to learn. Obviously I’m not excited
     > enough about this other trading interest (system
     > development) to make it work because I can’t even
     > put in 15 minutes on a consistent basis to learn the
     > software. That’s been my problem for a long time.
     >
     > In my opinion, trading is hard work. It’s not something
     > that’s intuitive and it’s not something anybody is going
     > to learn by osmosis. Unless there is continued,
     > sustained effort, it’s never going to happen. I’ve gone
     > to a lot of trading group meetings and talked with lots
     > of traders and heard many more. People work at it
     > when it’s convenient and then when things turn sour
     > they turn their backs and walk away. Maybe they return
     > at a later time. I think this feeds directly into how
     > the markets work on a macro level. It will never lead
     > to successful, long-term traders, though, if such
     > a thing is even possible.

Clearly I was frustrated in general and especially frustrated with myself. I have always had a difficult time forcing myself to learn coding. I wish I knew why.

Despite the frustration, I do think my comments on sustained, long-term effort are applicable to aspiring traders.

My Meetup Misadventures (Part 6)

Today I can conclude discussion of my third Meetup misadventure by presenting the IBD Meetup organizer’s response to my request/brainstorm about adding an options component to his group (see here for previous discussion).

After not hearing back, two weeks later I followed up by asking whether he got my message. He responded:

     > Yes I did. I will give out your info at our meeting and see if
     > there is any interest. I will not be participating given your
     > restrictions, but someone may have interest and will have your
     > thoughts and info to contact you.

Eight weeks later I followed up by asking if he found anyone interested in “talking about options.” He responded:

     > I gave out the note you sent me on your expectations for an
     > options group and how to contact you through the Meetup.

I responded:

     > Nobody contacted me. I appreciate your efforts, though. If
     > you don’t mind me asking, in your previous message when
     > you said “I will not be participating given your restrictions,”
     > to what were you referring?

He responded:

     > You are very restrictive in how you believe the group should
     > work and didn’t seem open to others ideas. My take on your
     > opening note is you should start your own Meetup group, set
     > it up the way you want it run, find members that agree with
     > how you have it set up and go from there.

As I have suggested with my editorial comments, I feel like I sabotaged that connection with a closed-minded and inflexible tone. It hurt me to blow this because the connection seemed to have good potential but in retrospect I am glad to have had the experience. I certainly learned something: don’t make it sound like a full-time paid job! That won’t fly unless I’m looking to scare people off.

More with regard to Ann Arbor Algos, this post describes another set of reasons why I may have had trouble finding group members in the past.

Next time, story time concludes with one final misadventure.