Modern trading in the stock market is based on well-defined and proven models. Nobody relies on luck or intuition. High speeds and huge volumes of information do not allow making decisions without analytical justification. The models that most traders use are quite simple to build, however, as mentioned above, large amounts of data increase the time it takes to build a model with a subsequent forecast. The development of modern technologies, as well as the improvement of other people's strategies, force traders to complicate their own predictive models, which only increases the power requirements that traders use. All this leads to the fact that traders should be able to build a model quickly on actual data in order to know the next market behavior. Another problem with building models and then trading based on the results of the model is that there are no tools that allow you to compare the results of the models to ascertain the quality of the model.

The subject of this study is the creation of such a system of analysis and trading in the stock market, which will not only allow you to quickly obtain ready-made models on updated data, but also do it without human intervention. Moreover, this system should allow the user to compare the constructed models according to various criteria, in order to ultimately choose the model that outperforms the others in a particular stock in most parameters. The object of this study is the process of exchange trading. The subject of the research is the automation of the process of analysis and exchange trading. One of the main hypotheses that will be tested in this study is the ability to combine and link models to obtain more accurate forecasts, as well as the hypothesis that it is possible to create a clear structure for choosing a model, depending on the market situation. Stock markets play a very important role in the modern economy. Stocks aren't just for traders.

Shares reflect the real state of affairs of the company, the state of affairs in the industry and in the country as a whole. It is important to understand how stocks will move not only in the near future, but also in the medium and long term. Moreover, you need to be confident in the forecasts. Despite the presence of some problems, the field of analysis and trading in financial markets, and in particular in the stock markets, is widely popular among representatives of various fields of knowledge. The existence of trading strategies, a variety of instruments, software solutions and brokers indicates some redundancy of solutions. With all the variety, there are no high-quality and effective solutions that can be applied in various market conditions and in various promotions. Moreover, there is no strict system of criteria for choosing the best model, as well as a tool for comparing model results in the long term.

The purpose of this study is to optimize the process of analysis and trading in the stock market, which means reducing the time and resources spent within these processes, with the subsequent receipt of relevant predictive results and profit. To successfully achieve this goal, it is necessary to develop: · the structure of the system, which will allow the analysis of historical time series of stock prices, and, based on the models obtained, to build forecasts of price changes; · Criteria of efficiency, automated exchange trading; connection to a trading broker, which allows trading according to the developed strategy, as well as having access to the exchange at any time of the market; visualization scheme of all models, as well as all developed strategies with all performance criteria for visual assessment and increasing confidence in the created system. Moreover, to fully achieve the goal, all tasks should involve minimal user participation in the system: the user should only enter the name of the action, the time period on which the forecast is based, and also be able to view charts, results and choose from several strategies according to the criteria provided . To reduce the risks of the system, it is also worth implementing the opening and closing of trading positions. This study is a combination of several groups of methods. This situation is dictated by the fact that before creating a system, it is necessary to carry out some theoretical observations and derive some theses, which then will need to be verified in practice using the created product. At the very beginning, the study is based on the observation and comparison of those systems and models that are used in modern analysis of the stock markets.

Then, based on the ideas that were chosen, the requirements for the system are formalized, as well as the synthesis of the system structure. Subsystem analysis is then carried out to further identify the strengths and weaknesses of the system. After that, simulation is carried out on test data. The results of the model are evaluated and analyzed. finalthe research stage is an experiment followed by a description of the results and conclusions. The first chapter of the study provides a detailed analysis of the structure of the stock market, as well as the mechanisms of trading in the stock market. The first chapter also provides various classifications of exchange trading.

It then discusses stock market analysis methods and the rationale for automation. In the second chapter of the work, the structure of the created system is directly considered: all subsystems, their functions, the algorithm of operation, as well as structural features, if necessary. Also in the second chapter, all the functionality of the system being created is considered. Moreover, this chapter discusses the data that is downloaded for analysis, the target structure that can be processed, and the data structures used. The third chapter describes the scheme for checking the quality of the created models, the performance criteria used, as well as the importance of each criterion for the created scheme with the rationale for choosing this system for evaluating the effectiveness of the system. The third chapter also describes the methodology for studying the effectiveness and subsequent analysis of the simulation results. At the end of the work there are quantitative conclusions that are available at this point in time, because.

with each new test run, the system undergoes some changes, qualitative conclusions about the tasks performed within the framework of the study, as well as possible modifications of the system in order to improve the quality of work and possible areas of application of the created system. All additional materials, the source code of the system, additional calculations and tables are given in the appendix to the work. This work is based on theories and methods from different fields of knowledge. Most of the models that will be explored and implemented are statistical models, more specifically, econometric time series models (Soren Bisgaard, 2011) (Tsay, 2001) (A.I. Orlov, 2009). The system also uses machine learning models.

This area is quite young, but there are many articles. (Alpaydin, 2004) (Trevor Hastie, 2001). It is also worth mentioning that these models and criteria will not be able to form a system. All connections and causes belong to the analysis of stocks and financial markets (Chan, 2009) (Erlich, 1996) (Schwager, 1996) (Belova E.V., 2006). Chapter 1.

