The Journey of Detours from an Experienced Programmer

Author: Lydia, Created: 2022-12-09 16:57:43, Updated: 2023-09-20 10:47:32

img

The Journey of Detours from an Experienced Programmer

I. Preface

Women are afraid to marry the wrong man, while men are afraid to enter the wrong profession. This sentence is really engraved on my face. I graduated from university with two bachelor’s degrees and joined the manufacturing industry in China, engaging in software design for traditional industries (automotive electronics). At the beginning, I wrote the first program with asm, cooperated with the pcb designed with the help of my girlfriend, and produced the first product and invention patent. At the beginning, I thought that the industry I was engaged in was second to none. However, I gradually found that this is not the case…

II. Internet+

I have done 8-bit, 16-bit and 32-bit mcu software design from a traditional industry to the current AI+ industry. The threshold of these industries is very high, and the investment capital and time period are very large. It didn’t take a long time for the Internet industry to become popular, and the capital foam needs to be digested. Internet plus was proposed, and the Internet began to penetrate and nibble away at traditional industries gradually. Big data, the Internet of Things, Industry 4.0, intelligent transportation v2x, etc. encroach on the profits of traditional industries gradually, forcing them to upgrade and reform. As a result, the overall salary of traditional industries is not high, especially in central cities, jumping from one pit to another is only a small increase, and also bears the risk of capsizing. The poor income of the old programmers can no longer meet the needs of modern life, gnawing on the old capital.

III. Individual input and output

On the growth path of the experienced programmer, they have been exploring ‘profits after sleep’ and ‘knowledge realization’. I have done several projects with my friends in my spare time, such as AGV’s energy storage battery management system, 3G/4G based vehicle monitoring system, rock scanner, electrolyte separation console, and so on. In the end, they all failed. I worked hard during the day and stayed up late at night to work. I invested a lot of time and energy, even split personality, but the output was very poor. I wrote a white paper with my partners. We experienced VC and pulled investment. I worked very hard with my partners. Finally, I fell down on the way to product implementation and failed to get up. In personal summary, it is difficult for technicians to grasp the market while focusing on the investment of assets. It is not easy to get customers, either the demand is not identified in the early stage or the order is poached. The project may not be rewarded if many risk mitigations are not controlled very well.

IV. The process of acquiring digital currency

When hearing about acquiring Bitcoins, many people said it was a Ponzi scheme. But I didn’t have the corresponding perception, so I dodged in fear. When I was amazed, Bitcoin had increased hundreds of times. A friend said that he had set up a machine to acquire Litecoins and he earned money everyday. I was curious to know what the machine was, so I went to visit and study specially. I found that the machine was really a good thing. I bought a machine and threw it there. I didn’t need to maintain it. I started the machine and it will acquire coins immediately. After checking with friends, I bought the first machine – ASIC for Litecoin. At that time, the price of Litecoin was RMB 70 yuan. According to the calculation power and the price of 70 yuan, it is estimated that the cost will recover in half a year. We will calculate every day to see whether the coin price and acquiring output are stable. Although we endure the loud noise, we are still very happy. The Bitcoin market is hot, and the acquiring market is hot. After all, we are good at how to make a acquiring machine by combining hardware, structure and software with friends. We contacted several manufacturers of ASIC chips, one of the local companies, which have high requirements for the minimum order quantity of chips. The minimum batch is 10k, and even the chips for trial evaluation are not given. In the condition that the technical threshold is unpredictable, we have not been able to find out how large the market can be, and it is impossible to invest so much money. Whether to miss the opportunity or to avoid the pit perfectly (refer to Kao Mao) is unknown. The prices of coins increased and decreased. For those who have not participated in the market, they have no sense of risk. Finally, the Litecoin decreased to 7 yuan, the acquiring machine was shutdown for a while, and finally, we found a place to acquire digital currency secretly. By the time of the shutdown, we had accumulated 200-300 Litecoins. We didn’t sell them at all, there were too many to hedge, so we lost everything. Since then, I have never paid attention to acquiring machines and coin prices.

img A crash without a rebound

V. Like a spring breeze suddenly

In the first half of 2017, a friend told me that the Litecoin had surpassed 100. I woke up immediately, opened the computer to check the price. Wow, I made a balanced budget, and earned, I was happy. I moved the currency from the wallet to the exchange, and watch the market every day, 150, 100, 120. Alas, 150 will sell. The psychology of the leek is reflected to the fullest… Finally, it was sold for 500CNY. However, I sold at the starting point of the bull market… Comfort myself with no regrets [tears running].

img Sold at the beginning of the bull market

Since the acquiring machine became a waste iron, I shared the money with the partners, which was considered as a successful investment. I withdrew the principal*2, and kept the rest as my trading principal. From then on, I stepped into the digital currency alone and never came out…

VI. Entering the digital currency

The 17 year bull market was really a bull market. At 12 o’clock in the evening, I found that most of the coin holders came to “move bricks”. I joined a QQ group, and I saw that the group members increased from 200 to 1000, and most of the people who came to learn to “move bricks”. Some people earn a lot every day when they move bricks, while others can earn a little. I learned html from scratch. js has made the first market comparison website for everyone to find the price difference. Internal reference img

