Patterns and aggregated data as basis for Hidden Markov Models and Bayesian networks

Discussion in 'Data Sets and Feeds' started by Gringinho, Apr 10, 2004.

  1. In answer to this silly article
    http://www.elitetrader.com/vb/showt...e=6&highlight=moving and average&pagenumber=1

    Yang on Moving Averages
    Astrikos is free this week so I cut and pasted something from there here that should interest many.

    Astrikos hardly ever has a free week, so it's definitely worth checking out. To get in the rest of the week the username is free and the password is pass.

    Cheers.

    By Rainsford Yang
    Wednesday, April 23rd 2003 9:00pm ET

    There's been a lot of press recently concerning the fact that the S&P500 has closed above its 200-day moving average, which sounds a lot more impressive than it really is. We've done extensive research on moving averages, and as far as the major stock market averages are concerned, a close above the 200-day moving average is absolutely meaningless. In fact, simple moving averages in general, except for the very short-term ones, should be disregarded in my opinion. Our studies clearly show that the best performing moving average (the 1-day average) isn't an average at all - it's simply today's close. If it's higher than yesterday's, the trend is up. If it's lower, the trend is down. This most basic of 'strategies' blew away all longer-term moving average strategies by a mile, as you'll see by the results of the studies below. And you can bet these results won't make it to the mainstream media anytime soon. No one would believe it.

    We're going to review three typical strategies for employing moving averages - the 'penetration', the 'crossover' and the 'slope' - beginning with a brief explanation of each strategy, and followed by a short list of the moving averages that produced the best returns in terms of buying and selling the S&P500. In every case, simple moving averages were used, and performance figures are based on the daily S&P500 close beginning in 1970 and finishing at the present.

    Moving Average Penetration
    This strategy goes long the market when the S&P500 closes above its X-period moving average (upside penetration), and goes short the market when the S&P closes below its X-period moving average (downside penetration).

    Best performing moving averages:
    2-day moving average: +54,859%
    3-day moving average: +46,038%
    4-day moving average: +10,371%
     
    #51     Apr 13, 2004
  2. And next time if you can't control yourself by exposing technical arguments than open your mouth for your insanity, go to the closets and do what you need to do before coming back ok ?

    BTW the site you like to refer to turtletrader.com is not a fraud and a liar perhaps ?
    http://www.elitetrader.com/vb/showthread.php?s=&threadid=31003
    <IMG SRC=http://www.originalturtles.org/images/pageheadings/scams.gif>
    denounced by the original turtles.
    This disqualifies you for being able to make a difference between a skilled marketing scam and real stuffs. The guy is said also to sell personality test: pretty sure you fit the personality he targets (or you are even the guy from the site : this would perfectly fit his scam personality ... )! Now pretty sure you will be freaking again after that so don't forget the closets :D

    As for me I will keep from being as little as yourself and just add that if you believe all Wall Street Marketing papers, I'm sorry I rather have a preference for Scientific American. Not the same kind of culture.

     
    #52     Apr 13, 2004
  3. See also
    http://www.elitetrader.com/vb/showthread.php?s=&postid=473194#post473194
    --------------------------------------------------------------------------------
    Quote from harrytrader:

    It's not so damned strange : this is well known by many and notably by pros since the origin of wall street: professionals intervene at near close and distribute at open to the public. Don't also forget the market is international. When Wall Street opens the european market is already open since several hours so has anticipated already much of the movement so that at Wall Street opening you can even have a gap up and then the "real" session which is just the second leg of global market movement. That's why it is often said that the market has two legs.

     
    #53     Apr 13, 2004
  4. abogdan

    abogdan

    So in your binary set all the variables have probability values attached to them, OK, still, could you give me an example of the pattern that you are talking about in a form of a definitive predicate? I'm not trying to be a "smart ass", I'm just trying to understand what the hell you are talking about. You could be as "mathematical" as you wish I will try to understand. Just relax, I'm not sarcastic or anything, I passed that a long time ago, I just want to learn.
    Have a good day, I heard its raining in your neck of the woods? :)
    Cheers,
     
    #54     Apr 13, 2004
  5. >I heard its raining in your neck of the woods?
    Hey I'm french and we don't have the equivalent : what does it mean :p

    I will come back to this thread this week end : my neuron (I have only one) doesn't like much do intellectual masturbation on normal days :D.

     
    #55     Apr 14, 2004
  6. This kind of question is a bit like some others where I answered to the question:
    http://www.elitetrader.com/vb/showthread.php?s=&threadid=30704
    "Are trades indepenent?
    In statistical view, each trade should be independent with one and other. But many people agree that you should reduce your bet when you had a series of losses. This statement seems to argue that trades are dependent. Which one is true?"


    "Yes and no but it's a bit long so I will explain this evening or next week-end or I will make it shorter than intended ."

    I have began to answer
    http://www.elitetrader.com/vb/showthread.php?s=&threadid=30704&perpage=6&pagenumber=6

    but to tell the truth I'm too lazy to continue although I have more much to say. People are most looking to comfort their OPINIONS than to really search for "truths" although truths are relative they are not SUBJECTIVE like many would like to pretend until even denying - for some extremists - that reality doesn't exist and is pure illusion: Reality is a fuzzy big Pattern and not easy to demonstrate that it really "exists" since Modern Philosophy like the Ancient still continues to debate it today :D.

    My philosophy is affiliated with Poincarré - I consider as the greatest Scientist of all time - that absolute doubt or skeptiscism is for easybrainer or more litterally he said in

    "Science and Hypothesis"
    http://spartan.ac.brocku.ca/~lward/Poincare/Poincare_1905_01.html

    "It was understood a hundred years ago by many men of science who dreamed of constructing the world with the aid of the smallest possible amount of material borrowed from experiment.
    But upon more mature reflection the position held by hypothesis was seen; it was recognised that it is as necessary to the experimenter as it is to the mathematician. And then the doubt arose if all these constructions are built on solid foundations. The conclusion was drawn that a breath would bring them to the ground. This sceptical attitude does not escape the charge of superficiality. To doubt everything or to believe everything are two equally convenient solutions; both dispense with the necessity of reflection."

    BTW, it is Henri Poincarré who first glimsed modern idea of "Chaos Theory" as it was called later:
    http://www-chaos.umd.edu/misc/poincare.html
    The ideas of dynamical chaos was first glimpsed by Poincaré when he entered a contest sponsored by the king of Sweden. One of the questions in this contest was to show rigorously that the solar system as modeled by Newton's equations is dynamically stable. The question was nothing more than a generalization of the famous three body problem, which was considered one of the most difficult problems in mathematical physics. In essence, the three body problem consists of nine simultaneous differential equations. The difficulty was in showing that a solution in terms of invariants converges. While Poincaré did not succeed in giving a complete solution, his work was so impressive that he was awarded the prize anyway. The distinguished Weierstrass, who was one of the judges, said, "this work cannot indeed be considered as furnishing the complete solution of the question proposed, but that it is nevertheless of such importance that its publication will inaugurate a new era in the history of celestial mechanics." A lively account of this event is given in Newton's Clock: Chaos in the Solar System.

    To show how visionary Poincaré was, it is perhaps best if he described the Hallmark of Chaos - sensitive dependence on initial conditions - in his own words:

    "If we knew exactly the laws of nature and the situation of the universe at the initial moment, we could predict exactly the situation of that same universe at a succeeding moment. but even if it were the case that the natural laws had no longer any secret for us, we could still only know the initial situation approximately. If that enabled us to predict the succeeding situation with the same approximation, that is all we require, and we should say that the phenomenon had been predicted, that it is governed by laws. But it is not always so; it may happen that small differences in the initial conditions produce very great ones in the final phenomena. A small error in the former will produce an enormous error in the latter. Prediction becomes impossible, and we have the fortuitous phenomenon. - in a 1903 essay "Science and Method""


     
    #56     Apr 14, 2004
  7. I need also to register the time of high and low using my new "journal dialect" (see http://www.elitetrader.com/vb/showthread.php?s=&threadid=30651) because as I know the price this can later provide me a more exact time as I have also a theorical time but didn't study the correlation between the theorical time and the physical time. So at the moment I know only approximately that is to say if the high will be made before the low or conversely.

    I also record intermediate highs and lows for calculating the precision of break zone (example with red ellipse below).

    For people who can't program the stuff I could put a simple database query engine that can extract all stats on the time criteria. It will be for the next site: as I said I'm going to retire my model from the current site as I don't want to offer it any more to the public so I will substitute the current contents by a mere portal ... of my financial bookmarks in fact :D. I can add such kind of statistics also (cleaned from datas specific to my model of course).

    <IMG SRC=http://www.elitetrader.com/vb/attachment.php?s=&postid=474970>

     
    #57     Apr 15, 2004
  8. Now I don't understand what formula you want since I gave an example of such formula of pattern definition with Pierre Lequeux Article, so that I will copy the precise screen part :
    <IMG SRC=http://www.elitetrader.com/vb/attachment.php?s=&postid=474979>


     
    #58     Apr 15, 2004
  9. This concerns time and if it is price it's just of the same kind except that with time the law is more complex than with price since it involved a not well known law which is arcsinus or persistency's law I talked in a thread once see "Arcsinus law: distinguishing trend from persistency of chance" http://www.elitetrader.com/vb/showthread.php?s=&threadid=22256&highlight=levy

    With price this is just classical random walk you studied at school (you know the classical problem asked by your professor of physics or mathematics when a guy who drank too much wine and make one step forward and then one step backward: what distance he would make on average and will he be able to probably join his home :D).

    The problem is not about formula the problem is about epistemology: understanding that the concept of a "true" pattern pertains to probability calculation as already exposed in the other thread:

    Quote from harrytrader:

    I agree with you as perceived correlation doesn't mean "true" correlation: if something is truly random walk then the perceived correlation is fake correlation wich is mathematically called "persistency" since at least the statistician Levy has established it's law: see the thread
    "Arcsinus law: distinguishing trend from persistency of chance "
    http://www.elitetrader.com/vb/showt...tency+and+trend

    And what is true for "perceived trend" is also true for "perceived pattern" which can be as fake pattern as fake trend above when it is in fact persistency, that is to say you will find trendline, head & shoulders, triangles etc (more or less other complicated perceived patterns)... even in a random generated price.

    So when I am talking of patterns I'm not talking about illusionary (only perceived) patterns but about true patterns. What true patterns mean OPERATIONALLY speaking ? It is about probability of predicting them in advance not only that they can occur but that they will occur at a precise level because if you only say they will be a trendline or triangle the probability will be high that it will be true even with random prices.

    The basic premisces of believing that there is no true pattern is logical: it is because there are so many market participants the stock market can only be random (even it is non-normal law so random is used here in the sense there is a probability law or universe) and so the patterns are illusionary. For example if you see a trendline or a triangle pattern occurs well it could occur by random at any price. But what if it occurs at a level that you can predict before the pattern even appears ? Then maybe it is not random because you can estimate the probability of making such a prediction by randomness: it is very low (again whatever probability distribution you would assume normal or not the order of the probability will stay low) and above all if your prediction is repeatable with the same accuracy then you can apply Bayes law of compounding probability and the probability will be very very very low so that it will requires more than the age of Universe to realise all the predictions just by random.

     
    #59     Apr 15, 2004
  10. HarryTrader,
    I honestly must say that the reaches of your knowledge continues to amaze me every day. Thanks for posting a lot of interesting stuff.
    ;-)
     
    #60     Apr 15, 2004