Skip to main content

NetZero Trade

· 7 min read

Overview​

NetZero (aka 60-40-20) is an At The Money Broken Wing Butterfly trade on SPX that Andrew Falde has devised. This trade has been explained in great detail by Mark Mosley in the Raleigh Durham Open Systematic Options Trading Strategies recording.

The options structure utilized in this trade involves a delta-neutral, positive theta, and negative vega income structure. The Broken Wing Butterfly's legs are strategically placed at deltas 60, 40, and 20 on the put side.

NetZero ONE Structure

Trade Rules​

NetZero Rules Part 1

The original trade rules are described as:

  • Enter trade 60-80 days to expiration
  • Select strikes having the deltas closest to 60, 40, and 20 deltas
  • Exit trades when
    • Middle leg’s delta changes by 30%
    • Upper leg’s delta changes by 30%
    • 30 days to expiration is reached

Mark Mosley has incorporated an additional exit rule into the trading strategy inspired by the methods of John Locke, whereby an early exit is taken when the delta to theta ratio (delta divided by theta) reaches a threshold of 60%.

We will validate the two variants by simulating their historical performance using MesoSim. In all simulation runs, we will use Multiple Positions in Flight to avoid relying on one execution path.


Simulating the original trade​

As the structure definition is trivial, we will only spend time detailing the trade's exit rules.

To enable exit criteria based on delta comparison of the Upper Long and Middle Short Leg with their initial states, we will be recording the delta values of each leg at initiation and storing them in the designated variables:

"Entry": {
...,
"VarDefines": {
"initial_leg_shorts_delta": "leg_shorts_delta",
"initial_leg_upper_long_delta": "leg_upper_long_delta"
},
}

Then using the Exit.Conditions to describe the three criteria:

"Exit": {
...,
"MaxDaysInTrade": 999,
"ProfitTarget": null,
"StopLoss": null,
"Conditions": [
"(leg_shorts_delta - initial_leg_shorts_delta)/initial_leg_shorts_delta > 0.3",
"(leg_upper_long_delta - initial_leg_upper_long_delta)/initial_leg_upper_long_delta > 0.3",
"leg_shorts_dte <= 30"
]
}
info

Please note that we have set the MaxDaysInTrade parameter to an exceptionally large value to render it ineffective. This configuration is aimed at adhering to the original rules of the trading strategy, which mandate an exit from the trade when the legs approach 30 days until expiration. To implement the time based exit rule, we have chosen the leg_shorts_dte variable for the check, although the other two legs' respective variables (leg_upper_long_dte and leg_lower_long_dte) would be equally viable options.

Backtest results​

NetZero Original MesoSim Screenshot

The full run with further statistics (full tearsheet) is available in the following link: https://portal.deltaray.io/backtests/148c6282-e485-4807-8418-385c96815bb2

Upon reviewing the Log Return graph, we can observe that the trading strategy exhibits strong performance characteristics in markets that trade sideways, which is reflected by its outstanding performance during the periods of 2015 and 2022.

The trading strategy encounters its most challenging period during the interval between two black swan events, namely the Volmageddon in February 2018 and the Covid Crash in 2020.


Simulating Mark Mosley’s variant​

During the presentation, Mark Mosley introduced an additional exit rule that employs the delta-to-theta ratio as a benchmark for exiting trades early. We suspect that this additional trading rule comes from John Locke’s methodology on trading Broken Wing Butterflies.

NetZero Mosley Modification

Additional trading rule​

To integrate the additional trading rule, we have made the following modifications to the job definition:

  • Entry.AbortCondition guarantees that we only establish positions that conform to the delta to theta ratio requirement
  • Exit.Conditions are responsible for exiting the trade when the ratio becomes unfavorable

The respective rule in Job Definition:

"pos_theta ~= 0 and abs(pos_delta / pos_theta) > 0.6"
note

The ScriptEngine in MesoSim (which utilizes Lua programming language), employs the non-equality operator, denoted by ~=. Initially, we leverage this operator to verify that the pos_theta variable is non-zero, which is necessary to circumvent any division by zero issues during the computation of the delta-to-theta ratio.

Backtest Results​

NetZero Mosley MesoSim Screenshot

Backtest Run’s URL: https://portal.deltaray.io/backtests/3c9e63c6-d946-4d65-b736-b7d0dba4dd4f

It is apparent that the performance of the strategy is greatly improved:

  • Sharpe increased from 0.74 to 1.16
  • CAGR reaches 19.85%
  • Max Drawdown is reduced from 50% to 33%

