Python algorithmic trading tools. SMA + Bollinger Bands on Severstal shares + ready-made strategy code

Previous article on " Calculating Daily Price Change "





When I wrote the last article (it was the first of a series), I did not expect that readers would be divided into 2 categories:





  1. Those who believe in algorithmic trading





  2. Those who believe that I am a charlatan





For both groups, I remind you that the goal of algorithmic trading is to increase the likelihood of making a profit on a trade.

Or, as they say in "game theory" - to make the mathematical expectation of the game positive.



Therefore, I invite the audience to agree on the following:





  1. If your comment has a scientific meaning, then write it under the post in Habré.





  2. If your comment carries a controversial message, then I ask you to ask it in a specially created channel in the cart .





Actually, here I come to the essence of this article.





SMA (Simple Moving Average) is an indicator based on calculating the average closing price of a security.



For those who do not know what SMA is, I will give an algorithm for calculating it:





  1. "close" t1 t2 t1 t2.





  2. N close.





  3. (simple average).





  4. ( moving) 3





  5. 4 , t2





SMA (N=20) close ( CHMF) 27 2021.:





, SMA Close 20 .





(Bollinger Bands)

1980 SMA, STD (standart deviation, ). , , .



, std 2. , 95% close 5% .





, close , . , , close , .



: , ( ).





Google Colab





RSI.





UPD:

- Google Colab. 100.



, ( , ), '2020-05-31' '2021-05-31' CHMF :

1. = 1.28

2. = 0.0038

3. = 0.015

4. = -0.045

5. = 0.052

6. = 0.007

7. = 153

8. = 100

9. = 53








All Articles