Current location | Thread information | |
![]() ![]() ![]() ![]() ![]() ![]() |
Last Activity 4/21/2021 9:48 AM 8 replies, 3022 viewings |
|
|
Printer friendly version |
^ Top | |||
jpb![]() Veteran ![]() ![]() ![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() |
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] ![]() ![]() | ||
^ Top | |||
LSJ![]() Legend ![]() Posts: 515 Joined: 8/17/2006 Location: Citrus Springs, FL ![]() |
I'm unable to download your attachment - internal server error. | ||
^ Top | |||
jpb![]() Veteran ![]() ![]() ![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() |
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 ![]() Posts: 515 Joined: 8/17/2006 Location: Citrus Springs, FL ![]() |
Google drive works - thanks. | ||
^ Top | |||
jpb![]() Veteran ![]() ![]() ![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() |
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 ![]() ![]() ![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() |
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 ![]() ![]() ![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() |
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 ![]() ![]() ![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() |
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 ![]() ![]() ![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() |
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. |
|
|
Legend | Action | Notification | |||
Administrator
Forum Moderator |
Registered User
Unregistered User |
![]() |
Toggle e-mail notification |