# Stock Market Prediction
Predicting the stock market using MATLAB and linear regression.
### Warning this algorithm does not make money, an error was found in our implementation
Using the opening price, high price, and low price of a stock over two weeks, as well as the current stock opening price, this model predicts the closing price of that stock with about 80% accuracy.
![](https://github.com/intermezzio/stock-market-prediction/blob/matlab_original_algorithm/output/jnug_gains.png)
[Full Report Here](https://docs.google.com/document/d/1L3u5gKNvpuLp4S4-yjCEbRjHrwH91EEyRn_v-18-4_s/edit?usp=sharing)
## Repository Structure
The `data/` folder stores csv files in the form \<TICKER\>.csv which include historical data for each stock.\
This folder also has a shell script to import this from Yahoo Finance (Copyright (c) 2017 Brad Lucas, MIT License) \
The `minute/` subfolder also has a limited amount of minute data
The `backtesting-python/` folder uses backtesting libraries to test algorithms over time
The `output/` folder stores output data in text files
The `strategies/` directory stores worktrees (branches as folders) for each strategy implemented
The `live_trading/` directory live trades the algorithm using the Alpaca API
## Usage
To set up the repository, run `sh setup.sh` in the main folder of the repository. Then, if you want to trade on the market, add your API keys to the `live_trading/config/config.py` folder. \
To run the trading algorithm 24/7, run `nohup python3 live_trading/alpaca_sdk_trade.py auto`. You may want to run this on a virtual machine that stays online forever for optimal results.
没有合适的资源?快使用搜索试试~ 我知道了~
matlab资源 利用线性代数和机器学习在MATLAB和Python中预测股市 仅供学习参考用代码.zip
共120个文件
txt:50个
csv:48个
py:10个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 136 浏览量
2023-10-18
15:32:25
上传
评论
收藏 7.58MB ZIP 举报
温馨提示
matlab资源 利用线性代数和机器学习在MATLAB和Python中预测股市 仅供学习参考用代码
资源推荐
资源详情
资源评论
收起资源包目录
matlab资源 利用线性代数和机器学习在MATLAB和Python中预测股市 仅供学习参考用代码.zip (120个子文件)
^IXIC.csv 922KB
BA.csv 840KB
PG.csv 828KB
AAPL.csv 656KB
AMD.csv 653KB
GOOG.csv 286KB
FTFT.csv 234KB
FAZ.csv 205KB
VXX.csv 204KB
TVIX.csv 192KB
FAS.csv 190KB
SOXS.csv 186KB
DRV.csv 185KB
TMV.csv 185KB
TMF.csv 180KB
GASL.csv 178KB
DRN.csv 174KB
TSLA.csv 172KB
SOXL.csv 168KB
TQQQ.csv 168KB
NUGT.csv 167KB
UVXY.csv 166KB
DUST.csv 166KB
UGAZ.csv 157KB
SVXY.csv 149KB
DGAZ.csv 146KB
CURE.csv 142KB
JNUG.csv 122KB
NUGT7d1m.csv 121KB
JNUG7d1m.csv 120KB
DUST7d1m.csv 119KB
JDST.csv 117KB
TVIX7d1m.csv 116KB
GUSH.csv 95KB
AMZN.csv 94KB
AM.csv 88KB
PCG.csv 85KB
LABD.csv 82KB
LABU.csv 81KB
DRIP.csv 79KB
SQ.csv 72KB
GASX.csv 70KB
DWT.csv 53KB
JDST3d1m.csv 51KB
DUSL.csv 46KB
CWBHF.csv 24KB
WEBL.csv 5KB
WEBS.csv 5KB
.gitmodules 158B
trendfollowing.m 1KB
meanreversion.m 951B
README.md 2KB
README.md 505B
README.md 487B
Toolbox_Parameters_Quantiacs.pdf 194KB
alpaca_sdk_trade.py 4KB
meanReversion.py 3KB
trendFollowing.py 3KB
TradingSystemTemplate.py 2KB
simpleTS.py 2KB
rsiExample.py 2KB
get-minute-data.py 1KB
get-minute-data.py 1KB
send_mail.py 1KB
slackbot.py 48B
get-yahoo-quotes.sh 2KB
setup.sh 293B
newworktree.sh 267B
setupworktrees.sh 167B
pullworktrees.sh 144B
F_ED.txt 614KB
F_FV.txt 609KB
F_TY.txt 608KB
F_US.txt 603KB
F_JY.txt 599KB
F_TU.txt 592KB
F_ES.txt 591KB
F_BP.txt 583KB
F_SF.txt 583KB
F_CL.txt 582KB
F_GC.txt 581KB
F_C.txt 576KB
F_HO.txt 575KB
F_S.txt 574KB
F_W.txt 571KB
F_CD.txt 569KB
F_SI.txt 569KB
F_BO.txt 569KB
F_SM.txt 569KB
F_LC.txt 568KB
F_NG.txt 568KB
F_HG.txt 566KB
F_AD.txt 565KB
F_CT.txt 564KB
F_KC.txt 563KB
F_LN.txt 563KB
F_SB.txt 562KB
F_CC.txt 559KB
F_FC.txt 558KB
F_PL.txt 556KB
共 120 条
- 1
- 2
资源评论
极客11
- 粉丝: 355
- 资源: 1835
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功