The improved Semi-parametric Markov switching models for predicting Stocks Prices
محورهای موضوعی : Statistical Methods in Financial ManagementHossein Naderi 1 , Mehrdad Ghanbari 2 , Babak Jamshidi Navid 3 , Arash Nademi 4
1 - Department of Accounting, Ilam Branch, Islamic Azad University, Ilam, Iran
2 - Department of Accounting, Kermanshah Branch, Islamic Azad University, Kermanshah, Iran.
3 - Department of Accounting, Kermanshah Branch, Islamic Azad University, Kermanshah, Iran.
4 - Department of Statistics, Ilam Branch, Islamic Azad University , Ilam, Iran.
کلید واژه: EM Algorithm, Markov Switching Models, Kernel function, Strategies for buying and selling,
چکیده مقاله :
The modelling of strategies for buying and selling in Stock Market Investment have been the object of numerous advances and uses in economic studies, both theoretically and empirically. One of the popular models in economic studies is applying the Semi-parametric Markov Switching models for forecasting the time series observations based on stock prices. The Semi-parametric Markov Switching models for these models are a class of popular methods that have been used extensively by researchers to increase the accuracy of fitting processes. The main part of these models is based on kernel and core functions. Despite of existence of many kernel and core functions that are capable in applications for forecasting the stock prices, there is a widely use of Gaussian kernel and exponential core function in these models. But there is a question if other types of kernel and core functions can be used in these models. This paper tries to introduce the other kernel and core functions can be offered for good fitting of the financial data. We first test three popular kernel and four core functions to find the best one and then offer the new strategy of buying and selling stocks by the best selection on these functions for real data.
The modelling of strategies for buying and selling in Stock Market Investment have been the object of numerous advances and uses in economic studies, both theoretically and empirically. One of the popular models in economic studies is applying the Semi-parametric Markov Switching models for forecasting the time series observations based on stock prices. The Semi-parametric Markov Switching models for these models are a class of popular methods that have been used extensively by researchers to increase the accuracy of fitting processes. The main part of these models is based on kernel and core functions. Despite of existence of many kernel and core functions that are capable in applications for forecasting the stock prices, there is a widely use of Gaussian kernel and exponential core function in these models. But there is a question if other types of kernel and core functions can be used in these models. This paper tries to introduce the other kernel and core functions can be offered for good fitting of the financial data. We first test three popular kernel and four core functions to find the best one and then offer the new strategy of buying and selling stocks by the best selection on these functions for real data.
[1] Aghaeefar, N., Pourzarandi, M., Kazemi, M., and Minoie, M., Applying Optimized Mathematical Algo-rithms to Forecast Stock Price Average Accredited Banks in Tehran Stock Exchange and Iran Fara Bourse, Advances in Mathematical Finance and Applications, 2019:77-94. doi: 10.22034/amfa.2019.580802.1150
[2] Billio, M., Casarin, R., Ravazzolo, F., and Van Dijk, H. K., Interconnections between Eurozone and US booms and busts using a Bayesian panel Markov switching VAR model, Journal of Applied Econometrics, 2016. doi:10.1002/jae.2501
[3] Chan, K. C. G., and Wang, M. C., Semiparametric modeling and estimation of the terminal behavior of recurrent marker processes before failure events, Journal of the American Statistical Association, 2017;112(517): 351-362. DOI: 10.1080/01621459.2016.1140051
[4] Chang, Y., Yongok, C., and Park, J.Y., A New Approach to Model Regime Switching, Journal of Econ-ometrics, 2017;196(1): 127-143. doi:10.1016/j.jeconom.2016.09.005
[5] Chang, J., Tang, C. Y. and Wu, Y., Local Independence Feature Screening for Nonparametric and Sem-iparametric Models by Marginal Empirical Likelihood, Annals of statistics, 2016;44(2):515-539. doi: 10.1214/15-AOS1374
[6] Chen, C. M., Shen, P. S., Wei, J. C., and Lin, L., A semiparametric mixture cure survival model for left-truncated and right-censored data, Biometrical journal, 2017; 59(2): 270-290. doi:10.1002/bimj.201500267
[7] Davallou, M., and Meskinimood, S., Performance examination of trading strategy based on Stochastic Dominance, Financial Knowledge of security analysis (Financial studies), 2019; 12:171-193.
[8] Davoodi, A., and Dadashi, I., Stock price prediction using the Chaid rule-based algorithm and particle swarm optimization (pso), Advances in Mathematical Finance and Applications, 2020;197-213. doi:10.22034/amfa.2019.585043.1184
[9] Di Persio, L., Frigo, M., Gibbs sampling approach to regime switching analysis of financial time series, Journal of Computational and Applied Mathematics, 2016. doi:10.1016/j.cam.2015.12.010
[10] Di Persio, L., Frigo, M., Maximum Likelihood Approach to Markov Switching Models, WSEAS Trans-actions on Business and Economics, 2015; 12: 239-242.
[11] Doaei, M., Mirzaei, S,A., and Rafigh, M., Hybrid Multilayer Perceptron Neural Network with Grey Wolf Optimization for Predicting Stock Market, Advances in Mathematical Finance and applications, 2021; 883-894. doi: 10.22034/amfa.2021.1903474.1452
[12] Franke, J., Stockis, J.P., Kamgaing, J.T., Li, W.K., Mixtures of nonparametric autoregressions, J. Non-parametric statistics, 2011; 23: 287-303. doi: 10.1080/10485252.2010.539686
[13] Gu, X., Ma, Y., and Balasubramanian, R., Semiparametric Time to Event Models in the Presence of Error-Prone, Self-Reported Outcomes-with Application to the Women's Health Initiative, the annals of applied statistics, 2015; 9(2): 714-730. doi: 10.1214/15-AOAS810
[14] Gupta, C., Cobre, J., Polpo, A., and Sinha, D., Semiparametric Bayesian estimation of quantile func-tion for breast cancer survival data with cured fraction, Biometrical journal. Biometrische Zeitschrift, 2016; 58(5): 1164-77. doi:10.1002/bimj.201500111
[15] Nademi, A., and Farnoosh, R., Mixtures of autoregressive-autoregressive conditionally heteroscedas-tic models: semi-parametric approach, Journal of Applied Statistics, 2014, 41(2), 275-293. doi:10.1080/02664763.2013.839129
[16] Nademi, A. and Nademi, Y., Forecasting crude oil prices by a semiparametric Markov switching mod-el: OPEC, WTI, and Brent cases, Energy Economics, 2019; 74: 757-766. doi:10.1016/j.eneco.2018.06.020
[17] Neale, M. C., Clark, S. L., Dolan, C. V., Hunter, M. D., Regime Switching Modeling of Substance Use: Time-Varying and Second-Order Markov Models and Individual Probability Plots, Structural equation modeling: a multidisciplinary journal, 2016; 23(2):221-233. doi: 10.1080/10705511.2014.979932
[18] Pashaei, Z., and Dehkharghani, R., Stock Market Modeling Using Artificial Neural Network and Comparison with Classical Linear Models, Signal and Data Processing, 2021, 17. doi:10.29252/jsdp.17.4.89
[19] Pourzamani, Z., Heidarpour, F., and Mohammadi, M., Comparative study of stock trading strategy in the long term investment, Financial engineering and securities management, 2011:7: 215-230.
[20] Rastegar, M. A., Dastpak, M., Developing a High-Frequency Trading system with Dynamic Portfolio Management using Reinforcement Learning in Iran Stock Market, Financial research journal, 2018; 20.
doi: 10.22059/jfr.2017.230613.1006415
[21] Sharif-far, A., Araghi, M.K., Vanani, I.R., Fallahshams, M., The Assessment of the optimal Deep Learning Algorithm on Stock Price Prediction (Long Short-Term Memory Approach), Quarterly Journal of Financial Engineering and Securities Management,2021.
[22] Von Ganske, J., A Regime Switching Partial Least Squares Approach to Forecasting Industry Stock Returns, Mimeo Edhec-Risk Institute, 2016.
Adv. Math. Fin. App., 2024, 9(2), P.367-381 | |
| Advances in Mathematical Finance & Applications www.amfa.iau-arak.ac.ir Print ISSN: 2538-5569 Online ISSN: 2645-4610 Doi: 10.22034/amfa.2021.1923297.1565 |
Case Study
The Improved Semi-Parametric Markov Switching Models for Predicting Stocks Prices
|
Hossein Naderia, Mehrdad Ghanbaria, *, Babak Jamshidi Navida, Arash Nademib
|
a Department of Accounting, Kermanshah Branch, Islamic Azad University, Kermanshah, Iran. b Department of Statistics, Ilam Branch, Islamic Azad University, Ilam, Iran. |
Article Info Article history: Received 2021/02/17 Accepted 2021/10/19
Keywords: Strategies for buying and selling Kernel function EM algorithm Markov Switching Models |
| Abstract |
The modeling of strategies for buying and selling in Stock Market Investment have been the object of numerous advances and uses in economic studies, both theoretically and empirically. One of the popular models in economic studies is applying the Semi-parametric Markov Switching models for forecasting the time series observations based on stock prices. The Semi-parametric Markov Switching models for these models are a class of popular methods that have been used extensively by researchers to increase the accuracy of fitting processes. The main part of these models is based on kernel and core functions. Despite of existence of many kernel and core functions that are capable in applications for forecasting the stock prices, there is a widely use of Gaussian kernel and exponential core function in these models. But there is a question if other types of kernel and core functions can be used in these models. This paper tries to introduce the other kernel and core functions can be offered for good fitting of the financial data. We first test three popular kernel and four core functions to find the best one and then offer the new strategy of buying and selling stocks by the best selection on these functions for real data.
|
1 Introduction
The index of the stock exchange and its subsets in the financial markets, as one of the most important benchmarks of the movement of stock prices of stock companies, is of particular importance. The Stock Exchange Index is derived from the stock price movements of all companies in the market, and thus enables the analysis of the price movement in the stock market. Understanding and examining the behavior of this index and its subsidiaries has always been the focus of researchers, economists and capital market activists since the formation of capital markets. Nowadays, there is a lot of research on stock indexes in financial markets of different countries to scientifically model the movement of stock price information. In addition, accurate forecasting of the stock price trends of companies in the form of modeling that is relevant to the overall index process and its subsidiaries is very important in providing useful trading strategies.
Predicting stock prices is one of the most complex issues because the stock market is essentially nonlinear and influenced by probabilistic issues. In addition, the stock market is affected by a variety of factors including political and social crises, economic performance, investor behavior, global prices and more. Following the efforts of economic and statistical scientists, new methods have been developed to predict prices in the stock market. Nowadays, nonlinear models of Markov switching, as well as nonparametric and semi-parametric estimation methods, are among these methods. Recent research into the prediction of stock price trends suggests that these models outperform traditional methods such as the ARIMA, GARCH, and Regression models. (See Nademi and Nademi [16], Chang et al. [4], Von Ganske [22], Billio et al. [2], Doaei et al. [11], Davoodi et al. [8], Aghaeefaret al. [1]).
The many investigations in economic and financial mathematics focused on what makes an investor profitable in the stock market. These studies can aid the researchers to decrease the investment risks and increase opportunities for high return of gaining. One of the important questions in the stock market is when the investors can buy the stocks and when they can sell their stocks. In research economic papers, there are two aspects of analysis: fundamental and technical analysis. In fundamental aspects, the researchers find the reasons of changing stock prices, in response to reasons of changing prices that caused from exogenous geopolitical events, supply disruptions or financial operation of the companies and etc. But technical analysis noted more the statistical and probabilities rules governed by processes of the data. In aspect of technical analysis, there are a lot of models in time series to capture the stock prices.
The Semi-parametric Markov switching models are the popular models in time series that are applied most widely in financial and economic data. These models exhibit abrupt changes in behavior of time series data, called switches of regimes, where the switching between the regimes is controlled by a hidden Markov Chain process. In semi-parametric class of algorithms, a special function, called kernel function and core functions, are used. The selection of proper kernel and core function is important item for estimating the parameters. Such that, if we apply the proper types, we can have a fast and unbiased estimating process. So, offering the best kernel and core functions for estimation algorithms can be essential for modelling process. In this paper, we first focus on selecting the best kernel and core functions in a special class of Markov switching models called semi-parametric Markov switching offered by Nademi and Farnoosh [15] for modeling the time series data and then offer the new strategy of buying and selling stocks by the best selected kernel and core function of this model on real data.
In the next section, the theoretical fundamentals and research background of this field will be introduced. Section 3 discuss on the offered kernel and core functions. Finally, section 4 probe the best selection of these functions and offer the new buying and selling strategy for stock markets.
2 Theoretical Fundamentals and Research Background
2.1 Research Background
The forecasting and offering strategies of stock buying and selling has been the object of plentiful expansions and applications over the past two decades, both theoretically and empirically. There are several attempts in this field. Pourzamani et al. [19] Compared stock buying and selling strategies in long-term investment using filtering, buying and holding methods and the moving average of the market. They showed the moving average of the market and the return of the buying and holding method is higher than the moving average method. Rastegar and Dastpak [20] offered a model entitled" Developing a High-Frequency Trading system with Dynamic Portfolio Management using Reinforcement Learning in Iran Stock Market". Results showed that, the proposed model outperformed the Buy and Hold strategy in Normal and Descending markets. Davallou and Meskinimood [7] examinated of trading strategy based on Stochastic Dominance. They showed the pricing of the random dominance factor in the Tehran Stock Exchange is approved. Sharif-far et al. [21] applied the assessment of the optimal Deep Learning Algorithm on Stock Price Prediction (Long Short-Term Memory Approach). The results showed better performance of LSTM architecture with Drop Out layer than RNN model. Pashaei and Dehkharghani [18] examined stock market modeling using Artificial Neural Network and compared with classical linear models
In the other hand, the most widely applied type of models is AR-ARCH models. The combination of autoregressive (AR) processes and autoregressive conditionally heteroscedastic (ARCH) processes, the so-called AR-ARCH process, are well created and very general models.
These findings clearly show a potential source of unknown structure, to explain that the form of the variance is relatively inflexible and held fixed throughout the entire sample period. Hence the estimates of an AR-ARCH model may suffer from a substantial bias in the persistence parameter. So, models in which the parameters are allowed to change over time may be more feasible for modeling processes. Recently, The Markov Switching models have repeatedly applied for making switching regimes processes which allow for more flexibility in modeling data which only show locally a homogeneous behavior. The Markov Switching models are the popular models in time series that are applied most widely in financial and economic data. These models exhibit abrupt changes in behavior of time series data, called switches of regimes, where the switching between the regimes is controlled by a hidden Markov Chain process. (See Chang et al. [4], Von Ganske [22], Billio et al. [2], Di Persio and Frigo [9-10], Neale et al. [17]).
Recently, Semi-parametric Markov switching models have repeatedly applied for making switching regimes processes and every of them offer an algorithm for estimating the parameters. In this respect, the combination of parametric and nonparametric methods, called semi-parametric algorithms, are popular and most broadly applied. (See Chan and Wang [3], Chang et al. [5], Chen et al. [6], Gupta et al. [14], Gu and Balasubramanian [13], Nademi and Farnoosh [15]). In the next subsection, the theory of these models will be explained.
2.2 Theoretical Fundamentals
This section consists of two subsections. In the first subsection, we introduce the Markov switching model introduced by Nademi and Farnoosh [15] and in the second subsection, their algorithm for estimating the parameters will be reviewed. Note that, their semi-parametric algorithm is a part of more general algorithm as EM algorithm that apply for class of Markov switching models.
2.2.1. The Model
Suppose are part of a strictly stationary time series that are generated by the following semi-parametric switching model
| (1) |
| (2) |
|
|
Table 1. The Estimated Parameters Based on Uniform Kernel Function | |||||||
The Parameters | MS-SEMI-K(1)-G(1) | MS-SEMI-K(1)-G(2) | MS-SEMI-K(1)-G(3) | MS-SEMI-K(1)-G(4) | |||
| -1.1501 | -3.3104 | -1.3116 | -1.1032 | |||
| -6.4251 | -4.3148 | -3.2190 | -6.2163 | |||
| 0.4216 | 0.3148 | 0.5184 | 0.4084 | |||
| 0.6218 | 0.7315 | 0.4023 | 0.5032 | |||
| 0.0015 | 0.0051 | 0.0010 | 0.0021 | |||
| 0.0001 | 0.0016 | 0.0003 | 0.0013 | |||
| 0.0037 | 0.0204 | 0.0216 | 0.0001 | |||
| 0.0028 | 0.0381 | 0.0203 | 0.0061 | |||
| 0.0104 | 0.0204 | 0.0016 | 0.0053 | |||
| 0.0265 | 0.0110 | 0.0367 | 0.0011 | |||
| 0.3401 | 0.3721 | 0.5169 | 0.3606 | |||
| 0.6599 | 0.6279 | 0.4831 | 0.6394 | |||
| 0.6112 | 0.5143 | 0.4035 | 0.6203 | |||
| 0.3150 | 0.3048 | 0.4318 | 0.3498 | |||
| 0.0012 | 0.0102 | 0.0122 | 0.0016 | |||
| 0.0034 | 0.0131 | 0.0351 | 0.0010 | |||
| 0.0731 | 0.0945 | 0.0871 | 0.0725 |
Table 2. The Estimated Parameters Based on Triangle Kernel Function | |||||||
The Parameters | MS-SEMI-K(2)-G(1) | MS-SEMI-K(2)-G(2) | MS-SEMI-K(2)-G(3) | MS-SEMI-K(2)-G(4) | |||
| -1.2510 | -1.1024 | -2.0012 | -3.1004 | |||
| -3.5462 | -3.6412 | -2.1640 | -2.3145 | |||
| 0.4325 | 0.5148 | 0.2489 | 0.1624 | |||
| 0.6245 | 0.6489 | 0.4327 | 0.2031 | |||
| 0.0026 | 0.0514 | 0.0031 | 0.0321 | |||
| 0.0010 | 0.0379 | 0.0049 | 0.1202 | |||
| 0.0311 | 0.0302 | 0.0319 | 0.1304 | |||
| 0.0051 | 0.0942 | 0.0402 | 0.0181 | |||
| 0.0645 | 0.0234 | 0.0521 | 0.0094 | |||
| 0.0713 | 0.0824 | 0.0601 | 0.0081 | |||
| 0.5732 | 0.2859 | 0.3289 | 0.3186 | |||
| 0.4268 | 0.7141 | 0.6711 | 0.6814 | |||
| 0.3489 | 0.6150 | 0.6502 | 0.4316 | |||
| 0.4685 | 0.2462 | 0.3186 | 0.2018 | |||
| 0.0013 | 0.0046 | 0.0027 | 0.0003 | |||
| 0.0048 | 0.0487 | 0.0062 | 0.0042 | |||
| 0.0945 | 0.1134 | 0.1246 | 0.1215 |
Table 3. The Estimated Parameters Based on Gaussian Kernel Function | |||||||
The Parameters | MS-SEMI-K(3)-G(1) | MS-SEMI-K(3)-G(2) | MS-SEMI-K(3)-G(3) | MS-SEMI-K(3)-G(4) | |||
| -1.0162 | -3.0510 | -1.4692 | -0.8472 | |||
| -2.3201 | -2.4210 | -4.3150 | -1.3496 | |||
| 0.1240 | 0.3160 | 0.4682 | 0.4081 | |||
| 0.4201 | 0.5015 | 0.4182 | 0.2486 | |||
| 0.0213 | 0.0105 | 0.0013 | 0.0003 | |||
| 0.0010 | 0.0315 | 0.0041 | 0.0008 | |||
| 0.0114 | 0.0021 | 0.0203 | 0.0214 | |||
| 0.0315 | 0.0184 | 0.0344 | 0.0804 | |||
| 0.0243 | 0.0648 | 0.0510 | 0.0034 | |||
| 0.0152 | 0.0921 | 0.0025 | 0.0107 | |||
| 0.3812 | 0.5501 | 0.3091 | 0.3329 | |||
| 0.6188 | 0.4499 | 0.6809 | 0.6671 | |||
| 0.5142 | 0.4210 | 0.3162 | 0.4316 | |||
| 0.3168 | 0.5147 | 0.1482 | 0.2154 | |||
| 0.0032 | 0.0032 | 0.0018 | 0.0002 | |||
| 0.0102 | 0.0012 | 0.0054 | 0.0011 | |||
| 0.0703 | 0.0791 | 0.0849 | 0.0748 |
The model | Time period | ||||||
t=243, t+1=244 | t=244, t+1=245 | t=245, t+1=246 | t=246, t+1=247 | ||||
MS-SEMI-K(1)-G(1) |
|
|
|
| |||
MS-SEMI-K(1)-G(2) |
|
|
|
| |||
MS-SEMI-K(1)-G(3) |
|
|
|
| |||
MS-SEMI-K(1)-G(4) |
|
|
|
| |||
MS-SEMI-K(2)-G(1) |
|
|
|
| |||
MS-SEMI-K(2)-G(2) |
|
|
|
| |||
MS-SEMI-K(2)-G(3) |
|
|
|
| |||
MS-SEMI-K(2)-G(4) |
|
|
|
| |||
MS-SEMI-K(3)-G(1) |
|
|
|
| |||
MS-SEMI-K(3)-G(2) |
|
|
|
| |||
MS-SEMI-K(3)-G(3) |
|
|
|
| |||
MS-SEMI-K(3)-G(4) |
|
|
|
|
© 2024. All rights reserved. |