OmniTrader Professional Forum OmniTrader Professional Forum
forums calendars search
today this week
 
register logon control panel Forum Rules
You are currently browsing as a guest.
You should logon to access more features
A Self-Moderated Community - ALL MEMBERS, PLEASE READ!
Vote for Members who contribute the most to your trading, and help us moderate content within the Forums.


  Current location        Thread information  
OmniTrader Professional Forum
OmniTrader Pro General Discussion
ATM Micro States Method
Last Activity 2/23/2025 4:01 AM
40 replies, 7391 viewings

Jump to page : 1 2
Now viewing page 2 [25 messages per page]
 
back reply
Printer friendly version

^ Top
Jeff Brown

Member
25
Posts: 31

Joined: 1/29/2008

User Profile
 
Subject : RE: ATM Micro States Method
Posted : 3/5/2018 6:07 PM
Post #29924 - In reply to #29923

Jim, thanks for the suggestion.

The interesting results, running with iif( C = 0, 0, ATR(4)/C ) produced poor results. Final Equity around $350k vs $700k.

Getting rid of the iif and only having the ATR(4)/C, the results return closer to the expected value although it was still not equal. $677k vs $700k. So, close.

I then added the SMA function: SMA(ATR(4)/C, 1) and got the same result: $677k vs $700k.

Changing the smoothing number from 1 to 2 caused the final equity to end up at $640k.

So, the logic from the OL VTY_PRICE code must function slightly different than the VTY_PRICE indicator or perhaps the order of execution is slightly different.

I didn't try taking that OL code and introducing it and running it side by side the official indicator to prove this out -- maybe tomorrow. Right now all I can say is that the VTY_PRICE indicator seems to produce slightly different results for the Trade Ranking function than stripping down the function.
^ Top
Jim Dean

Sage
2000100010010010010025
Posts: 3433

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: ATM Micro States Method
Posted : 3/5/2018 6:26 PM
Post #29925 - In reply to #29924

Note that default for ATT is usually 14, not 4. And I thought you realized that your ATR/C formula was different than MattG’s Indicator … MattG’s has 5-period SMA smoothing. That is:
Sma( ATR(14)/C, 5) … protected with iif for division by zero that would be:
iif( math.min(C,5) <= 0, 0, Sma( ATR(14)/C, 5) )
… that formula provides more protection than MattG’s does, but should match its results precisely.

And - running without iif versus with iif should make ZERO difference. The only places the iif takes effect are on bars where the exchange was closed for that day, or other odd data issues appear. I suggest you redo your tests.
^ Top
Jim Dean

Sage
2000100010010010010025
Posts: 3433

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: ATM Micro States Method
Posted : 3/5/2018 6:30 PM
Post #29926 - In reply to #29925

Oops. Just read your earlier posts and I see that you intentionally changes the 14,5 to 4,1 … in which case you are correct about not needing the SMA. However, the iif should be used and should not affect results at all
^ Top
Jeff Brown

Member
25
Posts: 31

Joined: 1/29/2008

User Profile
 
Subject : RE: ATM Micro States Method
Posted : 3/5/2018 8:14 PM
Post #29927 - In reply to #29926

Jim,
I agree with you that the logic of the iif should have ZERO impact on the calculation and the Trade Ranking with it should be exactly the same as without it. However, the results are clearly different.

Mach 5 uses VTY_PRICE(4,1).
Mach 5 v2 uses iif or ATR.

See the difference?

Results run with iif:


The Trade Ranking code:


Results run without iif:


The Trade Ranking code:


Also note that neither iif, nor ATR, when directly used instead of VTY_PRICE produce the exact same results (as Mach 5). If our formula is the same, then all 3 should agree. I'll dig into the Temp directory and see if I can see the difference in the code that actually gets compiled. But I think I'm going to end up concluding that "something's happening under the hood that I can't see that is creating the different results."


[Edited by Jeff Brown on 3/5/2018 8:19 PM]

Attached file : Screenshot_20180305_200617.png (47KB - 1119 downloads)
Attached file : Screenshot_20180305_200659.png (12KB - 1060 downloads)
Attached file : Screenshot_20180305_200923.png (44KB - 1105 downloads)
Attached file : Screenshot_20180305_200745.png (12KB - 1077 downloads)

^ Top
Jim Dean

Sage
2000100010010010010025
Posts: 3433

Joined: 3/13/2006
Location: L'ville, GA

User Profile
 
Subject : RE: ATM Micro States Method
Posted : 3/6/2018 4:23 AM
Post #29928 - In reply to #29927

Weird. Definitely a BUG. Please let me know what you discover in Temp.

