ប៉ុស្តិ៍ Donchian នៅលើ Bitcoin - Cryptonomist

This article will evaluate the use of one of the most widely used indicators in the trading landscape on Bitcoin: the Donchian Channel, also called the Price Channel.

The Donchian Channel trading strategy

Known to traders around the world since as early as the 1950s, it is nothing more than the set of two lines, which never cross, and respectively represent the maximum-maximum of the last X bars and the minimum-minimum of the same period. It identifies a channel, with two distinct levels, one upper and one lower. This channel always contains prices within it, and when the market makes a move of a certain magnitude to the upper or lower side of the channel, then the strategy enters a position just to the side of the channel levels. 

donchian channel btc
Figure 1. Graphical representation Donchian Channel on BTC

More specifically, it is well known how cryptocurrencies, and Bitcoin in particular, tend to stay in trend for quite some time, rather than reversing and returning toward an average value. From this statement comes the idea of using Donchian’s channel for the very purpose of intercepting the most interesting trends in the market.

In order to perform the tests, therefore, the Bitcoin spot market will be used. The spot market is the only one that can be used for Italian clients at the time this article is being written, and since short-selling on the spot market requires high margins and rather complex operations, at least in the initial phase the strategy will only be allowed to make long trades.  

However, according to what the major cryptocurrency exchanges, including Binance, which has recently been granted approval to operate in Italy, are saying, in a short time it will again be possible to return to trading cryptocurrency futures, which allow greater flexibility in terms of operations and fees. 

strategy periods
Figure 2. Optimizing Donchian Channel periods on BTC

Testing the Donchian Channel strategy on Bitcoin

The strategy will be tested on hourly timeframes, and the entry-level will be dictated by the ប៉ុស្តិ៍ Donchian ។ that will be constructed following an optimization that will lead to a decision on how many bars to calculate the instrument on. Figure 2 shows the results of this first optimization, which will indicate to the strategy the entry-level on which to place long orders. These will always be placed on the upper level of the channel, based on the idea that the market, after a show of strength, will continue in the direction taken.

This first analysis, carried out between 10 and 100 periods in steps of 5, identifies the area between 65 and 90 periods as the most stable. This means that buying when the highest high of the last 65-90 hours is exceeded could be worthwhile. 

All the cases bring gains, albeit slightly different, and consequently one can choose 75 periods, which is an intermediate value, as well as the best for profits in the cases analyzed.

The trades will then be closed on the lower side of the channel, if after an entry, prices start to fall, the trades will be stopped when prices on the lower channel are reached

The historical arc over which the tests are being conducted includes the last 5 years of the Bitcoin spot market and lasts until September of the current year. This historical arc is not huge, but nonetheless represents a sufficient basis for continuing the study. Then again, Bitcoin itself is a market that is still young all things considered. 

The monetary countervalue used for each transaction is $10,000. As is well-known Bitcoin is very scalable, which is why you are not obliged to trade a whole Bitcoin, but you can scale the position down a lot. Therefore, the position for each trade will be fixed, and results with reinvestment of profits will not be taken into account in order to get a clearer reading of performance trends over time.

In Figure 3 we can see how the profit curve is satisfactory and how, for almost the entire historical span, the strategy gains. Unfortunately, the beginning of 2022 coincided with an abrupt slowdown on the part of this strategy, which saw its trend change from strongly bullish to bearish. 

equity line
Figure 3. Equity line 75-period Donchian strategy

Comparison with the Buy&Hold

However, this is to be contextualized in a particularly difficult period for Bitcoin. The year 2022 has been a strongly bearish year, at least for now, and the strategy has suffered quite a bit, understandably right around this time. In fact, comparing the strategy with the Buy&Hold, which is the simulation of holding an amount of Bitcoin ($10,000 countervalue) from the beginning to the end of the backtest, we see that compared to the strategy on the Donchian Channel, simply holding Bitcoin would have brought far greater risks (រូបភាព 4) ។

buy-hold-btc
Figure 4. Buy&Hold Bitcoin

The implementation of the trading strategy

As written earlier, at the moment the chances of exiting a losing trade occur on the lower Donchian Channel, and this configures a limitation for the system, which remains constrained to only one type of exit in order to close the position. One will therefore enter a បញ្ឈប់ការបាត់បង់, which represents a losing exit from a trade, and a យកចំណេញ, which is the level that if touched will cause positions to close in profit. 

The values that seemed most appropriate for this market are $500 for the stop-loss and $2,000 for the take-profit, respectively. A 5% and 20% range from the position’s countervalue. These parameters for many markets might seem too wide, but Bitcoin has already shown that its volatility can become extreme at certain times. In any case, volatility is on average high during all days of the year. The parameters are therefore reasonable for Bitcoin, while they would be less so on stocks and futures.

In Figure 5 we see that at this point the system gets a respectable average trade, $128 or so, quantifiable as 1.28% of the position’s countervalue. Certainly a comforting figure, able to cover the costs one would face using this strategy in the market. 

ពាណិជ្ជកម្មជាមធ្យម
Figure 5. Average trade strategy with Stop and Target

One might think at this point to include a condition, a filter to the strategy, that would allow it to trade only in certain situations. For example, it might be interesting to see how the strategy would behave by buying only when the underlying trend is bullish. This would avoid buying in those situations where the market is going down and is in a so-called bearish trend. 

An instruction is then given to the machine that it will only trade following a definite price pattern, that is, when the high of yesterday’s day is higher than the high of 5 days ago. This condition avoids buying in bearish trend situations, and this greatly impacts the strategy’s drawdown, which used to be around $5,000 while it has now decreased to around $3,000.

លទ្ធផលនិងការសន្និដ្ឋាន

In the following figures you can see all the results that the strategy gets after the filter on the trend is inserted. The total profit drops slightly, but the average trade is benefited, rising to $173.

The equity line is also more pleasant, especially the last phase, the one covering the first 9 months of 2022. It takes on a smoother shape than the previous curve. 

performance summary
Figure 6. Performance summary with trend filter active
ពាណិជ្ជកម្មជាមធ្យម
Figure 7. Average trade with active trend filter
equity line
Figure 8. Equity line with active trend filter

The last results are certainly acceptable, potentially usable live, provided that the post-program period is benign and in line with the studies done. Which of course is impossible to establish as of today.

However, Bitcoin proves to be an extremely profitable market if approached with trend-following logic, and the Donchian Channel was able to confirm this notion. The future remains uncertain, and the latest phase of declines does not make one sleep soundly. The geopolitical situation, regulation, mass adoption, and advancing age even for Bitcoin are all factors that are contributing to smoothing and changing this market, which nevertheless remains very interesting and could lend itself to other logics in the future. 

រហូតដល់​ពេលក្រោយ!

Source: https://en.cryptonomist.ch/2022/09/25/donchian-channel-bitcoin-2/