ریاضی و جامعه (Dec 2023)
Prediction of gold price pattern by fractal interpolation
Abstract
Analyzing and examining the price trend of an asset is a fundamental step in managing investment risk on that asset. Therefore, in markets, predicting the price trend of an asset is of special interest to traders and even plays a crucial role in a country's monetary policies. Based on this, in this paper, we will try to use the concept of fractal interpolation to predict the price trend of gold, given its price fluctuations and greater importance compared to other metals in markets. By analyzing the gold’s price trend using time series data with a fractal structure, we aim to determine the pattern of price trend to predict the price trend of gold ounces. Such an approach can provide the necessary tool to help investment decision-making in different time periods (short-term, medium-term, and possibly long-term). To achieve this, we first identify the presence of long-term memory in gold's price trend using the Hurst exponent. After confirming stability, we generate fractal data by calling the fractal interpolation algorithm and then predict the behavior of the corresponding time series data using a neural network algorithm based on fractal data. Finally, we compare the results obtained from calling the algorithms present in the literature on gold data. 1- IntroductionThe financial market data is unstable and irregular, and it sometimes contains missing data. To address these issues, researchers have developed different approaches, such as the fractal interpolation method. The aim of this study is to investigate the time series related to the gold market and determine whether it exhibits fractal characteristics. To generate fractal data, we can use the improved fractal interpolation algorithm (IFI). Then, we can use the support vector regression (SVR) algorithm, which is a type of machine learning method (SVM), to predict the price trend of gold in a specific time period. The price of an asset is directly proportional to its risk or fluctuation. Therefore, in the first phase, business owners and investors can determine the appropriate fee rate by analyzing the time series of data with fractal structure, and in the second phase, in the asset management phase, they can control losses caused by big fluctuations in returns and investment. The fluctuation of asset prices is a significant topic that has been studied by many researchers. They use linear or non-linear methods to predict and make appropriate use of these price fluctuations. In economic and social fields, fractal interpolation is often used to fit missing data and predict short-term trends due to the abundance of unstable and irregular data. In time series, data are collected at regular intervals according to a certain rule, and by analyzing the obtained data and with the help of different methods, the behavior of the series in the future can be approximately predicted. There are methods to determine whether a system is fractal or not, and thus, to calculate its fractal dimension. The method of calculating the dimension of the system depends on the type of its fractal structure. By determining the fractal dimension, the stability of the system can be investigated. Stability is a key factor in time series analysis, and the Hurst exponent is one of the criteria used to assess stability. Therefore, the fractal interpolation method can be implemented when the time series is stable. Hurst's exponent is a measure that identifies the long-term memory in time series. The R/S analysis criterion is one of the methods used to calculate the Hurst exponent. This criterion was first proposed by Hurst in his studies of natural phenomena such as the hydrological characteristics of the Nile Basin in 1951. In financial markets, the R/S analysis criterion is used to distinguish fractal from non-fractal systems, to identify the stability of trends, and to determine the length of life-time cycles. The range value of R in this index is equal to the difference between the lowest and highest deviation values from the cumulative average of the time series. Hurst normalized the value of the R range by using the standard deviation of the time series, relative to the fluctuations of the inputs of different time series, and defined the analysis criterion in a certain period of time. In this study, we aim to evaluate the performance of the fractal interpolation algorithm in predicting the trend of gold price based on time series data. The global ounce of gold is of great importance in world markets and experiences fluctuations, making it an ideal candidate for this analysis. To achieve this, we first calculate the Hurst exponent to determine the long-term memory of the gold price trend. We then generate fractal data using the fractal interpolation algorithm and apply the support vector regression (SVR) algorithm to predict the gold price trend. We compare the performance of Wang's algorithm and the Fracsion algorithm to determine the best method for predicting the gold price trend. The primary objective of this research is to examine the predictability of the price trend of gold and determine its price pattern. We analyze and evaluate this process by comparing it with past-oriented methods such as Wang's method. 2- Main ResultsWe have analyzed the results of the Wang algorithm and the Fracsion algorithm separately for their ability to predict the final price of gold in 2020, 2021, and 2022 using well-known evaluation criteria.Two algorithms, the Wong and Fracsion methods, are presented below for the purpose of numerical analysis.Wang, et al., in 2018, using the fractal property of the Shanghai stock market and employing the contribution of algorithm of fractal interpolation and Support Vector Machin (SVM), have focused on predicting price patterns [21]. Algorithm 1 Wang Algorithm:Require: Gold closing price.Ensure: Prediction of gold price pattern in a short-term time interval.Start1: Examine the stability and fractal structure of gold price data using the Hurst exponent.2: Predict the data using the SVM algorithm.3: Adjust the points obtained from Step 2 using the fractal interpolation algorithm.4: Predict a short-term period based on the corresponding fractal interpolation function of the pointsfrom Step 3.End Algorithm 2 Fracsion Algorithm:Require: Gold closing price in a priod.Ensure: Prediction of gold price pattern in a short-term time interval.Start1: Examine the stability and confirm the fractal structure of the data using the Hurst exponent.2: Generate a set of fractal points for data with a fractal structure.3: Call and train the SVR algorithm based on the obtained fractal data.4: Predict the trend of gold price in a time interval based on the regression function obtained in Step 3.End The results for 2022 are presented in the following figure, for instance.The comparison of the results indicates that although both algorithms exhibit errors in price prediction, the adaptive Fracsion algorithm outperforms the Wang algorithm in predicting the price trend of gold in a short term memory. 3- Summary of Proofs/ConclusionsIn this paper, we analyzed the gold price time series in two phases. Firstly, by applying Hurst's method for each year, we investigated the stability of the gold price pattern (fractal structure of the system). Secondly, we utilized existing algorithms on the time series corresponding to the price of gold to predict its price trend, which provides important information to investors who seek to predict the gold market. The fundamental analysis of the gold market with the fractal structure presents a new approach to the analysis of the gold market and a non-linear perspective on this issue. The characteristic of long-term memory as well as the fractal structure of a time series corresponding to gold price data can play an effective role in predicting gold fluctuations and hence, the return based on gold fluctuations. However, predicting the price trend of the gold market in the long term is difficult due to many different factors that affect the global markets. Nevertheless, using algorithms for predicting the behavior of a time series, as a technical analysis tool, in stable economic and political conditions can have satisfactory results in predicting the price trend of gold in the short term. However, when there are conditions that strongly affect the price trend, such as war, global inflation, and in recent years, the global pandemic of Covid-19, algorithms cannot perform well in predicting the price pattern trend, because the structural order of the price pattern in such a situation, it is faced to distribution.
Keywords