No announcement yet.

Trading systems design.

  • Filter
  • Time
  • Show
Clear All
new posts

  • Trading systems design.

    Trading systems design.

    New series

    By popular demand from readers, ADT is starting a new series dedicated to trading systems - their design, development and subsequent application for real-time work.

    The series will begin with the essential essential principles, and gradually it will become more meaningful. However, even in the first articles there is a significant amount of practical and theoretical information, which, I hope, will be useful to traders with different experience: both those who develop conventional trading systems and those who do not seek to use such systems.

    Some readers are interested in very well known and proven technologies, and we hope to discuss some of them in a later issue. By the way, my good advice to those who are improving in trading systems is this: send the results of your experience in ADT in the form of articles, the best of which we can publish. This will provide an opportunity for a wider audience to discuss the pros and cons of your system, rather than relying only on reading ADT material, and welcome any feedback to free the magazine from bias.

    The series will begin with the publication of the basic principles and will end with a discussion of some of the details of the development of trading systems. Traders not using the system should not despair, however. Many concepts are equally important to your trading, and therefore will interest you in the reading. In conclusion, a few words about the language. Often many traders - and even trading consultants - use the word "system" to any approach and you don't understand why. Trading after the RSI peak, or using pivot points, is not a “system” but a “method”. Based on this, the “system” assumes a set of clear rules that, in fact, relieve the trader from the need to interpret the signals. This series is about building proper mechanical systems rather than applying a slick method.

  • #2
    Basic principles
    "The development of the trading system is 10% inspiration and 90% pot."
    Sunny harris

    When settlement chips were invented, some might have imagined it would be a bonanza for casinos, thanks to the simpletons who learned the rules and started gambling without perfecting their skills. In my opinion, the trading system is kind of like a beast. Widespread computerization has dramatically improved the working environment for all traders. A decade ago, most traders did not have the opportunity to do anything significant with these incredibly old screens for Reuters and Telerate messages. Today, traders can take streams of data, combine them, isolate individual images or merge them together, and manage a surprisingly complex quest for something that is far from the Holy Grail, but can promise serious profits over the long term. However, like all great innovations, the trading system contains many different pitfalls.

    The first question we are asked is whether you should build your own system or buy a black box system (The term is used to describe a trading system that was created and tested by an independent vendor. , let's highlight the problem of fitting (The flaw in a trading system lies in its ability to show the best results on the data on which it was tested. Thus, such systems will give excellent signals on historical data, but they will not necessarily generate useful signals for trading in the future. This is common to black box systems, which often result in a significant financial loss after a relatively short trading period), and many black box systems are often not robust in long term use. is it unfair to say that but most did not achieve this) from the archive.

    While many such systems show that they “make money” for a long time, most systems do not. Indeed, many tend to manage only black boxes, especially those that perform extremely well on historical data. But such systems lack fit, work well for past market conditions, and are unable to predict future events.

    Another issue for black box systems is the issue of trust. Traders using systems really need to have confidence in their particular systems approach in order to maintain order over time. If you simply follow the instructions of a program that you do not know the benefits of, then it will be difficult for you to maintain faith in it, especially when fortune inevitably turns away from you.

    Those who decide to spend their money on buying black box systems are advised not to strain too much and just mail a check to the editor, ADT will take care of everything. After 6 months, I will use a random number generator to give you back some of the original funds (minus commissions, of course). I can confidently guarantee that this return will be much larger than the loss that many black box systems will accrue!

    This series of articles aims to provide a broad overview of the most popular aspects of the trading system. She will also try to give both inexperienced and experienced system builders some help on the way to its final version.

    Of course, this begs the question: "What is the final version of the system?" The most vital starting prescription for all traders is to create a system that works for you. In other words, the system should be what is objectively appropriate for your invested capital. On this basis, the concept of a strictly business plan - as has often been discussed in previous issues of the ADT (here, for example) - is as important as the creation of a trading system. When we start working on a trading system, we have one significant goal, which is based on the creation of a long-lasting, profitable mechanism. The program, in the well-known language of system traders, must be robust. In other words, being able to withstand the market is like fighting a violent storm on a nimble racing yacht. Not robust systems are doomed to fail in a series of different market conditions. What we are looking for is a system that will handle all market seasons and directions and, preferably, will be profitable anyway. Therefore, the need for a strong system is the only reality that unites all system creators. As for others, they will depend only on individual circumstances. We can, however, simply define them as follows:
    • Available funds
    • Psychological aspects
    • Exodus of expectations
    • Ongoing support
    • System needs


    • #3
      Available funds

      Professional traders working in institutions have come to the conclusion that either they will achieve their goal only through the trading system, or if they break their limits into systematic and unsystematic parts. In my experience, many bank traders tie a small portion of their trading limits to the “follow the trend” system. They use this permanent profit generator over a longer time frame than intraday, in part as a good way to manage the long term, while focusing on trading short time frames themselves. Equally, institution traders often have the opportunity to trade in multiple markets. The most important thing here is to decide whether your goal is to create a model that reflects the specifics of one market, or a broader conceptual model that can be applied to different markets.

      In relation to private clients-investors, the situation will be even simpler. It is essential that you will be limited in the time and size of your trading account. As for timing: don't be fooled. If you are busy all day and completely absorbed in your work, then you will not be able to trade on an intraday basis. I have come across workers who monitored their positions with a pager hidden under the clothing. But besides the risk of losing your job, there is also the problem that constant “spasms” below the diaphragm can be quite like your belly's reaction to a fair amount of crab sticks. Instead of trading on an intraday time frame, work on a daily - or maybe weekly - system that requires weak support and you can check your position every time you go home.

      In addition, if you are on a limited budget, do not delude yourself that you will be lucky. You will not be able to successfully trade the system with $ 25,000 if the maximum historically known use of credit 10% credit Maximum credit utilization is a very important aspect of evaluating a consultant or trading system as it indicates the degree of volatility. Intraday credit utilization shows how much the system / trader is losing in one session. This metric can also be a useful indicator of volatility / risk. your game) is 40,000.

      And a few thoughts for those fanatics, system builders who want to quit their job and trade all the time. Remember that you consistently received X dollars in annual salary, including all these additional benefits. Trading systems are 365 days of business a year, seven days a week, and you have to “make money” not only for your salary, but also cover the many costs associated with your pension contributions, health insurance, and so on. And please do not quit your job on the basis that you have a system that has been well tested for endurance. In fact, systems rarely, or even never, behave as they do when tested for endurance (an aspect that we will look at in detail in a later article).


      • #4
        Psychological aspects

        It is vital to be aware of your own intellectual abilities and limitations - otherwise, you will create a system that will not suit you at all. There is no right or wrong personality type, but different types. But, if you have designed a very unstable system that often gives a wide spread in profit - if you want to save your capital, while ensuring low risk with increasing returns - then such a system is not suitable for you.

        If you are trading to heighten your emotions, then none of this is for you. By working with the system, you will not feel a nervous tremor when making your own decisions. This is not intended. On the other hand, it can help you stock up on more dollars - and remember, having an interesting life isn't just about good trading. The system is needed to automate your decisions and make your trading signals more reliable. It should reduce the number of errors in your analysis by automating the calculation of trading levels. If you only want the thrill, get out of the trade.

        If you enjoy composing your own analysis and putting your thoughts into action, then maybe the trading system is not for you. However, if you often feel like you are a victim of paralysis, then the system can be a good way to believe in your ideas and really help you start trading effectively.


        • #5
          Exodus of expectations

          If you plan a system that will do you 1000% regularly all year round, then you might as well sit on the roof and bark at the moon. This is what is left for you to do.

          Think of the article by Campbell Gorrie, who remarked that if you manage to make 20% annually for 20 years, then put your name prominently in the book on economics and investing. Systems are capable of generating large revenues, but they cannot work miracles. Expect a reasonable income from your system.

          Ongoing support

          All systems need some support, so your plan should also include how much time you can spend thinking about improving the quality of your trading system.

          System needs

          This again has to do with psychological criteria in which you can anticipate specific needs when planning your system. If you are creditworthy, you can limit your use of credit to any percentage - usually those systems that are created to manage money, this limit is 10 or 20%. Another might discard any system with a long history of losing trades — say 10 or more in a row. It is more a reflection of the psychology of a trader who wants to use the system than anything else. Otherwise, when the period comes when the loan is spent, you will probably lose confidence in the system and discard it before it rehabilitates itself. If you put in such criteria, then stick to them - or a system that fails to meet your needs will ruin you.

          Having completed a detailed plan of what you want to achieve, in the next section we will look at the boring requirements for building the software for a trading system.


          • #6
            Designing your own system

            One saying that fits very well when looking at the process of building trading systems is: "Those who do not know history are doomed to repeat it." The creation of a mechanical trading system proves the possibility that it is possible to learn from history in a way that allows us to use this knowledge in the future. But you must constantly keep in mind and avoid overestimating the fit of your trading system on historical data. We will deal with the complex data problem and the fitting problem in more detail in a future strength-testing article on historical data.

            There are 7 main elements worth considering when designing a mechanical trading system:
            • Targeting the trading system
            • Filtration technologies
            • Market entry positions
            • Initial risk management
            • Protective brake lights
            • Market exit positions
            • Methodology for opening a position "catch-up" or in the opposite direction


            • #7
              Targeting the trading system

              There are 3 essential types of systems that can be recommended for trading:

              Trend Following: In this case, we need a system to distinguish whether the market is moving up, down, or sideways. This can be achieved with a simple rule, or using a few rules to determine the direction of the trend.

              Breakout of resistance or support levels: Systems that follow the direction of the breakout after a trend change or after a sideways trend.

              Price Corridor: A system designed specifically to make a profit during periods when the market is in a price range.

              Many professional institution traders - especially layout makers or short-term traders on the other hand - have a series of systems reflecting each of these areas in order to profit from trading the market under any condition.

              Filtration technologies

              The simplest filters take measures to exclude a signal to trade if the trend or some other factors are not favorable enough. At a higher level, filtering can include rejecting trades or choosing between signals in favor of the strongest. The main purpose of simple filters is to filter out and reduce the number of false signals as much as possible. Commonly known filters of trading systems are technical analysis indicators such as the strength index (RSI), volume, and stochastics.

              Market entry positions

              The rules should be unambiguous mathematical signals that leave no room for the imagination of people.

              Initial risk management

              It can be done with a fixed amount of cash or with a means such as a fixed percentage of initial capital, responses to volatility, and so on. This is discussed in more detail in the next section of this series.

              Protective brake lights

              In principle, this is easy to understand, we will look at them in detail in the next section.

              Market exit position

              This can be simple when one or more stop signals have been triggered, a special target has been reached, or the leading trend has changed.


              • #8
                Methodology for opening a position "catch-up" or in the opposite direction

                Some systems - such as those that use simple moving averages - can involve the trader in the market all the time. A sell signal is both a reversal of any long position and an order to open a short position. Alternatively, many advanced systems often use the catch-up method of opening positions after one position is closed. Without waiting for the trend change, the system encourages the trader to re-engage in trading in the market in the same direction as in the previous triggered deal, as soon as a suitable signal arrives.

                The simplest pitfalls of trading system design are not very difficult to identify. The first and most important is the scope of the rules that make up the trading model. Many system builders have noticed that all the content of a good system can fit on the back of a postage stamp. The 20 pages of formulas are often a fit of a good back story trading system. Thus, the KISS principle (store is just silly, cut off all unnecessary) should be fully applied when designing your system.

                Second, filtering - while being a big advantage - can also get confusing. Some traders keep additional filters until the system becomes cluttered. The point to keep in mind here is that while we want to try to filter out as many inaccuracies as possible, eliminating all losing trades is simply not possible. Adding a large number of filters will reduce the number of valid trades and, as a result, testing trading systems will be extremely difficult. As a rule of thumb, many system builders do not like to apply more than 5 filters. When observing the actual execution of trading signals, one significant factor is the assessment of liquidity. Most experienced trading system builders only consider markets that have been active for at least a year (but usually more than 18 months). However, this is not enough time to gather enough data to properly test the backstory, which we will discuss in a future article. Similarly, it is not an important principle, if the liquidity indicators are at the absolute minimum, do not trade on the foreign exchange market, which has a volume of less than 5 lots per day and an open interest below 20,000 contracts.

                Many trading systems are triggered at the close of the market. So, while a system based on software packages (such as Tradestation and Metastock) often allows you to enter the market at the close of the trade, you need to consider whether you will actually receive a signal from your system before the market will close. If not, then you will be able to trade until the opening level of the next trading session appears - which may start at a price significantly different from the original entry point to the market.

                While it may be possible to create a filter that provides a signal based on the close before the actual close of the market, it will probably only be executed within the volume that has occurred in the last few minutes. Some trading systems traders, for example, think that they can sell, say, thousands of almost full execution copper contracts at the closing price of the LME (London Metal Exchange). In reality, they are more likely to change the price very strongly and, in any case, their entire order will not be executed. Also, those who think that the trading system can give a signal to close a position at a price higher than the actual closing price of the market should be very careful. The volume of their trades can change the closing price and thus act against their own signals.


                • #9
                  As you consider end-of-day questions, remember that it is not easy to pinpoint exactly when the OTC markets close. True, the London FOREX market seems to work until about 4 pm most days, but there is no limited specific opening time. Thus, OTC traders need to identify a specific point that can “get status” as a close, even if that close can take an entire hour of trading, during which dealers usually close positions. This approach, therefore, makes it entirely possible to include concepts such as open and close when considering liquid OTC markets - but you will be forced to use refined definitions that may be associated with a longer than 2 minute closing period of the markets trading currency.

                  Likewise, when you want to check, after a few hours of sessions, whether the accumulated data is displayed on the daily charts. The actual market high or low price may differ significantly from the price levels shown on some bar charts as they were plotted several hours later. And is this the close of the main session of the day, or has the trade continued?

                  The general idea of ​​the basis on which a signal to trade should be given deserves further consideration. For example, is such a base the point where, say, the moving average touches the price level (or another line)? Or, is it necessary to test the level breakout for strength before issuing a trade signal? Many long-term traders, wanting to weed out some unwanted trades, prefer to take 2 full days after the initial signal to trade before opening a position. Take all of these considerations into account early on in building your system and adapt them to suit your own trading mentality.

                  We'll cover more substantive trading system ideas in future articles, but we need your help to make them as easy to digest as possible. Fully relying on the people working at ADT to have ideas, we would also appreciate it if as many readers as possible could provide feedback on this (and related to this matter, any other) subject. As a result, we will have a more complete exchange of opinions about the market, which you will probably find useful.

                  In conclusion, remember one outstanding truth that would have been confirmed by many experienced trading system creators. The final version of your system should be simple enough for non-traders to understand. Now, don’t say, one day your system will be created, and you must make your grandmother responsible for executing the signals. Rather, your grandmother should understand the methodology of your systematic approach to trading, whether or not you use her entrepreneurial skills.

                  Does she know a lot of trading stop signal systems?


                  • #10
                    Stop - signals and systems

                    “… Of the two, trading systems and money management, money management is much more important in your activities as a trader or fund manager” Ralph Vince

                    When considering the issue of stop signals, there are a number of different concepts that can be applied either individually or in series within a trading system. Of course, as previously discussed in the ADT (just try putting “stops” into our research machine!) The complete placement of stoplights is controversial. While a necessary factor in preventing bankruptcy, they nevertheless have the ability to reverse transactions that could be good or bad. And they often do damage when the opportunity arises.

                    The most popular stop signals used by the creators of trading systems:
                    • Initial stop: A signal related to the initial entry level - this can be a percentage or a fixed amount of currency in circulation.
                    • Trailing stop: Closing a position when a predetermined amount of current profit is lost, ie the stop signal follows the market when the profit increases - it can also be a percentage or dollar amount.
                    • Profit target: This stop signal closes the position when a certain amount of profit is reached.
                    • Breakeven: Allows the user to determine the current profit level, and when the market surpasses this level, the position opening price becomes a stop signal to exit. I have often included this type of stop signal in my systems as it suits my trading style. I love the stress-relieving feeling that comes from realizing that I have reduced the chance of risk to near zero (see below) early in the trade.
                    • Inactivity / Time Stops: I covered the concept of timed stoplights in a previous article. Essentially, this type of stop signal is triggered when the market fails to provide a certain percentage of return towards an open position during a designated period.
                    • Once again, the application of stop signals is appropriate for the type of trader. System veteran Larry Williams prefers, for example, that many traders, private clients, set as minimum, relatively large, fixed dollar stop signals - around USD 2,500 in S & P500, 1,250 in IMM currencies and 1,000 in T-bond futures.


                    • #11
                      When thinking about your stoplight policy, you need to decide whether to use hard stoplights (say $ 1,000 or less), averaging to $ 5,000, or really big stoplights above that level. Remember, however, one pitfall that gets in the way of testing hard stop signals that comes with using daily data. If only daily data is available. The program must make assumptions about market events. It cannot, for example, determine whether the market made its minimum or maximum price before / after you entered it, if only the price range for each day is known. In other words, if your stop signal is 10 pips away from your entry level and the daily range is 25 pips or more on average, the system will automatically “close” you - even if the market does move in your direction since execution.

                      Thus, if your stoplights are very tight, you need intraday data to accurately test the system, even if your time frame is several days. Interestingly, some traders, while testing huge amounts of data, find that a stop signal, even one point from the market price, will often generate good results over a long period. This is because the best trades are often profitable almost immediately (for example, on breakouts). Remember, however, that you need to test such systems on a large amount of data to get significant results of any kind. It may take 500 or more trades to complete a total of 20 profitable trades. In reality, many traders / employers / investors do not have the patience to wait until such a trading system, which pleases only “after rain on Thursday,” starts making money.


                      • #12
                        There are 2 types of systems, self-correcting (This term is used to describe a trading system that gives signals to buy and sell. This means that even without money management rules, the system itself will change the direction of the position and save traders from losing trades. less, traders still apply money management rules in this system. robust) (This term is used to describe a trading system that has shown robustness when faced with various market influences. In other words, a system that does not tend to fall apart when price volatility unexpectedly rises or falls.) and does not self-correcting. A variety of self-correcting systems provide signals for both buy and sell, which, in turn, help correct an unsuccessful stop light position when the system corrects your position with a reversal signal from the previous direction. This operation, however, can be time consuming and expensive. This is why, although not strictly speaking only for this reason, initial stop signals (with other money management approaches) are especially applicable to this type of trading system. On the other hand, non-self-correcting systems are an unsecured firing gun. Oriented to act in only one direction, they can be a source of potentially unlimited losses. Such a trading system could, for example, generate a long signal, thereby proving the early stages of a bear market without further hinting that you should be selling. The results could be disastrous! Therefore, a sensitive stop-loss policy is imperative to make non-self-correcting systems robust enough for real-time trading.

                        In terms of how far away your original stop should be, a good yardstick might be to measure the latest market activity and then place the stop according to that. For example, some traders may prefer to use a stop signal that is located just past the extreme level of the last 14 days. In long-term trading, 20 or 40 days may be preferable. Another volatility-based approach looks at the average daily price range of, say, the last 10 days, and then places a stop at a level that is 10 times that range. The exact numbers will, of course, depend on the funds at your disposal, the degree of risk you therefore want to take and the volume of your trades. The reason some traders use large stop signals, such as these, is because the larger the stop signal, the less impact it will have on the original rules of the system.

                        Of course, if you want a confident, “hot” method to win 90% of the time, then design your system using a small profit target and a massive original stop. The profit cap is $ 100, the risk is 1500, and you will soon have a system that probably “makes money” 90% of the time, but gradually makes you bankrupt. (You think that no one really does this, but I can remember a client, an employee of a leading brokerage commission, whose orders were always in agreement with the instruction that the position is good when the profit target is up to 10 pips or unlimited stop loss ...) This is just one of the important items that many people overlook when trading. The best dealers in the world can only “make money” in 4 out of 10 trades, while some of the worst traders on the planet “make money” in 8 or 9 out of 10 trades. The system is designed to maximize profits over the number of correct trades. The latter may be good for satisfying our own ego, but the former is in line with our bank accounts.

                        Also, Tushar Chande in his article "Beyond Technical Analysis" noticed the effect of small losses based simply on probability theory. For example, take a complex market trading system with an average probability of 35% winning trades. from each other, the probability of ten “successfully lost” trades in a row is 0.65 to the power of 10, that is, approximately 13 times per 1000 attempts. then you will probably lose with a 20% drop in credit about 13 times in 1000 attempts.


                        • #13
                          You will be surprised, but it is very important to remember that the less we lose in case of losses, the easier it will be for us to refund the money. Consider the following table:

                          Capital loss (%) Profit required to reimburse capital
                          5 5.3
                          10 11.1
                          15 17.6
                          20 25.0
                          25 33.3
                          30 42.9
                          35 53.8
                          40 66.7
                          45 81.8
                          50 100.0
                          55 122.0
                          60 150.0
                          Remember that consecutive losses are not just possible, but ultimately happen at times over the course of several trades in a row. However, when this happens, it is important to have enough faith in your system to continue to follow its advice. Murphy's Law states that this “test of trust” will come sooner rather than later when the system is already in use for trading. Thus, this is not just a warning against the use of black box systems, but also a further encouragement to do as much work as possible to develop faith in one's own system.

                          Another concept that we must introduce here is the concept of sliding (The price range at which the execution of the client's order deviates from the level at which the order was issued. the slip would be 3 pips (or the equivalent amount of cash) This is an essential element in the design of the system, as numerous traders believe their brokers have the superhuman ability to execute stop orders indefinitely at the price they were placed at. is by no means intended to discredit brokers. Rather, traders should take a more realistic approach so that stop signals can be executed in an active market. For Italian government bonds or other volatile long-term instruments, I would always envisage at least least 3 or probably more than 5 points of slip for each op tear to feel protected.

                          Likewise, evaluate your brokerage commission levels logically. Yes, you can have a contract with your broker where you pay commissions based on the volume of the trade. But for the sake of your system's reliability, please set your brokerage commission level to the highest rate you would normally pay.

                          Tushar Chande is one of the many preeminent system builders who advises using stop limit signals that are not significantly different from simple money management tools with fixed loss levels. It protects stoplights that are themselves created by system design and market volatility. Chande protects a fixed stop loss at 2% of the margin and then adds a Maximum Adverse Execution (MAE stop) stop to it. MAE is a mathematical function that determines the largest loss on a series of trades and then adjusts the dollar value of the stop signal. An interesting twist, Chande also advises combining volatility measures into the calculation of the number of trading contracts, bringing money management, volatility and MAE into the trading process all at once.

                          [Regular readers will of course already be aware of many of these ideas - thanks to an excellent series of articles by Arthur Rabatin.]

                          Of course, it's great to have an approach to money management that works well, but here's how Ralph Vince expresses his opinion on market reality, which is equivalent to his opinion at the beginning of the section (see the quote to the section “Stop Signals and Systems”):


                          • #14

                            For starters, among the many dangers of data selection is the issue of data integrity. You always want data that comes from a good, high-quality source - and many providers differ in the accuracy of their data, the depth of coverage, and how they are presented. For example, suppliers use many methods to calculate the opening of markets for sure. In the future, the exchange will usually normally (but always not) determine this.

                            Likewise, investigate how data sources correct their prices if an error is found. Some ignore this and pass, others carefully remove the error. The third group leaves it to the broker to make the change (at least allows you to modify the data).

                            I cannot stress enough the point where the quality of your data matters. You must ensure that the quality of the data is as high as possible - otherwise you can easily end up building a system based on unhelpful prices. Remember, in a poor data system, it creates a negative 'garbage in, garbage' cycle. Theoretical results in the system during the testing phase can be worse than useless if they come from poor data. In fact, they can be clearly dangerous.

                            When we turn to contracts of the future, the first problem is how to solve the Rollover period.

                            (Rollover. This is the movement of a position from one expiring date to another that is further in time. Once the month of the front side reaches its expiration, traders wishing to maintain their positions move them to the next contract month by simultaneously selling one and acquiring the other.)

                            Each contract is traded for a relatively limited period (usually no more than 3 months) so 'front month' contracts are the most liquid. This is the most liquid contract and is therefore the contract we want to trade - and test our system on. The problem is that as one contract gets close to expiration and the other month is already (effectively) a front month, there is almost invariably a difference in rollover prices.

                            In the case of interest rate contracts, this can be very variable and sometimes quite critical. Pricing in a stock index future is often robust, thanks to the inherent cash / future relationship. However, the risk of losing money in the rollover process is greater for any future contract. It can be very difficult to come up with an equation within the model.

                            Each of the three main schools invented in working with rollover periods has corresponding advantages and disadvantages:

                            Simple use of the actual data will give you tons of short period charts. You could have, for example, 40 separate contracts for a 10 year period, which is very partial for testing with PC software.

                            It could also mean that you get retired from positions when you least want it, as can be the case if you returned to a direction that continues after the rollover. So, you also need to develop a method for scrolling through your positions, or have a secondary re-entry system for the market if appropriate.


                            • #15
                              The problem of a separate chart can be partially overcome by drawing up a continuous contract using actual prices. This involves drawing one contract per expiry (or a pre-defined rollover point), then drawing the next contract on the same diagram on your expiry (or a point before what you defined), and so on.

                              This is a good choice as far as it will allow you to test systems using accurate rather than authoritative data. This can nevertheless result in major dramatic changes due to payments or discounts that exist between contract months and therefore be a true stop-start in nature.

                              So there can be a whole series of complex rollover situations that must be corrected in the final results of the system.

                              It is undoubtedly due to such problems that the third continuous contract using the adjusted price method has developed.

                              In Beyond Technical Analysis, Chande offers one method. This involves melding together prices from both the current leading month and the next contract, but keeping the amount of price movements the same as a percentage. The end result is thus mostly complex data, but price movements keep the same integrity.

                              ADT often uses Proview data in its articles and this company produces continuous data in the form of three monthly forward charts. It does so by getting the price for a 3 month date by direct interpolation between the prices of each of the two parties to the contracts of that date.

                              None of these routes are perfect, by any means, but we are talking here about practical solutions to a problem for which, as far as we have been able to establish, there is no perfect solution to date. You can always let us know if you disagree!

                              There are other complications as well. For example, after a rollover, you might get a stop out of the trade, as long as a test system using continuous contract data can actually hold the position. This is simply one of the many reasons why reverse testing systems tend to perform better in theory than in practice.

                              Whatever your choice, you must address certain other questions, the first of which is the question of delivery. Readers will undoubtedly know that sellers of some contracts - such as future commitments - may choose a time frame for the delivery of the underlying instrument / commodity. The delivery period can start as early as the first day of the expiry of the month. Those who have long open positions in the future at this stage may thus be required to buy the underlying contract.

                              In addition to the obvious problems included in the package, this can disrupt many revenue calculations and knock the end results out of sync. If, for example, you have a position that loses money when a delivery starts, you might agree to it and then might not be beneficial if the market subsequently came your way.

                              Only very smart traders will normally want to take full advantage of any risk. You may well, therefore, want to ensure that this cannot happen to you! If this is the case, two absolute prerequisites should be built into your system design:

                              Your model must exit any existing positions, or scroll through them, before any delivery period begins.

                              It cannot allow you to analyze the data so that traders when a delivery might occur, that is, entering a new position (on which you might have delivered) once the delivery period has started.

                              When evaluating rollover prices, consider fillers, slippage, and so on. And only the most naive (or stupid) will expect to trade at the level shown on the chart - of course the average price. The bid-ask spread must be taken into account, regardless of whether the difference is one mark or, in the case of less liquid markets, more.

                              Having settled with the data presentation format, we reach the question of how much data is needed. In the case of a system, the more data we have, the better. We'll look at datasets later in the next section of this series.