When “moving bricks”, I learned that it was very popular to “move bricks” in a programmed way. The 5% price difference was found everywhere, and there was not much manual intervention, it was to move money from one place to another place, which could double the returns in a few days. So we started the so-called quantitative journey. Since Sep. 4th, 2017, more and more robbing robots came in, and the price difference was narrowed to a very small amount, human brick movers were basically defeated by robots. More than 1000 people came to give up, and few people use the website.

VII. The road to quantification

The “brick moving” in the bull market is really a golden age, but the good times are not long. Various robots were involved in and the profit space was squeezed. At present, the robots that can move bricks are competing for the service charge. Whoever has a lower service charge will have the opportunity. Here are the codes of the two veterans for reference: Great Z and Spinach have intersection:

Great z - Multi-platform Hedge Stable Arbitrage V2.1. js (open source on FMZ has been deleted, if it’s inappropriate, you can contact us to delete the link in the text) (https://github.com/beaquant/strategies/blob/master/多平台对冲稳定套利 V2.1.js)

Spinach - bitcoin-arbitrage (https://github.com/philsong/bitcoin-arbitrage)

Spinach - raven (Upgraded version, Spinach has deleted the code, if it’s inappropriate, you can contact us to delete the link in the text) (https://github.com/beaquant/crypto-raven)

For more open source strategies, click here (https://github.com/fmzquant/strategies)

I have run the grid, moving bricks, leek harvester on FMZ platform directly, on which the open source strategy can be run directly with the parameters configured. Great Z - grid deformation strategy for unilateral grid The shorting grid broke again and again in 2019. After several adjustments, I gave it up. Then I made a similar infinite grid and ended up striking out many times. The leek harvester was opened during the period when the trading platform began to have no service charge. However, the market has changed from the past. The leek harvester has been harvested and opened several times, but it is not ideal. “Moving bricks” is a kind of happiness. Whether it is moving bricks in futures-spots, moving bricks in spots-futures.

VIII. Market making

I always like pleasure, but I don’t want to be so slow. I started to make markets with high-frequency makers, single-leg and double-leg. The core idea of market making is to find a relevant market. Because there are many robots “moving bricks”, the market price tends to be consistent. Large market fluctuations are often caused by one market, and the chain reaction spreads to other markets. To put it more generally, the market price will react more quickly on some top platforms. Other platforms follow the price of the top platforms. Because these top platforms have funds that can affect the market, and when they get some ‘message’, they turn to be insiders (see “high-frequency trading”) and work together in one direction in the market. For the micro relationship of the market, please refer to (https://medium.com/digitalassetresearch/an-analysis-of-price-discovery-in-bitcoin-spot-markets-7563fbf1c890)

Let the market price of A be P* and the market price of B be P. When you have order book data, P*&P can be obtained by using mid=(ask+bid)/2.
First, determine the true value of the product in the B market V (value)=P+Alpha
P is the mid price of market B. Assuming that the market is an inefficient market, the price does not reflect the real value of the product. The real value is V, and the difference between the two is Alpha. Since we now assume that the lead-follower relationship between A and B has been determined, in this example, Alpha can be estimated by using the moving average (MA) of P* - P. If Alpha=0.1 and P=1, then V=1.1, that is to say, the price of B market is very cheap, only 1 yuan, while the actual value of this product is 1.1 yuan.

After I have made more than 6 versions of the market maker, I still can’t defeat the scalping of HGG, and I am still unable to make a profit, put it on hold.

For higher speed, I have found many ways to get the real IP address of the exchange and the internal IP address of the exchange to reduce network latency… This is how I got the skills of market making and maintenance (welcome bosses~)

IX. Take the market

After the failure of market making, I still didn’t give up in my mind. I found that the market taking strategy of open-source should be the strategy I have been looking for. After seeing it, I was enlightened and started to work immediately. The real bot is used to adjust the parameters and trade in real money. There is a parameter that makes a profit of 3% in one day, the relative returns (returns - currency price increase) is 2.5%, and the highest relative return is 9%. In the end, after running with the same parameters, there is no such good profit. This strategy is to take orders run slowly, which is similar to the leader vs follower in the above market making. However, the market price changes very quickly, and some market makers react a little faster than others - the actual situation is basically inevitable. As before, your passive market price is always a little higher than your active market price. If your active price is one cent better than the passive price, then when your passive price changes, your active market price will also change. What you have to do here is almost enough. Now, the market has undergone rapid changes. When you change the quotation to adapt to the new market, you may find that some people’s passive orders have not been cancelled in time, and they meet the price you are willing to take the initiative to close.

X. Backtesting system

The market is changing, and a set of parameters may remain for a period of time. It is difficult to find profitable parameters, especially the market making strategies. It is really time-consuming and expensive to do real bot verification. At present, the opening position data is being recorded and the backtesting system is being built.

The open source of recording data code is in github, welcome (https://github.com/goex-top/market_data_collector)

Backtesting system in Ticker-level is still being explored. Personally, I think it needs to be updated, that is, during the backtesting, the order cannot be closed at the price sent by strategy, but it should be closed according to the opening position data. After all, the price of sending orders has increased a lot of slippage.

XI. Summary

There is a saying that “I have been charging money but never withdrawn” in digital currency. Although it is a bit self-mockery, it is really realistic for me. On the road of quantitative trading, I can’t turn back. I will not stop until the loss is over.


Related

More