Our variant​

This time, instead of conducting a comprehensive study on IV Rank, Underlying State, or Theta, as we did for the Boxcar trade, we will make two changes to the strategy to improve its performance.

Days in trade vs. Date till Expiry​

The original rules for this trade specify the time-based exit using the "Date until Expiry" method, whereas we prefer to set the time barrier based on Days In Trade. We believe that Days In Trade is more predictable in terms of expected performance than the Date until Expiry, which can vary trade by trade. To make this change, we can set the MaxDaysInTrade variable to 30.

Truly Net Zero​

According to the original trade rules, legs should be chosen closest to Delta 60, 40, and 20. However, this approach may not always result in delta=0 at the initiation, which adds slight directionality to the trade. To address this issue, we will dynamically select the Lower Long leg such that the overall structure ends up at 0 delta. To accomplish this modification, we will set the target delta for the leg to pos_delta:

{
"Name": "lower_long",
"Qty": "1",
"ExpirationName": "exp1",
"StrikeSelector": {
"Delta": "pos_delta",
},
"OptionType": "Put"
}

For further information on how delta hedging is performed, please refer to the documentation.

Furthermore, we will incorporate an extra exit criterion that will terminate the trade if it becomes overly directional during its lifecycle. Our selected thresholds to exit the position are Delta -10 and 10:

"abs(pos_delta) > 10"

Backtest Results​

NetZero DeltaRay MesoSim Screenshot

Backtest Run's URL: https://portal.deltaray.io/backtests/0fed4a1f-3b66-4adb-aa36-0a49b59936f0

Setting the initial delta of the structure to 0 and maintaining it at around that level resulted in noticeable improvements in Sharpe ratio, CAGR, and Max Drawdown compared to both variants:

  • Sharpe: 1.32
  • CAGR: 20.1%
  • Max Drawdown: -29.94%
NetZero DeltaRay Monthly MesoSim Screenshot
NetZero DeltaRay Worst DD MesoSim Screenshot

Although the trade experienced difficulties in the post-volmageddon period, we consider it a promising subject for further research as it demonstrated remarkable performance in sideways markets.

Future work​

Hedging​

Although the recovery rate is quick, a Max Drawdown of -29.94% is still a significant loss of investment. As this drawdown happened during a black swan event (Covid crash), it is recommended to include a hedge while trading this strategy. Such a hedge can be as straightforward as buying long puts (teenies), implementing a Black Swan Hedge according to Ron Bertino's PMTT course, incorporating Brent Pedersen's findings on hedging power, or using David Sun's Bomb Shelter or Vibranium Shield.

Volmageddon - COVID period​

We attempted to pinpoint the root cause of the structure's difficult period by examining its Risk Profile and analyzing various metrics, including:

  • Position Theta, Gamma, and Vega throughout the trade
  • Relative (to the underlying) and Absolute Prices of the structure and the individual legs

Unfortunately none of these metrics yielded significant insights into the reasons for the trade's underperformance during the mentioned period. Since we acknowledge that there is no silver bullet solution to trading, we accept the structure in its current state.

If you have any suggestions for improving the trade, please feel free to leave a comment. We welcome and value your input.


Conclusion​

We have performed a simulation of a public SPX trade using MesoSim, which has shown exceptional performance in 2022. Therefore, we consider it a promising candidate for future research. We believe this trade would complement the Boxcar-NG trade well, resulting in a well-rounded portfolio.

MesoSim v2.4: Relative Expiry, Risk Graph and new templates

· 2 min read
MesoSim 2.4 Logo

We are happy to report that a new release of MesoSim is landed, which extends the functionality of Expirations, pre- and post-trade Analysis with Risk Graphs and Full TearSheet and provides a handful of new Templates to get you started more quickly. 

Expirations:​

We incorporated your feedback and implemented Root / OCC Symbol Selector and Relative Expirations. In practice, you can now filter (for example) for Weekly SPX Options and elegantly define calendar spreads by specifying the second expiration based on the expiration chosen for the first. 

Please see the Structure section of the Documentation for further details.

As a sample, we created the Enter-RootSelector and Calendar templates, which are available in the portal.

Risk Graph in JobEditor​

We added the initial version of Risk Graph to JobEditor, so you can now see what you are building (without importing it to ONE). The Risk Graph is calculated and shown based on the first entry your backtest would make. 

Risk Graph in JobEditor

Please note that this isn't the final version, additional features, such as T+x lines and greeks are coming shortly!

Full TearSheet​

