Origin

Occasionally, I was chatting about Chichiri Daijin in a group. The result is to realize that he has become the existence of a Dragon’s head and tail. Recruitment staff monthly salary are in hundreds of thousands of U.S. dollars from the time to recognize Qian Qian, Qian Qian is still a willing to share, like the actual disk running code dislike your face enthusiastic group owner. Later, the annual income of more than a hundred million, because too much money, the whole network deleted the number of run away. Can not find him.

As a retaliation, I hereby publish one of Chichi’s old articles on high frequency. On the path to building a money-printing machine through the sky ~~

Original article on high frequency trading

** Quantitative high-frequency money-printing machine construction guide (I)

**”If quantitative investment is the crown of the investment field, then high-frequency trading is the jewel in this crown. The most important feature of high frequency trading is that the return is very high while the risk is very small, of course, as a price, the capital capacity will not be too large, so this strategy is generally not to raise funds from the public, and broadcasters are often reluctant to share **.

Ladies and Gentlemen, I have not seen you for a long time, and this time I bring you the long-promised but long (I) difficult (very) to produce (lazy) high-frequency trading series related to content sharing. This article is the first of this series, may also be the last (encounter force majeure), depending on the circumstances. The content will involve more in-depth, significantly different from a variety of online conceptual introduction and a variety of slapdash generalizations.

Because high-frequency trading is too technical, the threshold is higher, Qianqian will try to be concise and clear, more graphs and less text less formula way to explain, but which still inevitably involves some of the more difficult to understand but also very important formula. At the same time, ** need to explain is a thousand thousand meow this high frequency trading level is not very high ** (compared to the field of the gods can only really be regarded as just stepping into the threshold), so can only try to speak within the scope of their own cognition are written out, the body of the content is to do the arduous path of the blood of the high-frequency ** if infringement of purely accidental ** I hope that the big brother have more connotations!

In addition, Qianqian sincerely hope that this article can be climbing the peak of the new broadcasters have inspiration, after all, the network can be found on the high-frequency trading dry goods to share too little, Qianqian himself from the road over know how hard, ** like in a dark basketball court to practice shooting **, may be to pay 10,000 times the effort is still nothing, may be the direction of the wrong from the outset, but also may be a very simple A very simple question takes a lot of time to go around a big corner to find the right answer is so simple. Really do high-frequency trading people are often not willing to come out to share, there is no need to share, because sharing is really a very laborious and unappealing thing.

This is a thousand thousand recent months of a certain account of high-frequency strategy real record (the principal is very small parameters aggressive), the main content of this series of sharing is written around this strategy.

As can be seen, high-frequency trading compared to traditional trading patterns (subjective trading, CTA trend class, arbitrage class, etc.) have ** small capital capacity, retracement is relatively small, profit and loss ratio is high ** characteristics, can be said to be ** the most suitable for ** individual investors in-depth study of the type of strategy. (Trend and arbitrage strategies are easier to learn to get started, but without the support of a large enough capital, it is difficult to increase the absolute return)

Let’s start with the main text.

High Frequency Concepts

Concepts

In order to make it easier for new broadcasters to understand, to re-describe high-frequency trading: the use of a computer program to trade a security quickly. (Anyone who can pay for a description to see it is a big shot, so I won’t ramble on too much)

Prediction and Speed

High-frequency trading involves the issues of prediction and speed, but note that not all high-frequency strategies require absolute prediction accuracy and speed, and often just breaking through a certain point is enough to make a profit (depending on market conditions).

For price movement can be described by a stochastic wandering model.

Where, dSt represents the price change, v represents the long-term trend of price movement (for high-frequency traders because of the short time of the position, it can be considered that v = 0), alpha represents the short-term trend of price movement (alpha with the rapid changes in the market environment), dWt represents the Brownian movement of the random wandering, sigma represents the coefficient of the degree of random wandering.

From this, it can be seen that the source of profit in high-frequency trading is divided into two parts, ** short-term trend movement of prices (trend) and random wandering (oscillator)**. Note that we are not talking about trends and oscillations in k-lines at the minute level and above in subjective trading, but rather trends and oscillations in price movements at the second level.

