Skip to content

Commit

Permalink
巨潮公告
Browse files Browse the repository at this point in the history
  • Loading branch information
Rockyzsu committed Apr 24, 2021
1 parent 35b5d62 commit 11828c3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* fund/fund_info_spider.py 集思录基金,腾讯证券基金折价率,溢价率 爬虫
* fund/etf_info.py 市场指数基金的持仓股监控
* fund/ttjj.py 天天基金数据获取
* datahub/jucao_ammouncement.py 巨潮公告批量获取+PDF下载


### 已有:
Expand Down
3 changes: 3 additions & 0 deletions analysis/pdf_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ def walk_pdf(self):
for file in glob.glob(str(root)):
print(file)

def parse(self,pdf_file):


def main():
app = PDFParserCls()
app.walk_pdf()
Expand Down
10 changes: 5 additions & 5 deletions fund/LOFShareDetection.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def query_big_volatility_share(self):

day = 0 # 前x天 ,天 ,0 即使昨天和前天的数据比较
PERCENT = 10 # 偏离 百分比
DIFF_MAX = 100
DIFF_MAX = 200
category_list = ["LOF","ETF"]

yesterday = self.ts_util.get_last_trade_date() # 最新的一天
Expand All @@ -65,7 +65,7 @@ def query_big_volatility_share(self):
has_data = False
for category in category_list:

string_arg+=f'############ {category} ###############\n\n'
string_arg+=f'\n############ {category} ###############\n\n'
lastest_lofs = self.sess.query(FundBaseInfoModel.name, FundBaseInfoModel.code, ShareModel.share,
ShareModel.date).join(ShareModel).filter(
FundBaseInfoModel.category == category).filter(
Expand All @@ -89,14 +89,14 @@ def query_big_volatility_share(self):
diff_part = yesterday_share_num - lastday_of_yesterday_num
diff = (diff_part) * 1.00 / lastday_of_yesterday_num * 100.00
diff = round(diff, 2)
if abs(diff) >= PERCENT or diff_part>DIFF_MAX:
if abs(diff) >= PERCENT or abs(diff_part)>DIFF_MAX:

has_data = True # 有数据则发送邮件

print(yesterday_share['name'].to_list()[0], yesterday_share['code'].to_list()[0],
yesterday_share_num, lastday_of_yesterday_num, lastday_of_yesterday, diff,diff_part)
yesterday_share_num, lastday_of_yesterday_num, lastday_of_yesterday, diff,round(diff_part,0))
string = self.formator(category,yesterday_share['name'].to_list()[0], yesterday_share['code'].to_list()[0],
yesterday_share_num, lastday_of_yesterday_num, lastday_of_yesterday, diff,diff_part)
yesterday_share_num, lastday_of_yesterday_num, lastday_of_yesterday, diff,round(diff_part,0))
# print(string)
string_arg+=string+'\n'
string_arg+='\n'
Expand Down
1 change: 0 additions & 1 deletion fund/ttjj.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# @File : ttjj.py

import sys

import execjs

sys.path.append('..')
Expand Down

0 comments on commit 11828c3

Please sign in to comment.