NexusFi: Find Your Edge


Home Menu

 





Trends and Nonlinear Dynamics


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 12 posts (26 thanks)
    2. looks_two Richard with 3 posts (2 thanks)
    3. looks_3 darthtrader3.6 with 2 posts (2 thanks)
    4. looks_4 Okina with 2 posts (3 thanks)
      Best Posters
    1. looks_one Fat Tails with 2.2 thanks per post
    2. looks_two Okina with 1.5 thanks per post
    3. looks_3 darthtrader3.6 with 1 thanks per post
    4. looks_4 Richard with 0.7 thanks per post
    1. trending_up 13,123 views
    2. thumb_up 35 thanks given
    3. group 17 followers
    1. forum 23 posts
    2. attach_file 11 attachments




 
Search this Thread
  #11 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,889 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,107

Hi darthtrader 3.6., thanks for your comments.

Maybe a model of the market using statistical variables is impossible, as you said. But I have learned quite a lot from having a look at nonlinear dynamics.

(1) Noise: Traders that have a smaller timeframe than you.

(2) Trading range: 80% of the time the market is in a state of bipolar disorder, testing whether it wants to go up or down, lacking direction. This may look like a temporary equilibrium, but it is not. It is the equilibrium within an hour glass, which is an unstable state. Trading ranges are created by negative feedback.

(3) Trend: Within the permanent state of bipolar disorder there are brief moments, where the market shows some conviction to move in one direction. Trends are created by positive feedback.

(4) Greed, fear, pain, irrational exuberance: Positive feedback has driven prices above or below the level anyone had imagined. Greed is not as strong as fear. Equity and bond markets have flat peaks and sharp troughs, commodities sharp peaks and flat troughs. This can be used, for an equity top you need at least a quadruple divergence to go short, for a commodity top a single divergence is good enough.

(5) Trading mostly is a zero-sum game: You can only make money, if somebody else has been trapped. You should have an idea, who is going to pay you, before putting on a trade.

This is valuable information for your trading style, you may draw some conclusions

(1) Pay attention to traders that have a larger timeframe than yours. Prepare your day and check, where their intervention levels are.

(2) and (3) Adapt your trading style to the state of the market. Mean reversion and arbitrage during the habitual state of manic-depressive psychosis, trend following during the initial stages of herd-like behaviour. As the market suffers from bipolar disorder, you always need at least two scenarios for trading, and get out of any trade, if the underlying scenario is no more validated by price.

(4) Identify points that trigger emotions. Greed, fear and pain translate into high volume climax bars, usually followed by churn bars. These can be detected. Even better than these are traps. I try to wait for the trend followers to be trapped, before initiating any countertrade. The trap can be a false breakout of a final trading range or a 2B top/bottom such as described by Victor Sperandeo.

(5) Try to find out, who is on the other side of your trade.

You are a bit negative on statistical physics. I think the main problem is that many quants have built models far from reality. Using Gaussian distributions - which are good for describing random price action - will not work in real inefficient markets. LTCM arbitrage did not work because they underestimated the probabilty of 4-sigma-events and because the sheer size of their trades distorted the market thus attracting a flock of vultures. But using statistics to describe the feedback mechanisms initiated by human psychology and propagated by nonlinear dynamics may help to determine the character of each market and adapt your trading style.


darthtrader3.6 View Post
statistical physics to model markets is just as delusional as anything else you can pull out of the hat...Nothing but trading the known econometric skimping on the variables problem for a completely unmeasurable number of variables...
Game theory and markets is not a stone that has not been turned over, look up minority games. Problem is it suffers from the same problems of statistical physics.
If anything IMO information theory is at least worth knowing..
To my mind trends are caused by known information being absorbed by liquidity restraints, coupled with an unknowable noise/garbage multiplier...


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Anyone Trading Equities using NT8?
NinjaTrader
TOS inspired trading simulator
ThinkOrSwim
Time, Futures, Scalping, Treasurys
Treasury Notes and Bonds
IB Gateway / IBKR (semi-) daily restart / login
Platforms and Indicators
IBD Accumulation/Distribution Rating
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Fighting Addiction and Stops
17 thanks
Big Mike in Ecuador
6 thanks
Just another trading journal: PA, Wyckoff & Trends
6 thanks
Crossing the Abyss: An Adventure Guide by Snax
4 thanks
Want your NinjaTrader indicator created, free?
4 thanks
  #12 (permalink)