**Why can high frequency strategies be profitable without forecasting? **Specific reference to the paper Market Making and Mean Reversion, 2011 by Tanmoy Chakraborty and Michael Kearns explains this part of profit from random fluctuations.

For example, UNI, SUSHI, DOGE, etc. in the digital currency market some time ago, the distance the price traveled randomly in the hot market was much greater than the distance the price traveled in the short trend. This also explains the fact that a 50% price increase, if you only do the trend, even if you eat from the beginning to the end, 3 times leverage is 150% gain, which is the ceiling of the trend, but if you do the maker to make money on random fluctuations, the gain will be far more than the former, and the overall profit may be 10 times or 100 times the difference.

No prediction will be informed traders to reverse the choice and lose money on the trend, but the hot market, the random fluctuation part of the gain can easily cover the former loss, the usual market, the random fluctuation part of the gain is less than the trend part of the gain. Therefore, a wise trader needs to prepare different strategies for different quotes, or have both trend-earning and spread-earning logic in one set of strategies at the same time (e.g. switching model parameters or different position models).

Categories

High-frequency strategies can be broadly categorized into three types: robbing the market, making the market, and ultra-short trend.

Type of strategy reasoning Forecasting requirements speed requirement specificities
chip in Relying on the speed advantage between buy one sell one bidirectional trading, once encountered in the direction of the unfavorable dump to the back of the large pending orders, or hedge in other orders low extremely high Exclusive to top players with small profit per transaction and high commission requirements
make a market Hanging orders at the top and bottom of the plate, and the top and bottom of the market price of the single transaction, to earn the middle of the spread income, the need for better liquidity and short-term carry a large floating loss moderate moderate Suitable for the average player with a single profit in the handling fee requirements
ultrashort trend At the same time to predict the direction of the price and the size of the fluctuations, market orders into the market, the price of rapid movement, was eaten up by the opponent’s floating loss stop loss will enable you to quickly cash gains high slightly lower Suitable for sub-top players with high profit per transaction and low commission requirements.

Common Scenarios:

1, plate mouth large single blocking, price volatility is low, retail investors in the buy a sell a back and forth transaction, once the directional change, these large single withdrawal speed is extremely fast, and quickly unfavorable positions dumped to the queue in the back of the single, which leads to the average trader, ** hanging close to the transaction, loss of fees, hanging far away from the transaction is very difficult to turnover, and once the transaction is made, is often in front of the backhand dumped out of the single, it is very likely that you will have to carry for a very long time! Floating loss, it is difficult to grab the single can be profitable **, and high-frequency trading is the most taboo is a long time to carry a single, this subject is no top rates and top infrastructure of ordinary investors is extremely difficult to profit by high-frequency, need to avoid, or change to a low-frequency long position trading strategy, through time for space.

2, buying and selling transactions are active, not only the number of transactions, volume of these familiar concepts, but also need to pay attention to ** market orders penetrate the distance ** (i.e., a market order sent to the plate, the impact caused by the plate can reach what depth). Because the market strategy in the plate above and below the single, profits from the transaction price difference, in the market is flat, the market price of the single number of small price fluctuations, market makers if not to hang the single close, it is difficult to obtain profits, this time a market price single penetration may be only one in 10,000, and when the market is active, the market price of the single number of a lot of people, and more than the short and long entangled in a price back and forth fight, ** market makers can be farther away from the mouth of the disk The place with the market price of the single transaction, so there is no incentive to hang the single to the place very close to the opening **, therefore, in the market price of the single volume becomes large and limit single more conservative double factors, the market price of the single breakdown distance will quickly expand, often to one thousand or even one hundred and one. When the transaction breakdown is very large, it is easier to close the position, so whether or not to predict the direction of the mid-price is relatively less important, but the market is flat and the trend suddenly started, or have a prediction is better, otherwise be reverse selection after you can only be forced to stop or hedge lock position.

