OmniTrader Forum OmniTrader Forum
forums calendars search
today this week
 
register logon control panel Forum Rules
You are currently browsing as a guest.
You should logon to access more features
A Self-Moderated Community - ALL MEMBERS, PLEASE READ!
Vote for Members who contribute the most to your trading, and help us moderate content within the Forums.


  Current location        Thread information  
OmniTrader Upgrade Forums
ATM
ATM Analysis Tools
Last Activity 4/21/2021 9:48 AM
8 replies, 3022 viewings

Jump to page : 1
Now viewing page 1 [25 messages per page]
 
back reply
Printer friendly version

^ Top
jpb

Veteran
1002525
Posts: 168

Joined: 5/11/2005
Location: Brown Deer, WI

User Profile
 
Subject : ATM Analysis Tools
Posted : 9/5/2019 11:33 AM
Post #46332

I'm creating a new thread because I keep looking for tools found in other threads -- sometimes less successfully than desired.

I've been using the Analyzing Macro And Micro ATM Trades Ver 40.xlsm that Mark Holstius created along with the Calculate Drawdowns.xlsx. These are fantastic tools and help you wrap your head around volumes of data.

In particular, the breakdown between Long and Short has lead me to split strategies into Long only and Short only and use them in specific market states.

What I found is that I wanted to do 2 things:
1) Explore new market states with different names and quantity of states
2) Explore new strategies

Both of those activities required a lot of manipulation of the spreadsheet. It also didn't help that I use LibreOffice instead of Excel which inhibited my use of the macro Mark added to help find market states and strategies.

Manual manipulation of the spreadsheet was okay when I had 9 Market States and a handful of strategies. But I've been exploring 64 Market States against 30+ strategies (or strategy variants). This type of exploration results in a significant shifting around of data and copying. Not to mention fixing errors if I messed up a formula.

So, I tweaked Mark's spreadsheet.
- Created a macro to rebuild everything. Simply add your trades and market states by date. Then click one button on the Setup Help sheet.
- Added the Calculate Drawdown sheet so I didn't have 2 spreadsheets to deal with.