We have extended analytic capabilities by including Ran Aroussi's excellent QuantStats package. You can access it by clicking the 'Full Tearsheet' tab on the backtest details page.

Full Tearsheet View

New Templates​

We did a bit of housekeeping in the existing templates and categorized them better based on their functionality.

Examples of basic Options structures are included:

While filters are listed under their respective sections:

Finally, we added a set of ready-to use strategies:

Spoiler alert

the old-school NetZero trade did pretty good in 2022.

We hope you enjoy this new release!

MesoSim v2.3: Crypto Options (BTCUSD, ETHUSD) Beta

· One min read
deribit-headline

We are releasing today the next version of our option backtesting service which adds beta support for Crypto Options traded in Deribit. 

The new instruments can be accessed via the BTCUSD, ETHUSD and SOLUSD symbols. Our historical goes back until 2019. 06. 01. for BTC and ETH, while Solana is available between 2022. 05. 09. - 2022. 12. 31. 

Please note that the offering isn't complete, we are still working on the following open items:

  • Commission to support Deribit's scheme
  • Data validation
  • UI and Template improvements

For further details, actual status of the project please reach out to the #crypto-options channel in our Slack.

MesoSim v2.2: Simple Run

· 2 min read
Simplified GUI Overview

We are excited to introduce our new, simplified Graphical User Interface to help our more cautious users get their feet wet.

Simplified Run Example

The Simple Run page utilizes a few key parameters and allows users to start backtesting simpler strategies. 

While a GUI like this is an implementation that feels more familiar to most people, it will always require huge compromises in terms of functionalities and flexibility due to its nature. For this reason, we developed the Simple Run with the features we believe provide the most user benefits:

  • Leg selection by DTE and Delta 
  • Delta hedging by a simple click

The full feature-set of the Simulator remains available via the Job Editor; its custom-made, simplified Domain Specific Language is how the complete set of functionalities is made available. This includes functions that are not possible or difficult to display on a graphical interface, so you don’t have to settle for less complex strategies.

We encourage you to start playing with the Simple Run. If you made it this far in this article, you have the necessary attention span to start experimenting with advanced features. 

The documentation of this new feature will be published soon; however, we were so excited about this new development we decided to release it immediately.

We are excited to see our users start playing with this shiny new toy, so we reset and increased the number of available runs for our users with free accounts.

You now have 25 free runs to try the Simple Run!

Head to the Portal and try it out!  

Boxcar-NG: An optimized Boxcar Trade

· 11 min read
Boxcar-NG Logo

Introduction​

In the previous post, we analyzed the Boxcar trade’s entry and identified a set of optimization opportunities. In this episode, we will investigate the opportunities outlined: We will use IV Rank, the underlying price’s relations to previous day and the position Greeks at initiation and throughout the trade.


Overfitting: The Danger of Optimization​

info

The critical challenge of trading system development is to avoid optimizing on random noise, which is called overfitting. By including too many optimizable parameters we will find a set of parameters that provides excellent in-sample performance but it will fail on unseen data as noise does not repeat by definition.

Our way of tackling overfitting is to set away Out of Sample data to validate our final model. We will be using the 2017 - 2018 timeframe only once, to validate our best model.


 Baseline for optimization​

A baseline for optimization should contain the structure and its basic trade rules (such as entry time, exit time and max days in trade). The baseline, however, should not contain any Profit Target and Stop Loss or any optimizable parameter so we can study the trade in its purest form.

The Optimization Baseline for Boxcar looks as follows: https://portal.deltaray.io/backtests/f3cf64be-62af-4005-b43e-f2618b62d97f

Boxcar Optimization Baseline Full

During the optimization process, we will be tracking the following metrics and comparing them to the baseline:

  • Trade Count
  • Alpha
  • Beta
  • Sharpe
  • CAGR %
  • Max Drawdown %
Boxcar Optimization Baseline Metrics

Optimization​

Approach​

info

Optimization starts by identifying the parameters that might profoundly affect the strategy performance. In the previous article, we identified that market states and greeks are good targets for optimization.

To reduce the chances of overfitting, we are not brute-forcing (i.e., not trying out all combinations) the parameter set. Instead, we are studying how the various parameters are affecting strategy performance by creating experiments where we try multiple values for the respective parameter.

Our parameters for the experiments of the Boxcar trade are:

  • IV Rank
  • Price relation to the previous day’s price (filter for up or down days)
  • Delta
  • Theta