3, the price trend movement, often without any signs, behind the price from one price level to another, many factors are difficult to fully grasp. One strategy is an event-driven strategy, that is, only in the event of the emergence of their own understanding of the scope of the event, only to enter the field to participate in directional trading, when the informed traders, the certainty of a large, but the event occurs at a lower frequency, this opportunity is not often. Another is the short trend strategy,** it is difficult to find the signal before the price start, but in the process of the price trend movement will appear some characteristics, suggesting that we may continue to run along the direction of the price,** the logic behind the order flow imbalance, the floating loss of the single need to stop, the new entry of the order may be more aggressive, which is for the price of the trend movement to play a role in fueling the movement. **Need to pay attention to, the trend started before the signal accuracy is very low, looking for early signals is likely to be useless, and not every wave of the trend midway through the reliable signals **, so trading opportunities need to wait, the benefit of a single profit is relatively high, even with the highest commission can run this high-frequency.

High Frequency Ideas

Of the publicly available high-frequency strategies on the market, “Penny Jump” belongs to the first category, “Easy Bitcoin High-Frequency Strategy Robot 2014” belongs to the second category, and “Leek Harvester “Leek Harvester” belongs to the third category.

Analyzing so much, the goal has been relatively clear, suitable for novice broadcasters to start the high-frequency strategy should be the second type - ** market-making class high-frequency strategy **, does not require a high speed and prediction accuracy (compared to other high-frequency strategy), the realization of the difficulty is relatively low, but also in the market when the market is active has a good return. (Here @eric Hu, with a vip0 account with the highest commission zero prediction pure market making 5 days 10 times the return)

Let’s reorganize the idea of market making strategy here:

1, the goal is to earn market orders in the plate up and down the messy earnings, so you need to hang up a single up and down, because the market order impact distance is in a range of changes, so you need to ** more than hang 1 layer of single **, but also ** to determine how far away from the price of the most appropriate to hang up a single **, too close to the list may get a very loss of a single, too far away from a single that may not be able to get a single, at the same time, hang up a single range to be able to pocket the maximum depth of penetration. Ensure that the price recovery can quickly profit when the position is closed, to avoid a long time to hold the position.

2, the ideal situation is ** buying and selling at the same time transaction **, if not at the same time transaction may accumulate unilateral positions, once the intermediate price trend movement, may lose money, so we must find ways to ** ensure that the position tends to zero over time **.

3, the price trend movement occurs, in order to avoid unilateral positions, ** to find ways to control the probability of multi-short transaction to make it more balanced. ** For example, when rising, buy orders closer, sell orders further away, so that both buy and sell orders after the transaction, it is easier to close the position at a more profitable price. ** In addition to pending order distance can control the probability of transaction, by changing the amount of pending orders can also be disguised as a control of the probability of transaction, predicting the direction of the advantage of more pending orders, predicting the direction of the disadvantage of fewer pending orders. **

In order to achieve the above three points, a high-frequency market-making strategy may need to include many rules of the module combined, which a very small change will have an unexpected impact on the entire system, may be changed on the profit, optimization and loss, parts and components are too complex and very difficult to do attribution analysis, so it must be the system as a whole included in the framework of a set of one-time tuning to solve all the problems, only, otherwise, five or ten conditions superimposed. Otherwise, five or ten conditions superimposed on each other will be completely beyond the scope of personal control.

Fortunately, there are many academics who have studied this issue in depth and basically provided the “perfect” answer that covers the above three points: Avellaneda, M., Stoikov, S.: High-frequency trading in a limit order Avellaneda, M., Stoikov, S.: High-frequency trading in a limit order. book. quant. fin. 8(3), 217-224,2008. This paper starts from the dynamic programming principle, solves the stochastic partial differential direction, and obtains a set of solutions to solve the problem of optimal quotes of market maker, and then there are a lot of papers to continue to optimize this theoretical model from a different point of view, and the related papers can be obtained by private messaging me.

After reading, deriving formulas, and reproducing these papers, Qianqian believes that they have solved the problem of market maker’s optimal offer more perfectly, and his own Maker-type high-frequency strategy is also modified and completed on the basis of these papers.

This series plans to distill the key points of these papers, omit the redundant formula derivation part, and directly share the core of the core that can be used.

The content that will be covered later are:

1, transaction probability modeling 2, optimal pending order distance interval calculation 3, open position processing model 4, price prediction models

…….

Conclusion

As a predecessor who became a god, there is only to look up to. But the articles and codes left by the gods can shine for the future generations. I hope we can learn from the essence of the gods and find our own path to godhood.

Customary Attach a picture of a beautiful woman~~