While we continually add and release features to the MesoSim backtesting service, it's beneficial to mark milestones. We firmly believe that MesoSim v2.10 represents an important advancement for the options trading community, offering unparalleled flexibility in the low-code backtesting universe.
By adding VarDefines to Entry, Exit, and all Adjustment types you are now empowered to capture or change state throughout the execution steps. Additionally, we have introduced a new Adjustment Type (called UpdateVarsAdjustment) built to alter variable states.
Lastly, we have converted all the numeric fields to Statements, enabling you to utilize Lua for calculating simulation parameters during execution.
info
We are showcasing the enhanced flexibility with the SPX-TrailingStop built-in template. The trailing stop results, in itself, are particularly noteworthy:
Data Voyager (and Vega) is a data exploration tool that has been integrated into our Portal.Click on the Analytics tab to study how Greeks and other variables are impact your Strategy's Performance. You can also visualize the variables you created during backtest.
The concept here is to identify a contract at a specific moment and wait
until favorable conditions arise. Once your conditions are met you can use AddLegsAdjustment to create a real Leg at the pre-defined contract.
The simulation performance has been significantly enhanced in this release!
The intraday strategies now run 1.5 to 2 times faster than before.The daily strategies' performance has also improved, with a margin of 15-30%.
These performance improvements now enable us to introduce concurrency in intraday runs. You can now simulate Multiple Entry Iron Condors [MEIC] (and others), where positions are taken multiple times per day.
The maximum concurrent positions in flight have also been increased from 10 to 12, allowing intraday strategies to enter positions every 30 minutes.
While the Simulator has become more flexible, we have also made progress in the areas of Live Trading and Forward Testing. Internal testing of a Position Monitor has commenced, and active work is underway for Order Creation (IBKR).
Once we are satisfied with the quality of the live offering, we will open up for a private beta. If you would like to participate, please send us an email at: [email protected]
John Locke (@Locke4Success) is a reputable source when it comes to Options Trading Strategies. You can find many of his trading strategies on YouTube, for free.
His strategies and their variants are often simulated with MesoSim.We are now adding his Super Bull strategy as a featured trade to our strategy library.
The rules were constructed as discussed in his youtube videos.
The strikes are selected in a manner where the long legs are positioned 20 points above the current price of the underlying asset and the shorts are chosen to achieve a Risk/Reward ratio that is close to 1.0
The strike closest to 20 points above the underlying price can be determined by setting the Complex StrikeSelector’s Target to underlying_price + 20 and specifying the constraint to ensure that the chosen leg’s strike will be always above the underlying price. This constraint is necessary because the Selector selects the nearest contract to our target, which - in some cases - may be below the underlying price.
The Statement field of the selector is evaluated for each contract and represents the strike. According to the SuperBull rules, our target will be 20 points above the current underlying price.
While John suggests aiming for a 1:1 Risk/Reward ratio, he shows multiple examples where the trade is initiated with a ratio lower than that. He explains that this is due to the unusual volatility skew observed on those particular days. In such trades, the risk/reward ratio was around 1.5 at the initiation.
John suggests that the trade should be sized so that it risks a maximum of 10% of the account size. This rule was implemented in our run using Entry.AbortConditions: We abort the entry if the Entry Debit would be greater than 10% of our NAV.
In our initial attempts, we used one contract for each leg. This turned out to be inadequate: Most of the time we under-sized the position (Maximum Risk was around 1% of NAV). To alleviate this problem we introduced Entry.QtyMultiplier to MesoSim, which is capable of scaling all the legs, once they are identified. We leverage this feature to target a maximum loss of 10% (in terms of account size) for our trades.
The exit rules for the strategy can be summarized as follows:
When the next monthly expiration becomes 65 days away, we enter a second trade. From that point onwards, we monitor the progress of the first trade. If the first generates a positive return, we exit the trade. However, if the first trade is at a loss we wait until it becomes profitable or reaches expiration.
OptionNet Explorer is frequently utilized by options traders for modeling and manually simulating trades. It is essential to comprehend the accuracy and limitations of its simulation and real trading accuracy before engaging in trading activities. This section provides concise insights into these limitations, allowing the reader to better understand the comparison between MesoSim and OptionNet simulated results.
OptionNet Explorer can be utilized for initiating and monitoring live trades. However, there is one potential accuracy issue to be aware of. When entering complex (multi-legged) trades using the compounded Option Price, the individual leg prices in OptionNet often differ from the actual fills. Therefore, it is necessary to manually adjust the prices of the individual legs after entering the trade. This adjustment can be performed using the Trade Log window.
In contrast, MesoSim’s performance reporting tracks daily NAV values and computes quantitative performance metrics for both the strategy and the benchmark, such as Sharpe, Sortino, Omega, and more.
This information provides a more precise representation of the strategy’s performance, allowing the user to better understand its expected performance.
info
Please note that we do not mean to suggest that MesoSim is better than OptionNet. Instead, we state that OptionNet's functionality can be extended by MesoSim's automated backtesting and performance reporting capabilities.
In other words: MesoSim is a companion service to OptionNet Explorer.
Our win rate of 85.2% (81/95) confirms that we are close to what John achieves (86%) with this trade.
Both the Log Return and yearly breakdown charts show that the trade performs well during Bull Markets, such as 2013-2014, 2019, and 2021. However, it exhibits higher volatility during sideways markets.
If we compare SuperBull with the S&P-500 Buy and Hold strategy we can conclude that it performs better in the validation period:
Higher CAGR: 16.7% vs 10.11%
Slightly lower max drawdown: -34.06% vs -34.83%
Improved Sharpe ratio 0.89 vs 0.67
It has low margin requirements
Surprisingly, this strategy didn't exhibit a large drawdown during COVID as the Maximum Loss based Entry Filter prevented it from entering during market turmoil.
Rafael Munhoz, a key contributor to our community has thoroughly analyzed this trade and developed his own variant. Based on his experience, it proved challenging to find optimal trades that offered a 1:1 risk/reward ratio. He made adjustments to the trade to address these challenges and generously shared his results with us.
His results are improving the original trade by having higher CAGR, reduced Drawdown, (and therefore) improved Sharpe:
CAGR: 19.4% vs 16.7%
Max Drawdown: 30.55% vs 34.06%
Sharpe: 1.06 vs 0.89
Similar to the original trade, the Relaxed SuperBull also excels in bull markets andit has outstanding performance in the 2013-2014 period.
Due to its more dynamic exit criteria and re-entry rules, it responds fairly well to crashes, such as COVID.
However, unlike the other trade, this variant demands more attention from the trader as the entries and exits are more frequent and dynamic compared to the original strategy.
Both Rafael and ourselves believe that John's trade is worth studying. None of us is affiliated with John in any way.
We would like to thank John Locke and Rafael Munhoz for sharing the SuperBull and the SuperBull-Relaxed trades with the options trading community!
MesoSim v3 Migration Note
This article was originally written for MesoSim v2. The examples and terminology have been updated to match the MesoSim v3 Strategy Definition format. For details, see the MesoSim v3.0 release announcement and the v2→v3 migration guide. The performance metrics, described behavior, and referenced run results reflect the original v2 behavior. If you rerun the referenced strategies on MesoSim v3, results may differ slightly due to behavioral changes in the simulator.
We released MesoSim v2.9 today, which further extends the simulator's flexibility with a new strike selector. Additionally, we are expanding our built-in strategy library to showcase the new feature.
To enhance the simulation capabilities we have added the Complex StrikeSelector. This feature allows users to find a leg based on complex criteria, such as the delta-to-theta ratio. The Complex StrikeSelect is particularly useful for building spreads and optimizing multi-legged structures. Similar to other Strike Selectors, it can be used during Entry, MoveLeg and AddLeg Adjustments.Please check out the documentation or take a look at the two built-in templates that utilize this feature:
Initially, we used closing and opening prices to account for settlements (PM and AM, respectively). While this approach provides a close approximation for PM settlements, AM-settled options may exhibit larger differences (more details here).
As part of the VIX stabilization effort, we have begun utilizing the official settlement prices for all the instruments we support.
Behavioral change warning
If you re-run previous backtests in which trades reached settlements you will now observe a different, more accurate simulation now.
We have addressed a remaining bug and included the missing structures in the Reg-T margin calculation. This makes Reg-T complete and fully supported under the Advanced plan.
To better support intraday strategies we are adding two variables for tracking the time of the day: minutes_before_open and minutes_after_close These variables be used in intraday entry, exit or adjustment conditions.
To ensure an accurate simulation of VIX Options' Settlement we have switched to using the official settlement prices. This is crucial
because all VIX options are AM settled and approximation using open didn't was not sufficiently accurate.
We are currently awaiting the resolution of the data issues we reported to CBOE. Once that is resolved we will promote VIX to Stable. Please stay tuned for further updates.
We have previously covered David Sun’s (@thetradebusters) Theta Engine in one of our blog posts. The power of Theta Engine comes
from David’s unique method for determining the size of short put positions. For more details on his approach, please refer to our blog post and his website.
Claudio Valerio, a valued member of our community has created and shared a variant of the Theta Engine strategy. His modification includes a dynamically added long put hedge during periods of elevated Implied Volatility (IVRank > 50). He selects the contract closest to Delta=4 with the same expiration as the short put. The number of purchased contracts is three times the number of shorts sold. Additionally, Claudio has adjusted how the parallel positions are spread out and increased the planned capital of the trade.
When the ATM Implied Volatility for SPX Options is below the mid point of its 52 week high-low range (IVRank < 50), we go with naked shorts as the original trade did.
When IVRank reaches (or goes beyond) 50, then 3x as many longs are added as shorts, creating a 3:1 Put Ratio Backspread. With the added hedge he is substantially reducing the downside risk and capping the upside profit potential.
While ThetaEngine originally does not contain a hedging component, David has shared his hedging strategies (Vibranium Shield and Bomb Shelter) in great detail. Hedging is a must when it comes to selling options, therefore we suggest that you study David’s original hedges or Claudio’s variant with the built-in hedge. It shall be noted that while reactive hedging (as presented here) is a cost-efficient way, it will likely not provide good coverage for scenarios where the market is closed and crashing, such as during the 9/11 events.
To study the characteristics of the trade we'll be using OptionNet Explorer. The following two screenshots are showing the Risk Graph when the position is naked short and when the hedge is added.
info
About sizing:
MesoSim’s built-in ThetaEngine template is more aggressive (details in the ThetaEngine post) than David’s original trade plan. Claudio has taken our built-in template with 25% credit target and created his variant allocating $50k for the trade.
We would like to thank Claudio for sharing the Volatility Hedged Theta Engine and David for creating the original trade plan!
MesoSim v3 Migration Note
This article was originally written for MesoSim v2. The examples and terminology have been updated to match the MesoSim v3 Strategy Definition format. For details, see the MesoSim v3.0 release announcement and the v2→v3 migration guide. The performance metrics, described behavior, and referenced run results reflect the original v2 behavior. If you rerun the referenced strategies on MesoSim v3, results may differ slightly due to behavioral changes in the simulator.
We are pleased to announce that MesoSim-2.8 has been released on May 27, 2023, effectively expanding our offerings to include new Market Data and Reg-T Margin Calculation capabilities.
In response to your feedback received through the Data Survey, we are expanding our offering to include VIX Options. This new data set allows us to cover better the broad-based indices utilized by both retail and institutional traders.
Please note that VIX is currently in the beta phase, as certain tasks such as Settlement to VIX Futures and IV calculation are yet to be finalized. For the latest information, please visit our Service Status page.
If you are interested in VIX trading strategies, we recommend exploring Russell Rhoads' presentations and books as valuable resources.
In response to a common user request, we have incorporated Reg-T Margin calculation into the simulator, based on the CBOE's Margin Manual.
Calculating Reg-T margin is a complex task that requires the system to effectively analyze and deconstruct a set of contracts into known structures to accurately determine the associated margin. Although the calculation rules are clearly defined, the combinations of structures can vary significantly. Furthermore, brokers have the discretion to include additional margin requirements based on their own house margin rules, which are frequently implemented.
While Options Backtesting Software, such as OptionNet Explorer, perform its own Reg-T Margin calculations, we have observed occasional deviations from the standard. In order to ensure accuracy, we have validated our implementation with all the tests described in the margin manual. Moreover, validations were also conducted with real brokerages, such as TD Ameritrade and TastyTrade.
Overall, we have added over 3500 lines of new code to our code base, making it the most extensive change implemented for the service thus far.
In order to support Options Education, we are initiating a program that offers complimentary access to MesoSim for classes focusing on Derivatives and Options at Universities.
If you are a lecturer interested in incorporating our service into your curriculum, please contact us at [email protected]
Once we address the remaining tasks related to VIX and Reg-T, we will proceed with implementing measures to support Forward Testing. Certain features, such as enhanced visualization, will first be provided via the backtesting offering.
As previously indicated, we are planning to introduce a Pro plan for MesoSim. The Basic Plan will allow users to backtest SPX and Crypto Options, while the Pro Plan will include additional features such as RUT & VIX Data Sets and Reg-T Margin Calculation. The Pro Plan will be available as soon as we transition VIX and Reg-T from beta to stable (sometime in the summer of 2023).
Customers with an ongoing subscription will enjoy all the benefits offered by the Pro plan at their original subscription price.