Then we define a valid set of values for each parameter and execute the backtest by combining the baseline with each value of the given parameter. For example, for IV Rank, enter when:

  • IV Rank < 90
  • IV Rank < 80
  • IV Rank < 70
  • …
  • Initial Delta = 0
  • Initial Delta = 10
  • Initial Delta = 20
  • …

Once we obtain all the performance metrics for each run, we analyze which parameter helps to achieve better performance. If we find that specific parameters are helping our strategy to perform better, we blend them and validate that the combined parameter set works better together than any of the individual parameters alone.

IV Rank Filter​

info

IV Rank (Implied Volatility Rank, sometimes also referred to as IVR) is an options trading metric that identifies the implied volatility compared to the IV history of the last 365 days. It’s measured on a scale of 0 to 100, where options with a higher IV Rank are more expensive.

In MesoSim, we use IV Rank as an Entry Filter (via the Entry.Conditions field). IV Rank in our experiment is scaled from 10 to 90 with a step of 10.  For more specific information, please see our documentation's Job Definition Reference section. IV Rank in MesoSim is listed in the underlying variables section.

We have collected all the runs in the following table:

Boxcar Optimization IV Rank Table

Notice the following:

  • The trade count is decreasing as we filter out more and more trades based on the IV Rank
  • Alpha steadily increases until we reach IVRank=60
  • Beta continuously decreases throughout the scaling exercise
  • Sharpe increases until IVRank=50, then starts to decline.
  • An outlier Sharpe is present at IVRank=30
info

Alpha - Alpha is a measure for reporting how much an investment returned compared to an index or other benchmark. The higher the better.

Beta - Beta shows how volatile a security’s performance is compared to the market as a whole. The closer to 0 the better.

Sharpe - The Sharpe ratio compares the return of an investment to its risk. The higher the better, above 1.5 it is considered good.

It is tempting to pick a run where Sharpe is maximized (IVRank=30), but we must proceed with caution: The number of trades is significantly reduced (by 30%), and the run’s Alpha (0.29) is smaller than our baseline run.

We pick the run where IVRank=60, which maximizes our alpha and has a positive impact on Sharpe.

Comparing the IVRank=60 run with our baseline run, we confirm that the IV Rank filter mitigates both COVID Crash and the 2022 Sideways market.

Boxcar Optimization IV Rank 60

Up and Down Day Filter​

Sometimes people suggest that a particular strategy works better when opened on “up days” (where the opening price is higher than the previous day’s closing price) or on “down days” (where the opening price is less than the previous day’s closing price).

Our experience with Theta harvesting income strategies is that it is not really relevant. Nevertheless, it is easy to validate by creating an Entry Filter (via Entry.Conditions) field to enter only when we observe the following:

Down Day:

underlying_today_open < underlying_prevday_close

Very Down Day:

underlying_today_open < underlying_prevday_close and underlying_price < underlying_today_open

Up Day:

underlying_today_open > underlying_prevday_close

Very Up Day:

underlying_today_open > underlying_prevday_close and underlying_price > underlying_today_open

The collected results in the table below show that these filters didn't improve the strategy’s performance. We did notice that the “Down Days” and “Very Down Days” scenarios worsened the performance. Therefore we included a filter that only enters when those conditions are not true: NotDownDay, NotVeryDownDay.

Unfortunately, neither of these test scenarios provides any meaningful improvement on the strategy; therefore, we will not use these filters in the combined run.

Boxcar Optimization Up and Down Days Table

Delta at Initiation​

info

Delta plays a vital role in strategy development.Simply put, it describes the directionality of the trade.

A delta of 100 for a 1-lot trade follows exactly the underlying, while a delta of -100 moves in the opposite direction. With income trades, delta neutrality (delta=0) is often targeted; however, with the Boxcar trade, the author specifies delta=10 as the initial target for the 10-lot trade.

Given that too much directionality exposes the trade to the underlying movement, we suspect this isn’t ideal. To avoid too much directionality, we create an Exit Condition that closes the trade once Delta reaches 15, 20, 25, … 100 for the 10 lot position (MaxDelta-15, … MaxDelta-100). Running these experiments, we do not observe any reasonable improvement in the overall trade.

Modifying the trade such that the position that it becomes delta neutral at initiation (DeltaNeutral-Start: delta=0 at initiation) shows significant improvement both for Alpha and Beta statistical measures. We will use this modification in the combined run along with the previously selected IV Rank filter.

Boxcar Optimization Delta Table

Theta Filter​

We observed in the original trade that Theta could become negative, which is counterproductive for an income trade where we are getting paid (as Theta is positive) by Selling Options. We suspect that positive theta at initiation (ThetaFilter-Positive) has a positive effect on the trade. It might also be helpful to exit trades early when the position theta becomes too low (ThetaFilter-Decay-*) compared to the position theta at the initiation.

