|Current location||Thread information|
OmniTrader 2017 Upgrade Forums
Using ATM to Improve ATM
Last Activity 2/13/2020 2:13 AM
38 replies, 2409 viewings
|Printer friendly version|
Location: Brown Deer, WI
I finished my analysis this morning using Mark's spreadsheet to explore the power of it and see the things that you can learn from the results. The actual spreadsheet contains over 350,000 trades, using 44 strategies (7 base strategies and 37 derivatives), across 9 market states. The spreadsheet is too large to post with all the data so it is available in full on my google drive. But, I did attach the results page so you can explore the results if you wish.
A word on the strategy names in the spreadsheet:
1) Strategies beginning with ATM- mean I use it with an ATM method. I do this so I don't accidentally change it. It also groups them together in the strategy list.
2) MOC in the name indicates that the orders are Market on Close.
3) In in the name indicates that it has an inactivity stop.
4) The numbers following In are the values of the parameters for the Inactivity stop. For testing, I wanted to see if different values improved or hindered the effectiveness of the strategy.
With the above naming convention, I'm able to perform an additive analysis of the base strategy against the modifications. One note. You will not see a strategy consisting of the Base + Inactivity. This is because I only added the Inactivity stop on top of the MOC. Why? Because that's what I did -- just that simple.
The Power of the Analysis Spreadsheet
Maybe this is obvious. Let's compare strategies in different market states:
Bear and Bear Market State
Bear and Bull Market State
Here we have a Bear and Bear MS vs a Bear and Bull MS. Looking at the CRT-3 strategy and its derivatives, we can see that in the Bear and Bear MS, the derivatives outperformed the base strategy. However, in the Bear and Bull MS, two of the derivatives marginally outperformed the base.
We can also observe that in both MS, 2 of the derivative strategies produce the same result. Do we need both derivatives? Why did I create two? I actually did it because I was optimizing the MOC version using Strategy Wizard 4 and in the Bull Default MS, the performance is different.
But, if we observe the results, we can actually see that the base strategy (CRT-3) outperforms all derivatives. So, without this analysis spreadsheet, I would have likely ignored the base strategy as a candidate because I was looking to establish a MOC base set. Am I over analyzing? Am I over optimizing? Is over optimizing bad? Personally I get into a pattern of seeing something and trying to make it better. Once I find something better, then I assume it will always be better -- that's my flaw and the spreadsheet highlights it.
This raises a question... If the base CRT-3 strategy outperforms the MOC version, how would I trade it using AutoTrade and ATM -- using a mix of Market and MOC strategies? I don't know the answer to this question yet. The challenge is that AutoTrade runs at a specific time. But more importantly, when OT does its analysis and simulation to produce the trades, what price did it use? Was it the market open price on the day following the signal? I don't know. I do know that for MOC, OT uses the close price for the bar. Since I have a difference in time of execution and AutoTrade only processes once a day, how can I solve this? I suspect I could run 2 instances of OT, splitting my ATM method apart into 2 -- one containing the MOC strategies and one containing the Market strategies. In this manner, I could run the analysis at the appropriate time. Perhaps that will work. Anyone have an answer?
Okay, the above is a perfect reason for me to use this analysis technique -- tuning the strategy to the MS and checking that I didn't over analyze and over tune.
One last exciting feature of this spreadsheet... the date range. Did you see it?
Change the dates and all the stats are updated! If I do that, do the same strategies that I saw as strong over the long run hold up in the date ranges I may be concerned about? Or how about the last 3, 5, or 10 years? Which strategies continue to prove strong? That's powerful!
As you can tell, I'm a fan of the spreadsheet. Mark, thanks for sharing it with the community!
[Edited by jpb on 8/15/2018 9:32 AM]
Attached file : Results Only Macro And Micro ATM Trades Ver Brown09.xlsx (42KB - 38 downloads)
Attached file : BearBearCRT-3.png (28KB - 663 downloads)
Attached file : BearBullCRT-3.png (28KB - 670 downloads)
Attached file : BullDefaultCRT-3.png (29KB - 667 downloads)
Attached file : DateRange.png (6KB - 662 downloads)
Glad to hear it's helping, Jeff...
You're definitely going to like the updated version.
Hope to have it available later today.
We all want to find the best pairings of Market State and Strategies in ATM.
This spreadsheet was created to simplify the process, and make it valid by not just curve fitting to the best outcomes already calculated by ATM.
However, there’s a problem in obtaining all the trades possible for every State & Strategy pairing in order to make a fair, valid, and useful comparison of the relative performance of each pair.
Let’s say there happened to be an excellent trade in Apple. OT only allows one trade in a symbol / day. Even though the trade would be taken by all the other Market States or Strategies it would only be credited to the first in the list - and all the rest of the States or Strategies wouldn’t get credit for the potential of that trade in the exported trades.
To resolve the problem, we have to individually pair each Market State with each Strategy, run a basic ATM Analysis with few restrictions, and export each set of trades. Thanks to ATM, each trade will be labelled with the Market State and Strategy used for the trade. We then combine all of the trade exports and import that large data set into the trades tab in this spreadsheet. It’s admittedly a tedious process at the moment, but essential to obtain the unbiased comparison we need.
To demonstrate the difference, Jeff’s original export of his ATM Method containing the 9 Macro & Micro Market States and associated Strategies had an export of 38,136 trades.
When he took the time to individually pair each State with an individual Strategy, the combination of all his trade exports contained 288,371 trades - almost 8X the number of trades.
This extensive data set now allows a valid comparison of the raw data, pre-ATM performance of every State and Strategy pairing. It allows us to find the best pairings to feed into ATM while avoiding the curve fit solution of “picking the best” after ATM runs.
Thanks again for your work obtaining the data, Jeff…
The latest version of my Analysis spreadsheet is too big to post (~40MB), but can be downloaded from the following Dropbox link;
After clicking on the link, you should be presented with an option to download it by clicking on the “ … “ at the top right of the screen;
I added a number of improvements, using Jeff’s 288,371 trades for development.
It now has 3 major sections. Each can be sorted to find the best opportunity for any selected date range.
It analyzes every combination of State and Strategy and calculates the following statistics for your chosen date range;
% Sum = total return for that pairing of State and Strategy during the period
# Days In State = # of days the state (ex: Bear and Bear) was active during the period
% / Days In State = a normalization based on the % Sum / # Days the state was active during the period
# Days In Trade = market Days the State & Strategy pair had open trades during the period
% / Day In Trade = normalization based on efficiency (esp if comparing short and long term strategies)
# Trades = all trades for that State & Strategy pairing during the period
Trades / Day = # Trades / Total # days during the period (would be 4,855 days from 1/1/00 to present)
PPT = during the period for that pairing
HR = during the period for that pairing
Every Market State is analyzed in a similar manner for Long, Short, and Both performance;
Every Strategy is analyzed for Long and Short performance;
This is an overview of the Analysis tab;
Long trade data is automatically highlighted in green, short data in red, and every section is individually sortable to help identify the best opportunities.
I’ve added a “Setup Help” tab that uses a Macro to find and identify all the Market States and Strategies available (Long & Short) in the raw trades entered on the Trades tab. This eliminates the tedious process of identifying them using sorts, etc., for a large number of trades. The “Setup Help” tab also gives instructions on how to set up ATM to obtain the trades, and where to modify the spreadsheet for your data, making the entry of data much easier than in the original spreadsheet.
IMPORTANT: the spreadsheet was set up for Manual Calculations to make it easier to modify during development, since it takes a while for all the calculations to run.
You need to go to "Formulas / Calculate Now" to make it calculate - or if you want it to calculate automatically, you need to change to Automatic Calculations in your excel preferences.
Please pass on any suggestions for improvements you might have, or any bugs you might find.
ATM opens up so many possibilities for adapting to changes in the market.
I’m looking forward to the third week of Jeff’s course, “Matching Strategies To Markets”, this afternoon.
[Edited by mholstius on 8/16/2018 6:32 AM]
Attached file : 00 Dropbox Link.png (99KB - 624 downloads)
Attached file : 01 Basic analysis of pairs.png (189KB - 625 downloads)
Attached file : 02 State analysis.png (333KB - 623 downloads)
Attached file : 03 Strategy analysis.png (459KB - 629 downloads)
Attached file : 04 Analysis Tab.png (721KB - 621 downloads)
Attached file : 05 Setup Help Tab.png (294KB - 623 downloads)
Location: Citrus Springs, FL
Thanks Mark and Jeff for all your work. This goes a long ways in solving the puzzle of infinite possibilities.
Location: Boulder, CO
Thank you Mark and Jeff for this stimulating thread.
I'd like to share my approach to getting the data to use in Mark's spreadsheet. His spreadsheet uses the %G/L of each trade, and the sign (+/-) from the # of shares. So, I'm using the following process to generate and gather trades by Market State, where each trade is just 1 share.
I created a set of ATM methods - one for each market state, and selected all of them for processing:
In each ATM method, I configured the Allocation tab with "Fixed Trade Size" and 1 share per trade, allowing 100% long, 100% short, 100 long trades and 100 short trades (this should be increased if you have 1000's of concurrent trades). In this example, I am configuring the "#ATM M&M Bear and Bear" method. So, ONLY the "Bear and Bear" market state TradeSize is set to 1. For all the other market states in this method, the TradeSize is set to 0, so that trades are gathered only for the "Bear and Bear" state. Repeat this process for each of the market state methods.
In all the methods for all the market states, "Use Portfolio Simulation Settings for Strategies" is selected for all the market states. NOTE: The strategy to be processed is controlled by the PortSim "Trade Source" setting.
In the PortSim Settings "Trade Source" tab, select the Focus List and Strategy to be analyzed:
In the PortSim Settings "Account Settings" tab, make sure you have sufficient funds allocated available to purchase 1 share of all possible in-trade symbols. If you have thousands of potential concurrent trades (assuming you have a very large number of symbols in your focus list), then make sure you set this to a high value, e.g. $1M. And, configure "Increase Number of Trades" so that all potential trades are included in the analysis.
In the PortSim Settings "Trading Parameters", I configured Min Shares and Max Shares to 1, and "Per Trade Allocation." (Frankly, I'm not sure whether these settings matter in this scenario, but it doesn't hurt to set them.)
Since this process is designed to only trade 1 share, I do not want commissions to be a factor in the analysis. So, I set commissions to $0.
Run the simulation, and at completion you will have a set of "Strategy-by-MarketState" trades for inputting into Mark's spreadsheet.
[Edited by Steve Luerman on 8/18/2018 12:01 AM]
Attached file : 2018-08-17_17-14-06 ATM Market State Methods.png (7KB - 551 downloads)
Attached file : 2018-08-17_17-21-15 PortSim Settings Trade Source.png (13KB - 546 downloads)
Attached file : 2018-08-17_17-23-18 PortSim Settings Account Settings.png (12KB - 550 downloads)
Attached file : 2018-08-17_17-24-04 PortSim Settings Trading Parms.png (19KB - 546 downloads)
Attached file : 2018-08-17_17-25-05 PortSim Settings Commissions.png (18KB - 544 downloads)
Attached file : 2018-08-17_17-19-36 Method Strategies.png (41KB - 524 downloads)
Attached file : 2018-08-17_22-56-51 Method Allocation.png (102KB - 529 downloads)
Location: Boulder, CO
I'm not using FixedTradeSize for trading, but rather just for gathering info for processing with Mark's spreadsheet. I intend to use the spreadsheet to better understand how different strategies perform in different market states.
The spreadsheet normalizes trades, and calculates the following stats for each strategy:
#Days in State
%Days in State
#Days in Trade
%Days in Trade
Trades per Day
None of these stats should be affected by trade size (i.e. allocation method), SO LONG AS you aren't excluding any trades from the stats due to available funds.
Personally, I used %ofEquity for sizing actual trades.
Good morning, John (et all)
Yours is an excellent topic (trade size, etc.) that needs to be addressed in more detail, so I hate to see it get "lost" in this discussion of how to get trades for the spreadsheet.
Jim has some good suggestions, and I'm sure others do too.
Can you create another thread for it and move your post to that thread (and your's too, Jim?)
I'm sure it's of interest to a lot of people.
As I said above - this is an important topic that Jim has spent considerable time on (Risk, etc) and I think it deserves it's own thread...
Good morning Steve…
Thanks for your suggestion of an easier way to cycle thru the various strategies to get the trades data.
I’d forgotten about using the Simulation Settings to pick the strategy being used - and that can be a big time saver (I need to do a couple hundred runs for my project).
On the serendipity side, I started using your method this morning - and it helped me find a good way to illustrate and document a small discrepancy in the trades exported when using concurrent states that I’ll be sending to Barry.
Since Nirvana can’t address anything until Monday, please make the following adjustment to your method to be sure you’re getting accurate trade data;
Rather than just setting the Default Fixed Trade Size to zero, also set the Symbols tab so that the Market State you don’t want to trade has no symbols in it…
In my testing this morning, I found that this will avoid the discrepancy I’ll be documenting for Nirvana.
Thanks for your input - we’ll move the ball forward faster working together.
[Edited by mholstius on 8/18/2018 8:51 AM]
Attached file : symbols to zero.png (74KB - 468 downloads)
Location: L'ville, GA
I’ve collected the three posts related to Fixed$ allocation (and suggestions re Risk management and Cash accounts) and created a new thread here, at Mark’s request:
(I also deleted my post in this thread and encourage the other contributors to do the same, as a courtesy to Mark and to keep it orderly)
It's an important topic that deserves more in-depth discussion, and you've done a lot of excellent work over the years on the subject.
Location: Longmont, CO
I hope this is the best place to post this question -- if not, I'll post where it should go if someone can tell me where that is.
I am trying to document the definitions of each market state (ideally including Micro/Macro)--meaning the formula that determines each state.
I know I can look in the ATM settings-but I am so lost as to which ATM version contains the most current set of all market states, I want to ask which ATM strategy I should pull up so I can then look at each MS and see the underlying formula(s).
Or if this has been documented, is it available somewhere?
Long story short, I am getting lost in all the threads trying to find the latest/best ATM strategy to use for this...
thanks for any help you can offer my way...
Location: Brown Deer, WI
You are right, there is a lot of information about ATM. We have many individuals trying to improve it and Mark H. has contributed some great tools (like the one on this post) along with the original model for the Macro & Micro -- collaborating with many others over the last few years.
The formulas you are looking for are located in another post --> here
The content in this post is focused on the tool to help analyze different strategies. As you read from top down in this post, you'll see many derivatives of the strategies used in the original ATM Macro & Micro method. There is nothing wrong with the original strategies. The tool (spreadsheet) in this thread helps you analyze the strategies against the market states to see if there is a better mix. Also, you may have your own strategies (or derivatives of strategies) you want to test and maybe swap out from the original set in the ATM MM method. The tool here will help you analyze that.
The market state formulas that Mark H. created are pretty good. I've spent weeks looking for ways to improve them, make them react a little different, capture a different market personality, and kept reaching the conclusion that they are as good as or better than any I can come up with. If you watch the flow of bars vs market state on a SPY chart (with the Macro Micro template activated), you'll see a nice transition between market movements and a market state color coded display. The underlying indicators used also make sense (at least to me).
I like to look at it that the ATM Macro & Micro method is a great starting point. You can use it as is or with tools like the one on this thread, you can introduce other strategies. I know some of the forum members prefer to trade with trending strategies over longer time periods vs the RTM strategies used in the ATM MM method. That's great! Switch them out, use the tool on this thread to analyze the trade performance of all the strategies and assign them to the market states.
Others prefer to just use the macro market states and eliminate the micro. Again, great! Some want to add in a "No Trade" state to define when to stay out of the market. Fantastic! You'll find threads focused on different ways of using ATM.
My point being, you ultimately control what you want to trade with and you can experiment in ways never possible before in OT. Some experiments work, others don't. You'll find a lot of that in various threads. I've posted a number of ideas that have been a dead end for me. But hopefully someone else will look at that and say "Hey, here's where Jeff went wrong... Or, what if we looked at it a different way...".
Hope that helps a little,
Excellent points, Jeff…
There are so many ways to use ATM, and we’ll undoubtedly improve the results even more in the future.
For Jim (and anyone interested)..
I've attached a file to this reply with all the Macro & Micro market states.
It's also color coded a bit to help see the formulas as they're combined.
Good luck in your testing,
[Edited by mholstius on 10/10/2018 7:15 AM]
Attached file : Macro and Micro market state formulas.rtf (4KB - 51 downloads)
E-Mail this thread to a friend
||Toggle e-mail notification|