Research Article Open Access

Kalman Filtering for Stocks Price Prediction and Control

Jimbo Henri Claver1, Mbiazi Dave2 and Shu Felix Che2
  • 1 Department of Applied Mathematics and Computing, American International University, Kuwait
  • 2 Department of Mathematics and Computer Science, University of Bamenda, Bamenda, Cameroon

Abstract

Stocks price analysis has been a critical area of research as the stock market is a very fluctuating market. Stocks price is affected by demand and supply dynamics making it difficult to forecast the price of a stock at a particular instant. The entire idea of predicting stocks price is to gain significant profits but predicting how the stock market will perform is a difficult task to carry out. In an attempt to do this, we construct a dynamical system for the stock’s price and simulate it using the Kalman filter. The dynamic tracking features of the filter here enable us to track the price of the Boeing stock. The stock price variation appears to be a maneuvering system from which we derive the state space model. Further, the robustness of the model is investigated by examining observability and controllability in the state space and proving that the system can be stabilized through state feedback. Finally, the forecasting result of 252 stock closing prices from January 01, 2021, to January 01, 2022, is provided by Kalman predictor and Python simulation. The evaluation of the prediction is done using absolute and relative error which gives relatively small values and thus makes the filter accurate for prediction.

Journal of Computer Science
Volume 19 No. 6, 2023, 739-748

DOI: https://doi.org/10.3844/jcssp.2023.739.748

Submitted On: 24 October 2022 Published On: 20 May 2023

How to Cite: Claver, J. H., Dave, M. & Che, S. F. (2023). Kalman Filtering for Stocks Price Prediction and Control. Journal of Computer Science, 19(6), 739-748. https://doi.org/10.3844/jcssp.2023.739.748

  • 2,116 Views
  • 2,429 Downloads
  • 3 Citations

Download

Keywords

  • Stocks Price
  • Maneuvering System
  • State Space Model
  • Controllability
  • Observability
  • Stability
  • Kalman Filter
  • Predictor
  • Python Simulation
  • Absolute and Relative Error