Discussing the article: "Creating volatility forecast indicator using Python"

 

Check out the new article: Creating volatility forecast indicator using Python.

In this article, we will forecast future extreme volatility using binary classification. Besides, we will develop an extreme volatility forecast indicator using machine learning.

In this article, I will share my journey from despair to a working volatility forecasting system. No boring stuff or academic jargon – just real experience and working solutions. I will show you how I combined MetaTrader 5 with Python (spoiler: they did not get along right away), how I made machine learning work for me, and what pitfalls I encountered along the way.

The main insight I gained from this whole story is that you cannot blindly trust either classic indicators or trendy neural networks. I remember how I spent a week setting up a very complex neural network, and then a simple XGBoost showed better results. Or how once a simple Bollinger saved a deposit where all the smart algorithms failed.

I also realized that in trading, as in boxing, the main thing is not the force of the blow, but the ability to anticipate it. My system does not make supernatural predictions. It simply helps you be prepared for market surprises and increase your trading strategy's safety margin in time.


Author: Yevgeniy Koshtenko

 
Great article, thank you! I realise that the article is quite fresh, but I'll ask - do you have any practice of working with volatility forecasting? When I was "dabbling" with regressions myself, I confirmed third-party observations that predictions are impossible from the word "absolutely". In brief - training of the model on a period of several months with validation on the values of the next month and testing of the model on the next month. The test regression line lies perfectly on the quotes. But it is worth to shift the "target" for the model by 1 bar into the future and the test is a complete arse. It is not a secret that any indicators, including volatility, are derived from the price. There is a sceptical feeling that the result should be similar. On the other hand, I realise that the level of diversity of data in the dataset can strongly influence the performance of the model. Why I was interested in your article - I thought that your approach is much better than "fitting" financial news calendars inside the strategy to avoid trading near (before) the news.
 
Aleksei Morozov trading near (before) the news.

Hello! Thank you very much. I don't rely on just one method. I have a comprehensive Python EA, which includes naive pattern analysis, machine learning on binary code, machine learning on 3D bars, neural network on volume analysis, volatility analysis, economic model based on World Bank and IMF data, huge datasets of hundreds of thousands of rows on all countries of the world, all statistics that is possible at all....And a statistical module that builds all possible statistical features, and a genetic algorithm that optimises hyperparameters, and an arbitrage module that builds fair currency prices, and downloading the headlines and content of the world's media on a particular currency, with analysis of the emotional colouring of all news articles and notes (in 80% of cases when the media encourage you to buy something, then comes the collapse, if the news is negative - most likely goes up with a lag of 3-4 days).

Do you have any ideas on what else to add? I have only come to the conclusion that I still need to make an upload of positions from a well-known account monitoring site (I don't know if I can say its name here), I have made the code, I will write an article about it as well, the price most often goes against the crowd.

I am also working on uploading data on futures volumes, volume clusters, and analysing COT reports - also on Python.

 
Aleksei Morozov trading near (before) the news

And I use both regression models and classification models, and soon I want to make a supersystem that will receive all signs, all signals of all models, as well as floating profit/loss and profit/loss of account history, and feed it all into DQN model=).

 
venv_volatility\Scripts\activate

The response to the first command is "Python", but for this line I get "The system cannot find the specified path"

(freshly installed Python, following your instructions)