Skip to main content

19 posts tagged with "Releases"

MesoSim and MesoLive Releases

View All Tags

MesoLive development update #1

· 6 min read
MesoLive Banner

Introduction

It’s been a while since we started working on MesoLive - the Live version of MesoSim. It’s a good time to give an update on what has been achieved so far.

Before we dive into the specifics here are the requirements driving the development:

  • MesoLive must become an excellent position, strategy, and account monitor
  • It must support the deployment and management of trading strategies developed in MesoSim
  • It has to be accurate, secure, and affordable

Based on the above requirements MesoLive is not a replica or clone of any other software. It’s a new way of addressing the real pain points of options trading today. 


Position / Strategy / Account Monitoring

State of the art

The majority of time spent in trading is dedicated to monitoring open positions and waiting for Profit Target or Stop Loss to be hit. While brokerages offer the tools (TWS by IBKR, ThinkOrSwim, or TastyTrade’s app) which display live positions and certain risk metrics, they lack the following functionalities:

  • Organizing Legs into Positions
  • Assigning Positions to Strategies
  • Tracking Position and Strategy PnL and Greeks over time

The most frequently used analytical tool for Options Trade by retail users - OptionNet Explorer (ONE) - bridges some of the gaps, but it still falls short on the following points:

  • Moving legs around is cumbersome:
    One needs to specify trade details (such as entry price and commission) manually.

  • Low-resolution PnL chart on a strategy level:
    Just the realized PnL is shown, but intra-trade drawdowns and quantitative metrics are missing.

  • Limited information on Greeks:

    • Historical charts of greeks over time are absent.
    • Greeks are shown only at T+0 and not projected to the future.

Therefore, people (including us) often track their trades not just in ONE, but in a tracker Excel or Google Sheets. This approach works but takes a lot of time to administer.

MesoLive’s approach

With MesoLive we are addressing the above pain points by

  1. Automatically Tracking Positions, Executions, and Account information, eliminating the need for manual entry of fills
  2. Combining legs on the fly to make up a positions
  3. Assigned positions to Strategies
  4. Collecting Position, Strategy, and Account level PnLs and Greeks frequently (every minute)
MesoLive Accounts Overview
MesoLive Strategies Overview
MesoLive Position Monitor Grid
MesoLive Position Monitor

To fully address the “Limited information on Greeks” part we utilize 3D charts to display the changes in Greeks and PnL throughout the trades lifecycle. These graphs are useful to better understand the trade characteristics of position.

MesoLive 3D Risk Graph - Theta
MesoLive 3D Risk Graph - WVega
MesoLive 3D Risk Graph - Gamma
MesoLive 3D Risk Graph - Delta

For open positions we show the PnL for both At Bid/Ask and at the Mark/Mid price level.

info

The monitoring capability of MesoLive is still a Work in Progress, but we believe it is already providing value compared to the currently existing solutions. 


Execution

Some might think that once a trade plan is made the hardest part is over. While this is true, our experience shows that a lot of risk is present during execution. Sometimes it is hard to precisely follow the trade plan, due to:

  • Time constraints: you might not always be available to enter / exit or adjust
  • Mistakes: wrong contract selection can happen even with the best
  • Negligence: hopium is a hard drug

These points will be addressed by MesoLive by taking MesoSim’s Job Definition and turning a backtest into a live trading job. We still believe that a full hands-off mode is risky with options trading, therefore it is not our goal to develop a fully automated system here. We might revisit this decision later.

The workflow we propose for executions (Entry / Adjustment / Exit) is as follows:

  • Initiated from MesoLive
  • Legs are automatically selected, and order is prepared
  • Order is reviewed and submitted by the user

This part of MesoLive is not ready yet, but it is the next big work item in our roadmap.

We’ll take an iterative approach: Exits, Entries then finally Adjustments will be implemented.


Accuracy, Security, and Costs

While the three items in the heading seem distinctly related, they are actually defining our software architecture. Here is why:

  • Realtime data is expensive, especially for professionals and businesses.
    Delayed data is unfeasible for trading, unless you do “buy and hold with monthly rebalances” type of strategy.

    While it would be easy and pleasant to develop a solution using data feeds from Exchanges or Data Vendors, it would make the price of the offering unfeasible for retail.

  • Security is of very high priority when it comes to handling money.
    Storing access keys to brokerage accounts comes with risks we wish not to take.
    Additionally, the user must be in full control at all times managing their account.

Both of the points above are addressed with our model:

We’ve created an Agent application that is run by the user providing a bridge between their brokerage account, live data stream, and our system. The Agent is certified by trusted software vendors, such as Microsoft and Apple. The Agent uses secure communication channels with tamper-proof keys to bring in account and realtime data to our systems. It is resilient to network failures and uses minimal system resources. The user is in full control of running this application.


