Current location | Thread information | |
![]() ![]() ![]() ![]() ![]() ![]() |
Last Activity 4/21/2021 9:48 AM 15 replies, 1456 viewings |
|
|
Printer friendly version |
^ Top | |||
jpb![]() Veteran ![]() ![]() ![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() |
In the 8/9/2018 ATM Master Course session, Jeff Drake had included a seemingly innocuous market state he called No Trade. The idea being that maybe there is a state in the market that is so unpredictable that you may want to move to the sidelines and wait it out. Jeff created it using a formula of ATR(20) > ATR(60)[20]*1.5 He placed this market state at the top of the list so it is the first to be evaluated. This of course means that we aren't running with concurrent market state enabled. But if the market state is triggered, you want to stop all trading. I was intrigued by this market state so decided to run a quick test during the seminar. My results showed an improvement of 34% against a test ATM method. I then wondered what it would do against the ATM Macro & Micro method. To test this, I used the stock ATM Macro & Micro method. I created the new No Trade market state and used Jeff's original formula. I also activated "Close all Trades when entering this market state". I placed this new market state at the bottom of the list so my first test run would never hit it. My second run, moved the market state to the top of the list so it was always evaluated. My third run used an altered formula for the market state that I arrived at running various optimizations against the basic formula. For this I used: ATR(22)>ATR(75)[20]*0.8 The results are attached. These are likely to be different from what you run since I start my account at $10,000 instead of $100,000. I also include my brokerage commissions. But the relevant point here is not my specific ending balances, but rather the degree of improvement the inclusion of a No Trade market state. The conclusion I reached was that stepping aside during certain market states and closing all positions can have a dramatic impact to your overall results. I see some interesting statistics: - ROI improved - Max DD decreased - Calmar improved - Trade quantity actually increased (substantially with the optimized formula) - While max # consecutive wins improved, max # consecutive losses got worse - Average Invested decreased - Profit Standard Deviation tightened. I haven't yet looked at exactly when the No Trade market state was declared, how long it lasted, or examined the trades. But I thought this was an interesting set of results to share. Feedback welcome, Jeff B | ||
^ Top | |||
SteveL![]() Veteran ![]() ![]() ![]() ![]() Posts: 262 Joined: 8/19/2005 Location: Boulder, CO ![]() |
Hey, Jeff. Sounds interesting. I'll definitely check this out. I tried downloading your Excel file, but for me, it fails with "We found a problem with some content in 'No Trade State Analysis.xlsx'. Do you want us to try to recover as much as we can? If you trust the source of the workbook, click Yes." But even after clicking "Yes", it still fails. Can you check it? Thanks. | ||
^ Top | |||
jpb![]() Veteran ![]() ![]() ![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() |
Steve, I used an older version of LibreOffice to create that version. Maybe that version had a bug writing to the Microsoft format. I re-saved it using a newer version of LibreOffice so hopefully that fixes it. If that doesn't work for you, I also attached a PDF version. It isn't as friendly as the spreadsheet version because of the way it page breaks. Or, if you choose, you can download and install LibreOffice from libreoffice.org. Thanks, Jeff ![]() ![]() | ||
^ Top | |||
SteveL![]() Veteran ![]() ![]() ![]() ![]() Posts: 262 Joined: 8/19/2005 Location: Boulder, CO ![]() |
Jeff, The newer version works with Excel 2016. Thanks. Steve | ||
^ Top | |||
jpb![]() Veteran ![]() ![]() ![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() |
Great! I'll update my older version of LibreOffice so this doesn't happen again. | ||
^ Top | |||
SteveL![]() Veteran ![]() ![]() ![]() ![]() Posts: 262 Joined: 8/19/2005 Location: Boulder, CO ![]() |
Jeff, Wow! That's a pretty big improvement. What's your date range for the analysis? Steve | ||
^ Top | |||
EYEGUY![]() Icon ![]() ![]() ![]() Posts: 1543 Joined: 12/12/2003 Location: BALDWINSVILLE, NEW YORK ![]() |
Jeff: I had the same problem with the .xlsx file download originally but the new version works just fine. And, as far as the results go, I certainly know there were a good number of times I should have kept my nose out of the markets. So, your analysis comes as no surprise to me. Tom Helget | ||
^ Top | |||
jpb![]() Veteran ![]() ![]() ![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() |
Date range was back test 1/1/1999 - 12/31/1999. Forward test 12/31/1999 to 8/9/2018. The results were Forward Test only. Beginning account balance 10,000 with 2x Leverage. Commissions: $0.005 per share with $1.00 per trade minimum. (GXTrader commissions). | ||
^ Top | |||
SteveL![]() Veteran ![]() ![]() ![]() ![]() Posts: 262 Joined: 8/19/2005 Location: Boulder, CO ![]() |
Jeff, I plotted your optimized market state "ATR(22)>ATR(75)[20]*0.8" on SPY as a quick indicator. It is mostly out of the market. So unsurprisingly, I did not see good results in the PortSim using this as a "NoTrades" market state. Are you using SPY? Here's a snapshot of the quick indicator on SPY: Also, I'm very suspicious of your 3x increase in trades. Using Jeff Drake's formula in my analysis had a mild negative effect on simulation results. But, I'm running a simulation with MoC for entries and exits which could account for different results than you saw. [Edited by SteveL on 8/10/2018 3:50 PM] ![]() | ||
^ Top | |||
jpb![]() Veteran ![]() ![]() ![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() |
Interesting! I am using the SPY. I ran it with 2 different types of strategies -- published only the ones used with the ATM Macro & Micro with no changes to the strategies or method other than adding the No Trade Market State and shifting its order from bottom of the list to the top of the list. The other ATM method and strategies are a derivation of the ATM Macro & Micro but introduced MOC for the orders and an inactivity stop. Both methods showed great improvement on the equity curve and the stats over a long period of time. But I agree, they do look almost too good to be true. Some of the stats, like Largest Loss % being 555.60% looks a bit off. I haven't yet analyzed the trades to see what's going on. Sometimes I wonder, when you get to such large numbers, is there something that might be overflowing or rounding? I like your use of the quick indicator to plot it. I was actually going to use Mark's method to determine what market state was active on each day of the year to look at it from a different angle. With the higher number of trades, it wouldn't be likely that being in NoTrade for prolonged periods of time would result in more trades -- I'd expect less. Something is odd though. I appreciate you looking at this and giving me a double check. If it can't be recreated on someone else's system, then I've got to see where my is broken. Thanks, Jeff | ||
^ Top | |||
jpb![]() Veteran ![]() ![]() ![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() |
Something is odd. With Jeff's original version (I'm calling it v1), there were a total of 214 days out of 4920 days that were in No Trade state -- 4.35%. With v2 (what I had called optimized), 78% of the time it was in a No Trade state. Yet, a significant number of trades had been placed (over 20,000). Something doesn't mesh. Attached is a spreadsheet of the market state by day with the 2 different formulas. I'll have to dig into it further -- maybe bounce some things off Barry. Thanks everyone for looking at this. Steve, I appreciate your sanity check. ![]() | ||
^ Top | |||
jpb![]() Veteran ![]() ![]() ![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() |
I found my mistake and learned something. On the Strategies tab of the Market State, I had not changed the setting from the default "Use Portfolio Simulation Settings for Strategies" to "Use These Strategies". As such, every time ATM hit the No Trades Market State, it took the trades from "All Strategies" which was the default setting in the Portfolio Simulator. So, essentially it was taking as many of the trades as it could. You can see from the screenshot that I have quite a few strategies enabled in my ToDo List. Even if you don't intend to use those in the method, they will all be used if you don't switch it to Use These Strategies and then only activate the ones you want -- in this case, I didn't want any to be active. When I re-ran my tests, inclusion of the No Trades actually produced worse results as Steve had reported. My results were skewed due to including trades from significantly more strategies than I expected. Version 2 of the formula I had optimized for the market states was actually activating the the No Trade MS 78% of the time, causing ATM to look at all the strategies and take trades -- precisely opposite of what I intended. This also explains why Version 1 of the formula had just under 8,000 trades while version 2 had 20,000 trades. Thank you everyone who attempted to verify and reproduce the results. Sorry for this rabbit hole. [Edited by jpb on 8/10/2018 9:24 PM] ![]() | ||
^ Top | |||
mholstius![]() Veteran ![]() ![]() ![]() ![]() Posts: 175 Joined: 1/13/2017 ![]() |
Hi Jeff… Since it appears that you use MOC for a lot of your strategies (all those in your snag?), maybe yours is a good test of using MOC - and maybe you should just check “Use Portfolio Simulation Setting For Strategies” in all the market states and see what happens when you use all the strategies all the time. In essence, you won’t be using any market states, but maybe something else will pop out. A lot of things look good in your “mistake” run… but also notice that you allowed 100 longs and 100 shorts in your “No Trades” market state. ser•en•dip•i•ty noun 1. the occurrence and development of events by chance in a happy or beneficial way. "a fortunate stroke of serendipity" Or - “I’ll take luck over skill any time…” Mark Now that I think about it… If you do decide to get all the trades for analysis, then I’d also suggest 4 things; 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 your allocation in each market state to 2% / trade and 100 Longs and 100 Shorts. 3) Set the account starting balance at $1M. That way a 2% trade will still allow a trade in a symbol that trades at $20,000 / share and you won’t be missing out on high priced stocks. 4) Set the Leverage at 6X and “Use leverage to Increase The Number Of Trades”. You stand less of a chance of missing trades due to hitting the equity ceiling. If we’re looking to analyze a system, we want to look at all the trades the system can potentially generate, and don’t care about ridiculous ending equities, big DDs, and huge numbers of trades. If you export the trades that way and post the excel file, I’ll do some additional analysis of the trades and post the results… | ||
^ Top | |||
jpb![]() Veteran ![]() ![]() ![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() |
Thanks Mark, I was thinking last night that I should dig into these a little more. My thought was if 78% of the time All Strategies work, I was very curious how it was allocating trades, which trades it chose, how it handled multiple strategies signaling trades for the same symbol... I ran the test you asked for and ran a second run with one tweak -- in Port Sim, setting the Increase Trade Size. Why? Because when I ran the first simulation according to your instructions, the final equity was $20 million. I then wondered, what would it look like if I flipped that one parameter. The final equity was then $3 trillion. I know, for analysis, it isn't relevant, but I like seeing substantial growth :) -- I always like to inject a little play into this too. Both sets of trades are attached for those who are interested. Now, a word on the strategies. Spring boarding off some of the ideas in this forum, I added MOC to each of the base strategies of the Macro & Micro method. I also added an Inactivity stop to each strategy (that's the "In" in the name). The final 3 or 4 digits that follow tell me the parameters for the Inactivity stop. The first digit represent Periods (first 2 digits when it is a 4 digit number, followed by Minimum Gain, followed by ATR Periods. So, ATM-XLS-19 V2-MOC-In-1224 would mean that I use this strategy with ATM, it is based on XLS-19 V2, it is configured with MOC entries and exits, it has the Inactivity stop configured as 12 periods, 2% minimum gain, looking at 4 ATR. The ATM method I was using all these strategies with was the 9 market states of Macro & Micro, however, I assigned different versions of each strategy to different market states, replacing any original strategy. I happened to use that Profile for testing out the stock ATM Macro & Micro method when I made my mistake to use all strategies. I expect to see that if XLS-19 V2 had trades that we will see trades also occur for all the derivations. I haven't looked at the data yet to see if they are being managed independently or as one large block. And then if by one large block, what trade plan is assigned. The trade plan is the only real difference due to the inactivity stop. I was going to go through all the strategies to see which were not relevant given the duplicity when All Strategies were traded to see which one proved to be better over the 18 years. That will take a little while to get through, but I think it will be buried in the attached data too. Last note. The No Trades Market State does not have any ranking or filtering that you would have had with Macro & Micro. But for the purposes of getting all the trades, the ranking wouldn't come into play since we are taking all trades and we wouldn't want the filtering. The ranking and filtering is still in place with any of the other market states. Thanks for your interest and encouragement, Jeff ![]() ![]() | ||
^ Top | |||
mholstius![]() Veteran ![]() ![]() ![]() ![]() Posts: 175 Joined: 1/13/2017 ![]() |
Hi Jeff, Thanks for the explanation for your strategy names - great idea. The 38,495 trades will yield some good info... but if you'll do one more thing we could learn even more. If you have time, could you remove the "no trades" state and then run it again with all the strategies checked in each state? That should give the same number of trades, but it'll add the market state it was in when the trade was taken. Mark | ||
^ Top | |||
jpb![]() Veteran ![]() ![]() ![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() |
Great point. I should have thought of that. Attached are both flavors - No Trades MS removed. ![]() ![]() |
|
|
Legend | Action | Notification | |||
Administrator
Forum Moderator |
Registered User
Unregistered User |
![]() |
Toggle e-mail notification |