Trading Simulator

Discussion in 'Index Futures' started by aphexcoil, Sep 5, 2002.

  1. DeepHindsight,

    Sorry it took so long to reply. Yes, you are correct -- I will be setting it up to buy on ask and sell on bid.

    Personally, I never understood why some traders will try so hard to buy on the bid and sell on the ask. From my observations with futures trading, the E-minis are so liquid that if you sit on bid and get filled, the spread may just as well go down and then you're really just buying at the ask of a lower spread -- but more importantly, if you screw up your strategy over a quarter point, that just doesn't make sense to me.

    Why worry about nickels when you're shooting for dollars? If I want to get into the market, I want in now. I might not put a market order in for a stock, but I have heard that it is all fair-game in the future's market -- which means using market orders isn't a bad thing when you want in or want out NOW.

    The only time I could see trying to get that .25 point is when you are scalping, in which case the rules are entirely different.

    It is all really very complicated, because there are so many variables to consider at each millisecond of the trading day.

    * What is the price?
    * What is the price relative to the last X periods?
    * What percentage from the mean is the price from the last X periods?
    * Where is the pressure (buying or selling)
    * Volume?
    * Other Indicators?
    * Moving Averages

    I am currently working on a moving average that doesn't look at tick data, but takes 10 snapshots of the market each second and whatever price it captures gets recorded into an array. That array then gets processed by a set variable (let's say 1000 units for 100 seconds of market data) and spits out the average for that period. The benefit of this is that a price will carry more weight the longer it remains the last agreed upon price by the market.

    I was looking over the material on Jurik Research's website about their JMA moving average -- which is apparently the best moving average currently to date. Apparently it is a non-linear moving average that uses statistical analysis on standard deviation and perhaps other things as well (wavelets, brownian motion, etc). This moving average apparently is self-adaptive to changes in market behavior.

    Even after all of that is complete, I still have to find a way to translate that "edge" into a program that can trade off the information far faster than I could.

    I'm just a little amazed at how complicated some of these theories are -- (random walk, guassian motion, fast fourier transforms, etc).

    aphie
     
    #11     Sep 6, 2002
  2. Excellent point. Missing trades in mechanical systems is just plain stupid.

    Interesting concept.

    Complicated != better.
     
    #12     Sep 7, 2002
  3. DeepHindsight,

    I agree. Complicated equals worse. However, if I can come up with a better moving average than what is out there (which would be complicated) and apply its use in a simple system, then I think that is different.

    We shall see. :confused:

    aphie
     
    #13     Sep 7, 2002
  4. echo

    echo

    I wouldn't say complicated automatically equals worse. I prefer simple in general, but some things in life are complicated. Aren't they? Of course, I don't think there is any form of moving average that will provide magic when compared to another. They are guides, not rules. Just my two cents.
     
    #14     Sep 7, 2002
  5. Not to say complicated can not work (just look at Prediction Company). But it definitely takes time and resources.
     
    #15     Sep 7, 2002
  6. Echo,

    You bring up an interesting point. From my discovery process (and it is by no means complete at this stage), I have found moving averages to be among the best indicators to make exit and entry decisions.

    After studying many various types of moving averages, the one that has appealed most to me is the JMA moving average (Jurik). He states that his moving average is a non-linear adaptive moving average that compensates for "noise" as well as having a phase adjustment.

    You could view any moving average of around 5-10 MA and notice that, if you could shift that moving average more to the left of the graph and still keep it current, you would have almost perfect entry and exit signals.

    Obviously, such a MA could never exist (Heisenberg's Uncertainty Principle), however you can develop ways to speed up a Moving Average without suffering from increases in false signals.

    After reviewing a lot of market data on a tick by tick basis, I have concluded that the S&P ES movement often has a very underlying strong price trend that is often masked by excessive noise. This noise follows a lot of standard laws of guassian and chaotic mathematics -- however, an adaptive strategy to a moving average would help alleviate and filter out much of this noise while also revealing the underlying price trend at any one point.

    The problem is often that a trend will have many divergences of various magnitudes. The issues lie with understand which of these divergences are true divergences and which are merely the signal that the trend has ended.

    I believe that, on a micro-level of price analysis via encoding a system that samples agreed-upon market price many times per second and filtering information that strays too far from the X-unit standard deviation, much of the noise can be eliminated and, in turn, a truer representation of the underlying trend can be made more apparent.

    Obviously an MA is a simple tool to base trading decisions off of, but that doesn't necessarily mean that it would not be prudent to explore more advanced methods for moving averages and then still applying this simple system to trading.

    Many of your TA indicators are simple to use, yet are complex in their mathematics. We understand what a stochastic is and how it is used, but computing that stochastic can be complicated. So, in essence, each of the TA indicators is really a "black box" where we don't concern ourselves with how they operate vis-a-vis with price-movements -- we only concern ourselves with understanding when they give a proper signal for entry and exit.

    The ideal system would encompass a set of signals that allow a trader to ride the major portions of the trend and give clear signals as to when that trend is concluding.

    The market, at least index markets, appear to operate under various levels of "harmonics" that exist over many X-periods of time. Without external influence (interest rates never rising, Greenspan never getting older, wars never starting or ending), these harmonics would eventually phase themselves and the markets would stagnate. Periods of overshooting and undershooting would lessen with each oscillation and, given enough time, a very flat market would ensue.

    However, this is not a good model of the real world, where the discovery of Greenspan using a new brand of toothpaste could affect the ES by a few points. These external events constantly hit the index-futures market and set forth stronger oscillations.

    Sometimes these various harmonics can amplify themselves and cause quick movements, and other times they may simply nullify each other. Imagine a kid on a swing and you want to push that kid so that he swings faster. There are points within the motion that would be most advantageous to use when amplifying their effects to create greater motion. Likewise, there are other moments when you would not want to "push the swing."

    However, in the market, you do not have just one swing or oscillation, but many superimposed on each other.

    The trick is to understand how the market has memory, how it tends to repeat itself when certain patterns develop and how to use the most basic of trading systems with solid discipline when trading them.

    aphie
     
    #16     Sep 7, 2002
  7. It's a signal! ;-)




    Agreed. That's all there is. I think trading is not rocket science, but rather about people and emotion. Although I understood the posting, I do not think that complex mathematical theories and models are the way to go.
    If you develop an edge by a more sophisticated MA or some other stuff, that is great and quite possible. But you do not have to be that smart to trade successfully.
    I would rather have the mindset of an old monk than the mind of an academic.
     
    #17     Sep 7, 2002
  8. Captain Future,

    I'd rather hit the multi-state lotto tonight.

    :p

    aphie
     
    #18     Sep 7, 2002
  9. Aphexcoil,

    If you're playing around with these types of indicators, then give some thought to an indicator that measures the volume of contracts sold at the bid minus volume bought at the ask. This to my way of thinking is the only effective (non lagging) indicator you can ever build. It is actually a forward indicator.

    Large turnover of contracts at the bid will indicate the markets is likely to break down. Large turnover of contacts at the ask will indicate the market is likely to rally.

    For example, if 3000 of the last 500 traded contracts went through at the bid and only 2000 went through at the ask, the market is likely to continue to fall until an equilibrium is achieved.

    You can build a series of non lagging oscillators that simply take a measure for the last X number of contracts sold minus bought in a given timeframe. You get a maximum +100% on the long side and a maximum -100% on the short side. For example a short term oscillator would be the last 10,000 contracts traded, a medium term could be the last 100,000 contracts and a long term would be the last 1,000,000 contracts.

    Each of the three calculations can be combined so that you only take long trades when all three are well above there 0% or equilibrium signal line or short trades when all three are well below their signal line.

    I have played around with this type of indicator and it is simply the best type of indicator you can create, because it actually shows you changes in market direction before the price does.

    You can even use this type of data to build a highly responsive mechanical system.

    Good luck.

    Runningbear
     
    #19     Sep 8, 2002
  10. Runningbear,

    Great post! That is an excellent idea and one that I definately will pursue.

    Have you ever noticed a divergence between price levels going one direction while volume of bid hitting ask or vice-versa was suggesting something else?

    I bet this is probably one of the best indicators you could use. I will program it.

    Thanks for the suggestion.

    aphie
     
    #20     Sep 8, 2002