Welcome to subscribe to the Python Data Analysis Practical: Building a Quantitative Trading System for Stocks booklet. After you finish this booklet, be sure to use your knowledge to help us analyze stocks!

preface

On July 16, the A-share market suffered A deep correction, and the Shanghai Composite Index, THE CSI 300 index and the GEM index plunged 4.50%, 4.81% and 5.93% respectively. Many investors were extremely panicked.

In fact, open multi – cycle chart to see short-term adjustment is inevitable, just a little big plunge. I am in the knowledge planet [4-23 record on July 16 A share market after A few experiences after the trend of sharp fall] also mentioned that the stock should control good sense of rhythm, avoid by all means to chase high, when buying the stock should choose to adjust.

Of course, many friends will ask, how to judge the position of adjustment?

Believe everybody heard quantitative trade this thing!

Quantitative trading is an emerging systematic financial investment method. It integrates the knowledge of multiple disciplines, uses advanced mathematical models to replace human subjective thinking to formulate trading strategies, and uses the powerful computing power of computers to backtest the profit and loss “probability” of trading strategies from huge historical data such as stocks, bonds and futures. Helps investors make accurate decisions by managing the “probability” of profit and loss.

Nevertheless at present domestic and foreign introduce quantitative book, course and so on, it is the personage of financial background is written mostly, so their Angle and our common stock people can be a little different. Partial research and analysis of the model algorithm may be we do not understand, do not use, some quantitative system for the establishment of institutional trading, is not suitable for small funds of ordinary shareholders.

So, what is the suitable way for ordinary shareholders to open quantitative trading?

This article introduces the classic golden ratio of stock analysis to find the pressure and support levels in the uptrend/downtrend, so that traders can better judge the time to “enter” and “exit”.

With a ground gas scene to share with you, how ordinary shareholders to use quantitative trading!

What is the Golden Ratio

Fibonacci sequence is not unfamiliar to you, it refers to such a series: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233…………

The Fibonacci sequence has many magical properties. Dividing the current number by the next number yields the following results:

0 ÷ 1 = 0 1 ÷ 1 = 1 1 ÷ 2 = 0.5 2 ÷ 3 = 0.6666… 3 ÷ 5 = 0.6 5 ÷ 8 = 0.625 8 ÷ 13 = 0.615… 13 ÷ 21 = 0.619… 21 ÷ 34 = 0.617… 34 ÷ 55 = 0.618… 55 ÷ 89 = 0.617…

89 ÷ 144 = 0.618…

144 ÷ 233 = 0.618…

Notice that from 21 divided by 34 to infinity, the quotient is an irrational number approaching 0.618!

Conversely, when the latter value is divided by the preceding value, the result is as follows:

1 ÷ 0 = 0 1 ÷ 1 = 1 2 ÷ 1 = 2 3 ÷ 2 = 1.5 5 ÷ 3 = 1.67 8 ÷ 5 = 1.6 13 ÷ 8 = 1.625 21 ÷ 13 = 1.615… 34 ÷ 21 = 1.619… 55 ÷ 34 = 1.618… 89 ÷ 55 = 1.618… 144 ÷ 89 = 1.618…

Correspondingly, from 34 divided by 21 to infinity, the quotient is an irrational number approaching 1.618! 0.618 and 1.618 are strangely reciprocal of each other, and 0.618 is the ratio known as the “Golden Ratio”! That’s why the Fibonacci sequence is called the Golden section sequence.

Fibonacci sequence is a basic attribute of nature, especially the golden ratio in sequence, which appears in many fields such as painting, sculpture, architecture, etc. People agree that the golden ratio is the most perfect. For example, the “broken Arm Venus” sculpture, 2.02 meters tall, her navel is the golden section, the ratio of the part above the navel and the part below the navel is close to 0.618.

It can be seen that the golden ratio is an objective law acting on people’s subconscious, with a strong natural attribute, including the analysis of the stock market.

Strategy implementation

There is no permanent bull market in the stock market, and there is no permanent bear market. The stock price has been following the running rule of high and low alternate with each other. When there is a reversal of stock price trend, it is very likely to encounter temporary resistance or support on the golden ratio of 0.382 and 0.618. Therefore, through the golden ratio to find out the pressure and support levels in the upward/downward trend, helps traders to better judge the timing of “entry” and “exit”.

Let me first share a case I worked on last year, which was also submitted to CSDN at that time.

The chart for New Hope from January 2019 to June 2019 is as follows:

Usually the stock price will not pull in place, mostly using spiral rise, that is to say, before the new rise, there should be a wave of retreat, wash off the floating chip to gather momentum, and the extent of retreat just in line with the golden section of the proportion 0.618.

The “New Hope” stock price showed an upward trend during the half-year period, with several short retracement movements in the middle. We use the golden ratio to calculate the position of the next retracement. The calculation formula is (maximum value – minimum value) * golden section ratio + minimum value, and the implementation method is as follows:

The next step is to verify the validity of the golden ratio to judge the support/resistance level. As shown in the figure below, the first round of retracement is exactly at the golden ratio of 0.618, namely 11.61.

Take my last case 000783, the first round of retracements is also in the golden ratio 0.618 near the position.

Although the golden ratio can help traders improve the success rate of the judgment, support or resistance level and other technical analysis tools, however, it also has certain limitation, such as selecting the wrong band moves as the benchmark of judging the support/resistance levels, can lead to calculate the support/resistance there is a certain error. Therefore, it is critical to know how to use it under what circumstances.

conclusion

Through this simple and practical stock quantitative scenario, I hope to give the majority of friends for quantitative trading have an intuitive feeling.

Then, we should upgrade their own way to fry, the stock before their own that set of methods, abstract into a strategic model, with quantitative methods to the whole market back test evaluation, and then let the program to help us monitor the trend of the market. This is the quantitative trade that ordinary shareholder place suits opens way!

— — — — — — — — — — — — — — — — — — — — — — — — if you want to have a more comprehensive knowledge of involved, more system way of from 0 to 1, recommend to all my books here the Python stock quantitative trading from entry to practice! Tmall, JINGdong, dangdang fully open for sale!

At the same time, you are welcome to follow my wechat official account [Yuanxiao Master Takes you to quantitative Trading in Python] to learn more about quantitative trading in Python