# Using a Kalman filter for predicting stock prices in python
This is a prototype implementation for predicting stock prices using a Kalman filter.
<br>
A generic Kalman filter using numpy matrix operations is implemented in src/kalman_filter.py. The predict and update function
can be used in different projects.
<br>
The stock prices were loaded from yahoo finance. The class YahooFinanceData
implemented in src/yahoo_financedata.py loads the .csv file holding the
stock prices (e.g. for the company Infineon) and provides a function
"next_measurement" to iterate through all rows.
<br>
For predicting the stock price of the next day, a simple model for the
stock price behaviour is used. The state vector of the filter holds the
current price and the velocity. The velocity is
the change of the stock price per day. The filter is updated every day with
the newest stock price measurement.<br>
The main.py script will also provide some plots for analyzing the filter
output. Obviously the results cannot be taken serious for trading
with stocks. The stock prices are used as example data for working with
Kalman filters.
matlab资源 python master中基于卡尔曼滤波的股票预测 仅供学习参考用代码.zip
版权申诉
137 浏览量
2023-10-18
15:32:15
上传
评论
收藏 28KB ZIP 举报
极客11
- 粉丝: 355
- 资源: 1835
最新资源
- LS416 高性能DSP的声控处理芯片语音识别模块AD设计硬件(原理图+PCB)+L2416-M-26P模块封装库+器件手册
- 基于tensorflow实现LSTM, CNN, SVM, MLP语音情感识别源码.zip
- 基于JSP在线学生选课管理系统源码.zip
- 基于JSP在线学生信息管理系统源码.zip
- 常用DHT11 MIC SHT11 VS1838B CHT8305 MQ-3 温湿度气体等传感元件2D3D封装库.PcbLib
- 基于JSP在线新闻管理系统包含前后台源码.zip
- 基于JSP在线文具销售平台商城源码.zip
- tiamo软件教程.doc
- nvm管理Nodejs多版本工具
- Unit1Howcanwebecomegoodlearners知识点整理(良心出品必属精品).doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