So, here's the catch. Since I use LibreOffice, I wrote it with the macro language of LibreOffice which is not compatible with Excel's VBA macro language. To use this version of the spreadsheet, you need to install LibreOffice (https://libreoffice.org). It is free and open source. It runs on Windows, Mac OS, and Linux.

But realize, that when you install LibreOffice on Windows, it will think that .odt and .ods and .odp file extensions are LibreOffice files instead of OmniTrader files. This won't affect OT functionality, but if you happen to click on an OT strategy file, LibreOffice will try to open it up. It will fail and will not harm the strategy file.

Now, once you load your data and run the macro (see the Setup Help sheet), you can export the spreadsheet as an Excel file (File SaveAs) and use Excel if you really want to.

Enjoy!

If you are unable to download the file directly, here's a link to my google drive: here

Version 2: Added additional analysis columns to the Draw Down sheet.
Version 3: Improved the rebuild speed significantly.
Version 4: Added a Candidates sheet to help in the analysis and filtering of strategies.
Version 5: Improvement to build the States tab containing the Market States from the Trade data. This eliminates the need to run the separate process to identify the market state for each date. The new macro builds the market state data only for the days that have trades.
Version 5.1: Fixed the button on the Candidates tab so that when you click the Regenerate Candidates button it actually executes the macro.

Options Version:
Version 1: Created an initial analysis spreadsheet for analyzing Options strategies (or regular strategies with an Options Trade Plan). This is based on Version 4 of the equities analysis spreadsheet above.
Version 2: Enhanced the Candidates tab to add filters at the Put/Call level.


[Edited by jpb on 2/8/2021 9:33 AM]

Attached file : Analyzing Options Template Ver 02.zip (1629KB - 296 downloads)
Attached file : Analyzing ATM Market States and Strategies Ver 05.1.zip (1948KB - 276 downloads)

^ Top
LSJ

Legend
500
Posts: 515

Joined: 8/17/2006
Location: Citrus Springs, FL

User Profile
 
Subject : RE: ATM Analysis Tools
Posted : 9/5/2019 12:01 PM
Post #46333 - In reply to #46332

I'm unable to download your attachment - internal server error.
^ Top
jpb

Veteran
1002525
Posts: 168

Joined: 5/11/2005
Location: Brown Deer, WI

User Profile
 
Subject : RE: ATM Analysis Tools
Posted : 9/5/2019 12:22 PM
Post #46335 - In reply to #46333

I deleted and re-attached. I also added a direct link to my google drive. From the Google Drive, just click the download button.
^ Top
LSJ

Legend
500
Posts: 515

Joined: 8/17/2006
Location: Citrus Springs, FL

User Profile
 
Subject : RE: ATM Analysis Tools
Posted : 9/5/2019 7:19 PM
Post #46337 - In reply to #46335

Google drive works - thanks.
^ Top
jpb

Veteran
1002525
Posts: 168

Joined: 5/11/2005
Location: Brown Deer, WI

User Profile
 
Subject : RE: ATM Analysis Tools
Posted : 9/6/2019 12:02 PM
Post #46338 - In reply to #46337

Version 2 added above. Working with Nirvana on why trying to download the attachment causes a 500 Internal Server Error. Version 2 is zipped. Try the download attachment and if that doesn't work, the link to my Google Drive has been updated in the top post in this thread.
^ Top
jpb

Veteran
1002525
Posts: 168

Joined: 5/11/2005
Location: Brown Deer, WI

User Profile
 
Subject : RE: ATM Analysis Tools
Posted : 9/8/2019 11:15 AM
Post #46343 - In reply to #46338

Version 3 added above. Direct download may still cause 500 Internal Server Error. Google Drive link should give you the update.

Significant speed improvement. 30k trades now completes in about 2 minutes. 200k trades in about 10 minutes. Speed is a factor of number of market states, number of strategies, and number of trades.

I had 64 market states, with 200k trades and 30 strategies and the version 2 was still running after 2 hours. This prompted a redesign of several loops to use more efficient methods of populating formulas. Run time is now between 10 and 15 minutes.
^ Top
jpb

Veteran
1002525
Posts: 168

Joined: 5/11/2005
Location: Brown Deer, WI

User Profile
 
Subject : RE: ATM Analysis Tools
Posted : 12/12/2019 4:59 PM
Post #46519 - In reply to #46343

Version 4 of the Equity Analysis spreadsheet uploaded. This version added a candidates tab that enables filtering of strategies -- useful when you have thousands of points of data.

Also created Version 1 of an Options Analysis spreadsheet. During the 2019 Bash, Ed demonstrated a method to convert any strategy into an options strategy by replacing the Trade Plan with an Options Trade Plan. In his example, he used the Long Option plan. Intrigued by this, I used an ATM method and copied all the active strategies to new strategies and changed the TP. I found that using the same Equity Analysis spreadsheet was useful but didn't break down the trades by Calls vs Puts. Version 1 was created to give me that view.
^ Top
jpb

Veteran
1002525
Posts: 168

Joined: 5/11/2005
Location: Brown Deer, WI

User Profile
 
Subject : RE: ATM Analysis Tools
Posted : 4/21/2020 7:45 PM
Post #47033 - In reply to #46519

Version 5 eliminates the need to run a separate process to identify the market state for each date. The new approach uses the data from the Trades tab and builds the MS to Date pairing based on the trade data.

Now you can simply take the exported trade data from OT, copy it and paste it into the Trades tab, switch to the Setup Help tab and click the Generate button.

Please note that the amount of time it takes to generate the market states is a factor of how many trades you have - the more trades, the longer it takes. But it makes the identification of market states simpler.

One example. I have multiple ATM methods (as I'm sure you do). Each method uses different market states with different names. Under the old process, you needed to copy the method, adjust it, use a special strategy, adjust the number of data periods and capture 2 sets of data to build the list. While this approach was all inclusive of the dates (not skipping any), it was time consuming and needed to be reworked as your timeframe changed.

With the new approach, I run Port Sim against the data I intend to use and the method I want to analyze, export the data into excel format as before. The data identifies the market state each trade was entered under. Copy the data and paste it into the Trades tab, switch over to the Setup Help and click the Generate button. Everything is then built from there automatically.

In this manner, I can move more quickly between analysis of different methods that use different Market State names or different number of Market States. It doesn't matter. The code rebuilds the full analysis based on the trade data.

Please remember that if the zip download does not work from this forum, there is a link in the top post to my Google Drive where I store both the zip version and the expanded version.
^ Top
jpb

Veteran
1002525
Posts: 168

Joined: 5/11/2005
Location: Brown Deer, WI

User Profile
 
Subject : RE: ATM Analysis Tools
Posted : 2/8/2021 9:35 AM
Post #47872 - In reply to #47033

Stock Version 5.1 - Fixed the Regenerate Candidates button on the Candidates tab to actually execute the macro.

Options Version 2.0 - Enhanced the Candidates tab to be able to filter at the Put/Call level.
Jump to page : 1
Now viewing page 1 [25 messages per page]
back reply

Legend    Action      Notification  
Administrator
Forum Moderator
Registered User
Unregistered User
E-Mail this thread to a friend
Toggle e-mail notification


Nirvana Systems
For any problems or issues please contact our Webmaster at webmaster@nirvsys.com.