Preface

The article "Quantitative Investment - Strategy and Technology" (edited by Ding Peng) points out that the secondary market is a system that is both random and traceable. In short cycles, price trends are random, but in long cycles they are random. Regular alternation of bulls and bears. This is more obvious in the digital currency market. The main reason is that the cyclical price fluctuations of Bitcoin caused by cyclical production cuts drive the market to move in the same direction, resulting in cyclical fluctuations in the digital currency market. It is precisely because of the randomness and cyclicality of the secondary market that there is no "Holy Grail" in the digital currency quantitative trading market. What we can do is to apply different trading strategies at different stages and find the optimal one that conforms to the current market structure. parameters, so as to maximize the profits of your own trading system at the current stage. For example, during a downturn in the market, prices tend to exhibit box fluctuations. At this time, the grid strategy is most suitable and can achieve good returns. However, in the bull market/bear market stage when the trend is obvious, the trend strategy is often more suitable and can bring good returns. income.

Since the digital currency market is global, 7*24 hours non-stop trading, T+0 and other characteristics, quantitative trading performs very well in the secondary market of digital currency, and can often achieve higher and more stable results than manual trading in the secondary market. income. Quantitative trading has not been developed in the domestic digital currency market for a long time. Strategy developers mainly transformed from the traditional financial market. Early quantitative traders have already made a lot of money. With the development of the domestic quantitative market, strategies in different directions have emerged based on the length of the K-line selection strategy, such as high-frequency trading, arbitrage, trend trading, fixed investment and other strategies. Among them, high-frequency quantification Traders often focus on minute-level K-lines or even millisecond-level single transactions, and they need better trading network resources. What's more, they deploy their own trading servers on the same core switch network of the exchange. Minimize order delays, thereby minimizing the risk of inventory backlog in violent market fluctuations; while trend quantitative traders pay more attention to indicators with longer timelines, such as the 4-hour MA and MACD , Bollinger Bands, or macro-level factors related to fundamentals, such as greed index, financial news index, etc.

At present, we are in a bear market. The intuition of a senior investor tells me that the current price is far from reaching the bottom and there will definitely be another plunge. History will never repeat itself simply, but it is always surprisingly similar. The bear market is a good time for us to lie dormant and accumulate strength. Cryptocurrency trading is like a farmer planting land. You need to sow in a bear market and harvest in a bull market.

Strategy Brief

The dynamic balance strategy is a relatively common trading strategy in the traditional financial market. It can be seen in the stock market, futures market and foreign exchange market. We can figuratively compare the dynamic balance strategy to a balance scale, which maintains the balance of positions by constantly reducing or increasing positions during market fluctuations. Readers can check the detailed concept online. Here, we mainly discuss the application of the dynamic balance strategy in the field of digital currency.

For example: Xiao Wang plans to use the dynamic balance strategy to invest 100,000 USDT. He can use 50,000 USDT to buy BTC and the remaining 50,000 USDT to cover his position. When the BTC price rises, the profit part will be cashed out, and the value of BTC in hand will be maintained at the initial investment of 50,000 USDT. Similarly, when the BTC price falls, the position will be covered, and the value of the BTC position will still be maintained at 50,000 USDT. Through the above principles, it is not difficult to find that the dynamic balance strategy is more suitable for volatile markets and volatile markets that are bound to return, and it can basically achieve risk-free arbitrage for volatile markets; while for unilateral markets, it will form a situation of continuous increase or continuous reduction of positions, the utilization rate of funds is not high, and there will be certain losses; while in the case of volatile rising markets, certain profits can be obtained, and in the case of volatile falling markets, spot trading will not have the risk of liquidation. Therefore, this strategy has low risk.

Today, the price of BTC has fallen by more than 70% compared to its historical high, but it will inevitably fall again in the next few years until the total Bitcoin market falls by more than 85%, and the bottom will gradually form. After the bottom price is formed, the price will slowly rise in fluctuations and usher in the next round of bull market, which creates opportunities for dynamic balance strategies, and the inevitable return will bring inevitable profits.

Strategy Optimization

