The 10 biggest pitfalls of quantitative trading

Author: The Little Dream, Created: 2016-08-26 18:13:29, Updated: 2016-08-27 17:01:04

The 10 biggest pitfalls of quantitative trading

  • One, stealing If a trading strategy requires you to trade at the price before the signal is triggered, then the trading strategy has a steal problem. The steal signal will not go away, but you will not have the opportunity to trade with the signal. For example, the signal may suggest that if the closing price of the day is higher than the previous day's highest price, then buy at the opening price of the day, which is almost impossible to trade at the opening price. Many people may underestimate the danger of stealing prices, in fact, stealing prices at fixed points is equivalent to superimposing a positive slope on the original capital curve (in the case of a fixed number of hands per trade). For example, suppose that a listed model that has traded 2,000 pennies to date steals 1 point per trade on the stock index, and the net profit stays stable.3002000 times 2 is 1.2 million. The following two graphs are the trading profit and loss curves of the binary even-line model that I tested on the 5-minute chart of the stock index continuous contract (retest period January 1, 2014 - June 16, 2014). Figure 1 is a strategy that includes a steal, i.e. if the previous k-line shows an even-line gold fork, then buy at the current k-line lowest price and sell at the current k-line highest price. Figure 2 is a strategy without steal, i.e. if the previous k-line shows an even-line gold fork, then buy at the current k-line opening price and sell at the current k-line opening price.

    img

    Figure 1. The stealing strategy Figure 2. The strategy is not stealing.

  • Second, the future function If a trading strategy includes a future function, the function is a future function if it is executed so that the trading signal that appears on a given day disappears after a period of time, and may then appear in other locations. This is because the function uses uncertain future behavior information to determine whether and what signals are being sent. For example, if the closing price on the current column line is still pulsing and is used to determine whether the signal is triggered, the function is a future function. The Zigzag indicator, which is available on many platforms, is actually a future function. The following two graphs are the trading profit and loss curves of the binary even-line model that I tested on the 5-minute chart of the gold continuous contract (retest period January 1, 2014 - June 16, 2014). Figure 3 is a strategy that includes the future function, i.e. if the current k-line shows an even-line gold fork, then buy at the current k-line opening price and sell at the dead fork. Figure 4 is a strategy that does not include the future function, i.e. if the upper k-line shows an even-line gold fork, then buy at the current k-line opening price and sell at the dead fork.

    img

    Figure 3. The strategy contains a future function Figure 4. The strategy does not contain a future function

  • The cost of the procedure When the strategy is tested, the capital curve can make a huge difference if the initial fee is not taken into account, and even a profit strategy that does not take into account the initial fee can also make a loss after the initial fee is taken into account. The initial fee is equivalent to superimposing a straight line with a negative slope on the original capital curve (with a fixed exponent for each transaction).

  • Four, the slider. Slippage refers to the difference between the opening position and the trade position. Slippage can be caused by network delays, trading platform instability, sharp market volatility, insufficient market capacity, etc. and is inevitable, so slippage is a factor that a qualified trading strategy must fully consider. The effect of slippage and handling fees on a strategy's funding curve is similar. The following two graphs are the trading profit and loss curves of the binary even-line model I tested on the 5-minute graph of the continuous copper contract. Figure 5 is a strategy with zero fees and slippage. Figure 6 is a strategy with 2.5% fees and 2 slippage.

    img

    Figure 5. Both the procedure fee and the slider are 0 Figure 6. The procedure fee is 2.5% and the slider is 2 jumps

  • 5 The index contract Some strategic retrospective contracts are index contracts, whereas index contracts are generated using a weighted average of all contracts of that variety, whose price differs from that of the main successive contract, which makes the retrospective capital curve untrue. For example, short-term sharp fluctuations in a contract are flattened by an index contract; or, when a long-term contract rises at the same time as the base of the most recent month, and is in the transition phase, there may be a downturn on the index contract due to a gradual increase in the weighting of the long-term position, which does not actually exist; or, the number of movements in the actual operation may result in a certain threshold cost, which does not need to be paid on the index contract. The following two graphs are the trade loss curve of the Pyeongchang trading system, which I tested on the 5-minute graph of the Pyeongchang copper index contract and the Pyeongchang copper continuous contract. Figure 7 is the trade loss curve of the Pyeongchang copper index contract. Figure 8 is the trade loss curve of the Pyeongchang continuous copper contract.

    img

    Figure 7. contracts for the copper index of titanium Figure 8. continuous contracts for titanium copper

  • Six, excessive optimization Some strategies may have been over-optimized before the release of the capital curve. Over-optimization has several ways of operating, for example, the strategy trader can optimize parameters for a specific market, or a short-term market, and then piece together the corresponding capital curve of the segmented market to obtain a better-performing capital curve; or, the strategy trader specifies that certain poorly performing trading days in the past are not traded; or, the strategy trader over-optimizes the past market, but does not consider that the matching equation is not applicable to the future; etc. Curve fitting can help us explain past trends, thus inferring future trends. However, if the strategic trader over-fits the market, the strategy may be very good at explaining past trends, but it is almost certainly very bad at explaining future trends. The following two charts can explain appropriate curve fitting and over-fitting. The red curve fitting in Figure 9 is appropriate, and we can see ten dissociated baseline points that are evenly distributed near the curve.

    img

    Figure 9. Properly fitted Figure 10. Overfitted

  • 7. Market capacity For strategies with larger capital sizes, if market capacity is not adequately taken into account, the transaction outcome may deviate significantly from expectations. For example, large amounts of capital are often difficult to transact during slumps and liquidity disruptions, which is difficult to take into account when reviewing the strategy; or, the market capacity of the actual variety is limited, and large quantities cannot be all transacted at specified prices, which also affects the final transaction outcome. The chart below is the chart of the Asphalt Main Contract 1409 on 17 June, showing that the Asphalt market has a very small capacity, sometimes not a single transaction for a few minutes, so it is difficult to apply a trading strategy on Asphalt to trade at the specified price.

    img

    Figure 11. Asphalt plate 1409

  • Eight, too few samples Some strategies cover too short a period of time, so the sample size is too small to fully reflect the impact of the strategy. These strategies may not perform as well on the capital curve over longer periods of time.

  • Nine, too little signal Some strategies, although tested over longer periods of time, trigger few trading signals. It remains to be seen whether these strategies will perform well in the future. For example, strategies applied on a day chart require a longer period of time.

  • 10, small scope Some strategies, while covering a longer period of time, or more varieties or markets, cover only one type of market (e.g. a longer bull market round); these strategies may perform very differently when faced with completely different market conditions. The book was written in late 2007 and published on May 1, 2008. The stock strategies in the book (stock only do more strategies) have a retest winning rate of more than 90%. But in fact, in such a bull market, any strategy of doing more can make money. But the bull market has ended after the book was published, and the dozens of strategies in the book are naturally not able to cope with the bear market and the shocks after 08 years.

Link to the video:http://bbs.pinggu.org/thread-3454457-1-1.html


More