Dec 6, 2016 - Hasbi Yasin, Rezzy Eko Caraka, Tarno, Alan Prahutama. Department of Statistics Diponegoro University. 2nd International Conference in ...
Stock Price Modeling using Localized Multiple Kernel Support Vector Regression (LMKSVR) Hasbi Yasin, Rezzy Eko Caraka, Tarno, Alan Prahutama Department of Statistics Diponegoro University
2nd International Conference in Actuarial Science and Statistics (ICASS) Institut Teknologi Bandung (Jatinangor Campus), December 5th-6th 2016 Hasbi Yasin,et al
Vu Pham
Stock Price Modeling using LMKSVR
Introduction High fluctuations in stock prices is main problem that is considered by the investors. Therefore we need a model that is efficient and able to predict accurately the stock prices The non-linierity financial time series models that can be used is Support Vector Regression (SVR) model Effectively and efficiently learning an optimal kernel is of great importance to the success of kernel methods Hasbi Yasin et al.al Hasbi Yasin,et
Vu Pham
Stock Price Modeling using LMKSVR
Introduction Combining multiple kernels instead of selecting a single one An unweighted sum of kernels (Pavlidis et al., 2001) Using a weighted sum (e.g., convex combination)
Hasbi Yasin et al.al Hasbi Yasin,et
Vu Pham
Stock Price Modeling using LMKSVR
Localized Multiple Kernel Support Vector Regression
Using a global combination rule (unweighted or weighted) has the disadvantage of assigning the same weight to a kernel over the whole input space Data-dependent kernel weights to capture data localities Localized multiple kernel learning (LMKL) framework (Gonen and Alpaydn, 2008)
Hasbi Yasin,et al
Vu Pham
Stock Price Modeling using LMKSVR
Localized Multiple Kernel Support Vector Regression (2) MKL can combine only different kernel functions and more complex kernels are favored over the simpler ones in order to get better performance. However, LMKL can also combine multiple copies of the same kernel
𝑓ℛ 𝑥 =
𝑝 𝑚=1 𝜂𝑚 (𝒙|𝐕)
𝜔𝑚 , 𝜙𝑚 (𝑥) + 𝑏
And the optimization of the equation 1
min. 2
𝑃 𝑚=1
𝝎𝑚
2 2
+𝐶
𝑁 𝑡=1
− w. r. t. 𝝎𝑚 𝜉+ , 𝜉 ,V 𝑖 𝑖 s. t ϵ + 𝜉+ ≥ 𝑦𝑖 − 𝑓ℛ 𝑥𝑖 ∀𝑖 𝑖 ϵ + 𝜉− ≥ 𝑓ℛ 𝑥𝑖 ∀𝑖 𝑖
𝜉+ ≥ 0 𝑖 Hasbi Yasin,et al
− 𝜉+ + 𝜉 𝑖 𝑖
∀𝑖 ; 𝜉− ≥ 0 𝑖 Vu Pham
∀𝑖
Stock Price Modeling using LMKSVR
Localized Multiple Kernel Support Vector Regression (3) − Where C is a regularization parameter with 𝜉+ , 𝜉 is the vector of 𝑖 𝑖 slack variable and ϵ is the tube width. Optimization of the slack variable is not convex and nonlinear. By adding V will get a convex optimization, and we can get a dual formulation
max. J 𝐕 =
Hasbi Yasin,et al
𝑁 𝑡=1 𝑦𝑖
− 𝛼+ − 𝛼 𝑖 −∈ 𝑖
Vu Pham
𝑁 ( + 𝑖=1 𝛼𝑖
−
Stock Price Modeling using LMKSVR
Localized Multiple Kernel Support Vector Regression (3) Locally combined kernel function can be defined as 𝑘𝜂 𝑥𝑖 , 𝑥𝑗 =
𝑃 𝑚=1 𝜂𝑚 (𝑥𝑖 |V)𝑘𝑚 (𝑥𝑖 , 𝑥𝑗 )𝜂𝑚 (𝑥𝑗 |V)
In order to get function as follows 𝑓ℛ 𝑥 =
+ 𝑁 − (𝛼 𝑡=1 𝑖 −𝛼𝑖 ) 𝑘𝜂
𝑥𝑖 , 𝑥𝑗 + 𝑏.
Multiple Kernel Support Vector Regression (MKSVR) is one model that can capture the nonlinear pattern of financial time series data including data on stock returns. Research on MKSVR has developed rapidly since introduced by (Bach, et al. 2004). Two Reasons for Using a Kernel Turn a linear learner into a non-linear learner (e.g. RBF, polynomial, sigmoid) Make non-vectorial data accessible to learner (e.g. string kernels for sequences)
Hasbi Yasin,et al
Vu Pham
Stock Price Modeling using LMKSVR
Research Objective This research aim to explain the application of Localized Multiple Kernel Support Vector Regression (LMKSVR) to predict the daily stock price of PT. XL Axiata Tbk (EXCL), PT. Indofood Sukses Makmur Tbk (INDF) and PT. Unilever Indonesia Tbk (UNVR) from January 2014 to May 2016
Hasbi Yasin,et al
Vu Pham
Stock Price Modeling using LMKSVR
GUI LMKSVR
Hasbi Yasin,et al
Vu Pham
Stock Price Modeling using LMKSVR
The daily stock price of PT. XL Axiata Tbk (EXCL) Actual Vs Predicted 7000 Actual Predicted
6500 6000 5500
Price
5000 4500 4000 3500 3000 2500 2000
0
100
200
300
400
500
600
700
Data -
Hasbi Yasin,et al
Vu Pham
Stock Price Modeling using LMKSVR
The daily stock price of PT. Indofood Sukses Makmur Tbk (INDF) Actual Vs Predicted 8000 Actual Predicted
7500
7000
Price
6500
6000
5500
5000
4500
0
100
200
300
400
500
600
700
Data -
Hasbi Yasin,et al
Vu Pham
Stock Price Modeling using LMKSVR
The daily stock price of PT. Unilever Indonesia Tbk (UNVR) 4
5
Actual Vs Predicted
x 10
Actual Predicted 4.5
Price
4
3.5
3
2.5
0
100
200
300
400
500
600
700
Data -
Hasbi Yasin,et al
Vu Pham
Stock Price Modeling using LMKSVR
Results Stock Price EXCL INDF UNVR
Hasbi Yasin,et al
MAPE 1.87 % 1.28 % 1.25 %
Vu Pham
RMSE 122.6482 120.7054 648.0822
Stock Price Modeling using LMKSVR
Conclusion It can be concluded that LKMSVR has good performance to predict daily stock price with Mean Absolute Percentage Error (MAPE) produced all less than 2%. In this research, we managed to make MATLAB GUI to simplify calculations and simulations using three different optimizations and also different kernel
Hasbi Yasin,et al
Vu Pham
Stock Price Modeling using LMKSVR
References 1.
2.
3.
4.
5.
6.
7.
8.
9.
Bach, F. R., Lanckriet, G. R. G., & Jordan, M. I. Multiple kernel learning, conic duality, and the SMO algorithm. In: Proceedings of the 21th international conference on machine learning, 2004, pp. 6–13. Bertsekas, D. P. Nonlinear programming (2nd ed.), Massachusetts, USA: Athena Scientific. 1999. Buckner, Mark A., Learning from Data with Localized Regression and Differential Evolution. PhD diss., University of Tennessee, 2003. http://trace.tennessee.edu/utk_graddiss/1979 Chapelle, O., Vapnik, V., Bousquet, O., & Mukherjee, S., Choosing multiple parameters for support vector machines, Machine Learning, 46(1–3), 2002, pp. 131– 159. Gönen, M., and Alpaydin. E., Localized Multiple Kernel Regression, Proceeding of International Conference on Pattern Recognition,2010,pp. 1425-142, DOI 10.1109/ICPR.2010.352. Gönen, M., and Alpaydin. E.,Localized Algorithms for Multiple Kernel Learning, Pattern Recognition, issue 46, 2013, pp. 795-807, DOI 10.1016/j.patcog.2012.09.002 He, W., Wang, Z., dan Jiang, H, Model Optimizing and Feature Selecting for Support Vector Regression in Time Series Forcasting, Neurocomputing, Issue 72,2008, pp. 600-611. Karatzoglou,A.,Meyer,D.,Hornik.K. Support Vector Machines in R. Journal of Statistical Software April 2006, Volume 15, Issue 9. Keerthi, S.S.., Gilbert, E.G. Convergence of a Generalized SMO Algorithm for SVM Classifier Design.2002. Machine Learning 46 (1-3): 351-360.
Hasbi Yasin,et al
Vu Pham
Stock Price Modeling using LMKSVR
References (2) 10.
11.
12.
13.
14. 15.
16.
17.
Lanckriet,G,R,G.,Cristianini,N., Bartlett,P., Ghaoui,L.E., and Jordan,M.I. Learning the Kernel Matrix with Semidefinite Programming. Journal of Machine Learning Research 5. 11. Platt, J. C, Fast training of support vector machines using sequential minimal optimization. In B. Schölkopf, C. J. C. Burges, & A. J. Smola (Eds.). Advances in kernel methods: Support vector learning, Vol. 11, 1999, pp. 185–208, Cambridge, MA, USA: MIT Press. Rakotomamonjy, A., Bach, F. R., Canu, S., & Grandvalet, Y, Simplemkl, Journal of Machine Learning Research, Issue 9, 2008, pp. 2491–2521. Rakotomamonjy, A., Bach, F. R., Canu, S., & Grandvalet, Y., More efficiency in multiple kernel learning, In Proceedings of the 24th international conference on machine learning, 2007. pp. 775– 782. Scholkopf, B. dan Smola, A, Learning with Kernels, The MIT Press. Cambridge, Massachusetts. 2002. Wang, Y., Wang, B., and Zhang, X., A New Application of The Support Vector Regression on The Construction of Financial Conditions Index to CPI Prediction, Procedia Computer Science, Issue 9, 2012, pp. 1263-1272. Yasin, H., Caraka, R.E., Tarno, and Hoyyi, A. Prediction of Crude Oil Prices Using Support Vector Regression (SVR) With Grid Search–Cross Validation Algortyhm, vol.12 no.4; august. Global Journal of Pure and Applied Mathematics.2016, pp. 3009–3020. Print ISSN : 0973-1768 Online ISSN: 09739750 Yeh, C.Y., Huang, C.W., dan Lee, S.J,, A multiple-kernel support vector regression approach for stock market price forecasting, Expert System with Applications, Issue. 38, 2001, pp. 2177-2186
Hasbi Yasin,et al
Vu Pham
Stock Price Modeling using LMKSVR