State Transitions

454 views

Published on

Detecting buy and sell signals for assets in a stock market. Calculates the transition point from schooling to swarming of asset prices. This is NOT a 'technical analysis' method.

Published in: Economy & Finance, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
454
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

State Transitions

  1. 1. Detecting State Transitions in a Stock Market with Many Agents Eric Van Horenbeeck PhD CNTS, University of Antwerp
  2. 2. Detecting State Transitions in a Stock Market with Many Agents <ul><li>Main thesis: </li></ul><ul><li>Decisions based on state transitions perform better than decisions based on models of complex behavior </li></ul>
  3. 3. Detecting State Transitions in a Stock Market with Many Agents <ul><li>Outline </li></ul><ul><li>1. Example </li></ul><ul><li>2. A Stock Market is a Complex Environment </li></ul><ul><li>3. Self-organization </li></ul><ul><li>4. Swarming and Schooling </li></ul><ul><li>5. Detecting State Transitions </li></ul><ul><li>6. Results </li></ul><ul><li>7. Summary </li></ul><ul><li>8. Future Work </li></ul>
  4. 4. <ul><li>1. Example </li></ul><ul><li>2. A Stock Market is a Complex Environment </li></ul><ul><li>3. Self-organization </li></ul><ul><li>4. Swarming and Schooling </li></ul>5. Detecting State Transitions 6. Results 7. Summary 8. Future Work
  5. 5. <ul><li>1. Example </li></ul><ul><li>2. A Stock Market is a Complex Environment </li></ul><ul><li>3. Self-organization </li></ul><ul><li>4. Swarming and Schooling </li></ul>5. Detecting State Transitions 6. Results 7. Summary 8. Future Work <ul><li>Red line: US funds with a range of annual return for ten years ending December 2000. Blue line: returns from random chance </li></ul><ul><li>The red and blue lines are on top of each other indicating that the number of above average funds is no different than if fund returns were based entirely on luck. </li></ul><ul><li>The number of fund managers with above-average returns over the last ten years is no different than would be by chance </li></ul>
  6. 6. <ul><li>1. Example </li></ul><ul><li>2. A Stock Market is a Complex Environment </li></ul><ul><li>3. Self-organization </li></ul><ul><li>4. Swarming and Schooling </li></ul>5. Detecting State Transitions 6. Results 7. Summary 8. Future Work
  7. 7. <ul><li>1. Example </li></ul><ul><li>2. A Stock Market is a Complex Environment </li></ul><ul><li>3. Self-organization </li></ul><ul><li>4. Swarming and Schooling </li></ul>5. Detecting State Transitions 6. Results 7. Summary 8. Future Work <ul><li>Technical traders assume that prices follow a pattern </li></ul><ul><li>Fundamental analysts assume prices respond to underlying economic realities </li></ul><ul><li>Random Walk Theory and Efficient Market Hypothesis hold that the best bet for tomorrow’s stock price is its value today </li></ul><ul><li>But </li></ul>
  8. 8. <ul><li>1. Example </li></ul><ul><li>2. A Stock Market is a Complex Environment </li></ul><ul><li>3. Self-organization </li></ul><ul><li>4. Swarming and Schooling </li></ul>5. Detecting State Transitions 6. Results 7. Summary 8. Future Work <ul><li>Long term feedback effects </li></ul><ul><li>Erractic behavior under certain conditions </li></ul><ul><li>Fractal structure </li></ul><ul><li>Sensitive on initial conditions </li></ul><ul><li>Trading behavior is neither purely rational nor random </li></ul>
  9. 9. <ul><li>1. Example </li></ul><ul><li>2. A Stock Market is a Complex Environment </li></ul><ul><li>3. Self-organization </li></ul><ul><li>4. Swarming and Schooling </li></ul>5. Detecting State Transitions 6. Results 7. Summary 8. Future Work <ul><li>Distances between intraday prices are small relative to the length of the path covered, i.e. trade prices are clustered </li></ul><ul><li>Stock market as a system shows regularity in spite of unpredictable interaction between its agents </li></ul><ul><li>We have biological models that exhibit similar behavior: ants, fish... </li></ul>
  10. 10. <ul><li>1. Example </li></ul><ul><li>2. A Stock Market is a Complex Environment </li></ul><ul><li>3. Self-organization </li></ul><ul><li>4. Swarming and Schooling </li></ul>5. Detecting State Transitions 6. Results 7. Summary 8. Future Work <ul><li>From biological models we learn: </li></ul><ul><li>Strong relation exists between constant J coupling individual members and the strength of noise  </li></ul><ul><li>In the swarming phase where J < 5   ,the center of the school hardly moves, whereas if J > 5   the fish form a thighter group with a rectilinear movement </li></ul><ul><li> shows the non-linearity of the system,  -1/2 is the steady swimming speed of fish </li></ul><ul><li>At J  -1/2 = 5  /  -1/2 the schooling structure is self-organising </li></ul>Hiro-Sato Niwa. 1994. Self-organizing Dynamic Model of Fish Schooling. In Journal of Theoretical Biology , 171, 23 – 136
  11. 11. <ul><li>1. Example </li></ul><ul><li>2. A Stock Market is a Complex Environment </li></ul><ul><li>3. Self-organization </li></ul><ul><li>4. Swarming and Schooling </li></ul>5. Detecting State Transitions 6. Results 7. Summary 8. Future Work <ul><li> /  -1/2 stands for the magnitude of random movement J where  -1/2 indicates the mean strength of influence on one individual by the other individuals as a group </li></ul><ul><li>A state transition occurs when the system is no longer driven by the average behavior of individuals. The school takes over and the individual becomes a follower </li></ul>
  12. 12. Always clustering (no ego trips) Always self-organizing (no leaders) Sometimes polarized behavior (schooling) Sometimes random (swarming) 1. Example 2. A Stock Market is a Complex Environment 3. Self-organization 4. Swarming and Schooling 5. Detecting State Transitions 6. Results 7. Summary 8. Future Work
  13. 13. Monday Tuesday Wednesday Thursday Friday 5 days of swarming and schooling by Philips (Nov. 29 - Dec. 3 ‘99)
  14. 14. <ul><li>1. Example </li></ul><ul><li>2. A Stock Market is a Complex Environment </li></ul><ul><li>3. Self-organization </li></ul><ul><li>4. Swarming and Schooling </li></ul>5. Detecting State Transitions 6. Results 7. Summary 8. Future Work <ul><li>Even without formal communication, traders cluster </li></ul><ul><li>These clusters show self-organizing features (schooling) </li></ul><ul><li>The trace of alternating swarming and schooling phases exhibits fractal characteristics </li></ul><ul><li>Technical and fundamental analysts presume the existence of a limit circle attractor. It might exist but... </li></ul><ul><li>The path is unstable and the time scale unknown </li></ul>
  15. 15. <ul><li>1. Example </li></ul><ul><li>2. A Stock Market is a Complex Environment </li></ul><ul><li>3. Self-organization </li></ul><ul><li>4. Swarming and Schooling </li></ul>5. Detecting State Transitions 6. Results 7. Summary 8. Future Work <ul><li>Modelling a price path is hard and unsure </li></ul><ul><li>Knowledge of the (long term) past is not necessary when one knows to recognize a turning point </li></ul><ul><li>Knowledge of the current state is sufficient </li></ul><ul><li>Problem: how to detect a state transition? </li></ul>
  16. 16. <ul><li>1. Example </li></ul><ul><li>2. A Stock Market is a Complex Environment </li></ul><ul><li>3. Self-organization </li></ul><ul><li>4. Swarming and Schooling </li></ul>5. Detecting State Transitions 6. Results 7. Summary 8. Future Work -2  -1   1  2  13.6% 13.6% 34.1% 34.1% Normal distribution of the variance of the observations ( Gaussian noise ) Variance outside the normal distribution Variance outside the normal distribution
  17. 17. <ul><li>1. Example </li></ul><ul><li>2. A Stock Market is a Complex Environment </li></ul><ul><li>3. Self-organization </li></ul><ul><li>4. Swarming and Schooling </li></ul>5. Detecting State Transitions 6. Results 7. Summary 8. Future Work <ul><li>Gaussian noise stands for fluctuations with a probabilty density function of the normal distribution </li></ul><ul><li>The observed values should have a variance that is Gaussian distributed </li></ul><ul><li>Probability of error erf ( x ) gives the probability that a single sample from a random process with zero-mean and unit-variance Gaussian probability density function will be greater or equal to x </li></ul><ul><li>We assume that the variables are correlated ( schooling ). If they behave independently & random the covariance would be zero ( swarming ). </li></ul>
  18. 18. <ul><li>1. Example </li></ul><ul><li>2. A Stock Market is a Complex Environment </li></ul><ul><li>3. Self-organization </li></ul><ul><li>4. Swarming and Schooling </li></ul>5. Detecting State Transitions 6. Results 7. Summary 8. Future Work <ul><li>The autocorrelationcoefficient (ACF) measures the covariance of a set with size n at t with a set n +1at t +1 </li></ul><ul><li>The errorfunction erf ( x ) indicates the probabilty that the ACF belongs to a normally distributed population </li></ul><ul><li>ACF > erf ( x ) phase wave = 1 </li></ul><ul><li>ACF < 1- erf ( x ) phase wave = -1 </li></ul><ul><li>Transition point when phase wave changes sign </li></ul>
  19. 19. <ul><li>1. Example </li></ul><ul><li>2. A Stock Market is a Complex Environment </li></ul><ul><li>3. Self-organization </li></ul><ul><li>4. Swarming and Schooling </li></ul>5. Detecting State Transitions 6. Results 7. Summary 8. Future Work Simplified meta model
  20. 20. <ul><li>1. Example </li></ul><ul><li>2. A Stock Market is a Complex Environment </li></ul><ul><li>3. Self-organization </li></ul><ul><li>4. Swarming and Schooling </li></ul>5. Detecting State Transitions 6. Results 7. Summary 8. Future Work Real world phase transition wave
  21. 21. <ul><li>1. Example </li></ul><ul><li>2. A Stock Market is a Complex Environment </li></ul><ul><li>3. Self-organization </li></ul><ul><li>4. Swarming and Schooling </li></ul>5. Detecting State Transitions 6. Results 7. Summary 8. Future Work <ul><li>Random Harvester is a trading agent that uses phase transition indicators to buy and sell stock </li></ul><ul><li>Application of business rules: transaction costs, expiration of contracts... </li></ul><ul><li>Tested on real (historical) data, fed one by one without recalculation of past positions </li></ul>
  22. 22. <ul><li>1. Example </li></ul><ul><li>2. A Stock Market is a Complex Environment </li></ul><ul><li>3. Self-organization </li></ul><ul><li>4. Swarming and Schooling </li></ul>5. Detecting State Transitions 6. Results 7. Summary 8. Future Work
  23. 23. <ul><li>1. Example </li></ul><ul><li>2. A Stock Market is a Complex Environment </li></ul><ul><li>3. Self-organization </li></ul><ul><li>4. Swarming and Schooling </li></ul>5. Detecting State Transitions 6. Results 7. Summary 8. Future Work
  24. 24. <ul><li>1. Example </li></ul><ul><li>2. A Stock Market is a Complex Environment </li></ul><ul><li>3. Self-organization </li></ul><ul><li>4. Swarming and Schooling </li></ul>5. Detecting State Transitions 6. Results 7. Summary 8. Future Work
  25. 25. <ul><li>1. Example </li></ul><ul><li>2. A Stock Market is a Complex Environment </li></ul><ul><li>3. Self-organization </li></ul><ul><li>4. Swarming and Schooling </li></ul>5. Detecting State Transitions 6. Results 7. Summary 8. Future Work
  26. 26. 5. Detecting State Transitions 6. Results 7. Summary 8. Future Work 1. Example 2. A Stock Market is a Complex Environment 3. Self-organization 4. Swarming and Schooling
  27. 27. <ul><li>Randon Harvester worked on Arbed for a simulated period of three years </li></ul><ul><li>17 transactions were executed (one at a loss) </li></ul><ul><li>Accrued asset value: 5.100 - 3.979 = 1.121 </li></ul><ul><li>Harvested: 2.315 - 605 = 1.710 </li></ul><ul><li>Total return 2.831,- or 71% on the initial value </li></ul><ul><li>60% of the return is a contribution from Random Harvester </li></ul>1. Example 2. A Stock Market is a Complex Environment 3. Self-organization 4. Swarming and Schooling 5. Detecting State Transitions 6. Results 7. Summary 8. Future Work
  28. 28. <ul><li>1. Example </li></ul><ul><li>2. A Stock Market is a Complex Environment </li></ul><ul><li>3. Self-organization </li></ul><ul><li>4. Swarming and Schooling </li></ul>5. Detecting State Transitions 6. Results 7. Summary 8. Future Work <ul><li>The main problem with long term memory is information loss of the current state </li></ul><ul><li>Long intervals create an illusion of predictability </li></ul>
  29. 29. <ul><li>1. Example </li></ul><ul><li>2. A Stock Market is a Complex Environment </li></ul><ul><li>3. Self-organization </li></ul><ul><li>4. Swarming and Schooling </li></ul>5. Detecting State Transitions 6. Results 7. Summary 8. Future Work <ul><li>Action is induced by a phase transition (change) </li></ul><ul><li>Knowledge of the current state and an indication of imminent change is necessary - and often sufficient - to act </li></ul><ul><li>The need to model the full path is avoided </li></ul><ul><li>Preliminary results show strong track record </li></ul>
  30. 30. <ul><li>1. Example </li></ul><ul><li>2. A Stock Market is a Complex Environment </li></ul><ul><li>3. Self-organization </li></ul><ul><li>4. Swarming and Schooling </li></ul>5. Detecting State Transitions 6. Results 7. Summary 8. Future Work <ul><li>Live tests </li></ul><ul><li>Comparing with other trading agents under similar conditions </li></ul><ul><li>Generalize use to class of decision problems based on the current state </li></ul>
  31. 31. <ul><ul><li>... for the gods perceive future things, ordinary men things in the present, but wise men perceive things about to happen ... </li></ul></ul><ul><ul><li>Philostratus, Life of Apollonius of Tyana , VIII, 7 </li></ul></ul>
  32. 32. References W. B . Arthur, S. N. Durlauf and D . A. Lane, eds.1997. The Economy as an Evolving Complex System II . Addison-Wesley. Reading, Mass. P. Bak, M Paczuski and M. Shubik. 1996. Price Variations in a Stock Market with Many Agents. Working Paper for the Santa Fé Institute Economics Research Program, submitted to the Journal of Mathematical Economics . P. De Grauwe, H. Dewachter and M. Embrechts. 1993. Exchange Rate Theory , Blackwell, Oxford. J. L. Deneubourg, S. Goss, N. R. Franks, A.Sendova-Franks, C. Detrain and L. Chretien.1990. The Dynamics of Collective Sorting:Robot-like Ants and Ant-like Robots. In J-A Meyer and S. Wilson eds, Simulation of Adaptive Behaviour: from Animals to Animats , MIT Press, Cambridge, Mass. E.F. Fama and K.R. French. 1992. The Cross-Section of Expected Stock Returns. In the Journal of Finance , 2. K..R. French and R. Roll. 1986. Stock Return Variances, The Arrival of Information and the Reaction of Traders. In Journal of Financial Economics , 17. L. Harris. 1986. A Transaction Data Study of Weekly and Intradaily Patterns in Stock Returns. In Journal of Financial Economics , 16. A. W. Lo and A. C. MacKinlay 1999. A Non-Random Walk Down Wall Street . Princeton University Press, Princeton. B. Mandelbrot. 1966. Forecast of future prices, unbiased markets and martingale models. In The Journal of Business of the University of Chicago ,39 . B. Mandelbrot. 1998. Fractals and Scaling in Finance: Discontinuity, Concentration, Risk . Springer-verlag, New York. R.N. Mantegna and H.E. Stanley. 1995. Scaling Behavior in the Dynamics of an Economic Index. In Nature , 376. Hiro-Sato Niwa. 1994. Self-organizing Dynamic Model of Fish Schooling. In Journal of Theoretical Biology , 171. E. P. Peters. 1991. Chaos and Order in Capital Markets . J. Wiley and Son, New York. R. J. Schiller. 1984. Stock Prices and Social Dynamics In The Brookings Papers on Economic Activity , 2.

×