The Theta Positivity Check at initiation is done via Entry.AbortCondition which is evaluated immediately after the legs for the position is selected but before the trade is entered. Using this construct, we can abort trade entries if the conditions aren’t ideal (such as position theta being negative).

For the Theta Decay Filter, we are recording the Position Theta at initiation to the initial_theta variable and setting an Exit.Condition statement which validates that the current position theta is still greater than 50%, 33%, or 25% of the initial_theta value.

Boxcar Optimization Theta Table

After execution, we conclude that Positive Theta at initiation helps somewhat the Risk-Adjusted Return (Sharpe), but it degrades both Alpha and Beta. Similarly, the Theta Decay filters are proven ineffective - likely since we are exiting trades early and not entering before the following Thursday or Friday.

Due to the lack of improved performance, we will not consider Theta-based filters in our combined runs.

Combined Run​

We went through a series of optimization attempts and identified IVRank=60 and DeltaNeutralStart cases which had a positive impact on the strategy performance. We expect that if we combine the two, we will see further improvements as the two optimizations target different weaknesses of the strategy.

The combined run of the two parameters can be found here: https://portal.deltaray.io/backtests/8cf8b3ea-5f02-4c2d-8e85-440ccdd07b4c

Boxcar Optimization Combined Without Stop Loss

The run confirms that the performance is indeed better than the original setup, the IVRank=60 filter, and the Delta Neutral setup.

Both the strategy’s Alpha and Beta improved, while the Sharpe ratio (our risk-adjusted return metric) substantially improved. However, we note that the Max Drawdown is still too much: 25%. To recover from a 25% loss, we need to gain over 30%.

To address the Max Drawdown, we still have one final parameter to optimize: The Stop Loss of the strategy. MesoSim’s Intra-trade drawdown chart helps to set a reasonable price target for StopLoss: 

Boxcar Optimization Combined Intra-Trade PnL

The graph displays each trade's maximum (unrealized) profit, maximum (unrealized) loss, and realized loss. From the graph, we notice that around $2k loss would be considered normal or acceptable for the majority of 2020 and 2021. A fixed dollar amount (such as $2000) works for some time, but it will be skewed as the underlying changes over time. Therefore, we are instead defining the StopLoss based on the Underlying Price:

For 2019, ^SPX was trading at around $2500 - $3000. If we take 70% of the underlying, we will end up at around the $2k mark, which looks like a reasonable target for Stop Loss. Alternatively, we could consider the overall structure’s price as a basis for our calculation.

Adding underlying_price * 0.7 as Exit.StopLoss results in the following run: https://portal.deltaray.io/backtests/21ae1a3d-c146-40d2-bed4-fb8d1c13c026

Boxcar-NG With Stop Loss

Looking at the metrics, we can confirm that the trade’s metric is now in the respectable range both in terms of Alpha, CAGR, Max Drawdown, and Sharpe.

Boxcar Optimization Combined Table

Validation​

info

As a final step, we need to validate our optimization using Out of Sample (OOS) data. To quote Timothy Masters: “Out Of Sample data is precious. Use it once. Or very few times”.

We will use the 2017-2018 time frame for our validation as it covers a grind-up and sideways market. We expect the OOS run to degrade somewhat regarding algo performance (Alpha, Beta, Sharpe). Our acceptance criteria will be that the overall performance Sharpe-wise (risk-adjusted return) outperforms the ^SPX buy-and-hold strategy.

The resulting run looks as follows: https://portal.deltaray.io/backtests/a7bb0205-dbf4-453b-9882-23b1de6f836e

Boxcar Optimization Out Of Sample

Summary​

success

We have taken the Boxcar trade modeled in MesoSim and optimized it using market state and greeks. We identified that the IV Rank filter and Delta Neutral setup positively impact strategy performance. We combined the two optimizations and validated them using OOS data.

The resulting run seems promising regarding risk-adjusted return: Sharpe being 1.32 on Out of Sample data.

As the trade setup rules are now deviating from the original one, we name this trade Boxcar-NG.

The trades performance for the 2017 - 2022 period looks as follows:

Boxcar-NG Full Performance

The associated run is available here: https://portal.deltaray.io/backtests/1c8fffc3-f463-4736-9ec7-e4c88658aa94

The collected measurements, including the individual runs, are available via this sheet.

Thank you for reading through this long article, we hope you enjoyed the journey!