Another thing worth trying - simplify the iif for the parser:

ATR(4) * iif(C = 0, 0, 1/C)
^ Top
Jeff Brown

Member
25
Posts: 31

Joined: 1/29/2008

User Profile
 
Subject : RE: ATM Micro States Method
Posted : 3/6/2018 12:55 PM
Post #29932 - In reply to #29928

I gave the revised formula a try. It produced the same results as before with the ATR embedded in the iif.

The only real difference I see, looking at the generated code is that ATR is substituted with a routine called WildersVolatility (which makes sense because that's another name for ATR) while VTY_PRICE is substituted for another routine called VolatilityPriceRatio which would also make sense since it is a little more than just an ATR.

I then took the code Bill provided and created an OL indicator indVTP. Plotting it on top of the VTY_PRICE(14,5), the values were identical. The VTY_PRICE indicator can't go as low as 1 for the smoothing parm so I set it to 2 while setting my new indicator to 1. This showed the slight difference between indVTP(4,1) and VTY_PRICE(4,2) as expected.

I then created an ATR(4)/C indicator that should match the indVTP(4,1) and the values are identical.

So, this all proves out:
1) The code Bill pulled is equivalent to the VTY_PRICE
2) ATR(4)/C is equivalent to VTY_PRICE(4,1)

It doesn't explain why with ATM the use of ATR(4)/C produced slightly poorer results than using VTY_PRICE. And it doesn't explain why the introduction of iif into the formula tanked the results.

Here's a quick screen shot of the indicators plotting on one chart. The interesting one is the lower one where it stacked the 2 versions of the VTY_PRICE at different settings (4,1) vs (10,5). From a ranking perspective, (4,1) is just producing higher values for ranking earlier for any symbol than the (10,5) and dropping earlier as well. There must be some benefit given the strategies.




[Edited by Jeff Brown on 3/6/2018 12:57 PM]

Attached file : Screenshot_20180306_124212.png (8KB - 1017 downloads)

^ Top
gbarber

Member
25
Posts: 28

Joined: 2/26/2018
Location: PEARLAND, TX

User Profile
 
Subject : RE: ATM Micro States Method
Posted : 3/23/2018 2:51 PM
Post #29953 - In reply to #29879

Sorry to bug you guys with a simple technical question. I would like to post some results of tests using optimization. I have the images but don't know how to get them into a post in line with the text like you folks are doing. I have asked tech support but don't have a working anser. Please let me know how you do that.
^ Top
THOMAS HELGET

Elite
500100
Posts: 610

Joined: 3/22/2006
Location: BALDWINSVILLE, NEW YORK

User Profile
 
Subject : RE: ATM Micro States Method
Posted : 3/23/2018 3:27 PM
Post #29954 - In reply to #29953

gbarber:

Insert Left Bracket ([) img= in the text where you want your image to appear.

Post you message with all the attachments you want to present. Images are best as .png files. Don't use .bmp files - they are way too large.

Go to the list of the images that appear below your message and on one of the listings right-click and select to Copy the Link.

Now re-open your message via Edit.

Past the copied link after the Left Bracket ([) img= you have already installed.

The link will now show. Close it off with a Right Bracket (]) so that it looks like Left Bracket ([) img=something125 Right Bracket (]). Make sure there are no spaces between [ and ].

Do the same with all other images you want to post (usually they are sequential and so you can just do multiple copies of the first link you right-clicked on and just increment the number at the end of the link).

Re-submit your message and your images should now be visible.

I hope that is clear.

Tom Helget

[Edited by THOMAS HELGET on 3/23/2018 3:38 PM]

^ Top
gbarber

Member
25
Posts: 28

Joined: 2/26/2018
Location: PEARLAND, TX

User Profile
 
Subject : RE: ATM Micro States Method
Posted : 3/23/2018 8:06 PM
Post #29956 - In reply to #29954

excellent. Thank you Tom. that works like a charm.
^ Top
mholstius

Regular
252525
Posts: 76

Joined: 6/15/2011

User Profile
 
Subject : RE: ATM Micro States Method
Posted : 3/24/2018 6:28 AM
Post #29957 - In reply to #29956

These are the formatting codes you can use when posting too;



Just put the Opening tag before the text you want it to apply to, and the Closing tag where you want that formatting to stop.

Mark

[Edited by mholstius on 3/24/2018 6:31 AM]

Attached file : Forum Formatting Codes.png (122KB - 856 downloads)

^ Top
gbarber

Member
25
Posts: 28

Joined: 2/26/2018
Location: PEARLAND, TX

User Profile
 
Subject : RE: ATM Micro States Method
Posted : 3/24/2018 2:41 PM
Post #29958 - In reply to #29957

thank you Mark
^ Top
gbarber

Member
25
Posts: 28

Joined: 2/26/2018
Location: PEARLAND, TX

User Profile
 
Subject : RE: ATM Micro States Method
Posted : 3/25/2018 8:36 PM
Post #29962 - In reply to #29958

When i tried inserting pictures i noticed that the .png file i put in was wider than the current width of the forum posts. thus one has to scroll right and left to read it all. How do I get it to insert the picture to same scale as all the others on the postings.
^ Top
SteveL

Veteran
10025
Posts: 133

Joined: 2/15/2007
Location: Boulder, CO

User Profile
 
Subject : RE: ATM Micro States Method
Posted : 3/25/2018 10:06 PM
Post #29963 - In reply to #29962

gbarber -
You need to change the number of pixels in the .png file. If you are using SnagIt, you can modify the image width. 800 pixels is a width that works on most monitors/screens at a reasonable resolution, and doesn't require scrolling right/left to read the text.
^ Top
mholstius

Regular
252525
Posts: 76

Joined: 6/15/2011

User Profile
 
Subject : RE: ATM Micro States Method
Posted : 3/29/2018 6:08 AM
Post #29975 - In reply to #29963

Maybe this will help with pasting the images...???

To get the images into a post;

At the point you want the image, insert;



xxxx = paste the "copy Link Address" you get from right clicking on the image below the post;



Mark
^ Top
gbarber

Member
25
Posts: 28

Joined: 2/26/2018
Location: PEARLAND, TX

User Profile
 
Subject : RE: ATM Micro States Method
Posted : 3/29/2018 11:14 AM
Post #29976 - In reply to #29975

Thanks very much Mark. That is what I have been doing. Still get just the icon not the image. I feel very bad about using your very valuable time to debug this problem so am trying to get some help from tech support. I suspect it is something very simple that I am overlooking but haven't found it yet.

Thanks again for reaching out to help.
^ Top
gbarber

Member
25
Posts: 28

Joined: 2/26/2018
Location: PEARLAND, TX

User Profile
 
Subject : RE: ATM Micro States Method
Posted : 4/2/2018 11:49 PM
Post #29994 - In reply to #29976

I noticed that Mark said he had not tried anything with optimization capabilities yet. So I tried to do that. I worked on the allocation parameters. To summarize briefly, improvements can be made by using optimization on the allocation parameters. However, it is not significant. That is probably not real surprising since the big gains from ATM come in the ranking and use of states.

The details of what i found and the final optimized parameters are shown in the following.
All following runs were done with leverage at 1X, both back and forward test, 0 commissions, and each of my symbols, states, strategies per state, and ranking from microstate method as developed by Mark Holstius.
Optimization is set to exhaustive.

this is with bear and bull allocation parameters optimized with max ending equity option



this is with bear, bull, and default allocation optimized with max ending equity option





this is all allocation optimized and bull equity % optimized with max ending equity option.
For this optimization I first set the bull max at 15 and increased the max in steps of 3 up to 51. It always chose the max value. Since I would never trade at 51% of equity per trade I just stopped there.




this is with all allocation optimized and bull equity % optimized with max avg annual return/avg MDD option. With range of 3 to 51, it picked 12%.




this is with all allocation optimized and bull and bear equity % optimized with max avg annual return/avg MDD option.




this is with all allocation optimized and bull, bear, and default equity % optimized with max avg annual return/avg MDD option.




this shows the bull state optimized parameters



this shows the bear state optimized parameters




this shows the default state optimized parameters





[Edited by gbarber on 5/8/2018 2:04 PM]

Attached file : bear and bull allocation optimizedsmall.png (234KB - 653 downloads)
Attached file : bear, bull, and default optimization optimizedsmall.png (389KB - 667 downloads)
Attached file : bull equity% optimizedsmall.png (322KB - 622 downloads)
Attached file : bull equity%optimized with avg annual reurn over avgMDDsmall.png (311KB - 629 downloads)
Attached file : bull, bear, and default %equity optimized with avg annual return over avg MDDsmall.png (250KB - 668 downloads)
Attached file : bull optimized values.png (41KB - 650 downloads)
Attached file : bear optimized values.png (36KB - 650 downloads)
Attached file : default optimized values.png (42KB - 699 downloads)

Jump to page : 1 2
Now viewing page 2 [25 messages per page]
back reply

Legend    Action      Notification  
Administrator
Forum Moderator
Registered User
Unregistered User
E-Mail this thread to a friend
Toggle e-mail notification


Nirvana Systems
For any problems or issues please contact our Webmaster at webmaster@nirvsys.com.