Adaptive learning in the first place

Author: The Little Dream, Created: 2017-02-23 11:18:03, Updated:

Adaptive learning in the first place


  • The equator

    Commonly calculated averages are ma (simple moving average) and ema (exponential moving average), with the following formula: SMA = SUM ((Close, N) /N) EMA is (CLOSE(i)P)+(EMA(i-1)(1-P)) or (M*CLOSE ((i) + ((N-M) *EMA ((i-1)) /N The MA is characterized by a lag, so giving more weight to the most recent price in the EMA improves the tracking effect of the trend. There are various versions of the specific ma indicator, ma, ema, sm, wma, etc., although the principle is similar. Traditional averages do not take into account ever-changing market conditions, using a fixed calculation process, short-term averages frequently shift when the market is repeatedly volatile, while long-term averages are sluggish when the market is rapidly rising or falling. While trend-tracking strategies require indicators to be able to adapt to different market characteristics, according to the direction and speed of the market, and respond intelligently, applying fast averages in one-sided markets, applying slower averages in volatile situations. Perry Kaufman developed the concept of the Adaptive Moving Average (AMA) in his book Smarter Trading, which attempts to allow the indicator to adjust automatically in a complex market environment, filter out noise and unpredictable price movements, and better track market trends.

  • The following is a description of the calculation process for adapting the equator:

    • The first is the price-effectiveness ratio. Question 1 is asked: From a to c, the market patterns go from ideally smooth to noisy, and the speed of the trend must decrease to avoid double losses. The faster the price changes in one direction, the less noticeable is the noise, so the choice of trend speed needs to consider both direction and noise: the clearer and faster the price changes, the faster the trend homogeneity needs to be used, so a mechanism is needed to sensitively capture the speed and continuity of the market patterns and feed back this information to the moving average, adjusting the horizontal speed of the moving average.

      img

      Efficiency Ratio ER The efficiency ratio is the ratio of price displacement to fluctuation divided by the net change in price over the entire price movement distance (price trajectory). Assuming that at the past n closing prices p1, p2,...pn, then the efficiency of this price sequence

      img

      As can be seen from the formula, the range of the er value is 0 (market is uncertain, full of noise) ~ 1 (high trend)

    • Second, define the trend speed range So let's just expand on the simple idea of exponential smoothness and make it more stable. Scaled smoothing constant: sc = ER* ((fast sc slow sc) + slow sc where sc = 2/ ((N+1) Eg If the range from fast to slow is 2 to 30 days, then the smoothing constant is 2/3 and 2/31. Sc is equal to er * (2/3- 2/31) + 2/31 Finally, even in a horizontal market, the long term (30) average still fluctuates slowly downwards, and when the market trend is not apparent, the adaptive average is best able to move horizontally. Constant: C is equal to sc * sc

    • The third is AMA. The final calculation of the AMA is as follows: AMA[i] is equal to AMA[i-1] + c * (p[i] AMA[i-1]) From the formula, the idea of calculating ama and ema is the same, only different in determining the weights.

      The AMA trend line has the following characteristics: 1) Use a certain number of days to specify the trend range 2) When the market has no direction, the ama trend line stops moving 3) When there is a significant price change, ama is able to track quickly, with less delay. 4) Change one parameter to apply to different markets 5) Ama is based on predictive analysis, not simple verification

      The above content is mainly a description or translation of the original author, and I think that this idea of cleverly extending traditional indicators is worth learning, and the subsequent need to test the strategy of adaptive equatorial AMA to see how the real effect of the battle in the A-share market.

  • References

    The smarter trading platform Unified securities currencies adapt to the uniform application currencies

  • Thank you very much. First of all, I would like to say that programmatic trading is not about strengthening one's judgment, nor is it about data mining, nor is it about data processing.

I've been reading this blog for the past few months.


More