Availability and price

MesoLive has been undergoing private beta for some time now with IBKR accounts.

We’re onboarding customers have shown interest in small groups on a weekly basis.

info

Currently, IBKR TWS is the only supported platform; additional brokerages may be supported later.

We consider the Position Monitor part to be 80% ready and expect to start the execution-related tasks immediately. As MesoSim provides a rich set of tools, reaching feature parity between Sim and Live is likely to be some quarters ahead.Since the offering is fairly resource intensive it will not be free.

We are continuously improving its performance so that it can operate in a cost-effective manner. Therefore, it would be too early to put a price tag on the offering.

As MesoLive in its full form will take MesoSim Jobs to Live, it makes sense to consider it as a paid add-on to MesoSim. We might or might not release the monitoring part as a separate solution later. Execution without access to MesoSim plan is a definite no from our standpoint.

Introducing Q-API

· 2 min read

At Deltaray we are committed to providing retail traders and institutions tools that help them make informed trading decisions. As part of this initiative, we are releasing a Free API today, which provides access to some of the building blocks of MesoSim and MesoLive.


Q stands for Quantitative

In trading, the ultimate goal is to increase your capital while minimizing the risk to an acceptable level. Measuring risk is a complicated process. Even the simplest risk metric - Max Drawdown - requires you to keep track of the highs and lows in a rolling manner. When evaluating strategy performance, it is advised to study the Risk-Adjusted Return (e.g., Sharpe or Sortino), which takes both returns and drawdowns into account.

QuantStats

In MesoSim and MesoLive we are using Ran Aroussi's excellent QuantStats library to calculate quantitative metrics and create portfolio analytics tearsheets. 

Tear Sheet Example Page 1
Tear Sheet Example Page 3
Tear Sheet Example Page 2

With Q-API we are releasing the tearsheet generation and risk metrics calculation free for personal use. These functionalities are available using the following endpoints:

/quantstats/v1/tearsheet-from-json
/quantstats/v1/tearsheet-from-csv
/quantstats/v1/metrics-from-json
/quantstats/v1/metrics-from-csv

Both endpoints require the user to provide the Strategy Performance and a Benchmark Price (such as ^SPX) as time-series. 

Market Calendar

It's important to know when we can engage in a particular activity we're interested in. This holds true for trading as well; it's essential to be aware of the market's opening and closing times, including early closures.

Q-API enables the users to access this information using the /market-calendar/v1/trading-hours endpoint. Our trading calendar's historical data dates back to 1998. 

On the roadmap

We plan to expand Q-API's functionality, including (but not limited to):

  • Position sizing via Kelly Criterion (Formula)
  • Options Pricers
  • Additional market data

Note on MesoSim API

MesoSim API is currently available to FundPro Plan customers. Therefore, Q-API does not include access to MesoSim's API.


Start using it Today

Head to Q-API and begin using it today.You can leverage the Swagger-UI to explore and try the API.

MesoSim v2.10: Exceptionally Versatile

· 3 min read
mesosim-v210-logo

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.


Key changes

Full control over simulation dynamics

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:

It turns a losing trade into a profitable one.

Backtest Analytics with DataVoyager

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.

You can find a generic demonstration video of DataVoyager here.

Mark legs and enter later

We allow now specifying Legs with Qty=0.

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. 

Concurrency in intraday runs

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.

And there is more...

The number of changes between version 2.9 and 2.10 is substantial:

We have implemented over 50 changes, including enhancements, fixes, and performance improvements, to deliver the current release.

You can find the full list of changes on the Service Status page.


Steps Towards Live Trading

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]

MesoSim v2.9: Complex StrikeSelector with new Strategies

· 3 min read
mesosim-v29-banner

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.


List of improvements

Complex StrikeSelector

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:

  • RUT-ComplexStrikeSelector-DeltaToTheta

  • SuperBull

"Complex": {
"Statement": "pos_delta / pos_theta",
"Target": "0.5",
"Constraints": [
"leg_long_strike < leg_short_strike"
]
}

Official Settlement prices

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.

Reg-T margin calculation

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.

New variables

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.

VIX progress update

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. 


New ThetaEngine Variant

Claudio Valerio graciously shared his work on ThetaEngine with us.His variant, the Volatility Hedged Theta Engine is featured in this blog-post.


Upcoming sale

We're planning a sale starting on the 4th of July.

MesoSim v2.8: VIX and Reg-T Margin beta

· 3 min read
MesoSim 2.8 Announcement Banner

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.


List of improvements

VIX Options

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.

Reg-T Margin Calculation

MesoSim Reg-T Margin Screenshot

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.

You can find a Margin Enabled run in this link.


MesoSim meets Academia

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]


Roadmap

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.

The complete list of work items is collected here.


Upcoming Pro plan

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.