Application of neuron networks to analysis of currency rate
The article analyzes the application of information technologies to the analysis of the stock market, namely to the study of the dynamics of the Ukrainian currency exchange rate, which will allow us to draw a conclusion about the market as a whole.
Рубрика | Программирование, компьютеры и кибернетика |
Вид | статья |
Язык | английский |
Дата добавления | 25.11.2023 |
Размер файла | 2,2 M |
Отправить свою хорошую работу в базу знаний просто. Используйте форму, расположенную ниже
Студенты, аспиранты, молодые ученые, использующие базу знаний в своей учебе и работе, будут вам очень благодарны.
Размещено на http://www.allbest.ru/
Application of neuron networks to analysis of currency rate
Ivan Burtnyak,
Oleksandr Kushnir
Abstract
The article analyzes the application of information technologies to the analysis of the stock market, namely to the study of the dynamics of the Ukrainian currency exchange rate, which will allow us to draw a conclusion about the market as a whole. Exploratory data analysis was used to familiarize and analyze financial data. It is an approach to summarizing, visualizing, and gaining insight into the important characteristics of a data set. When analyzing and predicting the dynamics of complex financial systems, one cannot do without such a powerful tool as the Python programming language and neural network technologies. Neural networks find new successful applications in the practice of management and decision-making, including in the financial and trade spheres, i.e. wherever it is necessary to find a certain hidden regularity and make a forecast of stock market tools aimed at achieving macroeconomic stabilization and dynamic development of the financial market. Forecasting is done the dynamics of stock market instruments, which allows to conduct analysis and make precautionary conclusions and proposals in order to minimize risks related to the pricing of derivatives that arise on the stock market. Neural networks were used to forecast the exchange rate, which allows you to minimize speculative changes in pricing, analyze stock market processes, and take specific steps to improve the situation in terms of optimizing financial strategies. As a result of the analysis, it can be noted that information technologies are widely used in financial spheres and activities. The effectiveness of the use of information technologies for data analysis and the ability of neural networks to one of the most sought-after tasks of financial activity - forecasting the future value of various instruments - have been proven . It can be argued that the best result is given by the combination of information technologies with expert systems, it allows to calculate the value of derivatives prices with great accuracy and to monitor changes in the speed of financial flows. The used technique allows to increase the accuracy of the forecast and to make informed management strategic decisions by the participants of the stock market.
Keywords: financial market, currency market, stock market, financial systems, neural network technologies, neural network.
Буртняк Іван, Кушнір Олександр. Застосування нейронних мереж до аналізу курсу валют
У статті проаналізовано застосування інформаційних технологій до аналізу фондового ринку, а саме до дослідження динаміки курсу української валюти, яка дозволить зробити висновок щодо ринку в цілому. Для ознайомлення та аналізу з фінансовими даними застосовано дослідницький аналіз даних. Це підхід до узагальнення, візуалізації та глибокого ознайомлення з важливими характеристиками набору даних. При аналізі та передбаченні динаміки складних фінансових систем в даний час не можна обійтися без такого потужного інструменту як мови програмування Python та нейромережних технологій. Нейронні мережі знаходять нові успішні застосування в практиці управління та прийняття рішень, у тому числі - у фінансовій та торговельній сферах, тобто усюди, де потрібно знайти певну приховану закономірність та зробити прогноз інструментів фондового ринку, спрямованих на досягнення макроекономічної стабілізації та динамічного розвитку фінансового ринку. Здійснено прогнозування динаміки інструментів фондового ринку, що дозволяє проводити аналіз та зробити запобіжні висновки і пропозиції, щоб мінімізувати ризики щодо ціноутворення деривативів, які виникають на фондовому ринку. Застосовано нейронні мережі для прогнозування валютного курсу, що дозволяє звести до мінімуму спекулятивні зміни в ціноутворенні, здійснювати аналіз проходження процесів на фондовому ринку та робити конкретні кроки для покращення ситуації щодо оптимізації фінансових стратегій. В результаті проведеного аналізу можна відзначити, що інформаційні технології мають велике застосування у фінансовій сфері діяльності. Доведено ефективність застосування інформаційних технологій для аналізу даних та здатність нейронних мереж до однієї з найбільш затребуваної задачі фінансової діяльності - прогнозування майбутньої вартості різних інструментів. Можна стверджувати, що найкращий результат дає поєднання інформаційних технологій з експертними системами це дозволяє з великою точністю обчислювати значення цін деривативів та проводити моніторинг зміни швидкості фінансових потоків. Використана методика дозволяє збільшити точність прогнозу та приймати обґрунтовані управлінські стратегічні рішення учасниками фондового ринку.
Ключові слова: фінансовий ринок, валютний ринок, фондовий ринок, фінансові системи, нейромережні технології, нейронна мережа.
Introduction
Nowadays, the application of information technologies in financial markets is particularly relevant, since the traditional, which have already become classic, approaches were developed to describe a stable, slowly evolving and radically dynamic changing world, a world that has not yet deviated much from the state of equilibrium. By their nature, these methods and approaches were not designed to describe and model rapid changes, unpredictable jumps and complex interactions of individual components of the modern world market process. With billions of cashless financial transactions taking place every day, information technology is ideally suited to the way financial systems are set up. The software tools and computer systems that exist for automation create enormous value for the use of information technology in finance. Predicting the dynamics of the stock market is quite convenient with the help of various computer programs.
The stock market in Ukraine is at the stage of formation. One of the reasons for this is the relatively short life of the stock market. Huge efforts of the state should be aimed at increasing investors' confidence in the Ukrainian econ omy. One of the important tasks on the way to stabilize the stock market of Ukraine is to attract private individuals to invest in enterprises and large companies of our country. For investors, the possibility of forecasting the situation on the securities market is especially necessary and relevant (Borodin & Salminen, 2002).
Theoretical background
Fundamental foundations research functioning of the stock market was found own reflected in foreign and domestic works scientists (Burtnyak & Malytska, 2019). Now domestic stock market significantly lags behind from the majority European countries in their development (Burtnyak & Malytska, 2020) and the derivative segment financial tools is insignificant that due to low level transparency operations, imperfection legislative base, low level public trust and protection of investors rights. In addition, currently developed many approaches which describe dynamics of the stock market (Burtnyak & Malytska, 2021). This is reflected in the works (Cox et al., 1985). The first works in this direction were done by (Going-Jaeschke & Yor, 2003), who focused attention on methods of evaluating exchange rates (Gorovoi & Linetsky, 2004). Possibilities of forecasting the pricing of stock market instruments have become the subject of research (Ho & Lee, 1986). information technologies currency
The situation on the stock market of Ukraine is constantly changing under the influence of globalization processes taking place in external financial markets, internal permanent financial and political crisis, unstable economic situation, etc. Therefore, despite the significant contribution to the development of the problems of the functioning of the stock market, such changes determine the objective necessity of constantly searching for new approaches to forecasting the dynamics of the stock market (Hull & White, 1987).
Research objective, methodology and data
Despite the significant amount of research in this direction, it is necessary to highlight the method of applying the Python programming language to the analysis of the stock market, namely to the study of the dynamics of the Ukrainian currency exchange rate, which will allow us to draw a conclusion about the market as a whole. Exploratory data analysis (EDA) is used to review and analyze financial data. This is an approach to generalization, visualization, and deep familiarization with the important characteristics of a data set (Linetsky, 2004).
Exploratory data analysis is an important method because it allows us to be more confident that the future results will be valid, correctly interpreted and applicable to the desired business contexts. This level of confidence can only be achieved after evaluating the raw data and checking for anomalies, ensuring that the data set was collected without error. EDA also helps uncover ideas that may not have been obvious or worth exploring for business and data analytics stakeholders, but may be very informative about a particular case. The analyst checks the assumptions and determines the regularities that will allow to understand the problem and make the choice of the neural network model. Thus, the distribution of the values of each field is checked, the number of missing values is determined, and possible ways of replacing them are found. In addition, the methods of statistics and financial analysis can be used (Lorig, 2014).
The purpose of the article is to study the application of information technologies, in particular the Python programming language, to the analysis of the stock market, and in particular the currency market. To do this, you need to deal with a number of specific issues: familiarize yourself with the historical data of the hryvnia exchange rate; make a research analysis; review the main points related to the construction of neural networks and implement a model of forecasting financial time series with their help (Merton, 1973; Shvets, 2020).
Results and discussion
Let's proceed to the direct analysis of the exchange rate of the national currency. The Python program has ready-made tools for further investigation of financial data. The exchange rate is determined using a certain mechanism called quotation. In our case, it will be the opposite, since the value of a unit of our national currency is expressed in foreign (dollars). At the same time, the amount in the national currency will be equal to the amount in the foreign currency divided by the foreign currency rate. The buying rate will be higher than the selling rate. Python is an interpreted high-level object-oriented programming language with strict dynamic typing. As of fall 2022, it ranks first in popularity among programmers, and therefore has a wide community.
First, we should download the historical data of the hryvnia at the purchase rate. This can be done with the help of the yfinance library, which is consonant with the name of the site from which we will receive the dataset . We analyze the data from 01.01.2016 to 02.23.2022 before the start of the war in Ukraine, because the forecast during military operations cannot be completely accurate. Data is presented in so-called dataframes, a certain program interface with rows and columns filled with data. For further actions, you need to import the libraries pandas, mathplotlib, and seaborn. Pandas is for data manipulation and others for visualization. Using the shape () function, we will check the dimensions of the dataset, and by summing the isna () values, we will find out whether there are missing data. Also using the describe () function you can find out general statistical indicators of our currency data, namely: quantity values, average, average quadratic, minimum, maximum and quantiles. Next step will be visual representation of each column depending from gives observation.
Fig. 1. Visualization of the hryvnia exchange rate
Further, with the help of moving averages, you can determine a certain trend of the exchange rate.
Fig. 2. Defining a trend using moving averages
You can trace the well-known pattern that when a curve with a shorter period is above a longer one, the trend is upward and vice versa.
This graph also gives an opportunity to see a certain seasonality, namely: at the beginning of each year, the dollar rate rises and reaches a certain maximum, and by the summer it falls sharply. The exception is 2020, because the Ukrainian economy suffered due to the coronavirus restrictions. Let's illustrate it on graphics.
Fig. 3. Seasonality of the exchange rate
With the help of visual perception and not only, you can check the normality of the price distribution, the stationarity of time financial series, etc.
All types of prices are strongly interrelated, so not only the closing price does not follow a normal distribution, but also others. In order to better understand this, you need to visualize it using a scatter diagram. As can be seen in Figure 4, the correlation is positive and linear everywhere, so a change in one of the factors directly affects the change in other factors. We also have the opportunity to calculate the volatility of the hryvnia.
Fig. 4. Price correlation chart
Volatility is statistical indicator dispersion profit for this valuable paper, currency or market index. In the majority cases, then above volatility, tim riskier is financial tool. Volatility is often measured as standard deviation, or dispersion between profitability from the most valuable paper, currency or market index. In financial market s, volatility is often associated with large swings in any direction. For example, when stock market increases and c decreases more than one percent for long period of time, it is called a "volatile" market. We can also visualize it all.
Fig. 5. Volatility histogram
The volatility of the hryvnia is 9.73% in annual terms.
After analyzing the historical data of the hryvnia exchange rate against the dollar, we can use neural networks to predict the future exchange rate.
To date, many different neural network models have been developed. The network is very similar to a statistical method, such as regression analysis.
Teaching neural networks focused on the following objects:
o layers which unite to the network (or model);
o weekends data and relevant them goals;
o functions losses, which determines the reverse signal communication that used for training;
o optimizer which _ determines how it happens training.
The layer is made up of small individual units called neurons. A "neuron" in a neural network is a mathematical function that collects and classifies information according to a specific architecture. He is its foundation. For working with artificial neural networks, Python, which contains many special tools. One such is the Numpy libraries i Keras .
It is necessary to divide the data set into training and test. On the first, the neural network will learn, and on the second, it will test its abilities. Let's do it in an 80/20 ratio.
Now let's deal with other parameters :
• Epochs is the number of times the network went through the entire data set to learn.
• Batch size - total number samples present in one batch. We can't transfer the entire set data into the neural network immediately. So, it is necessary divide set data per quantity batches, sets or parts.
• Early stop - A function that stops the training process when the loss does not improve within a certain number of epochs, in our case 5. This helps to combat overtraining, where the model is just "jagging" instead of actually learning to predict.
• Validation data - part educational data which will be used as data checks. The model will highlight this one-part educational data, will not train on it and evaluate losses models on these data at the end each era. We put their test set.
Now let's start process training. He looks like this:
Fig. 6. Network learning process
After the process teaching is over, we can to visualize losses model, depending from era.
Losses quickly are reduced to of the lower plateau, which signals that the model was improving for everything educational process. However, the most important part took place during the first few era, and then remained almost unchanging (Vasicek, 1977; Younsi & Nafla, 2019).
One feature will be that we can specify the number of observations that will influence the predicted result. In our case it will be 50. Let's call it a time step. That is, they will affect 51 values. Then everything will move forward by one value. Let's plot our test and forecast data.
Fig. 8. Graph of predicted and actual values
The actual values are marked in black, and the predicted values are in pink. As you can see from the figure, they almost coincide, which allows you to make highly accurate forecasts. After analyzing and forecasting the exchange rate, we can say with confidence that information technologies have significant applications in the financial sphere. In addition, the potential for development is still far from being reached in the information industry itself, and implementation in the economic sector requires some time. All this creates many opportunities for further development.
Conclusion
As a result of the analysis, it can be noted that information technologies are widely used in the financial sphere of activity. The effectiveness of the use of information technologies for data analysis and the ability of neural networks to one of the most sought-after tasks of financial activity - forecasting the future value of various instruments - have been proven. It can be argued that the best result is provided by the combination of information technologies with expert systems, it allows to minimize speculative changes in pricing, to analyze the progress of processes in the stock market and to take specific steps to improve the situation regarding the optimization of financial strategies.
As for the prospects for further development, it is worth paying attention to the fact that the potential has not yet been reached in the information industry itself, and implementation in economic sectors will take some time.
Prospects for further research in this direction are the study of market dynamics to create a favorable investment climate for improvement situations of optimization financial strategies.
References
1. Borodin, A., & Salminen, P. (2002). Handbook of Brownian motion: facts and formulae. Birkhauser.
2. Burtnyak, І. V., & Malytska, A. P. (2019). CEV Model with Stochastic Volatility. Journal of Vasyl Stefanyk Precarpathian National University, 6(3-4), 22-28. https://doi.org/10.15330/jpnu.6.3-4.22-28
3. Burtnyak, І. V., & Malytska, A. P. (2020). Construction of the fundamental solution of a class of degenerate parabolic equations of high order. Carpathian Mathematical Publications, 12(1), 79-87. https://doi.org/10.15330/cmp.12.L79-87
4. Burtnyak, І. V., & Malytska, A. P. (2021). Degenerate parabolic systems of the diffusion type with inertia. Journal of Mathematical Sciences, 249(3), 355-368. https://doi.org/10.1007/s10958-020-04947-2
5. Cox, J. C., Ingersoll, J. E., & Ross, S. A. (1985). A theory of the term structure of interest rates. Econometrica, 53(2), 385--408.
6. Going-Jaeschke, A., & Yor, M. (2003). A survey and some generalizations of Bessel processes. Bernoulli, 9(2), 313-349.
7. Gorovoi, V., & Linetsky, V. (2004). Black's model of interest rates as options, eigenfunction expansions and Japanese interest rates. Mathematical Finance, 14(1), 49-78. https://doi.org/10.1111/j.0960-1627.2004.00181.x
8. Ho, T. S. Y., & Lee, S. (1986). Term Structure Movements and Pricing Interest Rate Contingent Claims. The Journal of Finance, 41(5), 1011-1029. https://doi.org/10.1111/j.1540-6261.1986.tb02528.x
9. Hull, J., & White, A. (1987). The pricing of options on assets with stochastic volatilities. The Journal of Finance, 42(2), 281-300. https://doi.org/10.1111/j.1540-6261.1987.tb02568.x
10. Linetsky, V. (2004). The spectral decomposition of the option value. International Journal of Theoretical and Applied Finance, 7(3), 337-384. https://doi.org/10.1142/S0219024904002451
11. Lorig, M. J. (2014). Pricing derivatives on multiscale diffusions: an eigenfunction expansion approach. Mathematical Finance, 24 (2), 331-363. https://doi.org/10.1111/mafi.12007
12. Merton, R. C. (1973). Theory of rational option pricing. Bell Journal of Economics and Management Science, 4(1), 141-183.
13. Shvets, S. (2020). The golden rule of public finance under active monetary stance: endogenous setting for a developing economy. Investment Management and Financial Innovations, 17(2), 216-230. http://dx.doi.org/10.21511/imfi.17(2).2020.17
14. Vasicek, O. (1977). An equilibrium characterization of the term structure. Journal of Financial Economics, 5(2), 177-188.
15. Younsi, M., & Nafla, A. (2019). Financial stability, monetary policy, and economic growth: Panel data evidence from developed and developing countries. Journal of the Knowledge Economy, 10(1), 238-260. https://doi.org/10.1007/s13132-017-0453-5
Размещено на Allbest.ru
...Подобные документы
Information security problems of modern computer companies networks. The levels of network security of the company. Methods of protection organization's computer network from unauthorized access from the Internet. Information Security in the Internet.
реферат [20,9 K], добавлен 19.12.2013The material and technological basis of the information society are all sorts of systems based on computers and computer networks, information technology, telecommunication. The task of Ukraine in area of information and communication technologies.
реферат [29,5 K], добавлен 10.05.2011Способы оценки производительности компьютера. Метрики типа "rate", "non-rate". Двухбитный конечный автомат для прогнозирования переходов. Внеочередное завершение команд. Проблемы реализации точного прерывания в конвейере. Процессоры шестого поколения.
лекция [800,1 K], добавлен 14.12.2013Программа обработки одномерного массива средствами Visual Basic for Application (VBA) на предмет преобразования, печати, удаления, сортировки, поиска сумм, положительных, чётных элементов, их кратности и дополнения другими элементами и значениями данных.
контрольная работа [12,3 K], добавлен 07.10.2012Theoretical aspects of the application digital education resources in teaching computer science according to the capabilities of electronic programs. Capabilities of tools Microsoft Office and Macromedia Flash. Application of the program Microsoft Excel.
контрольная работа [1,5 M], добавлен 07.07.2013Visual Basic for Application. Объекты и коллекции. Использование VBA в среде Access. Основы современной технологии проектирования АИС. Автоматизированное проектированиеCASE-технологий. Реинжиниринг бизнес-процессов и проектирование корпоративной ИС.
курсовая работа [2,1 M], добавлен 22.02.2008Правила создания и особенности работы с приложением Windows Application. Рассмотрение структуры панели Properties и ее функционального назначения. Возможности пункта меню "View". Практическая разработка приложения - калькулятора для сложения двух чисел.
лабораторная работа [99,1 K], добавлен 01.12.2011Краткая история и основные цели создания Wireless Application Protocol (WAP) — беспроводного протокола передачи данных. Особенности работы WAP-броузеров. Адресация беспроводной сети. Поддержка протоколов Internet при использовании IP соединений.
реферат [623,3 K], добавлен 11.04.2013Характеристика системы программирования Visual Basic For Application. Автоматизация подписки на газеты и журналы, а так же их учёт. Связь между сходными документами, Базой данных и выходными документами. Встроенные объекты MS Access, методы и свойства.
курсовая работа [350,8 K], добавлен 22.09.2012Характеристика мови програмування VBA (Visual Basic for Application): можливості й засоби. Використання редактора Visual Basic. Створення та виконання VBA-програм. Типи даних, змінні й константи, операції й вирази. Керуючі оператори, процедури й функції.
реферат [29,9 K], добавлен 28.06.2011Алгоритми розв’язання задач у вигляді блок–схем. Використання мови програмування MS VisualBasic for Application для написання програм у ході вирішення задач на одномірний, двовимірний масив, порядок розв’язання задачі на використання символьних величин.
контрольная работа [742,9 K], добавлен 27.04.2010Решение экономических задач с помощью Microsoft Excel и инструментария Visual Basic For Application. Способы запуска редактора Visual Basic, правила его синтаксиса. Создание автоматических макросов по сортировке и выборке. Создание управляющих кнопок.
курсовая работа [852,0 K], добавлен 24.09.2010IS management standards development. The national peculiarities of the IS management standards. The most integrated existent IS management solution. General description of the ISS model. Application of semi-Markov processes in ISS state description.
дипломная работа [2,2 M], добавлен 28.10.2011Тестування і діагностика є необхідним аспектом при розробці й обслуговуванні обчислювальних мереж. Компанія Fluke Networks є лідером розробок таких приладів. Такими приладами є аналізатори EtherScope, OptіVіew Fluke Networks, AnalyzeAir та InterpretAir.
реферат [370,5 K], добавлен 06.01.2009Общая характеристика и особенности программы Corel Draw X3, основы работы с ней. Технологические возможности программы, ее интерфейс. Порядок и варианты разработки визитной карточки фирмы при помощи Corel Draw X3, импортирование растровых объектов.
аттестационная работа [33,5 K], добавлен 26.02.2009Работа с векторной графикой в графическом пакете Corel Draw. Средства создания и редактирования графических образов, удобный интерфейс и высокое качество получаемых изображений. История разработки графического пакета. Практическая значимость Corel Draw.
презентация [3,0 M], добавлен 07.09.2012Улучшение функции обслуживания клиентов при помощи добавления в интерфейс Microsoft Dynamics CRM 4.0 возможности выхода на локальный ftp сервер организации. Программные решения для интеграции Microsoft CRM с приложениями, инструменты для разработки.
дипломная работа [4,1 M], добавлен 19.02.2012Анализ систем: Галактика, Microsoft Dynamics AX, Эталон (DOS-версия), SAP R/3. Plazma и Apec: замечания по инструкции, возможности систем, анализ и сравнение. Знакомство с предложенными системами: LBSupervise, Microsoft Dynamics AX, Notematrix, PostBooks.
курсовая работа [1,8 M], добавлен 22.05.2012Система программирования - Visual Basic. Новые возможности. Быстрый запуск проекта. Средства управления. Что позволяет Visual Basic. Краткое описание работы. Corel Draw. Отличие векторной графики от растровой. Краткое описание работы в Corel Draw.
курсовая работа [1,3 M], добавлен 04.10.2008Програми лінійної та розгалуженої структури. Програмна реалізація функцій для роботи з датою та часом. Робота з візуальними компонентами керування. Створення інтерфейсу користувача стандартними подіями. Глобальні ідентифікатори Screen, Mouse, Application.
отчет по практике [1,3 M], добавлен 24.02.2015