[What is quantitative trading]
Generally speaking, quantitative trading refers to the use of mathematical models to select and trade. These mathematical models are usually based on economic theory or observed market patterns. After testing long-term historical data, they are compiled into programs and handed over to computers for trading. There is almost no human interference during the transaction process. ——"The Game of James Simmons"
[Features of Quantitative Trading]
(1) Discipline. Make decisions based on the results of running the model, rather than on feelings. Discipline can not only restrain the weaknesses of human nature such as greed, fear, and luck, but also overcome cognitive biases and can be tracked.
(2) Systematic. The specific manifestation is "three more". The first is multi-level, including models at three levels: major asset allocation, industry selection, and specific asset selection; the second is multi-perspective, with the core ideas of quantitative investment including macro cycles, market structure, valuation, growth, and profitability. Quality, analyst profit forecasts, market sentiment and other perspectives; the third is multi-data, that is, the processing of massive data.
(3) Arbitrage thinking. Quantitative investment captures opportunities brought about by mispricing and misvaluation through comprehensive and systematic scanning, thereby discovering valuation depressions and making profits by buying undervalued assets and selling overvalued assets.
(4) Probability to win. First, quantitative investment constantly mines patterns that are expected to be repeated from historical data and utilizes them; second, it relies on a combination of assets to win, rather than a single asset to win.
[About Xiaoyi Quantification]
As cryptocurrency traders, have we always had this experience? We often need to keep an eye on the market 24 hours a day, and the impact of the market on short-term speculative operations is very large. Even if we eat a meal, it may be You will miss several points of profit. Quantitative trading has always been cloaked in a very mysterious cloak in the financial investment community, and many people think it is a way to make a fortune in silence.
Xiaoyi quantitative spot trading was launched in March 2018. It is the first quantitative software in China that can realize semi-programming and flexibly set multiple strategies. So next, Xiaoyi Quantitative will take you to unlock the mystery of spot quantitative trading!
[Features of Xiaoyi Quantitative Spot Module]
Buy at a low price, sell at a high price, and earn the middle price difference. The machine replaces your manual operation and avoids the emotional impact of manual operation. It has the following characteristics:
(1) Parameters can be set flexibly, allowing you to implement semi-programming solutions according to your own ideas. Various strategies such as grid strategy, Martin strategy, and grid Martin hybrid can be configured.
(2) The unique callback mechanism can track the take-profit to obtain greater profits; it can also avoid excessive replenishment of positions due to sharp declines and minimize the risk of holding positions.
(3) Danger amplitude detection function: within the set time period, when the currency reaches the set increase, buying and covering positions will be stopped to prevent high buying.
(4) Stop loss function.
(5) Supports multiple exchanges and can upgrade multiple account operations on one exchange. It is also possible to monitor multiple currencies at the same time and produce qualitative changes in the quantity of dozens or hundreds of coins.
(6) Trend trading can be done.
(7) Spot prices can be opened long or short.
(8) Technical indicator opening, closing, and indicator stop loss.
(9) You can set the opening price range, which is safer.
(10) Stop loss on the first position when the position is full.
(11) When doing grid strategy, you can set the take-profit amplitude of each position individually, which is more flexible.
(12) Can be a market maker.
[Types of spot quantitative trading strategies]
(1) Turtle Trading Strategy
The turtle trading strategy is a very complete set of trend-following automated trading strategies. It uses the Tang Anqi channel to track the trend to generate buying and selling signals, uses ATR (average true volatility) to add or reduce positions in batches, and dynamically implements profit and stop loss.
(2) Grid trading strategy
Grid trading is an active trading strategy that takes advantage of market fluctuations to make profits. Its essence is to use the repeated movement of the price of the investment target within the grid range during a period of volatile market conditions to increase or decrease positions in order to maximize investment returns. the goal of.
(3) Intertemporal arbitrage
Intertemporal arbitrage is the most common type of arbitrage trading. Intertemporal arbitrage is the arbitrage activity of the same index but different delivery months on the same exchange.
(4) High-frequency trading strategy
High-frequency trading refers to computerized trading that seeks to profit from extremely brief market changes that humans cannot take advantage of.
There are also double moving average strategies, Martin strategies, alpha strategies, etc. The ones I understand more deeply are the grid strategy and the Martin strategy.
[Spot Grid Trading Strategy]
Grid Trading is a quantitative strategy that uses the "gear" mode to perform mechanical operations on the target. It is a classic strategy suitable for volatile markets. The grid trading strategy is simply a buy low and sell high strategy. The meaning of grid refers to the means of controlling the buying and selling range and buying and selling positions. That’s probably what the picture below means (it’s a bit ugly, so I’ll just take a look at it)
【Strategy Principle】
If the price of Bitcoin one day in the future will be the same as now, what strategy will you adopt to obtain profits? The easy way to think of is to sell when the price rises, buy when the price falls, and wait for the price to recover again to earn the difference in price. How to implement it specifically? If the price rises, you need to sell as much as you need. If you sell too early, you will obviously lose money. Likewise, if you buy too early, you will make less money. Grid strategy is suitable for this situation.
The grid strategy is fixed price buying and selling, and multiple sets of buying and selling ranges can be set, such as 8000-8500, 8500-9000. The strategy will buy 0.1 coins at 8,000 yuan, sell 0.1 coins when it rises to 8,500, sell 0.1 coins when it continues to rise to 9,000, and buy 0.1 coins when it falls to 8,500. Note that only when one end of a range is traded will the grid display the price at the other end. In this way, the strategy always buys low and sells high, and also notices that the coins bought and sold are the same, so that when the price returns to the initial price, the coins of the strategy remain unchanged, but the money increases.
This strategy grid is divided into equal difference grid and equal ratio grid. The grid price difference of the arithmetic grid is fixed. For example, if the lower limit and upper limit of the price range are set to 10000-20000 respectively, and the number of grids is set to 5, the price difference is (20000-10000)/(5-1) = 2500. The grids are 10000-12500, 12500-15000, 15000-17500, 17500-20000. If the price is 14,500 when the strategy is started, buy orders of 10,000, 12,500, and sell orders of 17,500, and 20,000 will be placed respectively. When any price is completed, the order at the other end of the grid will be placed. The lower the price of the arithmetic grid pending order, the higher the profit margin. The first group of 10,000-12,500 has a profit margin of 25%, and the last group of 17,500-20,000 has a profit margin of 14.3%.
The principle of the equal-proportion grid is similar to that of the equal-difference grid, except that the profit margin of each group of grids is the same and the price difference is different. The lower limit and upper limit of the same price range are set to 10000-20000 respectively. The number of grids is set to 5, and the grids are 10000. -11892.07,11892.07-14142.13,14142.13-16817.92,16817.92-20000. In this way, the profit margin of each group of grids is 18.9%.
The arithmetic grid calculation is simple and clear, and the arithmetic profit margin remains consistent. In fact, the running effect is similar. If you are interested, you can backtest to see the difference.
[Strategy applicable market conditions and risks]
The grid strategy is not a risk-free strategy. Choosing the grid means that you believe that the market will remain volatile, and the price will definitely return regardless of whether it rises or falls. If the grid strategy is abandoned because the price rises too much or falls too much, actual losses will occur. The grid strategy is not suitable for unilateral rising or falling markets, and temporary losses will occur when calculating floating profit and loss.
In addition to being used to make profits from repeated trading in volatile market conditions, the grid strategy can also be used to take profits or increase positions. If you want to clear your Bitcoin position above 40,000 yuan, you can set the upper limit of the grid to 40,000 and calculate the investment capital. If it rises to more than 40,000 yuan, the grid will stop running and the liquidation operation will be completed, and you will also earn the fluctuating money during the period. Money, in the same way, can also be used to gradually increase positions and buy dips.
[Historical Review] According to backtest data statistics: BTC’s rise and fall from April 28, 2013 to October 13, 2019, 2360 days (6 and a half years): 1853 days of which the fluctuation range was in the range of 2-4 points Within, accounting for 78.5%. In other words, in the past six and a half years, BTC has fluctuated between 2% and 4% for about 70% of the time. However, the real rise exceeds 4% only about 12% of the time.
So, in most of the volatile market conditions, how can we effectively use funds and steadily obtain the maximum value? Today's protagonist is invited below - grid trading, shock is king!
[Example] For example, the current price of Bitcoin is 8,000 US dollars, the investment principal is 10,000 US dollars, the number of grids (number of replenishment positions) is defined as 4 grids, the position (buying amount) of each grid is 2,000 US dollars, and the range of each grid is ( (Buy drop) is defined as 5%, buy one frame for every 5% drop, that is, buy the first frame when Bitcoin drops to 7,600 US dollars, and the buying amount is 2,000 US dollars, and so on, this is the purchase price Strategy. Similarly for the selling strategy, if it is set to sell at 10% (sell increase) every two bars, the selling price of the last bar will be US$7,040, and so on. The specific positions and buying and selling points are as follows:
Grid Buying Price Grid Width Position Selling Price
First grid 7600 -5% 2000 8360
Second grid 7200 -10% 2000 7920
Third grid 6800 -15% 2000 7480
Fourth grid 6400 -20% 2000 7040
【Summarize】
1 The market suitable for grid trading: volatile market. In the event of a unilateral rise or fall:
1) Unilateral rise: The grid is easy to sell out, the capital utilization rate is low, and the income is small. You can run an aggressive strategy by narrowing the grid interval, or you can clear your position and hold the currency to wait for an increase.
2) Unilateral decline: It is easy for the grid to break down, causing heavy positions to be locked up after continuous buying. Once the price falls beyond the set level, adjust the conservative strategy in time, wait for the correction and use the Martin strategy to unwind, or stop the loss appropriately.
2 Advantages: Never chase the rise and kill the fall, but sell high and buy low; it is necessary to formulate a good trading strategy, which can overcome the weaknesses of human nature and easily respond to market changes.
The grid trading method pursues the continuous fluctuation of the market within the price range. The more severe the market fluctuations, the higher the rate of return. Once the trend breaks through the price range and continues upward or downward, you have to consider whether you need to adjust your strategy.
【Notice】
We cannot buy at the lowest point and sell at the highest point. The most realistic approach is to use software to set the decline and increase, buy at a relatively low point, and sell at a relatively high point.
According to the backtest data under different market trends, there will be good returns if you open a position at a low point. Remember to do a good job in position management.
The above is the basic grid trading method. Just set the starting price, the grid density, the amount of funds per grid, and then start execution.
[Spot Martin Trading Strategy]
The Martingale strategy is actually a gambling strategy. This method actually became well-known in Europe not long after it originated in France in the 18th century. In theory, this strategy will never lose money.
Martin is a strategy based on capital position management. It is one of the most common and fundamental strategies in financial trading and gambling. After a loss, increase the multiple to open a position, wait for a correction, and even out all losses.
In order to improve efficiency, Martin will always increase his position in the future and use multiple positions to increase his position, thereby obtaining a relatively small retracement leveling point.
[The principle of Martin strategy]
(1) If there is a shock, there will be a trend, and if there is a trend, there will be a correction;
(2) If the market goes in the opposite direction, control the position and continuously increase the position in the opposite direction to reduce the average position cost until you exit with a profit after the market correction.
Advantages: Winning once can make up for previous losses and make a profit; Disadvantages: If the funds are not enough to support continuous increase in positions, you may lose everything.
In the Xiaoyi quantitative spot parameter setting, it is reflected in the following parameters:
Cover orders do not participate in arbitrage: the software will not sell the cover orders individually. When the selling conditions are met, the entire position will be sold together; that is, the purpose of unwinding the Martin strategy is achieved.
Cover positions based on purchased assets: increase positions at low points and lower the average price.
[Example] Assume a guessing game, the bet starts from 1 (can only bet on one side), and then increases by a multiple of 2 (2x1)n (exponential growth), that is: 1, 2, 4, 8, 16 , 32, 64, 128, 256, 512..., until you win money, and then start again from the beginning. As follows:
Round Bet Result Profit
1 1 -1
2 2 big -3
3 4 big -7
4 8 large -15
5 16 large -31
6 32 small 1
Advantages: Winning once can make up for previous losses and make a profit; the profit is very large.
Disadvantages: If the funds are not enough to support continuous addition of positions, it is very easy to make arbitrage, so remember to manage your positions.
[High-frequency spot and trend spot strategies]
High-frequency spot trading is a strategy of quickly buying low and selling high. The grid + Martin strategy is suitable for low and rising markets. If you can decisively take profit at a high level, the profits will be very violent. If you are a novice, you must always pay attention to the high reversal. , otherwise if you make a lot of money, not only will you not be able to keep it in the end, but your principal will also be invested for several years.
This is also the reason why I don’t recommend newcomers to play high frequency, because if you have never experienced bulls and bears, you will be blinded by the rise and cannot hold back at all, and you will not be able to hold on to the final profit!
The trend spot is to use Xiaoyi's quantitative indicators + spot, that is, to use a variety of K-line indicators (BOLL, RSI, KDJ, TD, EMA...) to carry out automatic operations of buying, selling and stop loss points, and high-frequency Compared with spot trading, the advantage is that it can clear positions at a higher point and keep profits. The disadvantage is that if the market rises violently, you will definitely not make as much as the brainless high-frequency traders. It is suitable for friends who have some research on K-line and want stability.
As for which one to choose, you can depend on your own mentality, and you can also refer to the detailed video below.
[Xiaoyi quantitative spot function (high-frequency spot, 100% pending orders, trend spot)]
Trend trading is also based on the player's own trading habits, whether to buy the bottom or focus on stability.
Take the moving average EMA as an example. For example, when EMA5 crosses EMA10 and the price is above EMA30, start buying. When the price is below EMA30, liquidation is forced.
For example, if 60,000 has dropped to 29,000, if this trend is used, the position will be forced to be liquidated around 58,000, and the profits will still be made, instead of watching the price in depression until 29,000.
Introduction to Trend Trading Indicators
Supported technical indicators:
In the same way, you can do other radical trends, such as BOLL line + RSJ
[Principles of high-frequency spot trading]
(1) Buy at low prices, sell at high prices, and earn the difference in price. The machine replaces your manual operations and avoids the emotional impact of manual operations.
(2) Parameters can be set flexibly, allowing you to implement semi-programming solutions according to your own ideas. Grid strategy, Martin strategy, and Grid-Martin hybrid strategy can be configured.
(3) Novices can follow the strategy with one click.
(4) Unique callback mechanism to obtain greater profits while minimizing position risks.
(5) It can monitor multiple currencies at the same time, and can also produce qualitative changes from the number of dozens or hundreds of coins.
Public account: Xiaoyi Quantification.
Risk warning: I firmly support and support national laws and regulations, mainly share quantitative trading strategies and tools, and do not provide any entrustment of funds, illegal transactions, etc. The opinions mentioned in this article only represent my personal opinions. I do not make any type of guarantee for the content of the article. All relevant data and information in the article are only for readers’ study and research purposes and do not constitute any advice or basis for investment, law or other fields. . You must use relevant data and content with caution and bear all risks incurred. You are strongly encouraged to conduct your own research, review, analysis and verification of the Content. The subject matter involved is not recommended. Buying and selling based on it is at your own risk.