Although the above dynamic balance strategy has lower risks, it also has problems such as continuous increase or decrease of positions and low capital utilization. After optimization, it will produce better results when applied to the digital currency trading market. Therefore, we have optimized it as follows.

1. Improve the logic of placing orders

For example: Xiao Wang plans to invest 100,000 USDT for BTC dynamic balance trading. Assuming the current BTC price is 10,000 USDT/BTC, Xiao Wang can buy a total of 10 BTC. At this time, 10 BTC is used as the virtual base. When the price rises to 11,000 USDT/BTC, a certain amount of BTC needs to be sold in the contract area. The amount = virtual base * (current price - price before the increase) / current price. Then the amount = 10 * (11,000-10,000) / 11,000 = 0.9091 BTC. When the price drops from 11,000 to 10,000, a certain amount of BTC is bought. The amount calculation method is the same as above, so the amount = 10 * (11,000-10,000) / 10,000 = 1. In summary, the overall profit is 909.1 USDT.

If the traditional dynamic balance strategy is adopted, 50,000 USDT of BTC is initially bought at a price of 10,000 USDT/BTC, totaling 5 pieces. When the BTC price rises to 11,000 USDT/BTC, a certain amount of BTC is sold to maintain the total value of the position at 50,000 USDT. The selling quantity = 5-(50,000/11,000) = 0.454545 BTC. At this time, there are 4.54545 pieces left in the position, with a total profit of 5,000 USDT. When the BTC price drops to 10,000 USDT/BTC, another amount of BTC is purchased, the buying quantity = (50,000/10,000)-4.54545=0.454545 pieces, and 4,545.45 USDT is paid, with a total profit of = 5,000-4,545.45=454.55 USDT.

The above calculation process does not consider the handling fee and slippage. The calculation concludes that the improved strategy is better than the traditional dynamic balance strategy in profitability.

2. Improve capital utilization

Through the above improved strategy order logic, it can be seen that although the profitability is better, in the process of BTC price rising from 10000 USDT/BTC to 11000 USDT/BTC, only 9091 USDT was used to open orders at most, and the capital utilization rate was only 10%, which is low. Therefore, when developing strategies, focus on capital utilization, and a certain proportion of total funds can be used for fixed investment. During the test, I used 30% of the total funds for fixed investment, and the specific operation was daily fixed investment in BTC. The fixed investment amount was calculated based on the two parameters of greed index and ARH999. For example, when the greed index is low and the ARH999 parameter is small, more BTC will be invested to improve the capital utilization of the strategy and gain higher rebound profits.

3. Improve order quantity

The equal price difference transaction commonly used in the traditional dynamic balance strategy is improved to isochronous transaction, that is, different time intervals such as 1 minute, 5 minutes, 15 minutes, 30 minutes, 1 hour, and 4 hours are selected for isochronous transaction attempts. Through backtest analysis, the profit model of isochronous transaction at different time intervals is shown in the figure below:

By analyzing the profitability of isochronous trading at different time intervals, it is found that isochronous trading at a 5-minute time interval has the strongest profitability after deducting commissions and slippage.

Actual situation

According to the above strategy optimization method, after completing the strategy compilation, real trading has been carried out for 1 month, with a profit rate of 4.5% and a maximum capital utilization rate of 50%, as shown in the following figure:

Summarize

The above real-time trading found that during the operation of the strategy, the price decline ratio reached about 48.5%, that is, the break-even was achieved. For example, when the price rose from 10,000 USDT/BTC to 11,000 USDT/BTC, the increase was 10%. When the price reached 11,000, it began to fall back. When the price fell back to 10,446, the break-even was achieved. Based on this, the boundary trend of the strategy to achieve profitability can be fitted.

Subsequent improvements

At present, our optimized dynamic balance strategy still has the problem of increasing reverse positions when encountering a one-sided market. For example, when the market rises, more short positions will accumulate. However, the relationship between the number of short positions and the price is not a simple linear relationship, so it is necessary to fit the position-price curve to reduce the number of reverse positions and reduce risks to a certain extent.