Bamizo77
Los Angeles
 
Posts: 11 since Apr 2010
Thanks Given: 17
Thanks Received: 2

Great picks... I read em all..

Reply With Quote
Thanked by:
  #13 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,889 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,107


I admit that I have a bit neglected this thread. The reason here is that I need time to digest the findings.

During 95% of the session ES remained within a trading range, then a sudden shift in value occured: How can this be detected?

Today was a good example for the behavior of nonlinear systems. ES stayed in a narrow range during the night session. The opening range - first hour of trading - confirmed the range established during the night session. ES remained within this range for 5 1/2 hours and produced a market profile that came close to an ideal Gauss distribution.

Then suddenly around 3:00 PM Eastern Time ES broke out to the downside within 20 minutes and established a new trading range. The market profile of the day now shows a smaller Gauss distribution below the larger one.... If I look at the entire session, these 20 minutes account for 5% of the time. During 95% of the time ES stayed within its trading range. This is exactly the same behavior as shown by the population of sugarscape. This tells us that the feedback mechanisms of market are similar to those encountered within simulations of artificial life, or real life behavior as shown by flocks of birds or schools of fish.

What causes these sudden shifts in value and how can they be detected before they occur? In this case there were two hints.

(1) During the morning session ES explored the full range. As often happens the noon session had reduced volatility. The key here is that the noon session was confined to the lower half of the range of the morning session. This is the same logic as for a descending triangle. The bulls were not able to push price back up to the upper half of the opening range.

(2) Most revealing however is what happened at 2 PM after the big guys came back from lunch. The second chart below shows that ES mostly traded at the ask. So the bulls were active, but could not push prices higher, because large sellers were sitting and waiting at the volume weighted average price (VWAP) of the current session. During 40 minutes the bulls were mostly buying at the ask, while ES stayed in a range of 1.5 points just below VWAP and yesterday's high. The first bear raid started at 2:55 PM, when bear sold the bid and drove prices down. The bulls started their counterattack and bought the ask again. But unlike the bears they could not move price up!

Detecting the shift in value was possible by

- noticing the weakness during the noon session
- watching the bulls buy into walls twice, walls set up by large bears that were distributing their longs or entering new shorts

The breakout to the downside was facilitated by the number of bulls trapped when they had hit the wall. The Better Volume indicator showed some churning on the 5 min chart, but without analyzing order flow and price action on a lower time scale you would not have been capable of drawing the right conclusions.

Thanks to the GOMRecorder it is possible to record bid and ask data from a live session. Quite embarassing for NT developpers that they still have not found a way to offer this as a standard feature. Thank you, GOMI.

Attached Thumbnails
Click image for larger version

Name:	ES 06-10 (5 Min)  26_04_2010.jpg
Views:	334
Size:	170.4 KB
ID:	12135   Click image for larger version

Name:	ES 06-10 (1 Min)  26_04_2010.jpg
Views:	321
Size:	123.0 KB
ID:	12136  
Started this thread Reply With Quote
Thanked by:
  #14 (permalink)
 
darthtrader3.6's Avatar
 darthtrader3.6 
wny
 
Experience: Intermediate
Platform: ninja, excel
Trading: YM, equities
Posts: 86 since Jan 2010


Fat Tails View Post
(1) Noise: Traders that have a smaller timeframe than you.

I don't see though how smaller time frame traders = noise though..Market "noise" is probably one of the most interesting topics in finance. I know information theory has a lot of insight on this topic but I don't have the mathematics yet to dig much into information theory.
Joe Blow X sold because his wife got pregnant, which caused trader Y to buy, which caused trader Z to arb..X I would consider "noise", I can't see Y and Z as noise though.
You could view this from a Game Theory perspective, but I'm done with Game Theory. Its only useful when you can reduce variables and game trees to extremely small numbers, completely the opposite of the markets as the above would be measured in milliseconds.
I'm too mathematically ignorant to prove the point but I would speculate Nonlinear Dynamics is a fudge and waste of time subset of stochastic process. If fractals didnt look so cool it would probably already be dead mathematically.

Visit my NexusFi Trade Journal Reply With Quote
  #15 (permalink)
Richard
Dallas TX/USA
 
Posts: 153 since Jun 2009
Thanks Given: 33
Thanks Received: 284


