Identifying a trend algorithmically
Many traders like to categorize the market cycles into four distinct phases (Figure 3.4), such as the following:
- Accumulation: Institutional investors quietly build positions, laying the foundation for the next uptrend
- Uptrend: Market sentiment is bullish as prices consistently rise, driven by increasing demand and positive investor sentiment
- Distribution: Institutional investors start to unwind positions, signaling the potential end of the uptrend as supply begins to surpass demand
- Downtrend: Market sentiment turns bearish as prices steadily decline, driven by increasing supply and waning investor confidence
We can see the four phases illustrated in the following figure:
Figure 3.4 - Market phases
As you can see in Figure 3.4, during the uptrend and downtrend phases, the price moves directionally and the volatility increases. On the contrary, in the accumulation and distribution phases, the...