# StockRecommendSystem
## Main Requirement:
Python 3.5.2
Keras 2.0.6
TensorFlow 1.2
pymongo
tqdm
nltk
googletrans
<br>
## Install
brew install mongodb --with-openssl
brew services start mongodb
mongod --dbpath (Your Porject Folder)/Data/DB
When you storing stock data with mongodb mode, you may meet [too many open files](https://superuser.com/questions/433746/is-there-a-fix-for-the-too-many-open-files-in-system-error-on-os-x-10-7-1) problem, try the following codes in command line:
> sysctl -w kern.maxfiles=20480 (or whatever number you choose)
> sysctl -w kern.maxfilesperproc=18000 (or whatever number you choose)
> launchctl limit maxfiles 1000000 (or whatever number you choose)
> brew services restart mongodb
> mongodump -h localhost:27017 -d DB_STOCK -o ./
<br>
## Data Fetching:
Cover stock related data fetching, storaging in either MongoDB or CSV mode (See config.ini [Setting] sector for more detail).
1. Stock:(NSDQ, NYSE)-> US, (HKSE) -> HK, (SSE,SZSE) -> CHN
2. Earning: US stock market earning info.
3. Short: US stock market short squeeze info. (Require Multi IP Routing Support)
4. News: NewsRiver
5. Media: Twitter Data
### Data Structure
** US Stock List **
DB : DB_STOCK
SHEET: SHEET_US_DAILY_LIST
ITEM : symbol, name, market_cap, sector, industry, stock_update, news_update
** US Stock Daily **
DB : DB_STOCK
SHEET: SHEET_US_DAILY_DATA
ITEM : symbol (stock symbol)
data -> [{date, open, high, low, close, adj_close, volume}]
** US Stock Earning **
DB : DB_STOCK
SHEET: SHEET_US_EARN
ITEM : symbol (date)
data -> [{date, symbol, analyist, estimate, actual, surprise}]
** US News **
DB : DB_STOCK
SHEET: SHEET_US_NEWS
ITEM : symbol, date, time, title, source, ranking, sentiment, uri, url, body_html, body_eng, body_chn
### Run
cd Source/FetchData
python Fetch_Data_Stock_US_Daily.py
<br>
## Stock Prediction:
Under Development...
<br>
## Stock Processing:
Correlation
> Company1 Company2 Correlation
> QQQ TQQQ 0.999
> IBB BIB 0.999
> INSE XBKS 0.999
> JAG JPT 0.999
> ACWX VXUS 0.995
> IXUS ACWX 0.993
> VONE SPY 0.992
> IXUS VXUS 0.991
> VTWO VTWV 0.988
> NTB FBK 0.988
> GOOG GOOGL 0.987
### Run
cd Source/StockProcessing
python Correlation_Stock_US.py
<br>
## Reinforcement Learning:
This sector is directly clone from: [Link](https://github.com/shenyichen105/Deep-Reinforcement-Learning-in-Stock-Trading)
More in mind:
1. The approach use only "Adj Close" price as input, it's supposed more features combinations shall be joined to the party.
2. The Trading Strategy is a little mediocre and limited, better rewrite it.
3. At most only two tickers are allowed in the trading system, rewrite it.
testing output:
> init cash: 100000
> Columns: [AMD, NVDA, SPY, ^VIX]
> Index: []
> Runner: Taking action 2016-03-16 00:00:00 buy
> Runner: Taking action 2016-03-17 00:00:00 buy
> Runner: Taking action 2016-03-18 00:00:00 hold
> ......
> Runner: Taking action 2017-06-12 00:00:00 buy
> Runner: Taking action 2017-06-13 00:00:00 buy
> Runner: Taking action 2017-06-14 00:00:00 buy
> Final outcome: 121500.348294
### Run
cd Source/ReinforcementLearning
python runner.py
<br>
## ToDo:
More AI approach will be arranged and upload ASAP
没有合适的资源?快使用搜索试试~ 我知道了~
StockRecommendSystem:用于股票分析,预测和交易的智能推荐系统
共57个文件
py:42个
pdf:8个
md:2个
需积分: 49 7 下载量 14 浏览量
2021-03-11
16:48:25
上传
评论 3
收藏 17.36MB ZIP 举报
温馨提示
股票推荐系统 主要要求: 的Python 3.5.2 Keras 2.0.6 TensorFlow 1.2 pymongo tqdm nltk 谷歌翻译 安装 brew安装mongodb --with-openssl 酿造服务启动mongodb mongod --dbpath(您的项目文件夹)/数据/数据库 当使用mongodb模式存储股票数据时,可能会遇到问题,请在命令行中尝试以下代码: sysctl -w kern.maxfiles = 20480(或您选择的任何数字) sysctl -w kern.maxfilesperproc = 18000(或您选择的任何数字) launchctl限制maxfiles 1000000(或您选择的任何数字) brew服务重启mongodb mongodump -h本地主机:27017 -d DB_STOCK -o ./ 数据获取: 以Mong
资源详情
资源评论
资源推荐
收起资源包目录
StockRecommendSystem-master.zip (57个子文件)
StockRecommendSystem-master
.gitignore 1KB
LICENSE 1KB
config.ini 1KB
README.md 4KB
.vscode
settings.json 38B
Source
Utility
python-twitter
twitter
__init__.py 2KB
parse_tweet.py 4KB
error.py 511B
models.py 16KB
api.py 193KB
twitter_utils.py 14KB
ratelimit.py 7KB
_file_cache.py 3KB
utils.py 972B
fix_yahoo_finance.py 11KB
DataBase
DB_API.py 16KB
Start_DB_Server.py 1KB
StockProcessing
Filter_Stock_Cashflow_CHN.py 19KB
Filter_Stock_CHN_1.py 15KB
Filter_Stock_CHN.py 16KB
Filter_Stock_US.py 15KB
Correlation_Stock_US.py 4KB
StockPrediction
Stock_Prediction_Recommand_System.py 15KB
Stock_Prediction_Base.py 11KB
Stock_Prediction_Run.py 12KB
Stock_Prediction_Model_Stateless_LSTM.py 23KB
copy.sh 54B
Stock_Prediction_Model_XgBoost.py 21KB
Literatures
Wide & Deep Learning for Recommender Systems.pdf 400KB
stock_hmm.pdf 285KB
Molina-StockTradingWithRecurrentReinforcementLearning.pdf 56KB
The Elements of Statistical Learning.pdf 12.69MB
Stock_Prediction_Model_DBN.py 42KB
Stock_Prediction_Model_Random_Forrest.py 15KB
Stock_Prediction_Data_Processing.py 19KB
FetchData
Fetch_Data_Media_Twitter.py 9KB
Fetch_Data_Stock_US_Short.py 4KB
Fetch_Data_Stock_CHN_Monthly.py 7KB
Fetch_Data_News_US.py 11KB
Fetch_Data_Stock_US_Weekly.py 9KB
Fetch_Data_Stock_US_Monthly.py 9KB
Fetch_Data_Stock_US_Daily.py 9KB
Fetch_Data_Stock_CHN_Weekly.py 7KB
Fetch_Data_Stock_HK_Daily.py 8KB
Fetch_Data_Stock_US_Earning.py 6KB
Fetch_Data_Stock_CHN_StockList.py 2KB
Fetch_Data_Stock_US_StockList.py 3KB
Fetch_Data_Stock_CHN_Daily.py 7KB
ReinforcementLearning
environment.py 18KB
agent.py 13KB
Literatures
0dbb876b6cb8698603dbc236fb8bdac201f323f4.pdf 2.74MB
deep_reinforcement_learning_for_pairs_traing_using_actor_critic.pdf 307KB
rdpg.pdf 608KB
database_composition.pdf 1.13MB
README.md 2KB
runner.py 3KB
main.py 2KB
共 57 条
- 1
e起学美术
- 粉丝: 18
- 资源: 4631
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0