Fat Tails View Post
Today was a good example for the behavior of nonlinear systems.

Hi, thanks for this thread. I hope it continues. Non-linearity is a very broad brush to be painting with. When you say ES behaved like a non-linear system, what kind of system do you have in mind? What are the inputs and outputs, and how are they non-linearly related? I mean y = x^2 is a non-linear relationship, but isn't a good market model.

Unless there is a more formal system definition, it seems it would suffice to say that market returns are spikey and be done with it. Right?

Reply With Quote
  #16 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,889 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,107

If I am talking about non-linear relationships, I am not thinking yet about any formula. I just want to compare the trading universe with other systems that are composed of a large number of agents, such as

- cars in a traffic jam
- snow crystals prior to a snowslide
- a shoal of fish
- a swarm of birds
- phase transformations in chemical substances
- also remember a model with a few planets rotating around each other, was close to stable for a number of periods then broke up

All these systems show periods of relative stability, as the positive and negative feedback loops between the agents cancel out most of the time. Then all of a sudden - just add the flap of a butterfly - the whole thing becomes instable, as a majority of the agents (snow crystals, birds, fishes. traders, etc.) take off in one direction. Positive feedback keeps the thing going for a while. I believe that there is a critical moment prior to action (low volatility in one of the timeframes), which precedes the trend. Entering a trade prior to a critical moment has an excellent reward-to-risk ratio. The more pressure has built up (accumulation or distribution), the stronger the breakout will be.

I believe that there are well known patterns to detect these critical transitions. An ascending triangle is such a pattern where volatiliy is reduced and pressure builds up. Now the ascending triangle can also transform itself to a topping pattern. To know whether the pressure for a breakout builds up, you would look at volume fpr confirmation.

Once the trend is established, it is kept going by greed or fear and technical feedback loops that reinforce the primary psychological loops. Now there are two possible ends to this. A parabolic move with a strong climax (exuberance) and a sudden reversal on high volume, or the wedge shaped / trading range type of price action that tries to establish a new value area around the final area of the trend and leads into a new period of relative stability.

It is important to understand, whether you are in a U-type or S-type situation and act accordingly. This also means that you need to adapt all technical indicators to the type of the market

- trading range (negative feedback)
- trend (positive feedback)
- U-peak (sudden reversal on high volume)
- S- peak (reverse symmetrical triangle, wedge)

The transitions between the different states are not always smooth, a breakout may occur suddenly, so there is little time to change the weapons.

I do not want to build complicated models but simply develop a better understanding for the different types of price action that I may encounter. This has practical applications:

