Current location | Thread information | |
![]() ![]() ![]() ![]() ![]() ![]() |
Last Activity 4/21/2021 9:48 AM 47 replies, 4579 viewings |
|
Printer friendly version |
^ Top | ||||
market_student![]() Member Posts: 14 Joined: 4/15/2007 ![]() |
Wondering if anyone has tried to build the "Resilient Portfolio" which uses Market States, in OT 2020 Any help would be very much appreciated. | |||
^ Top | ||||
EYEGUY![]() Icon ![]() ![]() ![]() Posts: 1543 Joined: 12/12/2003 Location: BALDWINSVILLE, NEW YORK ![]() |
market_student: I have taken a shot at it. I created an ATM Method for the Resilient Stocks. This uses no Market State but does employ a Ranker entitled Short Term Oversold which is just the RSI(9) sorted Ascending. The ATM Method also uses 10 Maximum Concurrent Positions and a Maximum Allocation of 10%. I created a strategy to fire a buy signal on the first trading day of the week - this means that each Resilient Symbol is up for trade and only will be taken if the Ranker deems it so. Unfortunately the Ranke here is worthless. Even with the 62 stocks that comprise Jeff Drake's Resilient Stock List all firing each and every First Day of the Week an Optimization of the Ranker Default value returns zero (0) meaning that the Ranker is ineffective in determining the trades and so the trades are take by Symbol Ascending as provided for in the Simulation Settings Trade Selection Tab by default. A real disappointment. If anyone else has a better way of doing this I am all ears. Tom Helget | |||
^ Top | ||||
market_student![]() Member Posts: 14 Joined: 4/15/2007 ![]() |
Eyeguy, Thank you for sharing that. Where can I start by getting the list of stock universe that is used in the Resilient Stocks "Sub Universe" to choose from.. And of course a naive question - How do you set to trade on Monday Morning (I take it that you rebalance the portfolio over the weekend, so you could have adds and deletes for Monday am?) Just don't know where to set that option of trading on Monday open. All my best | |||
^ Top | ||||
jpb![]() Veteran ![]() ![]() ![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() |
Tom, Wouldn't you need at least 3 market states? 1) Always: Select 9 symbols 2) Bull: Trade only DIA 3) Bear: Trade only DOG Run it weekly. Select Close all positions in either the Always or in both Bull/Bear. Probably having CMS set but no overlap between the definition of Bull/Bear would allow only Bull or Bear MS to fire and then Always (maybe C = C) so it always fires. I'm curious why the RSI(9) Ascending ranker is useless. Are all symbols reporting the exact same RSI value? If not, I would think that having the ranker in the Always order the list to give you the most oversold at the top of the list to trade? That is, assuming the positions were closed out. OmniFunds has a way to adjust positions in any symbol based on the calculations to rebalance -- I don't think that exists in ATM. That's why I'm suggesting exiting all positions and re-enter. Maybe there's a better way. I'm currently not trying to reproduce the Resilient Portfolio, but the concept Jeff introduced with a Resilient set of symbols is intriguing. I'm currently looking at OmniScan and seeing if there is a way that I can create a list that finds a few symbols that are trending better than the market on any given day (or demonstrating a few days of better performance) that I would feed to a set of strategies to determine trades. I'm thinking about the process... List that wants to move up -> Strategies that like predictability in symbols (AI?) -> Market States that help trim strategies, allocations, ranking -> ATM3 Automation -> Auto Trader. Jeff B | |||
^ Top | ||||
EYEGUY![]() Icon ![]() ![]() ![]() Posts: 1543 Joined: 12/12/2003 Location: BALDWINSVILLE, NEW YORK ![]() |
market_student: If you are a registered OmniFunds user you go to the Resilient OmniFunds Sector where you can copy and paste the symbols into a .txt file or OmniTrader. As for trading on the first trading day of the week here is the OmniLanguage Code: If BarDayOfWeek() < BarDayOfWeek()[1] Then Signal = LongSignal End If Hope that helps! Tom Helget [Edited by EYEGUY on 4/10/2020 8:43 PM] | |||
^ Top | ||||
EYEGUY![]() Icon ![]() ![]() ![]() Posts: 1543 Joined: 12/12/2003 Location: BALDWINSVILLE, NEW YORK ![]() |
Jeff B.: No, there are only two defined Market States in Resilient: Bull Stocks and Big Dog. Resilient Stocks are traded through thick and thin, Bull and Dog. And, yeah, I am curious why the Ranker doesn't work. But I would be less than honest if I said I ever created an ATM method where any Ranker "worked". Now you will see in some of the Nirvana ATM Methods Default Ranker Values but if you try to optimize them they usually return a value of zero (0) meaning optimization is not of value. This is also true (and, please forgive me, Mark) in several of Mark Holstius' ATM Methods. My "feeling" is that a number was inserted for the Default but was never actually tested nor optimized. And, boy, do I wish I were wrong about that. Now I don't know that the same is true for OmniFunds - remember the goal here was to make a Resilient Portfolio in OmniTrader and Ranking is essential to that process. You are also on the right track in emulating Jeff's effort to find what you would consider Resilient securities - certainly Jeff did not locate them all in every market situation from 2005 up to the present. Thinking of what you would classify as a resilient stock might put you on a more constructive path than what Jeff did which (as I understand it) was to basically find those securities that held up the best in the current Bear Market and in the Bear Market of 2008. To my mind a resilient stock is one that fares well compared to its fellow in all market situations. Jeff's real contribution I think was to get us all pondering what those stocks might be so that we don't suffer massive drawdowns in Big Boy Bear Markets like we have just experienced. So, keep looking for ideas on how to create a truly Resilient Focus List. Tom Helget [Edited by EYEGUY on 4/10/2020 8:44 PM] | |||
^ Top | ||||
John W![]() Regular ![]() ![]() ![]() Posts: 87 Joined: 8/1/2011 Location: Sydney, NSW, Australia ![]() |
Thanks for sharing Tom! I tried BarDayOfWeek() < BarDayOfWeek()[1]. It creates a signal on Monday but OT then doesn't appear to trade that signal until Tuesday. That's using daily bars. As an alternative I tried BarDayOfWeek()=6 as a criteria rule plus the ranker you mention to sort and find the top 10 using the pencil icon and a custom list. This did replicate the 10 Resilient stocks chosen in Omnifunds, and that did mean OT would place the trades on Monday if I let the system run automatically. Regarding ranker. The pencil icon and custom list with the ranker does work. You can also create a dynamic list for backtest. But there is an issue perhaps for Barry to have a look at if no one else can see an answer - on a chart if you create a long filter BarDayOfWeek()=6 it creates signals only from Oct through April each year, but no signals outside those months. Very weird and means that BDOW=6 as a criteria rule or filter is likely to stop working soon.... The second issue is in PortSim. Although OT did create 10 stocks for entry last Monday, PortSim only entered 9. I need to check this some more, but just wanted you to know that you need to be careful to ensure you are getting the results you expected and to check everything thoroughly before ponying up. Q1. To get OT out of the trade on Monday, that requires an exit signal on Friday. I did create an Omniscript exit BarDayOfWeek()=5 and that 'seems' to work, is there any other way to do this? Q2. does anyone know what happens if there is an exit signal and an entry signal for the same Monday bar, how does OT handle that? Final thought - below is the Portsim result if $10K had been placed on each of the 10 positions, but as per the above discussion only 9 of those were captured by Portsim, here is the result for those 9! I'm in social isolation with my wife and nowhere to run, so please don't tell her I didn't trade these positions last Monday! [Edited by John W on 4/11/2020 2:05 AM] ![]() ![]() | |||
^ Top | ||||
EYEGUY![]() Icon ![]() ![]() ![]() Posts: 1543 Joined: 12/12/2003 Location: BALDWINSVILLE, NEW YORK ![]() |
John W: Ah, you got me there! I should have added that I was using an Orders Block and had set Entries to Market on Close (current bar). Although not on the open it was as close as I could come: My Exits in the Orders Block was set the same. Additionally I had Re-Entry set to Re-enter trades if stopped out: Although that isn't trading at the open it was the closest I could come and solves your problem of not being in trades at certain times. When you say "the ranker does work" what was your ATM Default Setting for it? And, hey, Mrs. John W your husband could have bought you an even bigger diamond ring if he had just been in Resilient! Tom Helget [Edited by EYEGUY on 4/11/2020 7:09 AM] ![]() ![]() | |||
^ Top | ||||
John W![]() Regular ![]() ![]() ![]() Posts: 87 Joined: 8/1/2011 Location: Sydney, NSW, Australia ![]() |
Thanks Tom I 'see' what you did. You asked a question "When you say "the ranker does work" what was your ATM Default Setting for it?" I wasn't using ATM. Just click on the pencil icon at the top of the Focus List. That allows you to setup a copy of the "My Symbols" list and rename it (say) "Resilient Symbols". Exit and go back to the Focus List. Import a copy of the resilient symbols from Omnifunds into the "Resilient Symbols" list - File, Import, Symbol List, Browse. Click on the pencil icon again and create a new "Custom List", and rename it (say) "Resilient Weekly 10". In the Starting Population field refer to the "Resilient Symbols" List. In the Criteria Rules field put in BarDayofWeek()=6. In the sort Value field use the indicator that Omnifunds uses for its sort and Select 10 Ascending. This should create a list of 10 symbols the same as Omnifunds ready to trade every Monday. You can also create a dynamic version of that custom list for backtesting. Read my prior post because there may be an issue with BarDayofWeek()=6, and the records in Portfolio Manager. Also I had some questions, perhaps someone could answer those. Hope that helps, its bedtime here. | |||
^ Top | ||||
EYEGUY![]() Icon ![]() ![]() ![]() Posts: 1543 Joined: 12/12/2003 Location: BALDWINSVILLE, NEW YORK ![]() |
John W: Very cleaver, very cleaver using the Sort Value field in OmniScans to act as a proxy for the Ranker we all wish would work in an ATM Method! The only problem I see here is that the method can't be integrated into a coordinated ATM Method so as to fully emulate the Resilient OmniFund. I applaud your inventiveness and pray that Mrs. John W will forgive you not being in Resilient from the get-go. Tom Helget | |||
^ Top | ||||
jpb![]() Veteran ![]() ![]() ![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() |
Tom: With Trade Rankers, there is an old bug that requires you to enter a formula in both the Long and the Short. I created the attached ATM method and a twin with descending vs ascending and originally got identical results (indicating the ranker didn't work) but then remembered the bug. As soon as I entered a formula on the Short side, then the ranker worked. I also had trouble getting the system to enter a trade on Monday. John's method of BarDayOfWeek() = 6 didn't work in the system -- produced 0 signals for me. I finally checked to see if BarDayOfWeek()[1] = 4 (which would say I'm running on Friday to produce a trade for the next day) seemed to work. I've attached a zip that has: Resilient Test.otp -- the profile I created. Symbols in the profile are not those used in OmniFunds, I just randomly grabbed symbols to test out the ranker. Resilient-test.ots -- the strategy that takes the signal and uses a Trade Plan to place a market on open order for the next trading day (Monday) and a market on close order 4 days later (Friday) to exit. Note that this gets you out every Friday (unless Friday is a holiday). Persistent.its.txt -- the ATM Method with 2 market states. It seems to take 10 positions when the Bear market isn't in play and 11 when the bear market is in play (adding the DOG for the hedge). I defined Bear market simply as the SPY falling below the 50 period moving average. (Sorry for the name "Persistent" - I should have called it Resilient). TradeEveryMonday.txt -- the VBA system to fire a trade that will get placed every Monday (so fires one day prior). Here's the chart that demonstrates the trade ranker is working when you put a formula in the long and short. That one spike was due to bad data. On 3/23/20 PZOO went from $0.00 to $0.0002, trading 643 million shares and making a mint -- all prior runs where the trade was placed on a day other than Monday didn't have that spike. I didn't add in any brokerage fees -- the purpose of this run was simply to test out the ranker functionality. [Edited by jpb on 4/11/2020 10:28 AM] ![]() ![]() | |||
^ Top | ||||
EYEGUY![]() Icon ![]() ![]() ![]() Posts: 1543 Joined: 12/12/2003 Location: BALDWINSVILLE, NEW YORK ![]() |
jgb: Yes, I was aware of the bug requiring both the Long and Short Conditions in Trade Ranking to be populated. As you did here: But my question is: How did 100 become the Default value? I suggest you put it there. Now there is nothing wrong with that, but what happens when we optimize the Trade Ranking: Note that now the OptVal is zero (0) indicating that the Ranker is worthless. And, while I agree that your screen shot showing Reverse Trade is provocative I am not seeing that here. Instead I am actually getting a value of 10 for the Ranker Default which is a first for me: Tom Helget [Edited by EYEGUY on 4/11/2020 11:13 AM] ![]() ![]() ![]() | |||
^ Top | ||||
jpb![]() Veteran ![]() ![]() ![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() |
Tom: 1) Yes, I did set the default value to 100. I probably didn't need to since there is only one active ranker. 2) I'm not following you with the optimization. When you have only one ranker, how is it to optimize? What is it comparing against? When you have 2 or more rankers enabled, then it can optimize the split between the rankers. That's the function of that particular optimization check box as I recall. If you want to optimize the RSI(9), then I'd add a parameter, insert the parameter name in place of "9" and optimize the parameter. That's usually what I do when I want to optimize a ranker itself. I guess if you want to determine if the single ranker is having any effect, activate it, run your test and then deactivate it and then run the test again to see what your ending equity or draw down or Calmar... My ascending vs descending test of the ranker proved sort order matters and RSI(9) as a ranker has an effect given the list of symbols. What am I missing? | |||
^ Top | ||||
EYEGUY![]() Icon ![]() ![]() ![]() Posts: 1543 Joined: 12/12/2003 Location: BALDWINSVILLE, NEW YORK ![]() |
jpb: Your logic is impeccable and running Persistent Ranked and non-Ranked certainly makes your point: However it really doesn't explain how when I reverse the Ascending/Descending order for RSI(9) as I have shown above that I actually do get an Optimized Value of 10 - that still really needs to be explained. Thanks for helping me get my head wrapped around this whole Ranker concept a bit better - I really appreciate that! Tom Helget [Edited by EYEGUY on 4/11/2020 12:28 PM] ![]() | |||
^ Top | ||||
jpb![]() Veteran ![]() ![]() ![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() |
Tom, Are you saying that you took the Persistent method, flipped ascending to descending for the long, set the optimization flag for the ranker, and saved the method and ran the analysis again and now the Opt field shows 10 instead of 0? I tried that -- actually made the above changes and saved it as a new method and ran it but my Opt field still shows 0. I'd love to see what you're seeing. I just can't reproduce it on my end. I'd find that concerning when only one ranker exists. By the way, I now recall that the default value is a weight. When you have multiple rankers, you can set the weight for each ranker and optimize it in relation to other rankers. I think it adds up all rankers to find the % of weight to give any specific ranker. There is also the checkbox "Scale Indicator Values" that will alter the ranker value. But I rarely use that feature -- usually only one ranker at a time. Thanks, Jeff B | |||
^ Top | ||||
EYEGUY![]() Icon ![]() ![]() ![]() Posts: 1543 Joined: 12/12/2003 Location: BALDWINSVILLE, NEW YORK ![]() |
Jeff B: As regards: "Are you saying that you took the Persistent method, flipped ascending to descending for the long, set the optimization flag for the ranker, and saved the method and ran the analysis again and now the Opt field shows 10 instead of 0?" YES, but additionally I flipped Descending to Ascending for the Short. I also had "Scale Indicator Values" checked both times. And, yes, my understanding about the Ranking Default values is the same as yours only I thought that more than one Ranker was not required. Although I can't honestly conceive of it I though a value was required for the Default Value and I can keep hearing Ed Downs saying zero means the Ranker had no effect. Thus when I optimized to it I assumed the Ranker held no value. In times past Barry Cohen has posited that maybe that was because there were not enough trades to rank. So, if you had 10 stocks to allocate at 10& each and there were only five trading signals ranking really doesn't come into play. But I could kick myself for not trying the simple experiment you proffered - I do this all the time in my coding to see if something is working and I never, ever thought to do it with the ATM Ranker. Shame on me. Please don't tell my wife! Thanks again, Tom Helget | |||
^ Top | ||||
jpb![]() Veteran ![]() ![]() ![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() |
Tom, For grins I just ran another test. I hadn't flipped the short order. It didn't make a difference. Still scratching my head on that one as to why you see it and why I don't. But, I also created a third method, this one I set the weight to 0. I deactivated the ranker in one of the other methods. And ran the test. This was to see if a weight of 0 was the same as disabling the ranker -- that would make sense but I hadn't thought of it that way. First run: All three methods reported identical final equity. I've seen this before -- sometimes it takes 2 runs when you start OT and switch over to Port Sim, make changes and run a test. Once it has gone through a couple of runs, subsequent changes show up with just one Analysis Run. Second run: The world started working as expected -- the ranker left active and with a weight reported a different final equity than the other 2 methods. The other 2 methods matched, proving a weight of 0 deactivates the ranker. Thanks for setting me straight on the 0 weight. I'll have to take a look at my various methods and see if I've accidentally deactivated a ranker. You might have just given me a reason to do more testing (and please don't tell my wife! -- she thinks I spend way too much time researching). Thanks, Jeff B | |||
^ Top | ||||
EYEGUY![]() Icon ![]() ![]() ![]() Posts: 1543 Joined: 12/12/2003 Location: BALDWINSVILLE, NEW YORK ![]() |
Jeff: I always run the To Do list before looking at any Portfolio Simulation - don't know why, just do. Sometimes you get to Port Sim and it gives you the "we ain't got no trades" thing. Sometimes even when you can see the Vote Line Trades and have even printed out the Performance Summary Report. That "glitchiness" sometimes can cause you to discard a good idea. And it is present in OmniFunds as well. I guided a friend through the setup of two OmniFunds months ago via a screen share from his computer. At the time we checked and double-checked but we could not get agreement between my installation and his. A couple of days ago we revisited the situation and found that a complex Ranker I had given him in the lab was listed as Ascending instead of Descending. We corrected the error and then kept bouncing between the Lab and Explore sometimes showing the correct evaluation and sometimes not. We finally gave up when OmniFunds reverted to what my friend had all along. I told him to check it the next day and see what was going on. And, of course, the following day things were right as rain! And have been ever since. So, just because you can't get something to run like you think it should on OmniFunds come back to it the next day and see if things have sorted themselves out. As far as you wife is concerned she should know that you can never spend way too much time researching just like you can never spend way too much time doing the housekeeping. OUCH - was that my wife slapping me upside the head? Tom Helget | |||
^ Top | ||||
EYEGUY![]() Icon ![]() ![]() ![]() Posts: 1543 Joined: 12/12/2003 Location: BALDWINSVILLE, NEW YORK ![]() |
Jeff: In answer to: "Wondering if anyone has tried to build the "Resilient Portfolio" which uses Market States, in OT 2020" I think I have finally come as far as my current knowledge of ATM Methods will allow. So, I will let you be the judge: Now I am sure you are saying, hey Tom, you really blew it on the hard right edge threre, me bucko! Well I am not so sure about that: Now since I am sworn to strict secrecy about OmniFunds Pro I will never ever post my stuff here like I often do. But I can tell you that you will have to know how to use Concurrent Market States in order to make this work. I look forward to seeing if anyone else can crack this tough nut and maybe offer an even better solution. And if your programming skills are not up to the task then I suggest you looking into purchasing OmniFunds! Tom Helget [Edited by EYEGUY on 4/12/2020 11:55 AM] ![]() ![]() ![]() | |||
^ Top | ||||
jpb![]() Veteran ![]() ![]() ![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() |
Tom: Well Done! I took the easy way out and just subscribed to OmniFunds (as I'm sure you have too). But it is answering challenges like this that gives us greater insights into the Nirvana set of tools and strategies -- helping us use them better to win in the market. I see you issued your own challenge:
Firing up OT... | |||
^ Top | ||||
EYEGUY![]() Icon ![]() ![]() ![]() Posts: 1543 Joined: 12/12/2003 Location: BALDWINSVILLE, NEW YORK ![]() |
jpb: Yeah, you go dude! ATM is so complex now that while I am confident that my approach achieves similar results to Jeff Drake's Resilient I can't be 100% sure. So, I'll keep plugging along and see if anything pops up to improve upon my paradigm. Good luck with yours and congratulations on being a fellow OmniFund Pro user. Tom Helget | |||
^ Top | ||||
jpb![]() Veteran ![]() ![]() ![]() Posts: 168 Joined: 5/11/2005 Location: Brown Deer, WI ![]() |
Version 1. With Commissions, it dropped it to approximately $3.62 million. Without commissions (to match yours), $6.1 million. I've got a late 2017 or early 2018 drop that isn't showing up in yours. Jeff Drake's has a lower Avg Ann MDD than either of ours. But, I think my version confirms your version as a reasonable reproduction. I'll run a couple of optimization runs to see if I can refine a few of my guesses and see if I can drive down the MDD while keeping the return high. I don't like the chop. [Edited by jpb on 4/12/2020 4:26 PM] ![]() | |||
^ Top | ||||
EYEGUY![]() Icon ![]() ![]() ![]() Posts: 1543 Joined: 12/12/2003 Location: BALDWINSVILLE, NEW YORK ![]() |
Jeff B: Don't throw that one away - maybe you can sell it to OmniFunds. Nice Work! Tom Helget | |||
^ Top | ||||
Trailbrake![]() Member Posts: 11 Joined: 2/5/2004 ![]() |
This is awesome. I am dually inspired. Congrats to both of you for getting these omnifunds emulations to work. I have been focused on trying to emulate some popular tactical asset allocation methodologies like dual momentum and global rotation to work better in ATM as they might in Omnifunds but, not as far along as you guys. Curious, I don't believe the Omnifunds equity curves use margin in the calculation and it appears that your portsims are 2x. Do you think this accounts for your higher than Resilient return and slightly higher vol? I do think a great strategy is to drive the strategy(s) native vol down and then lever up. Correct me if I am wrong about either of these. Cheers, Tim | |||
^ Top | ||||
EYEGUY![]() Icon ![]() ![]() ![]() Posts: 1543 Joined: 12/12/2003 Location: BALDWINSVILLE, NEW YORK ![]() |
Tim: You are correct - I am using 2X in the Portfolio Simulation I presented. If you use 1X your Ending Equity over the 15 year period is something along the line of $1,000,000. Not a bad return but surely not as stellar as nearly $4,000,000. Two other things: First - my strategy is set to trade at the end of the week regardless if that week is foreshortened or not like we just experienced with Good Friday last week. But OmniTrader can't know that ahead of time and so it has to wait until Monday (or the first trading day of the week if that isn't Monday) to consider firing a signal. This is unlike my honorable opponent's (if Jeff B. will allow me to refer to him as such) strategy which is looking for signals on Friday (Day of the Week = 5). Of course he didn't have any signal last Friday because there was no trading then. The downside with my approach is that I really don't know what my trades will be until I run a Portfolio Simulation first thing in the morning and look at the Trades List: And, of course, consequently I can't have those trades up and running at the open. Second - even with 2X the allocation achieved is different from that in OmniFunds. Currently in OmniFunds DOG is 33.33% and there are 10 Resilient Stocks at 6.66% for a grand total of 100%. But here is what I get: Going to 1X still allocates DOG at 50% but we only have 5 Resilient stocks left over at 10% each for a total of 100%. Thus OmniFunds somehow looks at everything to provide better balance in asset allocation than an ATM Method can. So, is your Dual Momentum Strategy that of Gary Antonacci? Thanks, Tom [Edited by EYEGUY on 4/13/2020 1:15 PM] ![]() ![]() |
|
Legend | Action | Notification | |||
Administrator
Forum Moderator |
Registered User
Unregistered User |
![]() |
Toggle e-mail notification |