Java quantitative retrospective tells you that you are still losing money with the moonlight treasure box

Some people say that if I can travel through time and space, I will definitely make money investing in stocks. It is better to spend time studying stocks than studying high-energy physics. Look for wormholes that twist in time and space, or find where the Moonlight Treasure Box is buried. Traveling back will definitely make a lot of money.



Here I throw out such an experiment, assuming that I have traveled from a year ago to now and know that a certain stock is doing well in a certain period of time and can make money completely, and then I will travel back and simulate the stock trading behavior of ordinary retail investors. When there is a little bit of trouble, or there are some psychological changes in myself, I will keep going in and out to see what the effect is.
The picture below is the daily K-line chart of Ping An 601318 from February 2016 to the present:



it is obviously a major upswing. If you hold stocks from February 2016 to the present, then you have made a profit. However, this is not realistic, you will inevitably have to go in and out for so long.
What effect will the random trading have, let me test it:
this is the Java code on the raquant platform, if you are interested, you can take a look:



this code seems to simulate a quantitative transaction like me. In the process, I looked at the stock market every few days, groped for it myself, and decided to buy or sell. What is the probability of making a profit from such random stock trading? I took this code and backtracked it ten times. The results are as follows:
the first time:




the second time:


the third time:



the fourth time:


the fifth time:



you can see that almost all of the rhythms are going to be lost, backtracking 5 losses 4 times , as a stock that performs quite well among A shares, let alone what the probability will be in general. Therefore, stock selection is important, but after choosing a good stock, you can't buy or sell it at will. Without a rational strategy as a guide, you will still lose money.

Having said that, I have to talk about quantitative trading. The reason why quantitative trading exists is that the feeling is often unreliable, and quantitative trading is to summarize the various laws of the stock market without relying on intuition and emotion, and find a rational trading strategy. Using quantitative trading, even if the transaction fails or loses money, you can summarize the reasons, modify the strategy and keep trying until you find a strategy that suits you. I think that every stock enthusiast should not refuse to learn and use this method.

http://www.raquant.com/ RaQuant radium mine is a powerful platform integrating the study, research, development and trading of quantitative trading strategies. Committed to helping investors with simple programming or investment foundation get started quickly, and can efficiently develop quantitative trading strategies to help investors make more effective analysis and decision-making.
www.raquant.com has a series of strategies that can be used by copying it. If you write more than 5 strategies on the radium mining platform, you can have the right to apply for a real strategy. Come and try it.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326659472&siteId=291194637