Article Contents
Article Contents

# The application of model predictive control on stock portfolio optimization with prediction based on Geometric Brownian Motion-Kalman Filter

• * Corresponding author: Wawan Hafid Syaifudin

The first author is supported by ITS grant 1191/PKS/ITS/2019

• A stock portfolio is a collection of assets owned by investors, such as companies or individuals. The determination of the optimal stock portfolio is an important issue for the investors. Management of investors' capital in a portfolio can be regarded as a dynamic optimal control problem. At the same time, the investors should also consider about the prediction of stock prices in the future time. Therefore, in this research, we propose Geometric Brownian Motion-Kalman Filter (GBM-KF) method to predict the future stock prices. Subsequently, the stock returns will be calculated based on the forecasting results of stock prices. Furthermore, Model Predictive Control (MPC) will be used to solve the portfolio optimization problem. It is noticeable that the management strategy of stock portfolio in this research considers the constraints on assets in the portfolio and the cost of transactions. Finally, a practical application of the solution is implemented on 3 company's stocks. The simulation results show that the performance of the proposed controller satisfies the state's and the control's constraints. In addition, the amount of capital owned by the investor as the output of system shows a significant increase.

Mathematics Subject Classification: Primary: 93C95; Secondary: 91G10.

 Citation:

• Figure 1.  Daily Stock Price of Each Company

Figure 2.  Daily Stock Return of Each Company

Figure 3.  Stock's Forecasting Results

Figure 4.  Control Variables in Portfolio Optimization

Figure 5.  The Dynamic of Total Invested Capital in Each Stock

Figure 6.  The Dynamic of Total Invested Capital in Risk Free Asset

Figure 7.  The Dynamic of Total Invested Capital in the Portfolio

Table 1.  Kalman Filter Algorithm

 System Model and System model : $x_{k+1}=f(x_k,u_k,k)+Gw_k$ Measurement Model Measurement model : $z_k=h(x_k,k)+v_k$ Assumption : $x(0)\sim X({\tilde x}_0,P_0);\; \; w(k)\sim N(0,Q_k);$ Assumption : $v_k\sim N(0,R)$ Initialization ${\tilde x}(0)={\tilde x}_0;\; \; P(0)=P_0$ Time Predict Estimation : $\hat{x}_{k+1}^-=f(\hat{x}_{k}^-,u_k)$ Covariance : $P_{k+1}^-=AP_kA^T+G_kQ_kG_k^T$ Measurement Update Kalman gain : $K_{k+1}=P_{k+1}^-H^T(H_{k+1}P_{k+1}^-H^T+R_{k+1})^{-1}$ Estimation : $\hat{x}_{k+1}=\hat{x}_{k+1}^-+K_{k+1}(z_{k+1}-H\hat{x}_{k+1}^-)$ Error covariance : $P_{k+1}=(I-K_{k+1}H)P_{k+1}^-$

Table 2.  MAPE (%) GBM vs GBM-KF

 Stock GBM GBM-KF Stock 1 (Canon) 1.01 0.16 Stock 2 (Starbucks) 0.59 0.097 Stock 3 (Microsoft) 1.23 0.1

Table 3.  Parameters of Stock Portfolio

 Variable $\alpha$ $\beta$ $r_1$ $r_2$ $\boldsymbol{x}(0)$ $N_p$ Value $0.0002$ $0.0002$ $0.00003$ $0.00031$ $[ 0,0,0,1\times10^5]^T$ $10$ Variable $Q$ $R$ $r(k)$ $p_i\max$ $q_i\max$ Value $1$ $0,1$ ${10}^6$ ${10}^5$ ${10}^5$
•  [1] T. R. Bielecki and S. R. Pliska, Risk-sensitive dynamic asset management, Appl. Math. Optim., 39 (1999), 337-360.  doi: 10.1007/s002459900110. [2] Z. Bodie, A. Kane and A. J. Marcus, Investments, NY : McGraw-Hill/Irwin, 2011. [3] E. F. Camacho and C. B. Alba, Model Predictive Control, Springer-VerlagLondon, 2007. [4] F. Cassola and M. Burlando, Wind speed and wind energy forecast through Kalman filtering of numerical weather prediction model output, Applied Energy, 99 (2012), 154-166.  doi: 10.1016/j.apenergy.2012.03.054. [5] A. Dmouj, Stock price modelling: Theory and practice, Masters Degree Thesis, Vrije Universiteit, 2006. [6] V. Dombrovsky and E. Lashenko, Dynamic model of active portfolio management with stochastic volatility in incomplete market, SICE 2003 Annual Conference (IEEE Cat. No. 03TH8734), IEEE, 1 (2003), 516-521. [7] G. Galanis, P. Louka, P. Katsafados, I. Pytharoulis and G. Kallos, Applications of Kalman filters based on non-linear functions to numerical weather predictions, Ann. Geophys., 24 (2006), 2451-2460.  doi: 10.5194/angeo-24-2451-2006. [8] J. Guo, W. Huang and B. M. Williams, Adaptive Kalman filter approach forstochastic short-term traffic flow rate prediction and uncertainty quantification, Transportation Research Part C: Emerging Technologies, 43 (2014), 50-64.  doi: 10.1016/j.trc.2014.02.006. [9] H. Markowitz, Portfolio selection, The Journal of Finance, 7 (1952), 77-91. [10] J. A. Primbs, Portfolio optimization applications of stochastic receding horizon control, in 2007 American Control Conference, IEEE, (2007), 1811–1816. [11] K. Reddy and V. Clinton, Simulating stock prices using geometric brownian motion: Evidence from Australian companies, Australasian Accounting, Business and Finance Journal, 10 (2016), 23-47.  doi: 10.14453/aabfj.v10i3.3. [12] G. Welch and G. Bishop, An introduction to the Kalman filter, Proc. Siggraph Course, 8 (2006). [13] L. Wang, Model Predictive Control System Design and Implementation Using MATLABⓇ, Springer Science & Business Media, 2009.

Figures(7)

Tables(3)