Methodology of automation of exchange trading In the modern world, the phrase "Financial market" is quite common. However, not all people correctly understand what it is. The financial market is a certain structure of relationships that, in a market economy situation, implements borrowing, exchange, investment, and the sale and purchase of economic goods, where money is an intermediary asset (Belova E.V., 2006). At the moment, the financial market can be divided into the derivatives market, where the conclusion of futures contracts, such as forwards, futures and options; the money market, where funds are provided for a period of less than one year; the capital market, where funds are provided for a period of more than one year; the foreign exchange market, where transactions are made for the purchase and sale of foreign currency and the movement of foreign capital; and the stock market, where securities are traded. We are more interested in trading in the stock market, despite the fact that trading in the futures and currency markets is very popular at the moment.

The stock market or securities market is an association of economic relationships that results in the issuance and redistribution of securities (Schwager, 1996). The emergence of this market is directly related to commodity production, because manufacturers constantly need to raise capital to grow their business. Through the issuance of shares and bonds, companies were able to instantly receive investments for the development of new business branches, product lines, and so on. It is worth clarifying that a security is a monetary document drawn up according to certain rules that certifies property rights that can be realized or transferred only upon presentation of this document. Securities include shares, bonds, bills, checks, etc. This study analyzes and trades in stocks. 1.

1 Types of exchange trading At the moment, there are many different approaches to conducting exchange trading (Chan, 2009). Most of them have many followers and adherents. If you look in more detail, then there are several classifications by type of exchange trading. Let's consider some of them. The first classification is based on the styles of conducting exchange trading. At the moment, there are 5 styles: scalping, impulse trading, technical trading, trading on the intermarket spread and arbitrage. Scalping is trading in which transactions are made with a high frequency.

Each transaction brings a small profit, but their number in the end makes the final profit huge. The probability of losses with this style of trading on the exchange dosvery small, because scalping is not based on profiting from random fluctuations in price. Trading on impulses consists in the thesis that a rising price will continue to rise, and a falling one will fall. The essence of the method is that you need to have time to open a position at the moment of a trend reversal. If you incorrectly recognize a trend reversal or delay too much in opening a position, you can lose your invested funds. This method is considered quite risky, because. Determining the right trend, especially a trend change, is very difficult and error prone.

Technical trading is based on the analysis of a sufficiently large number of indicators, charts and models, as well as the inclusion in the analysis of some financial indicators about the company (Schwager, 1996). The main disadvantage of this approach is the fact that all decisions made by a trader depend on the past, while the past does not always carry adequate information. Another drawback is the lack of an ideal indicator, model, chart and analysis approach. Each stock requires its own instruments, the relevance of which can change over time. Trading on the intermarket spread involves opening one long and one short position in two different instruments with a high level of correlation between them. This method is considered difficult, because. requires a transaction in two markets at once.

Arbitrage involves working with one financial instrument on different trading floors. This method is based on the difference in price and profit is derived from the simultaneous purchase and sale of one asset. Another arbitrage strategy is to open two buy and sell positions on an illiquid asset. When a sell position is executed, the buy is also closed. This approach allows you to both get rid of unnecessary securities and make a profit. Another division is based on the division by types of interactions with an intermediary. In this classification, gambling on the stock exchange, trust management and online trading are distinguished.

Playing on the stock exchange implies a classic interaction between participants in the securities market by phone. This type of interaction is suitable for long-term or medium-term investments. By purchasing shares of large companies, the buyer invests his money with subsequent profit in the form of dividends. Trust management implies the transfer of rights to manage the client's shares and funds to a specialized investment company. This option is suitable for those people who do not have sufficient knowledge, time and opportunities for independent trading, but they want to benefit. Investment companies for a certain commission make transactions on behalf of the client to exaggerate capital. Another type of exchange trading, which is classified by interaction with an intermediary, is online trading.

This approach includes both short-term and long-term investments. The client himself creates his own strategy of behavior in the market and follows it. This type of trading is carried out using special trading systems and terminals provided by brokers through an Internet connection. This type of trading is suitable for people who are willing to devote time to trading, as well as those who have their own idea for creating a trading strategy and want to implement it. Another interesting classification is the assessment of the trader's awareness (Narang, 2009). This classification divides all traders into two broad categories - informed and uninformed. Those who belong to the first category base their decisions on certain types of analysis - fundamental and technical.

Such traders have a certain confidence in their actions and rely on the data of the constructed models. Representatives of the second category are those people who take into account only what their intuition tells them when making decisions in the stock market. Traders of this type do not use the methods of either fundamental or technical analysis. By simply observing the dynamics of the stock market, these traders make their trades, relying on their own experience. Also, traders can be divided by the time of holding a position. This classification distinguishes day traders (day traders), scalpers and pipsers, swing traders, position traders (short-term), medium-term traders and long-term traders. Day traders make their trades during one trading session (trading day).

Traders in this category never carry over open positions to the next day and close them at the end of the day. The main motivation for this behavior is the large gaps between one day's closing prices and the next day's opening prices. Moreover, this approach allows you not to pay the loan. One of the features of such trading participants is the tendency to choose securities with high price volatility (volatility). Most often soAll traders have little capital. Scalpers and pipsers are those players who make a large number of transactions in a short period of time, ranging from tens of seconds to tens of minutes. Due to the fact that representatives of this category make many transactions of small profit in a short time, in total, at the end of the trading day, they can have a fairly large profit.

Most often, scalpers prefer to use securities with low volatility, because. any sudden change in price can greatly harm the trader. The scalping process as a whole consists of opening a position and following it until the price direction changes, and at the moment of closing, the position is closed. Profit is realized through a simple difference between the purchase and sale price of a security.