(a) define type of environment
(b) adapt trading style to environment (an example is J. Welles Wilder's trend and reaction mode)
(c) enter positions during low volatility (consolidation patterns, sqeueeze, even a Gartley pattern)
(d) use volume to gauge transitions between one of the 4 environments



Richard View Post
Hi, thanks for this thread. I hope it continues. Non-linearity is a very broad brush to be painting with. When you say ES behaved like a non-linear system, what kind of system do you have in mind? What are the inputs and outputs, and how are they non-linearly related? I mean y = x^2 is a non-linear relationship, but isn't a good market model.

Unless there is a more formal system definition, it seems it would suffice to say that market returns are spikey and be done with it. Right?


Started this thread Reply With Quote
Thanked by:
  #17 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,889 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,107

Thursday's crash confirmed again that markets are not random, but that they show periods of extended equilibrium, and then all of a sudden a minor triggers such as the debt refinancing of Greece (with both population and economic weight less than Bavaria) produces a chain reaction of feedback loops.

The left chart below shows that during the last 500 million years there were 7 peaks during which more than 25% of the marine species were extinct. The right chart shows the VIX during the last 15 years. There were 5 occasions, when the VIX jumped to values above 40.

Both extinction of species, and the VIX show the behaviour of a complex system. Complexity stands for feedback loops. For the vix this is generated by fear and greed, leverage and the liquidity constraints it imposes, and trend following computer algorithms that use different timeframes. For the extinction of species, the feedback loops can be taken more literally, as one species feeds on another.

The important thing here is that the behavior of complex systems does not have an external cause but can be seen as endogenous porperty. The near-banktrupcy of Greece is just a sign that the real estate, stock and commodity bubbles have been deflated by inflating the sovereign debt. One thing leads to another and the new disequilibrium takes its toll.

Can this be applied to trading? Yes it can. The rare - but not so rare - 3 sigma events do take place and punish those that play a mean-reversion strategy. Banks and also hedge funds such as the famous LTCM mainly played the mean reversion game. This works for a number of years, and their employees pay themselves high salaries, based on current earnings. When the black swan finally hits, the banks cannot survive on their own and the tax payer pays for the bill. Backs enrich themselves by abuse of the Black Swan effect. The profit is for the bank, the risk for the tax player. Then history repeats itself until the system collapses within a war or a revolution.

As traders we cannot afford to blow our accounts. Mean reversion strategies are potentially dangerous and countertraders are the first to be wiped out, if the market shows a sudden increase in volatility. Opposed to this, a trendtrader rather runs the risk of the slow death caused by whipsaws and will see occasional gains when a large move occurs. This is painful, as you have to sustain regular small losses and avoid taking profits too early. But probability teaches us, that what is more diffuclt psychologically should be more profitable.

Trade with the trend, take your losses and let your profits run, and you will survive 3 sigma events.

Attached Thumbnails
Click image for larger version

Name:	Extinction_Intensity.jpg
Views:	252
Size:	159.7 KB
ID:	13027   Click image for larger version

Name:	VIX (Monthly)  7_1995 - 5_2010.jpg
Views:	269
Size:	80.4 KB
ID:	13028  
Started this thread Reply With Quote
Thanked by:
  #18 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,889 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,107

Brief report on current status (2006) of econophysics by Thomas Lux. The paper includes a reference list of previously published books and articles for those who are interested in the subject.

Not directly related to trading, but shedding some light on the underlying mechanisms of financial markets.

Attached Thumbnails
Trends and Nonlinear Dynamics-thomas-lux-statistical-physics-applied-finance.pdf  
Started this thread Reply With Quote
  #19 (permalink)
 
Okina's Avatar
 Okina 
montreal quebec/canada
 
Experience: Beginner
Platform: CQG/NT7
Broker: IB/AMP/CQG
Trading: CL
Posts: 2,149 since Sep 2015
Thanks Given: 758
Thanks Received: 5,464

Financial Crisis Observatory by Didier Sornette

Financial Crisis Observatory - ER D-MTEC [AUTOLINK]ETH[/AUTOLINK] Zurich

Didier Sornette : Dragon-kings: mechanisms, statistical methods and empirical evidence

https://arxiv.org/ftp/arxiv/papers/1205/1205.1002.pdf

https://www.sg.ethz.ch/ethz_risk_center_wps/pdf/ETH-RC-11-001.pdf

Hundreds of interesting papers from this guy.

@Fat Tails : have you tried to apply his statistical analysis tools to real time trading ?

R.I.P. Olivier Terrier (aka "Okina"), 1969-2016.
Please visit this thread for more information.
Visit my NexusFi Trade Journal Reply With Quote
  #20 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,889 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,107



Okina View Post
Financial Crisis Observatory by Didier Sornette

Financial Crisis Observatory - ER D-MTEC [AUTOLINK]ETH[/AUTOLINK] Zurich

Didier Sornette : Dragon-kings: mechanisms, statistical methods and empirical evidence

https://arxiv.org/ftp/arxiv/papers/1205/1205.1002.pdf

https://www.sg.ethz.ch/ethz_risk_center_wps/pdf/ETH-RC-11-001.pdf

Hundreds of interesting papers from this guy.

@Fat Tails : have you tried to apply his statistical analysis tools to real time trading ?

I have read the book "Why Stock Markets Crash" by Didier Sornette. He is a brilliant guy, maybe a bit too brilliant for me. I was able to grasp the major findings that he exposed, but I could not follow all the details. It is a very mathematical book.

Therefore I have not been able to exploit his work statistically. Nevertheless, some of his findings confirm that the underlying price volume distribution do favor black swans, and that they appear much more often than you would expect. This is also something that I had learned in a simpler way from books by Roger Lowenstein (When Genuis Failed) and Nicholas Nassim Taleb (Fooled by Randomness. The Black Swan).

I am therefore aware of changing correlations and self-reinforcement mechanisms, which can trigger impressive trends. But I have not yet formalized any strategy that feeds on such reinforcement loops so far.

Started this thread Reply With Quote




Last Updated on November 29, 2018


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Sitemap - Downloads - Top
no new posts