OmniTrader Forum
-
ATM
Using ATM to Improve ATM |
^ Top | ||
mholstius![]() Posts: 175 Joined: 1/13/2017 ![]() | I’ve been working on a project for the last 5 months that will allow us to use ATM to “walk forward” each month with settings determined by the preceding history alone. That project is progressing nicely, and I hope to have more to share about it in the next few weeks. I’ve just returned from a family vacation and watched the recordings of the first 2 weeks of Jeff Drake’s “ATM Master Course”… and the course is incredible. As I’ve said so many times before… if you don’t have ATM, you really should buy it. If you DO have ATM, Jeff’s course is unquestionably the best way to get the most from your investment. I thought I was somewhat familiar with ATM, but just the first 2 weeks of Jeff’s course have given me countless new ideas to improve my trading with ATM. ATM is a revolutionary piece of software. With the addition of this outstanding course, and the combined efforts of the talented traders in this group, I’m definitely eager to see what we’ll accomplish over the next few months… OK, on to the purpose of this thread - how to use ATM to improve our results with ATM. Trust me, it’s not as convoluted as it sounds. Jeff B started a thread on the “No Trade Market State” introduced in Jeff’s ATM course. I asked him to follow some specific rules for setting up his ATM system so that he could generate the maximum number of trades. He then posted his export of the 38,135 trades generated and I imported then into the attached spreadsheet ("Analyzing Macro And Micro ATM Trades"). Thanks, Jeff... His thread is here: https://www.omnitrader.com/currentclients/otforum/thread-view.asp?threadid=15822&posts=16 These are the steps I shared with Jeff in his thread to obtain all the raw trades the system could generate; 1) Check “Use These Strategies” in each state and then go down and check all the Strategies in the list in every market state. That way, the strategy used will show up along with the market state at the time of the trade in the export of the trades. 2) Set the allocation in each market state to 2% / trade and 100 Longs and 100 Shorts. 3) Set the account starting balance to $1M. That way a 2% allocation will allow a trade in a symbol that trades at $20,000 / share and it won’t be missing out on high priced stocks. 4) Set the Leverage at 6X and check “Use leverage to Increase The Number Of Trades”. With this, you stand less of a chance of missing trades due to hitting the equity ceiling. I do all this because when analyzing a system, I want to look at all the trades the system can potentially generate. I don’t care about ridiculously high ending equities, or big DDs. I want a large number of diverse trades to analyze before applying the excellent ranking and filtering capabilities of ATM. The nice part is that ATM itself can be used to generate the trades and label them with both the Strategies and the Market State at the time of the trade - something we’ve never been able to do before. I’ve plugged Jeff B’s trade data (38,135 trades) into the attached spreadsheet. I’ll use it to show how the analysis can help us find potentially good pairings of Strategies with Market States. Overview: There are 3 tabs in the spreadsheet; The core of the data processing is in the “Analysis” tab. The Exported raw trade data is plugged into the “Trades” tab. The Market States for each day are in the “States” tab (Macro & Micro daily states are included) #1) I’ve repeated the group of Jeff’s 21 Strategies 9 times in rows 2 thru 192 and paired each group of 21 Strategies with each of the 9 Macro & Micro Market States. #2) I’ve found that “Normalizing” the returns according to how many days were available to trade in a particular state is a useful way to compare the efficiency of the strategies (comparing Apples to Apples). #3) You can select any range of dates to be evaluated. #4) You can substitute your own groups of Strategies and Market States if you want to modify the spreadsheet to use it yourself - you just need to ensure that the formulas in the yellow shaded columns match the number of rows necessary for your own analysis. The data can be sorted in numerous ways to help isolate possibly good pairings of Strategies and States. This is a sort by Strategy; This is a similar sort by State; Can this method be used as a “double optimization” to find perfect combinations and ridiculous equity curves that probably won’t trade well at the HRE? Sure - but if done with some prudence, it can be a useful tool to improve results. The key is to input as many trades as possible using as many symbols as possible to get representative results. In particular, if you just input the trades already selected using ATM’s filtering and ranking, then you will definitely be curve fitting. However, if you input a large, representative sample of a variety of diverse trades over time then this can definitely help find robust combinations that ATM will then refine. I’ll close with 2 more plugs… I heartily recommend Jeff’s ATM course being offered by Nirvana - the first 2 weeks have been extremely informative and helpful. And as always, please consider the kids at Saint Jude Children’s Hospital; https://www.stjude.org/ Thanks - and good luck in your trading, Mark I attached "Analyzing Macro And Micro ATM Trades Ver 09" and it now appears to work correctly without any errors on opening after downloading. Not sure what was going on, but please let me know if you have any problems with it. ![]() ![]() ![]() ![]() | |
^ Top | ||
jpb![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() | Mark, This is awesome! (and by the way, the spreadsheet worked fine for me) I'm going to compare it to what I've been doing with Pivot Tables but I already see that you are doing some things here that I couldn't possibly do (or don't know how to) with pivot tables. I continue to learn more with each post of yours that I read. I do have one question. You stated: In particular, if you just input the trades already selected using ATM’s filtering and ranking, then you will definitely be curve fitting. However, if you input a large, representative sample of a variety of diverse trades over time then this can definitely help find robust combinations that ATM will then refine. I take it that you mean, because we took as many trades as possible (using the $1 million, 2% allocation, and 100 long and short), the strategies had to stand on their own (no ATM optimization -- only the definition of the market state really came into play). And because of this and the size of the population over a long period of time, we can find stronger strategies to use with each market state. Then if we activate only those strategies for the given market state, we will effectively be improving our results while minimizing any curve fitting that may be leading us into a false sense of optimistic performance. Did I get that right? Thanks, Jeff B. | |
^ Top | ||
jpb![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() | I'm going to amend my statement a little. I love the breakdown between Long and Short. Looking at my Pivot Table (not posted) results compared to your analysis, I would have discarded ATM-NSP-41-MOC-In-224 from Bear and Bear due to an overall loss. However, looking at the data you've produced, I'd actually consider transforming it into a Long only strategy for this market state while in the Bear and Default MS, I would include it as a Long and Short. Is this over thinking or over optimizing in your opinion? Also, the symbol population just happened to be the original set included with ATM Macro & Micro (making it easy to compare). But with this process, I should be able to change up the symbol population and repeat the process to see that the strategies hold up in general within a given market state -- true? Thanks, Jeff B. | |
^ Top | ||
SteveL![]() Posts: 262 Joined: 8/19/2005 Location: Boulder, CO ![]() | Hi, Mark. I'm very interested in what you've done with this spreadsheet, but I can't get it open. Excel 2016 just fails to repair and offers the same "Open and Repair" suggestion over and over. I see Jeff B. was successful, so perhaps I need to install "LibreOffice" which he indicated (in another thread) that he uses. What are you using to produced the spreadsheet? Thanks. | |
^ Top | ||
jpb![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() | One word of caution with LibreOffice -- its file extension is .ods and .odt -- You will likely recognize these as overlapping with OT's strategies and trade plans. All will work fine, except that if you accidentally click on an OT file, it will try to launch LibreOffice. It won't work of course and LibreOffice gracefully informs you of that. It won't break OT either or corrupt the file. So, you are safe, but it is just a consequence of file extensions. I've saved Mark's original file back as excel and uploaded it. Maybe this one will work for Excel 2016. [removed file since Mark uploaded ver 9] | |
^ Top | ||
SteveL![]() Posts: 262 Joined: 8/19/2005 Location: Boulder, CO ![]() | Hi, Jeff B. Thanks, but it also failed to open in Excel 2016. So, I've installed LibreOffice and both Mark's file and your file open successfully. Steve | |
^ Top | ||
jpb![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() | I really like the analysis spreadsheet data the more I look at it. I noted earlier that there is a Long vs Short. I didn't see in the spreadsheet how it determined that so I'm suspecting Mark is using a Macro to run through the data and dynamically build the Analysis sheet. I also see on the Trades tab that Mark overcame the text based fields for G/L($) and Entry Date that come out of Portfolio Simulator by using the =VALUE() function -- very nice. I've been conducting a change all with RegEx (inside of LibreOffice) to convert those to proper numbers/dates but I'm going to remember this trick. One observation while I was comparing Mark's analysis against my pivot table, specifically in the Default and Bear market state. Two strategies "ATM T3-S3 MOC In 224" and "ATM X ULT MOC In 224" both show a positive G/L(%), arrived at by summing all the G/L(%) for that strategy in that market state. However, if you sum the G/L($), you would see significant losses. T3-S3: G/L(%) 86.08% G/L($) -325,059.02 X-ULT: G/L(%) 16.52% G/L($) -69,198.08 I dug into the trades found on the Trades tab for T3-S3 and see that on 8/20/2015, 8/21/2015, and 1/5/2016, this strategy had a few bad days. Because we are using % Equity as the allocation, the quantity acquired caused significant losses in a short period of time. Usually I'll look just at the % since it normalizes value, but since the loss was significant (without looking at the data), I had originally thrown out those strategies even though they demonstrated good returns (%). But looking at the data, it tells me I forgot why we look at %. If I pulled out the trades from those 3 days, the picture changes dramatically: T3-S3: G/L(%) 352.16% G/L($) 621,076.68 I like that Mark removed the statistics that can cause distraction (at least distract me). Thanks, Jeff B. | |
^ Top | ||
mholstius![]() Posts: 175 Joined: 1/13/2017 ![]() | Good morning... I was distracted by some other issues yesterday. First, I'll try to attach a newly saved version of the spreadsheet to this reply and see if it downloads better. Mark OK, I attached "Analyzing Macro And Micro ATM Trades Ver 09" to this reply and the original post and it now appears to work correctly without any errors on opening after downloading. Not sure what was going on, but please let me know if you have any problems with it. ![]() | |
^ Top | ||
mholstius![]() Posts: 175 Joined: 1/13/2017 ![]() | Good morning Jeff, I'll try to respond to your questions (in blue) before the day gets busy. Didn't mean to ignore you yesterday - just had other things to deal with. I take it that you mean, because we took as many trades as possible (using the $1 million, 2% allocation, and 100 long and short), the strategies had to stand on their own (no ATM optimization -- only the definition of the market state really came into play). And because of this and the size of the population over a long period of time, we can find stronger strategies to use with each market state. Then if we activate only those strategies for the given market state, we will effectively be improving our results while minimizing any curve fitting that may be leading us into a false sense of optimistic performance. Did I get that right? Exactly. If we use the trades already screened by ATM and then screen them even more with this, then we're just curve fitting. But, one of the beauties of ATM is that we can use it to export huge numbers of raw trades to see how the strategies work in different market states - and have the trades labeled with the market state at the time of the trade. That's extremely helpful, if done right. Also, the symbol population just happened to be the original set included with ATM Macro & Micro (making it easy to compare). But with this process, I should be able to change up the symbol population and repeat the process to see that the strategies hold up in general within a given market state -- true? Sure! You can repeat your OT and Port Sim run again with a different list that contains all new symbols, append those new additional exported trades to the Trades tab data, and then make sure the yellow shaded cells on that tab are extended to account for the new trades. When analyzed again, it will have even more data to work with to make the analysis more reliable. Nothing would need to be changed on the "Analysis" tab. It will just add the new trades to the analysis. (You might want to re-sort the "Trades" tab by entry date to speed up some calculations, but it's not strictly necessary) With ATM, we can finally begin to identify what type of market and symbol "personality" a strategy works well with. That's huge. Mark | |
^ Top | ||
mholstius![]() Posts: 175 Joined: 1/13/2017 ![]() | More... I really like the analysis spreadsheet data the more I look at it. I noted earlier that there is a Long vs Short. I didn't see in the spreadsheet how it determined that so I'm suspecting Mark is using a Macro to run through the data and dynamically build the Analysis sheet. Actually, we can identify the long vs short by the # of shares purchased. A short trade has a negative number of shares in the exported "Qty" field of the data. No macros in the spreadsheet. Usually I'll look just at the % since it normalizes value, but since the loss was significant (without looking at the data), I had originally thrown out those strategies even though they demonstrated good returns (%). But looking at the data, it tells me I forgot why we look at %. Yup, $ amounts vary with the size of the acount, but %'s are static. Also, I'm not sure why these had so few trades in your data...??? NSP-41: 1 trade T3-S3: 2 Trades X-MFI: 2 trades I hope others will be able to use the spreadsheet to improve things too. I used your data as a good example (thanks), but it can work for anybody. And a reminder - when you do the sorts to glean more information, be sure to sort columns A thru J. But, that's probably obvious. You can also sort the small tables for the State (L1:T11) and Strategy (L13:P34), but you have to specifically select each range before doing the sort. Also probably obvious, but wanted to point it out. Good luck - off to another busy day, Mark | |
^ Top | ||
jpb![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() | Thanks... I don't know why I didn't look at the quantity for Long v Short. It was staring me in the face. Just no formula in Long/Short column that I saw. As for why NSP-41, T3-S3 and X-MFI didn't have many trades, I'll have to look deeper. I saw that too and added it to my list to explore. In fact, I expected far more trades from some of the derivative strategies too. I might need to step through these strategy by strategy. I suspect that if two strategies fire for the same symbol that only the first one alphabetically is being taken. That might explain why the *-224 had trades while the *-324 did not. It may also explain why NSP-41, T3-S3, and X-MFI had so few. I'll report back once I've had a chance to get through that analysis. | |
^ Top | ||
SteveL![]() Posts: 262 Joined: 8/19/2005 Location: Boulder, CO ![]() | Hi, Mark. The Ver 09 spreadsheet opens without errors. Thanks. And thanks for the spreadsheet. It will be useful. | |
^ Top | ||
mholstius![]() Posts: 175 Joined: 1/13/2017 ![]() | Thanks for the kind words, Steve... Don't go too far, I've discovered some important info and am improving the spreadsheet today. Will be back with more later today - along with better ways to use it. Mark | |
^ Top | ||
mholstius![]() Posts: 175 Joined: 1/13/2017 ![]() | Hi Jeff, After extensive testing over the past 5 days and discussions with Barry, I can explain why they don’t show many trades - and why this discovery(?) is so important for this kind of analysis. I had forgotten (if I ever knew it?) that OT only allows 1 trade in a symbol / day. With ATM, and especially using concurrent states, this is a critical point. Unfortunately, I have things to do today and won’t be able to illustrate what to do about this until later - but I’d suggest waiting before doing more analysis until I post the info and an updated spreadsheet. Mark | |
^ Top | ||
Jim Dean![]() Posts: 3022 Joined: 9/21/2006 Location: L'ville, GA ![]() | Not just limited to OT. Brokers only allow one active trade per symbol at any given time. Since ATM is limited to daily bars (not intraday), “at a time” is limited by that resolution. Also, if mult Strategies fire on one symbol, only one will control it. | |
^ Top | ||
EYEGUY![]() Posts: 1543 Joined: 12/12/2003 Location: BALDWINSVILLE, NEW YORK ![]() | Jim: I can understand your second statement as this has to do with OmniTrader and the way it works. But certainly your first statement can't be correct (or at least in the way I interpret it). On Interactive Brokers if I, say, have a position in SPY I can add to that position at any time - on the day of the original trade or any day thereafter. If this were not the case one couldn't spiral up his trades as so many strategies (like Connors' 1-2-3-4) work. And when I exit the trade my profit on each "leg" of the trade will be determined by the price at which I entered the trade. So, what am I missing here? Tom Helget | |
^ Top | ||
Jim Dean![]() Posts: 3022 Joined: 9/21/2006 Location: L'ville, GA ![]() | We are saying the same thing. It’s just one position. You can change its size during its lifetime but it’s controlled (in any N platform) via a single Trade Plan. If you want a separately controlled (via TP) position, it needs to be via a separate brokerage account. Example: can’t trade daily bars and intraday bars at same time from same account for a single symbol. | |
^ Top | ||
mholstius![]() Posts: 175 Joined: 1/13/2017 ![]() | Hi Jim… Sorry, but I need to add some clarity to this, as it doesn’t apply in Omnivest. In my Elite FTM portfolio, we regularly have multiple trades open in 1 symbol at IB that are controlled by multiple trade plans, with entries and / or exits on different days. Here’s a quick snag I made of 5 different positions in the live account. In each case, the 5 concurrent trades in each of the 5 symbols were controlled by 5 different strategies / trade plans; No criticism intended, just want to clarify that it happens regularly in OV coupled with IB. I'm adapting to OT rules... Mark ![]() | |
^ Top | ||
Jim Dean![]() Posts: 3022 Joined: 9/21/2006 Location: L'ville, GA ![]() | Thanks for the correction. So I’ll amend my statement to refer to trades in OT. (And also VT trades) Mark do you know if the OV ATM separate-server-instance tool also permits overlaps? I don’t know what “FTM” is, that that you referenced. I don’t understand how OT can be a development platform for ATM if it’s core capabilities differ that much from OV ATM. Seems like performance might differ markedly. | |
^ Top | ||
mholstius![]() Posts: 175 Joined: 1/13/2017 ![]() | In the ATM Macro & Micro ported over to OV, it works the same as OT: one symbol / day controlled by one trade plan. Maybe someday it will actually come under OV "rules", but at the moment it's just a convenient way to trade ATM on IB via Nirvana's servers. FTM = Follow The Money portfolio. Thanks for your input, Mark | |
^ Top | ||
Jim Dean![]() Posts: 3022 Joined: 9/21/2006 Location: L'ville, GA ![]() | Ok, so my statement, relative to ATM even on OmniVest at present time, and in response to Tom’s Comments re ATM, is correct after all? | |
^ Top | ||
mholstius![]() Posts: 175 Joined: 1/13/2017 ![]() | Yup - for ATM, it's true for now. Mark Did you ever consider practicing law...??? ;-) | |
^ Top | ||
jpb![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() | I used a simple approach and ran each strategy, one by one, through all market states, combined the results and inserted them on the Trades tab. I then went back through and added all the strategies along with a Long/Short row as it pertained to the data. I was already about 75% through rerunning all the strategies so I just kept going. The spreadsheet worked great. Because of all the strategies I was testing, I had to unmerge the instructional box on the Analysis tab and then remerged it when I was done expanding the Strategy Performance section. The reason for the lack of trades for many of the 28 strategies was that trades for a symbol had been taken already for that day as suspected and confirmed. Running the strategies one by one through the market states eliminated that problem. Since I have many different variations of the same base strategy that I was running through, it was necessary to isolate each from another. Now all the results are side by side and I can see which strategies actually perform well in any given MS. And I can compare the strategy to its base to see if it actually improved performance or not. I have 2 variables to each strategy compared to the base: 1) Market on Close 2) Inactivity So, I can't contribute the impact of each change to overall improvement (or degradation) without removing the Inactivity stop and running a new set with only MOC as the variable. I'll have to look through my virtual machines to see where I have those versions -- I'm certain I still have them around. There is one problem. The number of trades is now over 275,000. The spreadsheet is almost 24 MB in size -- zipping it is only shrinking it to 22.8 MB so I can't upload it. I'll try a few more methods of compressing it and see if I can get it under the 7 MB limit for attachment. Update: Sorry, even 7zip could only compress it to 21 MB. Update 2: For those who want it, I placed it on my google drive | |
^ Top | ||
mholstius![]() Posts: 175 Joined: 1/13/2017 ![]() | That's outstanding, Jeff... Exactly what I was going to suggest and explain. Can you just put the exported trades by themselves into a spreadsheet and attach it (or send a dropbox link to it)? I've finished the updated version of the spreadsheet and could put the trades into it. Mark If not, please send me a private message and we'll work something out. | |
^ Top | ||
jpb![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() | The data alone is 19+ MB in xlsx format. In a CSV format, it is 28.6 MB. I was able to use 7-zip to compress the csv format to 3.5 MB. The prior post has a link to my google drive if you'd like the full spreadsheet. 7-zip files can be opened with most archive tools -- Peazip is one that I use on Windows. I tried straight zip but it was close to the 7MB limit. I'll put the zip file version on my google drive also for those that don't want to deal with 7zip. ![]() | |
^ Top | ||
jpb![]() Posts: 168 Joined: 5/11/2005 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! ![]() ![]() ![]() ![]() ![]() | |
^ Top | ||
mholstius![]() Posts: 175 Joined: 1/13/2017 ![]() | Glad to hear it's helping, Jeff... You're definitely going to like the updated version. Hope to have it available later today. Mark | |
^ Top | ||
mholstius![]() Posts: 175 Joined: 1/13/2017 ![]() | 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; https://www.dropbox.com/s/eez2ohp4rn9i1ln/Analyzing%20Macro%20And%20Micro%20ATM%20Trades%20Ver%2040.xlsm?dl=0 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. Mark ![]() ![]() ![]() ![]() ![]() ![]() | |
^ Top | ||
LSJ![]() Posts: 515 Joined: 8/17/2006 Location: Citrus Springs, FL ![]() | Thanks Mark and Jeff for all your work. This goes a long ways in solving the puzzle of infinite possibilities. | |
^ Top | ||
SteveL![]() Posts: 262 Joined: 8/19/2005 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. ![]() ![]() ![]() ![]() ![]() ![]() ![]() | |
^ Top | ||
SteveL![]() Posts: 262 Joined: 8/19/2005 Location: Boulder, CO ![]() | John, 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 Trades per Day PPT HR 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. | |
^ Top | ||
mholstius![]() Posts: 175 Joined: 1/13/2017 ![]() | 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. Thanks, Mark | |
^ Top | ||
mholstius![]() Posts: 175 Joined: 1/13/2017 ![]() | 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... Mark | |
^ Top | ||
mholstius![]() Posts: 175 Joined: 1/13/2017 ![]() | 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. Mark ![]() | |
^ Top | ||
Jim Dean![]() Posts: 3022 Joined: 9/21/2006 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: https://www.omnitrader.com/currentclients/otforum/thread-view.asp?threadid=15829 (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) | |
^ Top | ||
mholstius![]() Posts: 175 Joined: 1/13/2017 ![]() | Thanks Jim, 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. Mark | |
^ Top | ||
Jim Easter![]() Posts: 6 Joined: 4/30/2006 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... -Jim | |
^ Top | ||
jpb![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() | Jim, 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, Jeff | |
^ Top | ||
mholstius![]() Posts: 175 Joined: 1/13/2017 ![]() | 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, Mark ![]() |