[English](README.md) | [中文](README_zh.md)
## What is this?
This is the freshman year project for HITSZ 2020-2021. We chose the topic "Stock Prediction and Analysis based on Machine Learning."
In essence, the core of this project is our introduction to deep learning and an attempt at the complete workflow of an engineering project. In both respects, the project has achieved its initial objectives.
The project is divided into two main parts: the implementation of the GUI and the implementation of various model algorithms. The bridge between the two is the Config class, which encapsulates all the required parameters for the GUI to call the models.
> We learned the encapsulation strategy from here: [https://github.com/hichenway/stock_predict_with_LSTM/blob/master/main.py](https://github.com/hichenway/stock_predict_with_LSTM/blob/master/main.py)
The GUI was completed by zh and wyl, while I was responsible for the model codes. yzx took care of the initial web scraping and later worked on the initial project process as well as model adjustments in collaboration with me.
## What can this project do?
We believe our models, when trained properly, can effectively learn most stock trends. Even if they predict the exact opposite trend for a few stocks, we think this issue can be addressed with a more detailed analysis model.
Predicting complex stock prices using a single neural network model with historical data is feasible. It suggests that, despite the influence of various factors, stocks exhibit certain regularities over time.
The direction of normalization has a significant impact on model weight learning. Our unconventional data normalization approach avoids potential data leakage issues and seamlessly transitions to iterative prediction data processing.
Combining iterative prediction with follow-up prediction can, to some extent, eliminate unsuitable models. A typical problem is models learning to use the previous day's price as the current day's output, causing lag. Iterative prediction helps determine if the function learned by the model is correct.
## Project Introduction
### Project Results Display
The images show NVAX results (for more results, check the `assets` folder):
![fig_1](assets/NVAX_true.png)
![fig_2](assets/NVAX_forecast_1.png)
![fig_3](assets/NVAX_forecast_2.png)
### Overall Project Structure
For the framework code, the GUI framework uses the wxPython library, and there was no special discussion about the choice of library. The GUI code serves as the main module of the entire project, invoking and organizing other parts.
Regarding data acquisition, since YahooFinance is a dynamic web page, the selenium library is known to scrape such pages. A major downside is its slow speed and high network requirements. For stock data updates, the original web scraper search function was modified to use the official API for more efficient handling; web scraping is only used when searching for unknown stock abbreviations, improving efficiency.
Regarding data processing and analysis, the data processing method directly affects model learning outcomes (Normalization direction and strategy). Common underfitting and overfitting outcomes were observed, involving some parameter tuning and classic deep learning optimization techniques. We analyzed the reliability of the results and obtained some highly reliable models, investing more research effort into some intriguing phenomena.
![procedure](assets/procedure.png)
### Limitations during the Project Execution
1. For individual developers, there's no full support for the GUI interface; there's a dependence on the source code and the console.
2. The data source requires a robust internet connection, both when using the API or invoking the web scraper (being able to smoothly access GitHub is a basic requirement).
3. Specific ways of analyzing model details remain unclear. While standard image processing can be explained using methods like the Saliency Map, judging the outcomes of stock predictions, which are challenging even for experts, is more difficult.
4. The originally planned classification model was abandoned. We suspect that the somewhat arbitrary classification of rises and falls might lead to model learning failures. This is still under investigation.
### References
[1] 7forz. 2019. Predicting time series using LSTM. https://www.7forz.com/3319/.
[2] Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E. Hinton. 2016. Layer normalization.
[3] Sergey Ioffe and Christian Szegedy. 2015. Batch normalization: Accelerating deep network training by reducing internal covariate shift.
[4] Yuxin Wu and Kaiming He. 2018. Group normalization.
[5] Zhang Feng. 2015. Understanding HMM (Hidden Markov Model). https://www.cnblogs.com/skyme/p/4651331.html.
[6] Programmer One One Dis. 2020. Time series prediction with Python Part Four: Stationary/Non-stationary time series. https://cloud.tencent.com/developer/article/1638198.
[7] Fat House_Sean. 2018. Stock prediction using LSTM. https://blog.csdn.net/a19990412/article/details/85139058.
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
<项目介绍> 该资源内项目源码是个人的毕设,代码都测试ok,都是运行成功后才上传资源,答辩评审平均分达到96分,放心下载使用! 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 2、本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载学习,也适合小白学习进阶,当然也可作为毕设项目、课程设计、作业、项目初期立项演示等。 3、如果基础还行,也可在此代码基础上进行修改,以实现其他功能,也可用于毕设、课设、作业等。 下载后请首先打开README.md文件(如有),仅供学习参考, 切勿用于商业用途。 -------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
资源推荐
资源详情
资源评论
收起资源包目录
基于机器学习的股票预测和分析+源代码+文档说明 (2000个子文件)
F.csv 1.21MB
BAC.csv 1.14MB
^IXIC.csv 1.12MB
AAPL.csv 1.03MB
^IXIC.csv 956KB
^IXIC.csv 956KB
T.csv 945KB
^RUT.csv 809KB
F.csv 805KB
BAC.csv 802KB
AMD.csv 767KB
AMD.csv 681KB
NOK.csv 677KB
FCEL.csv 663KB
^RUT.csv 653KB
^RUT.csv 653KB
ABEV.csv 606KB
BB.csv 532KB
PBR.csv 528KB
FCEL.csv 512KB
EFA.csv 499KB
ITUB.csv 490KB
VALE.csv 490KB
GME.csv 485KB
NVAX.csv 480KB
PLUG.csv 463KB
NFLX.csv 461KB
STX.csv 457KB
NVAX.csv 434KB
BB.csv 375KB
ABEV.csv 375KB
PBR.csv 352KB
EFA.csv 344KB
GME.csv 328KB
NFLX.csv 328KB
ULTA.csv 327KB
FNMAT.csv 297KB
NWAU.csv 287KB
ULTA.csv 242KB
MARA.csv 212KB
RMSL.csv 207KB
BTC-USD.csv 206KB
FNMAT.csv 206KB
AMC.csv 190KB
AAPL.csv 187KB
AAPL.csv 187KB
FB.csv 170KB
FB.csv 168KB
NWAU.csv 159KB
MARA.csv 152KB
OCGN.csv 149KB
AMC.csv 130KB
YOJ.SG.csv 121KB
SNAP.csv 109KB
BTBT.csv 80KB
TLRY.csv 74KB
NIO.csv 73KB
BTBT.csv 55KB
BTBT.csv 55KB
TLRY.csv 54KB
LCID.csv 26KB
PLTR.csv 25KB
training.csv 25KB
SHIB-USD.csv 22KB
SHIB-USD.csv 18KB
PLTR.csv 17KB
log.csv 11KB
trained.csv 10KB
log.csv 9KB
log.csv 9KB
YMM.csv 8KB
log.csv 7KB
HTZZ.csv 7KB
META.csv 6KB
log.csv 5KB
YMM.csv 5KB
HTZZ.csv 4KB
log.csv 4KB
log.csv 4KB
log.csv 4KB
log.csv 3KB
log.csv 3KB
log.csv 3KB
log.csv 3KB
EFA_0.7_2[1]_50_20211025_235950.csv 3KB
EFA_0.7_2[1]_50_20211025_225458.csv 3KB
EFA_0.7_2[1]_50_20211027_114910.csv 3KB
EFA_0.7_2[1]_50_20211027_114321.csv 3KB
EFA_0.7_2[1]_50_20211027_114420.csv 3KB
EFA_0.7_2[1]_50_20211026_000006.csv 3KB
EFA_0.7_2[1]_50_20211025_235032.csv 3KB
EFA_0.7_2[-1]_50_20211025_225825.csv 3KB
EFA_0.7_2[-1]_50_20211025_235130.csv 3KB
EFA_0.7_2[0]_50_20211025_225300.csv 3KB
EFA_0.7_2[0]_50_20211025_234938.csv 3KB
EFA_0.8_2[-1]_50_20211025_225841.csv 3KB
EFA_0.5_2[0]_50_20211025_225217.csv 3KB
EFA_0.5_2[0]_50_20211025_233244.csv 3KB
EFA_0.5_2[0]_50_20211025_234725.csv 3KB
EFA_0.6_2[-1]_50_20211025_225808.csv 3KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
- 烤红薯啊2024-01-20资源很不错,内容和描述一致,值得借鉴,赶紧学起来!
- m0_672595982024-03-02资源内容详细,总结地很全面,与描述的内容一致,对我启发很大,学习了。
机智的程序员zero
- 粉丝: 1945
- 资源: 4199
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功