Full Code of Rockyzsu/stock for AI

master 87b853a20f9f cached
207 files
4.5 MB
1.2M tokens
1027 symbols
1 requests
Download .txt
Showing preview only (4,746K chars total). Download the full file or copy to clipboard to get everything.
Repository: Rockyzsu/stock
Branch: master
Commit: 87b853a20f9f
Files: 207
Total size: 4.5 MB

Directory structure:
gitextract_dvg32hnt/

├── .gitattributes
├── .gitignore
├── LICENSE
├── README.MD
├── StockAnalyze.py
├── __init__.py
├── analysis/
│   ├── FOF_Duanjuan_fund.ipynb
│   ├── Untitled.ipynb
│   ├── Untitled1.ipynb
│   ├── apply_people_count.ipynb
│   ├── bond_daily_report.py
│   ├── closed_fund_analysis.ipynb
│   ├── closed_fund_backtest.ipynb
│   ├── column_between_hours.ipynb
│   ├── daily_zt_report.py
│   ├── data_sync_uqer.ipynb
│   ├── deal_company_analysis.ipynb
│   ├── df_sql_analysis.ipynb
│   ├── diagnose_stock.py
│   ├── fd_money.py
│   ├── filterstock.py
│   ├── fupan.py
│   ├── get_break_high_low.py
│   ├── hk_new_stock_ratio.ipynb
│   ├── hugutong.ipynb
│   ├── index_stock.ipynb
│   ├── ipospeed.py
│   ├── jucao_annnounce_parse.py
│   ├── last_year_price.ipynb
│   ├── levt_notebook.ipynb
│   ├── location.ipynb
│   ├── longhuban.ipynb
│   ├── plot_test.ipynb
│   ├── query.ipynb
│   ├── realtime_monitor.ipynb
│   ├── recall_bond.py
│   ├── reits区间涨幅.ipynb
│   ├── stock_analysis.ipynb
│   ├── topTenHolder.ipynb
│   ├── trade_frequency.ipynb
│   ├── xueqiu_private.ipynb
│   ├── 东北债.ipynb
│   ├── 乖离率计算.ipynb
│   ├── 公众号绘制收益率曲线.ipynb
│   ├── 基金分析.ipynb
│   ├── 基金年度收益.ipynb
│   ├── 收益率曲线绘制.ipynb
│   ├── 新闻分析.ipynb
│   ├── 每日分析模板.ipynb
│   ├── 私募基金收益率.ipynb
│   ├── 统计分时最大站跌幅.ipynb
│   ├── 退市转债分析.ipynb
│   ├── 选股.ipynb
│   ├── 雪球私募收益率分析.ipynb
│   └── 雪球赏金.ipynb
├── backtest/
│   ├── backtrader-course-lession1.py
│   ├── dataframe-feed.py
│   ├── datapath.py
│   ├── examle1/
│   │   └── sma-demo.py
│   └── ma_line_backtest.py
├── common/
│   ├── Base.py
│   ├── BaseService.py
│   ├── SecurityBase.py
│   ├── TushareUtil.py
│   ├── __init__.py
│   ├── aes.py
│   └── pdf_convertor.py
├── daily/
│   └── fupan.ipynb
├── datahub/
│   ├── A_stock_daily_info.py
│   ├── SPSIOP_PRICE.py
│   ├── __init__.py
│   ├── basic_market_info.py
│   ├── black_list_sql.py
│   ├── bond_industry_info.py
│   ├── daily_stock_market_info.py
│   ├── dfcf_hot_block.py
│   ├── foreignexchange.py
│   ├── industry_info/
│   │   ├── ak_bk.py
│   │   ├── cookies.txt
│   │   ├── ths_industry_cralwer_top.py
│   │   ├── ths_industry_detail.py
│   │   └── ths_industry_list.py
│   ├── jisilu.py
│   ├── jisilu_bond_announcement.py
│   ├── js_file/
│   │   └── encode_jsl.js
│   ├── jsl_login.py
│   ├── jucao_announcement.py
│   ├── jucao_reits_notice.py
│   ├── ninwen.py
│   ├── public_private_fund_members.py
│   ├── repurchase.py
│   ├── store_news.py
│   ├── ttjj_new_stock.py
│   ├── xueqiu_group.py
│   ├── xueqiu_sync_portfolio.py
│   ├── yanbao_crawl.py
│   └── zdt.py
├── fund/
│   ├── ETFShareDetection.py
│   ├── ETF_Finder.py
│   ├── JJTool.py
│   ├── LOFShareDetection.py
│   ├── LOF_Model.py
│   ├── LOF_Purchase_limit.py
│   ├── LOF_arbitrage.py
│   ├── ShareDetection.py
│   ├── __init__.py
│   ├── ark_funds.py
│   ├── check_holiday.py
│   ├── closed_end_fund.py
│   ├── closed_end_fund_backtrade/
│   │   ├── backtrade_fund_weekly_share_increment.py
│   │   ├── fund_code.json
│   │   ├── fund_data_source.py
│   │   └── main.py
│   ├── danjuan_fund.py
│   ├── danjuan_fund_data_analysis.py
│   ├── etf_info.py
│   ├── etf_models.py
│   ├── etf_range_increment.py
│   ├── fund_annouce.py
│   ├── fund_holding_list_gen_dynamic_flourish.py
│   ├── fund_holding_person.py
│   ├── fund_info_spider.py
│   ├── fund_jsl.py
│   ├── fund_profit_info.py
│   ├── fund_raise_speed.py
│   ├── fund_share_crawl.py
│   ├── fund_share_monitor.py
│   ├── fund_share_update.py
│   ├── fund_tencent.py
│   ├── jsl_fund.py
│   ├── ndx_index.py
│   ├── qdii_fund_analysis_5fund.ipynb
│   ├── reits.ipynb
│   ├── reits_data_crawler.py
│   ├── reits_history.py
│   ├── reits_netvalue.py
│   ├── run_sh_fundshare.py
│   ├── run_sz_fundshare.py
│   ├── sqlhelper.py
│   ├── stop_purchase_lof_fund.py
│   ├── sz_etf.py
│   ├── ttfund_etf_holding.py
│   ├── ttjj.py
│   ├── ttjj_others.py
│   ├── xueqiu_content.txt
│   ├── xueqiu_private_fund.py
│   └── 基金持仓股.ipynb
├── futu/
│   ├── basic_usage.py
│   ├── realtime_price.py
│   ├── subscribe.py
│   ├── unsubscrible.py
│   └── util.py
├── hk_stock/
│   ├── aastock_new_stock.py
│   └── new_stock_release.py
├── jisilu_bond_release.py
├── jisilu_daily.py
├── jubi.py
├── juejin/
│   └── fetch_data.ipynb
├── k-line/
│   ├── basic_usage.py
│   ├── main.py
│   ├── recognize_form.py
│   └── search_target.py
├── k_line.py
├── longhuban.py
├── machine_learning/
│   └── 贝叶斯预测涨跌.py
├── monitor/
│   ├── __init__.py
│   ├── alert_me.py
│   ├── big_deal.py
│   ├── ceiling_break.py
│   ├── crawler_monitor.py
│   ├── jsl_monitor.py
│   ├── realtime_kzz_price.py
│   ├── realtime_monitor_ts.py
│   └── server_api.py
├── new_stock_break.py
├── new_stock_fund.py
├── pledged_validation.py
├── plot_line.py
├── ptrade/
│   ├── __init__.py
│   └── 逆回购.py
├── real_time_big_deal.py
├── recordMyChoice.py
├── relationship_case.py
├── requirements.txt
├── select_stock.py
├── shareholder_info.py
├── snowball.py
├── source_code_reading/
│   ├── README.MD
│   └── source_code.py
├── statistices.py
├── stockInfo.py
├── stock_check.py
├── store_data.py
├── strategy_verify.py
├── temp/
│   └── edit.txt
├── toolkit.py
├── trader/
│   ├── __init__.py
│   └── auto_trader.py
├── transfer_data_es.py
├── utils/
│   ├── delivery_order.py
│   ├── profit_compare.py
│   └── push_msn.py
├── yesterday_zt_monitor.py
├── 收益率曲线绘制.ipynb
├── 新闻分析.ipynb
├── 选股.ipynb
└── 雪球赏金.ipynb

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitattributes
================================================
*.js linguist-language=python
*.css linguist-language=python
*.ipynb linguist-language=python
*.html linguist-language=python

================================================
FILE: .gitignore
================================================
*.pyc
.DS_Store
data.cfg
/.idea
*.xml
*.html
/private
.ipynb_checkpoints/
*.log
*.pkl
stock_list.txt
bases.csv
yanbao/
*.csv
*.xls
*.xlsx
config.py
conf.py
send_mail.py
user.json
codes.txt
.vscode/
settings.py
keys/
data/
email_list.py
config.json
.ipynb_checkpoints
log/jsl_monitor
configure/
release/
/datahub/image_server_dump_model.py
datahub/model.h
ninwen_model.h
validate_key.py

================================================
FILE: LICENSE
================================================
Copyright (c) Stock developers.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

    1. Redistributions of source code must retain the above copyright notice,
       this list of conditions, and the following disclaimer.

    2. Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions, and the following disclaimer in the
       documentation and/or other materials provided with the distribution.

    3. Neither the name of Stock nor the names of its contributors may be used
       to endorse or promote products derived from this software without
       specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

================================================
FILE: README.MD
================================================
### 更好的帮助自己炒股(亏钱-。-)

#### 2022-12-08 更新

目前正在重构项目代码,目录结构可能与下面描述有些出入,后期会慢慢更新修改,感谢大家的关注与支持。

---

*analysis/ 数据分析部分*

*datahub/ 数据采集部分*

*fund/ 基金相关的分析部分*

*futu/ 富途牛牛接口的基本用法 *

*hk_stock/ 港股部分*

*k-line/ K线技术形态部分*

*machine_learning/ 机器学习预测* 

*trader/ 交易部分*

*ptrade/ ptrade自动交易实盘代码*

*log/* 存放日志

*common/* 常用函数与库

*configure* 数据库连接与配置

----
#### 使用教程:
* 修改 configure/sample_config.json 配置文件名 为 configure/config.json,根据不同项目,并对着里面的字段进行修改,修改你的mysql,mongodb的用户名和密码,如果项目里面没有用到mysql,mongodb等,则不需要修改。
对应的映射关系可以看这个文件里面的源码。这个设置主要为了同一套代码便于切换线上和本地的数据库,并没有采用环境变量的方式存储用户密码。需要的朋友也可以自己改动。

configure/setting.py

```
    def config(self, db_type='mysql', local='ubuntu'):
        db_dict = self.json_data[db_type][local]
        user = db_dict['user']
        password = db_dict['password']
        host = db_dict['host']
        port = db_dict['port']
        return (user, password, host, port)

    def get_engine(self, db, type_='ubuntu'):
        from sqlalchemy import create_engine
        user, password, host, port = self.config(db_type='mysql', local=type_)
        try:
            engine = create_engine(
                'mysql+pymysql://{}:{}@{}:{}/{}?charset=utf8'.format(user, password, host, port, db))
        except Exception as e:
            print(e)
            return None
        return engine

    def get_mysql_conn(self, db, type_='ubuntu'):
        import pymysql
        user, password, host, port = self.config(db_type='mysql', local=type_)
        try:
            conn = pymysql.connect(host=host, port=port, user=user, password=password, db=db, charset='utf8')
        except Exception as e:
            print(e)
            return None
        else:
            return conn

    def mongo(self, location_type='ubuntu', async_type=False):
        user, password, host, port = self.config('mongo', location_type)
        connect_uri = f'mongodb://{user}:{password}@{host}:{port}'
        if async_type:
            from motor.motor_asyncio import AsyncIOMotorClient
            client = AsyncIOMotorClient(connect_uri)
        else:
            import pymongo
            client = pymongo.MongoClient(connect_uri)
        return client
```

#### 文末有券商福利:提供券商自动化下单接口

---

码农的量化交易,把经历写成代码推送到github。代码和策略会一直保持更新,如果你有好的策略或者想法和疑问想要交流,可以加文末微信。

### 新增:

### analysis 目录 数据分析部分

* analysis/get_zt_info 分析次新板块中的涨停强度
* analysis/diagnose_stock 股票诊断,是否有黑历史和东北股
* analysis/ipospeed IPO发行速度 与指数的相关性
* analysis/fd_money A股某段日期内涨停板的封单金额 
* 
### fund(基金)

* fund/LOFShareDection.py 监控LOF、ETF场内份额变动
* fund/ark_funds.py 获取ARK ETF每日持仓数据,并写入mongodb
* fund/fund_share_update.py 上交所,深交所 基金场内基金份额监控
* fund/fund_share_monitor.py 上交所,深交所 基金基金份额查询,规模变动
* fund/fund_info_spider.py 集思录基金,腾讯证券基金折价率,溢价率 爬虫
* fund/etf_info.py 市场指数基金的持仓股监控
* fund/ttjj.py 天天基金数据获取
* fund/xueqiu_private_fund.py 雪球私募私募获取
* fund/danjuan_fund.py 雪球蛋卷基金数据获取
* fund/danjuan_fund_data_analysis.py 雪球蛋卷基金分析

## datahub(数据源)

* datahub/foreignexchange.py 美元兑人民币汇率监控
* datahub/niwen.py 宁稳可转债下载
* datahub/public_private_fund_members.py 公墓私募基金成员数据
* datahub/jucao_ammouncement.py 巨潮公告批量获取+PDF下载
* datahub/bond_industry_info.py 可转债行业分布
* datahub/ceiling_break.py 涨停板封榜监控

## k-line (K线技术形态识别)
* k-line/recognize_form.py 通过talib识别常见形态,如三只乌鸦等
* 
### 已有:

* datahub/black_list_sql.py 记录A股市场上所有有黑历史的股票名单,并存入数据库
* big_deal.py 监控每天A股市场上的大单交易
* bond_monitor 可转债监控
* ceiling_break.py 新股一直板开板后多少天能够重新回到开板价格
* delivery_order.py 把交割单导出到Mysql,便于查找某只清仓股的操作历史痕迹,对自己的操作记录一目了然
* fetch_each_day.py --获取每天换手率前50的热门股
* filter_stock.py 通过不同的因子策略选股,常见的如市盈率,流通量,股东数,基金持股数等
* foreign_exchange.py 获取美元汇率的每天走势并存入Mysql
* get_break_high.py --获取当天破50天新高的股票。为什么不获取60天呢? 因为大家都在用,用的人多了就不准了。
* ipospeed.py 统计每天IPO新股发行速度与大盘的相关性
* ipo_stock.py 新股统计
* jisilu.py 获取集思录的可转债行情
* jubi.py -获取国内山寨币平台的实时数据
* new_stock_break 分析新股的开板时机
* new_stock_fund 打新基金获取,并选出中签科创板的基金
* pledgeed_validation.py 股权质押数据整理
* push_msn.py -短信提醒自己 设定的某个股票价格或者涨幅达到自己 要求
* relationship_case.py 每个月的解禁股与大盘指数的关系
* select_stock.py - 选股策略, 根据自己的经验选出来的个股。
* SPSIOP_PRICE.py - 华宝油气估值 通过爬虫获取数据然后计算
* stockInfo.py 爬取市场股票新闻消息,并存储到ElasticSearch数据库中
* strategy_verify.py 获取雪球的策略并验证
* simulation.py 记录自己的模拟仓
* strategy_verify.py -获取雪球的即时交易策略
* win_or_lost_each_day.py --评估自己每天每只股票的盈亏情况 完成度100%
* zdt.py --每天股票市场的涨停热度

----

# 福利

### 券商量化下单接口

支持python语言,可云端部署与本地运行两种模式,支持A股市场股票,转债,基金等品种。

![实盘python下单接口](http://xximg.30daydo.com/picgo/ptrade1.png)

### 接口文档

![](http://xximg.30daydo.com/picgo/api%E6%96%87%E6%A1%A3.png)

### 费率

交易费率低:<br>
股票万一; 可转债万0.4;基金ETF,LOF万0.5


----

开通量化接口后是不收取额外费用,可永久使用。

开通条件:
不同券商门槛不同
* 券商一:开户后入金1W可开通
* 券商二:开户后入金2W即可开通
* 

----

当然也有其他主流券商可选,华泰,广发,华宝,招商,国金,银河证券等等,基本可以涵盖主流券商。

----

## 开通方式:

扫码


<img src="http://xximg.30daydo.com/picgo/ufc200.png" style="zoom:80%;" />
<br>注明:开户。


----
关注开发者公众号: 可转债量化分析

----

[![公众号](http://www.30daydo.com/uploads/article/20210329/e42c51f95e6e6b41366ee320c1f01316.jpg)](http://www.30daydo.com/uploads/article/20210329/e42c51f95e6e6b41366ee320c1f01316.jpg)

================================================
FILE: StockAnalyze.py
================================================
'''
@author:rocky
@email:weigesysu@qq.com
@feature: 收盘事后分析
'''

from configure.settings import DBSelector
import pandas as pd
from scipy import stats
import tushare as ts
import datetime
import os
# import matplotlib.pyplot as plt
import numpy as np

pd.set_option('display.max_rows', None)


def volume_calculation(code, start, end):
    '''
    计算某个股票的某个时间段的累计成交量

    :param start: 开始日期
    :param end: 结束日期
    :return: 成交量,占每天比例
    '''

    df = ts.get_today_ticks(code)

    # 转换str为时间格式,便于下面用来比较时间的大小
    df['time'] = df['time'].map(lambda x: datetime.datetime.strptime(str(x), '%H:%M:%S'))
    total = df['volume'].sum()
    start = datetime.datetime.strptime(start, '%H:%M:%S')
    end = datetime.datetime.strptime(end, '%H:%M:%S')
    new_df = df[(df['time'] >= start) & (df['time'] < end)]

    volume = new_df['volume'].sum()
    rate = round(volume * 1.00 / total * 100, 2)

    return volume, rate


def today_statistics(today):
    '''
    :help: 今天涨跌幅的统计分析: 中位数,均值等数据
    :param today: 日期 2019-01-01
    :return:None
    '''

    engine = DBSelector().get_engine('db_daily')
    df = pd.read_sql(today, engine, index_col='index')
    # 去除停牌的 成交量=0

    df = df[df['volume'] != 0]
    median = round(df['changepercent'].median(), 2)
    mean = round(df['changepercent'].mean(), 2)
    std = round(df['changepercent'].std(), 2)
    p_25 = round(stats.scoreatpercentile(df['changepercent'], 25), 2)
    p_50 = round(stats.scoreatpercentile(df['changepercent'], 50), 2)
    p_75 = round(stats.scoreatpercentile(df['changepercent'], 75), 2)

    print('中位数: {}'.format(median))
    print('平均数: {}'.format(mean))
    print('方差: {}'.format(std))
    print('25%: {}'.format(p_25))
    print('50%: {}'.format(p_50))
    print('75%: {}'.format(p_75))


def zt_location(date):
    '''
    :help: 分析涨停的区域分布
    :param date:日期格式 20180404
    :return:
    '''
    engine_zdt = DBSelector().get_engine('db_zdt')
    engine_basic = DBSelector().get_engine('db_stock')

    df = pd.read_sql(date + 'zdt', engine_zdt, index_col='index')
    df_basic = pd.read_sql('tb_basic_info', engine_basic, index_col='index')
    result = {}

    for code in df['代码'].values:
        try:
            area = df_basic[df_basic['code'] == code]['area'].values[0]
            result.setdefault(area, 0)
            result[area] += 1

        except Exception as e:
            print(e)

    new_result = sorted(result.items(), key=lambda x: x[1], reverse=True)
    for k, v in new_result:
        print(k, v)


def show_percentage(price):
    '''
    :help: 根据收盘价计算每个百分比的价格
    :param open_price: 开盘价
    :return:
    '''

    for i in range(1, 11):
        print('{}\t+{}% -> {}'.format(price, i, round(price * (1 + 0.01 * i), 2)))

    for i in range(1, 11):
        print('{}\t-{}% -> {}'.format(price, i, round(price * (1 - 0.01 * i), 2)))


def stock_profit(code, start, end):
    '''
    :help: 计算某个时间段的收益率
    :param code: 股票代码
    :param start: 开始时间
    :param end: 结束时间
    :return: 收益率
    '''

    k_data = ts.get_k_data(start=start, end=end, code=code)

    if len(k_data)==0:
        return np.nan

    start_price = k_data['close'].values[0]
    print("Start price: ", start_price)

    end_price = k_data['close'].values[-1]

    print("End price: ", end_price)

    earn_profit = (end_price - start_price) / start_price * 100
    print("Profit: ", round(earn_profit, 2))
    return round(earn_profit, 2)


def exclude_kcb(df):
    '''
    :help: 去除科创板
    :param df:
    :return:
    '''
    non_kcb = df[~df['code'].map(lambda x: True if x.startswith('688') else False)]
    return non_kcb


def plot_percent_distribution(date):
    '''
    :help:图形显示某一天的涨跌幅分布
    :param date:
    :return:
    '''
    import matplotlib.pyplot as plt

    total = []
    engine = DBSelector().get_engine('db_daily')
    df = pd.read_sql(date, con=engine)
    df = exclude_kcb(df)

    count = len(df[(df['changepercent'] >= -11) & (df['changepercent'] <= -9.5)])
    total.append(count)

    for i in range(-9, 9, 1):
        count = len(df[(df['changepercent'] >= i * 1.00) & (df['changepercent'] < ((i + 1)) * 1.00)])
        total.append(count)

    count = len(df[(df['changepercent'] >= 9)])
    total.append(count)
    # print(total)
    df_figure = pd.Series(total)
    plt.figure(figsize=(16, 10))
    X = range(-10, 10)
    plt.bar(X, height=total, color='y')
    for x, y in zip(X, total):
        plt.text(x, y + 0.05, y, ha='center', va='bottom')
    plt.grid()
    plt.xticks(range(-10, 11))
    plt.show()


def year_price_change(year,ignore_new_stock=False):
    '''
    :year: 年份
    :ignore_new_stock: 排除当年上市的新股
    计算某年个股的涨幅排名
    :return: None 生成excel
    '''

    year = int(year)

    basic = ts.get_stock_basics()
    pro = []

    name=''
    # basic['timeToMarket']=pd.to_datetime(basic['timeToMarket'],format='%Y%m%d')

    # 去除当年的新股
    if ignore_new_stock:
        basic=basic[basic['timeToMarket']< int('{}0101'.format(year))]
        name = '_ignore_new_stock'

    filename='{}_all_price_change{}.xls'.format(year,name)

    for code in basic.index.values:
        p = stock_profit(code, '{}-01-01'.format(year), '{}-01-01'.format(year+1))
        pro.append(p)

    basic['p_change_year'] = pro
    basic=basic.sort_values(by='p_change_year', ascending=False)
    basic.to_excel(filename, encoding='gbk')


def stock_analysis(filename):
    '''
    # 分析年度的数据
    :return:
    '''

    df=pd.read_excel(filename,encoding='gbk')
    print('mean:\n',df['p_change_year'].mean())
    print('max:\n',df['p_change_year'].max())
    print('min:\n',df['p_change_year'].min())
    print('middle\n',df['p_change_year'].median())
    # plt.figure()
    # df['p_change_year'].plot.hist()
    # plt.show()


def cb_stock_year():
    '''
    上一年可转债正股的涨跌幅排名
    :return:
    '''
    engine = get_engine('db_stock')
    df_cb = pd.read_sql('tb_bond_jisilu', engine)
    filename='2019_all_price_change_ignore_new_stock.xls'
    df_all=pd.read_excel(filename,encoding='gbk')
    zg_codes = list(df_cb['正股代码'].values)
    df = df_all[df_all['code'].isin(zg_codes)]
    df.to_excel('2019_cb_zg.xls',encoding='gbk')

def main():
    ## 某个股票某个时间段的成交量 ####
    # code = '000069'
    # v, ratio = volume_calculation(code,'09:30:00', '10:00:00')
    # print('\n')
    # print(v, ratio)

    ## 涨跌幅分布 #####
    # TODAY=datetime.datetime.now().strftime("%Y-%m-%d")
    # today_tendency(TODAY)

    ## 分析涨停的区域分布 ####
    # TODAY = datetime.datetime.now().strftime("%Y%m%d")
    # zt_location(TODAY)

    ## 显示百分比价格
    # show_percentage(121)

    ## 计算某个个股某段时间的收益率
    # stock_profit('300333','2019-01-01','2020-02-03')

    ## 显示价格分布
    # date = '2020-02-07'
    # plot_percent_distribution(date)

    # 某年个股涨幅
    # year_price_change(2019,True)
    # stock_analysis('2019_all_price_change_ignore_new_stock.xls')

    cb_stock_year()

if __name__ == '__main__':
    main()


================================================
FILE: __init__.py
================================================
# -*- coding: utf-8 -*-
# @Time : 2020/11/21 0:12
# @File : __init__.py
# @Author : Rocky C@www.30daydo.com


================================================
FILE: analysis/FOF_Duanjuan_fund.ipynb
================================================
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import sys\n",
    "sys.path.append('..')\n",
    "from configure.settings import DBSelector"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "outputs": [],
   "source": [
    "db=DBSelector().mongo('qq')\n"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "doc=db['db_stock']['danjuan_fund']"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "plan_list =[]\n",
    "for item in doc.find():\n",
    "    plan_name=item['plan_name']\n",
    "    holding=item['holding']\n",
    "    d={}\n",
    "    d[plan_name]=holding\n",
    "    plan_list.append(d)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "len(plan_list)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "plan_list[0]"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "fund_dict={}\n",
    "for item in plan_list:\n",
    "    name=list(item.keys())[0]\n",
    "    funds=item[name]\n",
    "    for fund in funds:\n",
    "        # if fund['percent']!=0:\n",
    "        fund_dict.setdefault(fund['fd_name'],set())\n",
    "        fund_dict[fund['fd_name']].add(name)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "result={}\n",
    "for item in fund_dict:\n",
    "    print(item,len(fund_dict[item]))\n",
    "    result[item]=len(fund_dict[item])"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "list(sorted(result.items(),key=lambda x:x[1],reverse=True))"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "help(sorted)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "result_=list(sorted(result.items(),key=lambda x:x[1],reverse=True))"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "result_dict_=[]\n",
    "for name,count in result_:\n",
    "    d={}\n",
    "    d['name']=name\n",
    "    d['count']=count\n",
    "    result_dict_.append(d)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "import pandas as pd"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "result_dict_"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "df = pd.DataFrame(result_dict_)"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "df.head()"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "df.to_excel('fund_count_.xls',encoding='utf8')"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "import numpy as np"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "found_day_list=[]\n",
    "for item in doc.find({},{'found_days':1}):\n",
    "    found_day_list.append(item['found_days'])"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "print(np.array(found_day_list).mean())"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "result_np.mean()"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "plan_list =[]\n",
    "for item in doc.find():\n",
    "    plan_name=item['plan_name']\n",
    "    holding=item['holding']\n",
    "    d={}\n",
    "    d[plan_name]=holding\n",
    "    plan_list.append(d)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "134"
      ]
     },
     "metadata": {},
     "execution_count": 5
    }
   ],
   "source": [
    "len(plan_list)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "{'螺丝钉指数基金组合': [{'fd_code': '003318',\n",
       "   'fd_name': '景顺长城中证500低波动',\n",
       "   'type_desc': '指数型',\n",
       "   'type': 'index',\n",
       "   'percent': 12.21,\n",
       "   'total_gain_rate': 34.2128},\n",
       "  {'fd_code': '164906',\n",
       "   'fd_name': '交银中证海外中国互联网指数',\n",
       "   'type_desc': 'QDII型',\n",
       "   'type': 'qdii',\n",
       "   'percent': 11.39,\n",
       "   'total_gain_rate': 92.76259999999999},\n",
       "  {'fd_code': '001406',\n",
       "   'fd_name': '东方红策略精选C',\n",
       "   'type_desc': '混合型',\n",
       "   'type': 'hybrid',\n",
       "   'percent': 8.27,\n",
       "   'total_gain_rate': 1.294},\n",
       "  {'fd_code': '006586',\n",
       "   'fd_name': '南方安裕混合C',\n",
       "   'type_desc': '混合型',\n",
       "   'type': 'hybrid',\n",
       "   'percent': 7.61,\n",
       "   'total_gain_rate': -0.3519},\n",
       "  {'fd_code': '006327',\n",
       "   'fd_name': '易方达中概互联50ETF联接人民币A',\n",
       "   'type_desc': 'QDII型',\n",
       "   'type': 'qdii',\n",
       "   'percent': 7.57,\n",
       "   'total_gain_rate': 50.16890000000001},\n",
       "  {'fd_code': '161128',\n",
       "   'fd_name': '易方达标普信息科技',\n",
       "   'type_desc': 'QDII型',\n",
       "   'type': 'qdii',\n",
       "   'percent': 7.18,\n",
       "   'total_gain_rate': 30.4336},\n",
       "  {'fd_code': '006585',\n",
       "   'fd_name': '南方宝元债券C',\n",
       "   'type_desc': '债券型',\n",
       "   'type': 'bond',\n",
       "   'percent': 6.93,\n",
       "   'total_gain_rate': 4.9699},\n",
       "  {'fd_code': '090010',\n",
       "   'fd_name': '大成中证红利指数A',\n",
       "   'type_desc': '指数型',\n",
       "   'type': 'index',\n",
       "   'percent': 6.07,\n",
       "   'total_gain_rate': 21.2486},\n",
       "  {'fd_code': '100032',\n",
       "   'fd_name': '富国中证红利指数增强',\n",
       "   'type_desc': '指数型',\n",
       "   'type': 'index',\n",
       "   'percent': 5.01,\n",
       "   'total_gain_rate': 34.3354},\n",
       "  {'fd_code': '501050',\n",
       "   'fd_name': '华夏上证50AH优选指数(LOF)A',\n",
       "   'type_desc': '指数型',\n",
       "   'type': 'index',\n",
       "   'percent': 4.9,\n",
       "   'total_gain_rate': 20.8073},\n",
       "  {'fd_code': '519671',\n",
       "   'fd_name': '银河沪深300价值指数',\n",
       "   'type_desc': '指数型',\n",
       "   'type': 'index',\n",
       "   'percent': 4.77,\n",
       "   'total_gain_rate': 23.9742},\n",
       "  {'fd_code': '006060',\n",
       "   'fd_name': '鹏扬泓利债券C',\n",
       "   'type_desc': '债券型',\n",
       "   'type': 'bond',\n",
       "   'percent': 4.27,\n",
       "   'total_gain_rate': 3.6461},\n",
       "  {'fd_code': '485011',\n",
       "   'fd_name': '工银双利债券B',\n",
       "   'type_desc': '债券型',\n",
       "   'type': 'bond',\n",
       "   'percent': 2.89,\n",
       "   'total_gain_rate': 0.8126},\n",
       "  {'fd_code': '001594',\n",
       "   'fd_name': '天弘中证银行指数A',\n",
       "   'type_desc': '指数型',\n",
       "   'type': 'index',\n",
       "   'percent': 1.89,\n",
       "   'total_gain_rate': 21.3651},\n",
       "  {'fd_code': '110031',\n",
       "   'fd_name': '易方达H股ETF联接',\n",
       "   'type_desc': 'QDII型',\n",
       "   'type': 'qdii',\n",
       "   'percent': 1.69,\n",
       "   'total_gain_rate': 27.4416},\n",
       "  {'fd_code': '160716',\n",
       "   'fd_name': '嘉实基本面50指数(LOF)A',\n",
       "   'type_desc': '指数型',\n",
       "   'type': 'index',\n",
       "   'percent': 1.6,\n",
       "   'total_gain_rate': 58.5325},\n",
       "  {'fd_code': '008127',\n",
       "   'fd_name': '广发趋势优选混合C',\n",
       "   'type_desc': '混合型',\n",
       "   'type': 'hybrid',\n",
       "   'percent': 1.52,\n",
       "   'total_gain_rate': 1.9698},\n",
       "  {'fd_code': '501021',\n",
       "   'fd_name': '华宝香港中小',\n",
       "   'type_desc': 'QDII型',\n",
       "   'type': 'qdii',\n",
       "   'percent': 1.46,\n",
       "   'total_gain_rate': 34.732},\n",
       "  {'fd_code': '070023',\n",
       "   'fd_name': '嘉实深证基本面120联接',\n",
       "   'type_desc': '指数型',\n",
       "   'type': 'index',\n",
       "   'percent': 1.44,\n",
       "   'total_gain_rate': 65.225},\n",
       "  {'fd_code': '110003',\n",
       "   'fd_name': '易方达上证50指数A',\n",
       "   'type_desc': '指数型',\n",
       "   'type': 'index',\n",
       "   'percent': 0.92,\n",
       "   'total_gain_rate': 49.3477},\n",
       "  {'fd_code': '310398',\n",
       "   'fd_name': '申万菱信沪深300价值指数',\n",
       "   'type_desc': '指数型',\n",
       "   'type': 'index',\n",
       "   'percent': 0.37,\n",
       "   'total_gain_rate': 35.1811},\n",
       "  {'fd_code': '008975',\n",
       "   'fd_name': '富国中证消费50ETF联接A',\n",
       "   'type_desc': '指数型',\n",
       "   'type': 'index',\n",
       "   'percent': 0.04,\n",
       "   'total_gain_rate': 65.2204},\n",
       "  {'fd_code': '161725',\n",
       "   'fd_name': '招商中证白酒指数',\n",
       "   'type_desc': '指数型',\n",
       "   'type': 'index',\n",
       "   'percent': 0,\n",
       "   'total_gain_rate': 58.114},\n",
       "  {'fd_code': '040046',\n",
       "   'fd_name': '华安纳斯达克100指数',\n",
       "   'type_desc': 'QDII型',\n",
       "   'type': 'qdii',\n",
       "   'percent': 0,\n",
       "   'total_gain_rate': 50.47430000000001},\n",
       "  {'fd_code': '000968',\n",
       "   'fd_name': '广发中证养老',\n",
       "   'type_desc': '指数型',\n",
       "   'type': 'index',\n",
       "   'percent': 0,\n",
       "   'total_gain_rate': 40.7162},\n",
       "  {'fd_code': '001550',\n",
       "   'fd_name': '天弘中证医药100A',\n",
       "   'type_desc': '指数型',\n",
       "   'type': 'index',\n",
       "   'percent': 0,\n",
       "   'total_gain_rate': 31.3658},\n",
       "  {'fd_code': '530015',\n",
       "   'fd_name': '建信深证基本面60ETF联接A',\n",
       "   'type_desc': '指数型',\n",
       "   'type': 'index',\n",
       "   'percent': 0,\n",
       "   'total_gain_rate': 20.3643},\n",
       "  {'fd_code': '002086',\n",
       "   'fd_name': '大成景安短融债券E',\n",
       "   'type_desc': '债券型',\n",
       "   'type': 'bond',\n",
       "   'percent': 0,\n",
       "   'total_gain_rate': 0.28800000000000003},\n",
       "  {'fd_code': '501029',\n",
       "   'fd_name': '华宝红利基金',\n",
       "   'type_desc': '指数型',\n",
       "   'type': 'index',\n",
       "   'percent': 0,\n",
       "   'total_gain_rate': -3.1023}]}"
      ]
     },
     "metadata": {},
     "execution_count": 6
    }
   ],
   "source": [
    "plan_list[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "fund_dict={}\n",
    "for item in plan_list:\n",
    "    name=list(item.keys())[0]\n",
    "    funds=item[name]\n",
    "    for fund in funds:\n",
    "        # if fund['percent']!=0:\n",
    "        fund_dict.setdefault(fund['fd_name'],set())\n",
    "        fund_dict[fund['fd_name']].add(name)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": [
      "景顺长城中证500低波动 11\n交银中证海外中国互联网指数 16\n东方红策略精选C 1\n南方安裕混合C 1\n易方达中概互联50ETF联接人民币A 19\n易方达标普信息科技 4\n南方宝元债券C 4\n大成中证红利指数A 13\n富国中证红利指数增强 13\n华夏上证50AH优选指数(LOF)A 15\n银河沪深300价值指数 9\n鹏扬泓利债券C 4\n工银双利债券B 2\n天弘中证银行指数A 10\n易方达H股ETF联接 9\n嘉实基本面50指数(LOF)A 5\n广发趋势优选混合C 1\n华宝香港中小 13\n嘉实深证基本面120联接 6\n易方达上证50指数A 11\n申万菱信沪深300价值指数 2\n富国中证消费50ETF联接A 4\n招商中证白酒指数 9\n华安纳斯达克100指数 7\n广发中证养老 5\n天弘中证医药100A 5\n建信深证基本面60ETF联接A 5\n大成景安短融债券E 1\n华宝红利基金 8\n中欧时代先锋股票C 1\n中欧行业成长混合(LOF)C 1\n中欧新动力混合(LOF)C 1\n中欧价值发现混合C 3\n中欧明睿新起点混合 1\n中欧数据挖掘混合C 1\n中欧养老混合 2\n中欧医疗健康混合C 1\n中欧消费主题股票C 2\n中欧新蓝筹混合C 1\n中欧丰泓沪港深C 1\n中欧明睿新常态混合 3\n中欧盛世成长混合(LOF)C 1\n中欧新蓝筹混合A 9\n诺安研究精选股票 2\n鹏华新兴产业混合 5\n前海开源再融资股票 1\n国泰聚信价值优势C 6\n工银金融地产混合 18\n南方香港成长 2\n前海开源沪港深优势精选 5\n富国互联科技股票 1\n银华体育文化混合 1\n中欧品质消费股票A 2\n易方达亚洲精选 5\n博时军工主题股票 4\n中欧价值发现混合A 7\n交银新生活力混合 10\n嘉实新能源新材料A 2\n华安中证全指证券公司指数 3\n创金合信医疗保健股票A 3\n富国蓝筹精选股票 1\n上投摩根中国生物医药(QDII) 2\n华宝创新混合 2\n嘉实港股通新经济指数A 9\n南方中证有色金属联接C 2\n西部利得中证500指数增强C 1\n华安黄金易ETF联接A 7\n方正富邦红利精选 1\n长城环保主题混合 1\n景顺长城能源基建 4\n上投摩根科技前沿混合 1\n富国中证新能源汽车指数 7\n华安沪深300增强 1\n万家经济新动能混合C 1\n南方500信息联接 4\n国泰中证申万证券行业指数 5\n国联安半导体ETF联接C 3\n天弘中证计算机指数C 2\n天弘中证500指数增强A 5\n国泰中证全指通信设备ETF联接基金C 3\n长信军工量化混合 3\n申万菱信中证500指数优选增强 3\n富国沪深300增强 7\n天弘医疗健康混合C 1\n天弘医疗健康混合A 1\n创金合信中证500指数增强C 1\n方正富邦消费红利指数增强(LOF) 1\n申万菱信沪深300指数增强 1\n天弘中证500指数A 2\n广发沪深300指数增强C 2\n广发中证基建工程指数C 4\n申万菱信中证500指数增强 5\n申万菱信中证500指数优选增强C 1\n鹏华中证传媒指数(LOF) 6\n汇添富中证环境治理指数A 1\n广发沪深300指数增强A 1\n前海联合沪深300指数A 1\n兴全商业模式优选 11\n富国天惠成长LOF 18\n国富大中华精选混合(QDII)人民币 5\n国富沪港深成长精选股票 10\n交银新成长混合 14\n易方达安盈回报混合 3\n汇添富价值精选混合 14\n中欧新动力混合A 5\n泓德远见回报混合 4\n招商沪深300地产等权重指数 9\n工银文体产业股票 11\n兴全合宜混合(LOF)A 8\n鹏华中证全指证券公司指数(LOF) 4\n南方原油 5\n安信价值精选股票 2\n泓德泓益混合 2\n东方红沪港深混合 1\n汇添富全球移动互联网 5\n鹏扬景升混合A 1\n华宝中证银行ETF联接A 6\n华夏恒生ETF联接 15\n万家新利混合 2\n南方中证全指证券联接A 4\n财通价值动量混合 1\n中欧新动力混合 1\n中银转债增强债券A 1\n诺安成长混合 1\n博时裕隆混合 1\n天弘越南市场股票A 2\n广发全球精选股票 4\n国泰深证TMT50指数 3\n嘉实新兴产业 5\n中欧时代先锋 9\n华安德国30(DAX)ETF联接 7\n广发中证全指建筑材料指数A 4\n兴全沪深300指数增强A 9\n华安媒体互联网混合 6\n工银全球精选股票 2\n兴全可转债 6\n博时信用债券A 5\n交银医药创新股票 1\n信达澳银精华配置 2\n华泰柏瑞量化阿尔法 2\n兴全趋势 16\n前海开源金银珠宝 1\n华夏海外收益债券C 1\n兴全合润混合 16\n博时亚洲票息收益债 3\n易方达安心回报债A 6\n中海可转换债券A 1\n嘉实原油 2\n鹏华全球高收益债 2\n富国中证500指数增强 15\n易方达蓝筹精选混合 25\n东方红睿丰混合 1\n广发稳健增长混合A类 19\n中欧潜力价值混合 5\n景顺长城新兴成长 6\n兴全轻资产 2\n兴全合泰混合A 2\n兴全绿色投资 1\n兴全精选混合 3\n兴全社会责任 2\n兴全全球视野股票 2\n兴全有机增长 1\n兴全合泰混合C 1\n华安沪港深外延增长 1\n申万菱信中证申万电子行业投资指数(LOF)A 2\n鹏华文化传媒娱乐 1\n易方达沪深300量化增强 2\n工银深证红利ETF联接C 4\n易方达安心回报债B 2\n富国收益宝货币B 1\n易方达稳健收益债B 3\n广发中证传媒ETF联接A 4\n中欧新趋势混合A 3\n工银高质量成长混合A 1\n华宝价值发现混合 2\n汇添富蓝筹稳健混合 5\n交银优势行业混合 12\n易方达沪深300医药ETF联接 3\n华宝中证医疗指数 2\n国泰国证房地产行业指数 9\n华宝科技龙头ETF联接A 9\n华安黄金易ETF联接C 8\n国泰国证航天军工指数 2\n大成有色金属期货ETF联接C 2\n国联安半导体ETF联接A 2\n汇添富中证主要消费ETF联接 5\n国泰CES半导体芯片行业ETF联接A 3\n国泰中证生物医药ETF联接A 3\n富国中证科技50ETF联接A 1\n富国中证医药主题指数增强 2\n万家中证500指数增强A 1\n富国中证智能汽车指数 1\n国泰中证煤炭ETF发起式联接C 1\n天弘中证计算机指数A 5\n富国消费升级混合 1\n景顺长城大中华 1\n中欧医疗创新股票C 1\n嘉实智能汽车 1\n华宝资源优选 4\n富国品质生活混合 1\n华宝中证消费龙头指数(LOF)A 2\n易方达消费行业 7\n信达澳银新能源产业 5\n华宝科技ETF联接C 2\n交银阿尔法核心混合 5\n汇添富医药保健混合 2\n易方达安心回馈混合 5\n华夏创新成长ETF联接C 3\n中欧医疗健康混合A 12\n景顺长城鼎益混合(LOF) 3\n广发中证医药卫生  2\n南方中证500ETF联接 5\n鹏华国证钢铁行业指数(LOF) 1\n招商中证煤炭等权指数 3\n富国中证1000指数增强 2\n海富通阿尔法对冲混合C 1\n广发中证基建工程指数A 6\n广发纳斯达克100指数 5\n中信保诚中证800医药指数(LOF) 1\n鹏华中证500 1\n易方达中证军工指数(LOF) 1\n长盛中证全指证券公司指数(LOF) 1\n华夏沪港通恒生ETF联接 4\n国泰大宗商品配置 1\n诺安中证100指数A 1\n广发中证环保ETF联接C 3\n天弘中证医药100C 2\n广发中证军工ETF联接C 1\n南方中证500C 1\n广发中证传媒ETF联接C 5\n前海开源沪深300指数 1\n南方中证全指证券联接C 2\n前海开源中证军工指数A 1\n华安中证500低波ETF联接C 2\n广发可选消费联接C 2\n景顺中证500指数增强 1\n博时中证500指数增强 1\n华安安康灵活配置混合A 1\n中银新回报混合 1\n南方中证房地产联接A 2\n景顺顺益回报C 1\n银河君信混合C 1\n广发医药卫生联接C 4\n广发中证全指家用电器指数A 4\n南方创业板ETF联接 1\n天弘中证食品饮料指数C 3\n嘉实中证500ETF联接 4\n天弘沪深300指数增强A 1\n南方中证有色金属联接A 1\n南方中证银行联接A 1\n中欧责任投资混合A 2\n国泰国证新能源汽车指数 6\n汇添富中证新能源汽车产业指数A 4\n易方达创业板ETF联接A 8\n广发中证军工ETF联接 4\n天弘创业板ETF联接A 3\n鹏华中证信息技术指数(LOF) 2\n华宝券商ETF联接A 5\n华夏中证500ETF联接 1\n工银全球股票(QDII) 2\n中银增利债券 1\n南方天天利货币B 5\n汇添富移动互联股票 2\n工银传媒指数A 1\n中融新经济混合C 2\n泰康中证港股通非银指数C 3\n天弘上证50指数C 2\n广发中证全指家用电器指数C 2\n广发中证500ETF联接(LOF)A类 4\n天弘中证电子ETF联接C 4\n南方中证银行联接C 1\n广发信息技术联接C 4\n银华新能源材料量化优选C 2\n国泰国证食品饮料行业指数 3\n中邮新思路混合 1\n鹏华中证新能源指数 2\n方正富邦中证保险主题指数 7\n银华文体娱乐量化优选C 2\n交银经济新动力混合 3\n交银先进制造混合 1\n交银先锋混合 1\n交银策略回报混合 1\n交银精选混合 2\n交银蓝筹股票 1\n交银稳健配置混合 2\n交银定期支付双息平衡 6\n交银主题优选混合 1\n交银数据产业灵活配置混合 1\n交银中证环境治理指数 1\n交银国证新能源指数(LOF) 1\n交银双轮动债券C 1\n交银国企改革混合 1\n交银全球自然资源 1\n交银趋势优先股票 1\n交银上证180公司治理 1\n交银科技创新混合 1\n景顺长城内需增长 3\n广发优企精选混合 5\n汇添富优势精选混合 2\n易方达沪深300ETF联接 5\n南方MSCI中国A股国际通联接A 1\n华夏中证5G通信主题ETF联接A 1\n景顺长城沪深300指数增强 8\n南方H股联接A 2\n华安行业轮动混合 1\n招商行业精选股票 3\n富国高新技术产业 2\n诺德价值优势混合 1\n广发制造业精选混合 1\n上投摩根新兴动力混合 1\n汇添富消费行业混合 8\n银华心怡混合 2\n南方稳健成长混合 1\n华夏创新前沿股票 2\n银河服务混合 1\n富国天博创新混合 1\n融通行业景气混合 3\n添富红利增长混合C 1\n汇添富全球消费行业混合A 3\n易方达中小盘混合 9\n易方达科翔混合 1\n广发消费品精选混合 2\n银华内需精选混合 2\n工银新生代混合 2\n华夏经济转型股票 1\n鹏华消费优选混合 1\n华泰柏瑞创新升级 3\n嘉实泰和混合 3\n易方达行业领先企业 1\n海富通股票混合 2\n中欧创新成长混合A 2\n银华中小盘精选混合 2\n前海开源量化优选C 1\n创金合信工业周期精选股票C 1\n富国创新科技混合 2\n中银智能制造股票 1\n富国内需增长混合 1\n前海开源医疗健康C 1\n工银前沿医疗股票 6\n前海开源人工智能主题 1\n中银金融地产混合 5\n兴全多维价值混合A 1\n工银消费服务混合 1\n工银信息产业混合 3\n工银战略新兴产业混合A 1\n工银消费股票A 1\n工银战略转型股票 3\n工银美丽城镇股票 1\n工银深证红利联接 6\n中欧时代智慧混合A 1\n万家臻选混合 1\n汇添富文体娱乐主题混合 1\n广发利鑫灵活配置混合A 2\n博时新兴消费主题 1\n广发科技动力股票 1\n嘉实美国成长股票 1\n东方红中证竞争力指数A 1\n工银精选金融地产混合A 3\n汇添富消费升级混合 2\n华宝新兴成长混合 1\n中金MSCI中国A股国际质量指数A 1\n中欧医疗创新股票A 4\n东方红中证竞争力指数C 1\n富国美丽中国混合 1\n朱雀企业优胜A 1\n嘉实价值优势混合 2\n景顺沪港深领先科技 2\n泓德战略转型股票 2\n交银持续成长主题 1\n华安沪港深通精选混合 1\n景顺长城量化新动力 1\n嘉实沪港深精选 1\n华泰柏瑞量化优选 1\n广发钱袋子货币 7\n嘉实优化红利混合 1\n前海开源沪港深龙头精选 1\n富国沪港深行业精选混合 4\n易方达国防军工混合 5\n汇添富医疗服务混合 3\n广发中证能源  1\n广发可选消费联接 2\n华宝美国消费 2\n广发中证信息联接   1\n富国富钱包货币 4\n鹏华香港中小企业指数 2\n博时转债增强债券C 1\n华宝标普油气上游股票人民币A 3\n永赢惠添利混合 3\n富国天合稳健混合 1\n华安成长创新混合 1\n国泰聚信价值优势A 5\n华泰柏瑞价值增长 1\n泰达宏利沪深300增强A 1\n易方达沪深300非银ETF联接 3\n易方达上证中盘ETF联接A 1\n华宝红利基金C 1\n华宝沪港深中国增强(LOF)A 2\n中金沪深300指数增强A 1\n华夏鼎沛债券A 1\n天弘中证中美互联网A 3\n鹏华香港银行指数 1\n泰康中证港股通非银指数A 2\n华宝香港大盘C 1\n嘉实全球互联网股票 1\n汇添富全球医疗保健 1\n交银品质升级混合 1\n天弘创业板ETF联接C 1\n易方达中概互联50ETF联接人民币C 4\n安信量化精选沪深300增强C 3\n华夏上证50AH优选指数(LOF)C 2\n易方达中证红利ETF联接发起式C 1\n华夏沪港通恒生ETF联接C 1\n易方达恒生国企ETF联接C 3\n中金中证500指数增强C 2\n广发纳斯达克100指数C 3\n易方达沪深300ETF联接C 3\n中金中证500指数增强A 1\n易方达中证500ETF联接C 2\n富国中证消费50ETF联接C 3\n国泰家电ETF发起式联接C 1\n易方达上证50ETF联接发起式C 3\n中融央视财经50ETF联接C 3\n嘉实中证主要消费ETF联接C 2\n西部利得中证500指数增强A 1\n浦银安盛沪深300指数增强 1\n工银新蓝筹股票 1\n博时中证全指证券公司指数 1\n富国中国中小盘混合 2\n易方达纳斯达克100指数 5\n海富通阿尔法对冲混合A 7\n创金合信中证红利低波动指数A 1\n兴全合宜混合(LOF)C 1\n富国天惠精选成长混合C 1\n华富成长趋势混合 1\n招商中证全指证券公司指数 3\n汇添富创新医药主题混合 5\n华夏医疗健康混合C 1\n嘉实价值精选股票 5\n新华策略精选股票 2\n工银精选金融地产混合C 1\n南方香港优选股票 1\n华泰柏瑞质量成长 1\n信达澳银先进智造 2\n平安睿享文娱灵活配置混合C 1\n鹏华股息龙头ETF联接C类 1\n鹏华中证医药卫生指数 1\n鹏华中证国防指数(LOF) 2\n鹏华中证酒指数(LOF) 1\n鹏华中证500ETF联接C 1\n汇添富大盘核心资产增长混合 1\n汇添富环保行业股票 1\n汇添富民营活力 1\n国富弹性市值混合 1\n天弘中证电子ETF联接A 1\n富国中证全指证券公司指数 1\n信诚基建工程(LOF) 1\n嘉实恒生国企指数 3\n中欧价值智选回报A 1\n华夏价值精选混合 1\n华夏聚丰混合(FOF)A 1\n大成中小盘混合 1\n海富通内需热点混合 1\n华夏新起点混合 1\n华安生态优先混合 2\n景顺长城品质投资 2\n华泰柏瑞行业领先 1\n华宝香港大盘A 5\n鹏华中证800地产指数(LOF) 1\n天弘中证证券保险指数A 2\n申万菱信中小板指数 1\n易方达增强回报债A 3\n嘉实新兴市场债券 1\n广发医疗指数LOF 1\n汇添富中证生物科技指数C 1\n博时标普500ETF联接 3\n华泰柏瑞稳健收益债C 1\n博时信用债纯债C 2\n华夏海外收益债券A 1\n长信内需成长混合A 1\n银河创新混合 2\n易方达裕丰回报 3\n国泰中证全指通信设备ETF联接基金A 2\n天弘中证银行指数C 3\n泰康港股通TMT指数C 1\n中邮双动力混合 1\n天弘中证证券保险指数C 2\n国投瑞银白银期货(LOF) 2\n博时创业成长混合A 1\n国泰现金管理货币A 1\n中银中高等级债券C 1\n华夏鼎茂债券A 1\n国泰江源优势混合A 2\n富国转型机遇混合 1\n国泰区位优势混合 1\n国泰蓝筹精选混合C 1\n国泰黄金ETF联接A 1\n易方达中债7-10年国开债指数 2\n国泰互联网+股票 1\n国泰融安多策略灵活配置混合 1\n国泰景气行业混合 1\n国泰成长优选混合 1\n国泰事件驱动混合 1\n国泰优势行业混合 1\n国泰金马稳健回报 1\n国泰创业板指数 1\n华夏亚债中国指数C 1\n融通行业景气C 1\n华夏亚债中国指数A 1\n国泰民安增利债券C 1\n国泰利是宝货币 1\n国泰货币基金 1\n国泰民安增益纯债A 1\n国富估值优势混合 1\n安信量化精选沪深300增强A 1\n大成纳斯达克100指数 3\n嘉实中证主要消费ETF联接A 1\n国泰新能源汽车ETF发起式联接A 1\n易方达金融行业股票 1\n富国新动力混合A 4\n银华中证全指医药卫生指数增强 1\n易方达标普生物科技 1\n汇添富中证港股通(LOF)A 2\n申万菱信新能源汽车主题 2\n广发双擎升级混合 3\n中欧电子信息产业沪港深 1\n万家行业优选混合 7\n富国中证银行指数 2\n广发多元新兴股票 3\n泓德臻远回报混合 3\n国泰金牛创新成长 1\n鹏华创业板指数(LOF) 1\n易方达中证银行指数A 1\n易方达供给改革混合 2\n国泰国证有色金属行业指数 5\n创金合信恒兴中短债债券A 1\n创金合信工业周期精选股票A 2\n广发中证金融地产  2\n创金合信科技成长A 2\n鹏华中证A股资源产业指数(LOF) 1\n广发全指工业ETF联接 1\n创金合信金融地产股票A 2\n长信可转债A 1\n广发趋势优选灵活配置混合 3\n华夏沪深300ETF联接 1\n国富中国收益混合 1\n易方达平稳增长混合 1\n泓德致远混合A 5\n易方达瑞和混合 1\n安信新价值混合A 1\n诺德成长优势混合 1\n华安安顺混合 1\n国寿安保稳惠混合 1\n国泰沪深300增强A 1\n泰康新机遇混合 1\n汇添富中证互联网医疗指数C 1\n天弘互联网混合 1\n嘉实沪深300ETF联接(LOF)A 1\n博时黄金ETF联接A 1\n万家沪深300指数增强A 1\n南方上证50增强A 1\n华泰柏瑞中证500ETF联接A 1\n华宝券商ETF联接C 3\n华夏国证半导体芯片ETF联接C 1\n银华中证5G通信主题ETF联接 1\n国泰智能汽车股票A 1\n富国军工主题混合 3\n国泰上证金融ETF联接 1\n博时黄金ETF联接C 2\n易方达稳健收益债A 1\n招商境远保本混合 1\n招商安泰平衡 1\n招商制造业混合 1\n招商丰韵混合C 1\n招商沪深300指数增强C 1\n招商医药股票 2\n招商核心价值混合 1\n招商先锋基金 1\n创金合信消费主题股票A 1\n创金合信新能源汽车股票C 1\n创金合信资源主题精选A 1\n创金合信新能源汽车股票A 1\n创金合信转债精选债券A 1\n华安中证银行指数 2\n国泰国证医药卫生行业指数 2\n建信中证500指数增强A 3\n招商央视50指数 2\n工银产业债券A 1\n汇添富双利债券A 1\n泓德裕康债券A 1\n广发聚鑫债券A 1\n鹏华优势企业股票 1\n景顺长城中证500联接 1\n景顺长城景颐双利C 1\n景顺长城内需增长贰号 1\n景顺长城环保优势 2\n景顺长城中证沪港深红利低波A 1\n景顺稳定收益债A 1\n南方转型混合 1\n南方智慧精选混合 1\n广发沪港深新起点股票A 3\n南方创新经济 1\n南方安福混合C 1\n广发沪港深股票 1\n中欧行业成长混合A 1\n南方金融主题混合 1\n南方国策动力 1\n南方天元 1\n工银医疗保健股票 1\n易方达标普500指数 2\n银华汇利灵活配置混合C 1\n银华信用四季红债券 1\n银华心诚混合 1\n银华和谐主题混合 1\n银华长丰混合发起式 1\n银华兴盛股票 1\n银华富裕主题混合 1\n银华中债AAA信用债指数C 1\n银华深证100指数(LOF) 1\n中欧可转债债券A 2\n汇添富可转换债券A 1\n广发聚宝混合A 1\n富国产业债债券 1\n富国创业板指数 2\n博时裕富沪深300指数A 1\n易方达信用债A 3\n博时信用债纯债A 1\n汇添富精选美元债A 1\n中欧互联网先锋混合A 1\n新华资源混合 1\n易方达信息产业混合 1\n宝盈先进制造混合A 1\n汇添富中证新能源汽车产业指数C 1\n国泰新能源汽车ETF发起式联接C 1\n广发创业板ETF联接C 2\n广发金融地产联接C 1\n国泰CES半导体芯片行业ETF联接C 1\n广发中债7-10年国开债指数C 1\n华夏上证50ETF联接 1\n广发沪深300ETF联接C 1\n广发中证全指建筑材料指数C 1\n前海开源金银珠宝C 1\n南方中证房地产联接C 1\n广发中证全指汽车指数C 1\n华安添鑫中短债A 1\n华安新丝路主题 1\n华安低碳生活混合 2\n华安双债A 1\n华安升级主题混合 1\n华安策略优选混合 1\n华安鼎丰债券 1\n博时宏观回报债券C 1\n博时富瑞纯债C 1\n博时汇智回报混合 1\n博时逆向投资混合C 1\n华安智能生活混合 1\n广发聚鑫债券C 1\n博时回报混合 1\n博时厚泽回报混合C 1\n博时价值增长混合 1\n嘉实主题新动力混合 1\n博时中证500指数增强C 1\n华安中证细分医药ETF联接C 2\n易方达创业板指数ETF联接C 1\n博时鑫泰混合C 1\n易方达裕祥回报债券 2\n安信稳健增值混合C 1\n博时沪深300指数C 1\n博时上证50ETF联接 2\n博时安盈债券C 1\n汇添富中证全指证券公司指数C 1\n招商双债增强债券 1\n大成景安短融债券A 1\n大摩优质信价纯债A 1\n博时鑫源混合C 1\n交银优选回报A 2\n中银多策略混合 1\n光大安和债券A 1\n华宝量化对冲策略A 2\n广发纯债债券C 1\n易方达投资级信用债C 1\n安信新回报混合A 1\n国投瑞银先进制造混合 1\n国投瑞银双债债券A 1\n国投瑞银恒泽中短债A 1\n国投瑞银新兴产业混合(LOF) 1\n国投瑞银锐意改革混合 1\n国投瑞银新机遇混合A 1\n国投瑞银港股通价值发现混合 1\n国投瑞银医疗保健混合 1\n国投瑞银美丽中国混合 1\n华宝沪深300增强 1\n华宝标普中国A股质量价值 1\n华夏沪深300指数增强A 1\n招商产业债券 2\n金鹰信息产业股票A 1\n汇安沪深300指数增强A 1\n华夏创蓝筹ETF联接A 1\n中海医药健康产业C 1\n招商中证银行指数 1\n建信中证红利潜力指数A 1\n广发全球医疗保健 1\n招商国证生物医药指数 2\n天弘中证光伏A 1\n汇丰晋信恒生龙头指数A 1\n浦银安盛沪港深基本面100指数 1\n南方恒生中国企业精明指数A 1\n鹏华中证银行指数(LOF) 1\n国联安中证医药100指数 1\n广发恒生中型股指数(LOF)A类 1\n银河定投宝腾安指数 1\n广发中证环保ETF联接A 1\n益民中证智能消费指数 1\n嘉实策略增长混合 1\n万家和谐增长混合 1\n国富研究精选混合 1\n华宝动力组合基金 1\n申万菱信新经济混合 1\n景顺长城优选混合 1\n创金合信沪深300指数增强C 1\n天弘中证500指数增强C 1\n鹏华外延成长混合 1\n鹏华产业精选混合 1\n鹏华研究精选混合 1\n鹏华精选成长混合 1\n鹏华先进制造股票 1\n鹏华环保产业股票 1\n鹏华沪深港互联网 1\n天弘港股通精选A 2\n中欧先进制造股票A 1\n国联安主题驱动 1\n国联安鑫安混合 1\n国联安添鑫混合A 1\n国联安锐意成长 1\n国联安鑫享混合 1\n天弘中证食品饮料指数A 1\n富国沪港深价值精选 1\n国富中小盘股票 1\n景顺长城绩优成长混合 3\n南方优选成长混合 2\n汇添富成长焦点 2\n易方达消费精选股票 2\n大成标普500 1\n易方达中证500ETF联接A 1\n汇添富中证全指证券公司指数A 1\n中证银行ETF联接基金C 1\n广发消费升级股票 1\n广发量化多因子混合 1\n广发策略优选 1\n广发轮动配置混合 1\n广发医疗保健股票A 2\n广发新兴产业混合 1\n广发品牌消费股票 1\n广发聚瑞混合 1\n广发电子信息传媒产业精选 1\n广发新经济混合 1\n工银双利债券A 1\n交银优择回报A 1\n南方10年国债C 1\n华夏粤港澳大湾区创新100ETF联接A 1\n创金合信中证500指数增强A 1\n易方达中债新综合债券指数A 1\n华宝宝康债券 1\n华宝新活力混合 1\n华宝先进成长 1\n华宝大盘精选 1\n华宝量化对冲策略C 1\n华宝中证100指数 1\n泓德量化精选混合 1\n泓德睿泽混合 1\n泓德泓汇混合 1\n泓德优势领航混合 1\n泓德泓华混合 1\n泓德优选成长混合 2\n泓德泓利货币A 1\n泓德裕丰中短债债券A 1\n易方达港股通红利 1\n鹏华改革红利 1\n博时精选混合 1\n华夏军工安全混合 1\n华夏回报混合 1\n泰达宏利风险预算 1\n南方宝元债券 2\n宝盈互联网沪港深混合 1\n中泰开阳价值优选混合A 1\n宝盈鸿利收益灵活配置混合A 1\n宝盈研究精选混合A 1\n工银圆兴混合 2\n华泰保兴吉年丰A 1\n鹏华养老产业股票 1\n融通健康产业混合 2\n华安创业板50ETF联接A 1\n华安沪深300ETF联接C 1\n华安CES港股通精选100ETF联接C 1\n易方达深证100ETF联接C 1\n华泰柏瑞沪深300ETF联接A 1\n华安上证180联接 1\n华安创业板50指数 2\n大摩强收益债券 2\n鹏华研究智选混合 1\n广发小盘成长混合(LOF) 1\n鹏扬中证500质量成长A 1\n富国中证价值ETF联接 1\n工银新金融股票 2\n中海量化策略混合 1\n万家恒利债券A 1\n大成有色金属期货ETF联接A 1\n交银丰润收益债C 1\n华安安信消费混合 1\n万家恒利债券C 1\n工银绝对收益混合B 1\n易MSCIA股ETF联接A 1\n富国信用债债券A 3\n广发高端制造股票 1\n中欧消费主题股票A 1\n融通产业趋势股票 1\n建信中债国开行债C 1\n建信鑫泽回报混合C 1\n建信沪深300指数增强C 1\n华夏创蓝筹ETF联接C 1\n建信中证500指数增强C 1\n富国天益价值混合 1\n宝盈品牌消费股票A 1\n广发内需增长混合A 1\n鹏华双债增利债券 1\n南方安泰混合 1\n易方达纯债A 1\n兴业添利债券 1\n博时丝路主题股票A 1\n景顺长城成长之星 1\n工银养老产业股票 1\n中海医疗保健主题股票 1\n民生加银策略精选 1\n广发稳健增长混合C类 1\n"
     ]
    }
   ],
   "source": [
    "result={}\n",
    "for item in fund_dict:\n",
    "    print(item,len(fund_dict[item]))\n",
    "    result[item]=len(fund_dict[item])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "[('易方达蓝筹精选混合', 21),\n",
       " ('易方达中概互联50ETF联接人民币A', 19),\n",
       " ('富国天惠成长LOF', 15),\n",
       " ('工银金融地产混合', 14),\n",
       " ('交银新成长混合', 13),\n",
       " ('兴全趋势', 12),\n",
       " ('广发稳健增长混合A类', 12),\n",
       " ('兴全合润混合', 12),\n",
       " ('富国中证红利指数增强', 11),\n",
       " ('华夏上证50AH优选指数(LOF)A', 11),\n",
       " ('汇添富价值精选混合', 11),\n",
       " ('景顺长城中证500低波动', 10),\n",
       " ('易方达上证50指数A', 10),\n",
       " ('国富沪港深成长精选股票', 10),\n",
       " ('工银文体产业股票', 10),\n",
       " ('华夏恒生ETF联接', 10),\n",
       " ('华宝香港中小', 9),\n",
       " ('中欧新蓝筹混合A', 9),\n",
       " ('交银新生活力混合', 9),\n",
       " ('嘉实港股通新经济指数A', 9),\n",
       " ('国泰国证房地产行业指数', 9),\n",
       " ('富国中证500指数增强', 9),\n",
       " ('兴全商业模式优选', 8),\n",
       " ('兴全合宜混合(LOF)A', 8),\n",
       " ('中欧医疗健康混合A', 8),\n",
       " ('景顺长城沪深300指数增强', 8),\n",
       " ('交银中证海外中国互联网指数', 7),\n",
       " ('银河沪深300价值指数', 7),\n",
       " ('天弘中证银行指数A', 7),\n",
       " ('易方达H股ETF联接', 7),\n",
       " ('交银优势行业混合', 7),\n",
       " ('招商中证白酒指数', 7),\n",
       " ('大成中证红利指数A', 6),\n",
       " ('招商沪深300地产等权重指数', 6),\n",
       " ('华宝科技龙头ETF联接A', 6),\n",
       " ('方正富邦中证保险主题指数', 6),\n",
       " ('万家行业优选混合', 6),\n",
       " ('前海开源沪港深优势精选', 5),\n",
       " ('易方达亚洲精选', 5),\n",
       " ('华安黄金易ETF联接A', 5),\n",
       " ('国富大中华精选混合(QDII)人民币', 5),\n",
       " ('汇添富全球移动互联网', 5),\n",
       " ('兴全沪深300指数增强A', 5),\n",
       " ('富国中证新能源汽车指数', 5),\n",
       " ('易方达安心回馈混合', 5),\n",
       " ('富国沪深300增强', 5),\n",
       " ('易方达创业板ETF联接A', 5),\n",
       " ('景顺长城新兴成长', 5),\n",
       " ('易方达国防军工混合', 5),\n",
       " ('华安纳斯达克100指数', 5),\n",
       " ('工银深证红利联接', 5),\n",
       " ('海富通阿尔法对冲混合A', 5),\n",
       " ('汇添富创新医药主题混合', 5),\n",
       " ('嘉实价值精选股票', 5),\n",
       " ('国泰国证有色金属行业指数', 5),\n",
       " ('易方达中小盘混合', 5),\n",
       " ('嘉实深证基本面120联接', 4),\n",
       " ('富国中证消费50ETF联接A', 4),\n",
       " ('博时军工主题股票', 4),\n",
       " ('鹏华中证传媒指数(LOF)', 4),\n",
       " ('中欧新动力混合A', 4),\n",
       " ('华宝中证银行ETF联接A', 4),\n",
       " ('南方中证全指证券联接A', 4),\n",
       " ('华安黄金易ETF联接C', 4),\n",
       " ('华宝资源优选', 4),\n",
       " ('天弘中证500指数增强A', 4),\n",
       " ('天弘中证计算机指数A', 4),\n",
       " ('汇添富消费行业混合', 4),\n",
       " ('工银前沿医疗股票', 4),\n",
       " ('中欧医疗创新股票A', 4),\n",
       " ('国泰聚信价值优势A', 4),\n",
       " ('华宝红利基金', 4),\n",
       " ('易方达纳斯达克100指数', 4),\n",
       " ('汇添富中证主要消费ETF联接', 4),\n",
       " ('易方达消费行业', 4),\n",
       " ('华宝香港大盘A', 4),\n",
       " ('华宝券商ETF联接A', 4),\n",
       " ('泓德致远混合A', 4),\n",
       " ('交银定期支付双息平衡', 4),\n",
       " ('南方宝元债券C', 3),\n",
       " ('鹏扬泓利债券C', 3),\n",
       " ('嘉实基本面50指数(LOF)A', 3),\n",
       " ('中欧价值发现混合C', 3),\n",
       " ('鹏华新兴产业混合', 3),\n",
       " ('创金合信医疗保健股票A', 3),\n",
       " ('景顺长城能源基建', 3),\n",
       " ('易方达安盈回报混合', 3),\n",
       " ('南方原油', 3),\n",
       " ('中欧潜力价值混合', 3),\n",
       " ('中欧新趋势混合A', 3),\n",
       " ('易方达沪深300医药ETF联接', 3),\n",
       " ('国泰中证申万证券行业指数', 3),\n",
       " ('景顺长城鼎益混合(LOF)', 3),\n",
       " ('广发纳斯达克100指数', 3),\n",
       " ('申万菱信中证500指数增强', 3),\n",
       " ('天弘中证医药100A', 3),\n",
       " ('嘉实中证500ETF联接', 3),\n",
       " ('南方中证500ETF联接', 3),\n",
       " ('广发全球精选股票', 3),\n",
       " ('天弘中证电子ETF联接C', 3),\n",
       " ('景顺长城内需增长', 3),\n",
       " ('广发优企精选混合', 3),\n",
       " ('汇添富蓝筹稳健混合', 3),\n",
       " ('易方达沪深300ETF联接', 3),\n",
       " ('招商行业精选股票', 3),\n",
       " ('交银阿尔法核心混合', 3),\n",
       " ('工银信息产业混合', 3),\n",
       " ('工银精选金融地产混合A', 3),\n",
       " ('广发中证基建工程指数A', 3),\n",
       " ('安信量化精选沪深300增强C', 3),\n",
       " ('易方达沪深300ETF联接C', 3),\n",
       " ('南方500信息联接', 3),\n",
       " ('嘉实恒生国企指数', 3),\n",
       " ('易方达增强回报债A', 3),\n",
       " ('富国沪港深行业精选混合', 3),\n",
       " ('广发双擎升级混合', 3),\n",
       " ('广发多元新兴股票', 3),\n",
       " ('华宝券商ETF联接C', 3),\n",
       " ('易方达安心回报债A', 3),\n",
       " ('易方达信用债A', 3),\n",
       " ('中欧时代先锋', 3),\n",
       " ('景顺长城绩优成长混合', 3),\n",
       " ('易方达标普信息科技', 2),\n",
       " ('工银双利债券B', 2),\n",
       " ('申万菱信沪深300价值指数', 2),\n",
       " ('国泰聚信价值优势C', 2),\n",
       " ('南方香港成长', 2),\n",
       " ('中欧价值发现混合A', 2),\n",
       " ('嘉实新能源新材料A', 2),\n",
       " ('上投摩根中国生物医药(QDII)', 2),\n",
       " ('华宝创新混合', 2),\n",
       " ('南方中证有色金属联接C', 2),\n",
       " ('鹏华中证全指证券公司指数(LOF)', 2),\n",
       " ('万家新利混合', 2),\n",
       " ('天弘越南市场股票A', 2),\n",
       " ('兴全轻资产', 2),\n",
       " ('兴全合泰混合A', 2),\n",
       " ('兴全精选混合', 2),\n",
       " ('华宝价值发现混合', 2),\n",
       " ('华宝中证医疗指数', 2),\n",
       " ('大成有色金属期货ETF联接C', 2),\n",
       " ('华夏创新成长ETF联接C', 2),\n",
       " ('华夏沪港通恒生ETF联接', 2),\n",
       " ('广发中证传媒ETF联接C', 2),\n",
       " ('南方中证房地产联接A', 2),\n",
       " ('广发中证全指家用电器指数A', 2),\n",
       " ('天弘中证食品饮料指数C', 2),\n",
       " ('中欧责任投资混合A', 2),\n",
       " ('国联安半导体ETF联接C', 2),\n",
       " ('中融新经济混合C', 2),\n",
       " ('泰康中证港股通非银指数C', 2),\n",
       " ('广发中证500ETF联接(LOF)A类', 2),\n",
       " ('广发信息技术联接C', 2),\n",
       " ('交银经济新动力混合', 2),\n",
       " ('汇添富中证新能源汽车产业指数A', 2),\n",
       " ('南方H股联接A', 2),\n",
       " ('富国高新技术产业', 2),\n",
       " ('富国创新科技混合', 2),\n",
       " ('广发利鑫灵活配置混合A', 2),\n",
       " ('嘉实价值优势混合', 2),\n",
       " ('景顺沪港深领先科技', 2),\n",
       " ('永赢惠添利混合', 2),\n",
       " ('易方达沪深300非银ETF联接', 2),\n",
       " ('天弘中证中美互联网A', 2),\n",
       " ('泰康中证港股通非银指数A', 2),\n",
       " ('易方达中概互联50ETF联接人民币C', 2),\n",
       " ('华夏上证50AH优选指数(LOF)C', 2),\n",
       " ('工银深证红利ETF联接C', 2),\n",
       " ('易方达恒生国企ETF联接C', 2),\n",
       " ('中金中证500指数增强C', 2),\n",
       " ('广发纳斯达克100指数C', 2),\n",
       " ('富国中国中小盘混合', 2),\n",
       " ('国泰中证生物医药ETF联接A', 2),\n",
       " ('新华策略精选股票', 2),\n",
       " ('汇添富全球消费行业混合A', 2),\n",
       " ('广发中证军工ETF联接', 2),\n",
       " ('国泰国证新能源汽车指数', 2),\n",
       " ('华安生态优先混合', 2),\n",
       " ('华泰柏瑞创新升级', 2),\n",
       " ('天弘中证证券保险指数A', 2),\n",
       " ('广发中证养老', 2),\n",
       " ('银河创新混合', 2),\n",
       " ('建信深证基本面60ETF联接A', 2),\n",
       " ('易方达裕丰回报', 2),\n",
       " ('国泰江源优势混合A', 2),\n",
       " ('易方达中债7-10年国开债指数', 2),\n",
       " ('大成纳斯达克100指数', 2),\n",
       " ('中银金融地产混合', 2),\n",
       " ('富国新动力混合A', 2),\n",
       " ('申万菱信新能源汽车主题', 2),\n",
       " ('长信军工量化混合', 2),\n",
       " ('嘉实新兴产业', 2),\n",
       " ('富国中证银行指数', 2),\n",
       " ('泓德臻远回报混合', 2),\n",
       " ('易方达供给改革混合', 2),\n",
       " ('创金合信工业周期精选股票A', 2),\n",
       " ('创金合信科技成长A', 2),\n",
       " ('创金合信金融地产股票A', 2),\n",
       " ('华安德国30(DAX)ETF联接', 2),\n",
       " ('工银战略转型股票', 2),\n",
       " ('天弘创业板ETF联接A', 2),\n",
       " ('兴全可转债', 2),\n",
       " ('博时黄金ETF联接C', 2),\n",
       " ('招商医药股票', 2),\n",
       " ('建信中证500指数增强A', 2),\n",
       " ('华宝标普油气上游股票人民币A', 2),\n",
       " ('招商央视50指数', 2),\n",
       " ('广发沪港深新起点股票A', 2),\n",
       " ('中欧可转债债券A', 2),\n",
       " ('博时信用债券A', 2),\n",
       " ('富国创业板指数', 2),\n",
       " ('华安低碳生活混合', 2),\n",
       " ('交银优选回报A', 2),\n",
       " ('申万菱信中证500指数优选增强', 2),\n",
       " ('招商产业债券', 2),\n",
       " ('招商国证生物医药指数', 2),\n",
       " ('天弘港股通精选A', 2),\n",
       " ('南方优选成长混合', 2),\n",
       " ('汇添富成长焦点', 2),\n",
       " ('易方达消费精选股票', 2),\n",
       " ('广发医疗保健股票A', 2),\n",
       " ('富国军工主题混合', 2),\n",
       " ('南方宝元债券', 2),\n",
       " ('工银圆兴混合', 2),\n",
       " ('大摩强收益债券', 2),\n",
       " ('工银新金融股票', 2),\n",
       " ('融通行业景气混合', 2),\n",
       " ('富国信用债债券A', 2),\n",
       " ('东方红策略精选C', 1),\n",
       " ('南方安裕混合C', 1),\n",
       " ('广发趋势优选混合C', 1),\n",
       " ('中欧时代先锋股票C', 1),\n",
       " ('中欧行业成长混合(LOF)C', 1),\n",
       " ('中欧新动力混合(LOF)C', 1),\n",
       " ('中欧明睿新起点混合', 1),\n",
       " ('中欧数据挖掘混合C', 1),\n",
       " ('中欧养老混合', 1),\n",
       " ('中欧医疗健康混合C', 1),\n",
       " ('中欧消费主题股票C', 1),\n",
       " ('诺安研究精选股票', 1),\n",
       " ('前海开源再融资股票', 1),\n",
       " ('富国互联科技股票', 1),\n",
       " ('银华体育文化混合', 1),\n",
       " ('中欧品质消费股票A', 1),\n",
       " ('华安中证全指证券公司指数', 1),\n",
       " ('富国蓝筹精选股票', 1),\n",
       " ('西部利得中证500指数增强C', 1),\n",
       " ('方正富邦红利精选', 1),\n",
       " ('长城环保主题混合', 1),\n",
       " ('上投摩根科技前沿混合', 1),\n",
       " ('泓德远见回报混合', 1),\n",
       " ('安信价值精选股票', 1),\n",
       " ('泓德泓益混合', 1),\n",
       " ('东方红沪港深混合', 1),\n",
       " ('鹏扬景升混合A', 1),\n",
       " ('财通价值动量混合', 1),\n",
       " ('中欧新动力混合', 1),\n",
       " ('中银转债增强债券A', 1),\n",
       " ('诺安成长混合', 1),\n",
       " ('博时裕隆混合', 1),\n",
       " ('东方红睿丰混合', 1),\n",
       " ('兴全绿色投资', 1),\n",
       " ('华安沪港深外延增长', 1),\n",
       " ('工银高质量成长混合A', 1),\n",
       " ('国泰国证航天军工指数', 1),\n",
       " ('富国消费升级混合', 1),\n",
       " ('景顺长城大中华', 1),\n",
       " ('中欧医疗创新股票C', 1),\n",
       " ('嘉实智能汽车', 1),\n",
       " ('富国品质生活混合', 1),\n",
       " ('中信保诚中证800医药指数(LOF)', 1),\n",
       " ('鹏华中证500', 1),\n",
       " ('易方达中证军工指数(LOF)', 1),\n",
       " ('长盛中证全指证券公司指数(LOF)', 1),\n",
       " ('华宝中证消费龙头指数(LOF)A', 1),\n",
       " ('国泰大宗商品配置', 1),\n",
       " ('诺安中证100指数A', 1),\n",
       " ('广发可选消费联接C', 1),\n",
       " ('景顺中证500指数增强', 1),\n",
       " ('广发中证基建工程指数C', 1),\n",
       " ('博时中证500指数增强', 1),\n",
       " ('华安安康灵活配置混合A', 1),\n",
       " ('中银新回报混合', 1),\n",
       " ('景顺顺益回报C', 1),\n",
       " ('银河君信混合C', 1),\n",
       " ('南方创业板ETF联接', 1),\n",
       " ('天弘沪深300指数增强A', 1),\n",
       " ('南方中证有色金属联接A', 1),\n",
       " ('南方中证银行联接A', 1),\n",
       " ('天弘上证50指数C', 1),\n",
       " ('广发中证全指家用电器指数C', 1),\n",
       " ('南方中证银行联接C', 1),\n",
       " ('银华新能源材料量化优选C', 1),\n",
       " ('交银先进制造混合', 1),\n",
       " ('交银先锋混合', 1),\n",
       " ('交银精选混合', 1),\n",
       " ('汇添富优势精选混合', 1),\n",
       " ('南方MSCI中国A股国际通联接A', 1),\n",
       " ('华夏中证5G通信主题ETF联接A', 1),\n",
       " ('华安行业轮动混合', 1),\n",
       " ('前海开源量化优选C', 1),\n",
       " ('创金合信工业周期精选股票C', 1),\n",
       " ('中银智能制造股票', 1),\n",
       " ('富国内需增长混合', 1),\n",
       " ('前海开源医疗健康C', 1),\n",
       " ('兴全多维价值混合A', 1),\n",
       " ('工银消费服务混合', 1),\n",
       " ('工银战略新兴产业混合A', 1),\n",
       " ('工银消费股票A', 1),\n",
       " ('中欧时代智慧混合A', 1),\n",
       " ('万家臻选混合', 1),\n",
       " ('汇添富文体娱乐主题混合', 1),\n",
       " ('东方红中证竞争力指数A', 1),\n",
       " ('汇添富消费升级混合', 1),\n",
       " ('华宝新兴成长混合', 1),\n",
       " ('中金MSCI中国A股国际质量指数A', 1),\n",
       " ('富国美丽中国混合', 1),\n",
       " ('朱雀企业优胜A', 1),\n",
       " ('泓德战略转型股票', 1),\n",
       " ('中欧创新成长混合A', 1),\n",
       " ('富国天合稳健混合', 1),\n",
       " ('华安成长创新混合', 1),\n",
       " ('泰达宏利沪深300增强A', 1),\n",
       " ('易方达上证中盘ETF联接A', 1),\n",
       " ('华宝红利基金C', 1),\n",
       " ('华宝沪港深中国增强(LOF)A', 1),\n",
       " ('中金沪深300指数增强A', 1),\n",
       " ('华夏鼎沛债券A', 1),\n",
       " ('鹏华香港银行指数', 1),\n",
       " ('嘉实全球互联网股票', 1),\n",
       " ('汇添富全球医疗保健', 1),\n",
       " ('交银品质升级混合', 1),\n",
       " ('天弘创业板ETF联接C', 1),\n",
       " ('易方达中证红利ETF联接发起式C', 1),\n",
       " ('华夏沪港通恒生ETF联接C', 1),\n",
       " ('中金中证500指数增强A', 1),\n",
       " ('易方达中证500ETF联接C', 1),\n",
       " ('西部利得中证500指数增强A', 1),\n",
       " ('浦银安盛沪深300指数增强', 1),\n",
       " ('工银新蓝筹股票', 1),\n",
       " ('博时中证全指证券公司指数', 1),\n",
       " ('创金合信中证红利低波动指数A', 1),\n",
       " ('易方达安心回报债B', 1),\n",
       " ('兴全合宜混合(LOF)C', 1),\n",
       " ('富国天惠精选成长混合C', 1),\n",
       " ('汇添富医药保健混合', 1),\n",
       " ('华富成长趋势混合', 1),\n",
       " ('国泰国证食品饮料行业指数', 1),\n",
       " ('工银精选金融地产混合C', 1),\n",
       " ('南方香港优选股票', 1),\n",
       " ('鹏华股息龙头ETF联接C类', 1),\n",
       " ('鹏华中证医药卫生指数', 1),\n",
       " ('鹏华中证信息技术指数(LOF)', 1),\n",
       " ('鹏华中证国防指数(LOF)', 1),\n",
       " ('鹏华中证酒指数(LOF)', 1),\n",
       " ('汇添富大盘核心资产增长混合', 1),\n",
       " ('汇添富环保行业股票', 1),\n",
       " ('国富弹性市值混合', 1),\n",
       " ('天弘中证电子ETF联接A', 1),\n",
       " ('富国中证全指证券公司指数', 1),\n",
       " ('广发中证传媒ETF联接A', 1),\n",
       " ('国联安半导体ETF联接A', 1),\n",
       " ('信诚基建工程(LOF)', 1),\n",
       " ('中欧价值智选回报A', 1),\n",
       " ('华夏价值精选混合', 1),\n",
       " ('华夏聚丰混合(FOF)A', 1),\n",
       " ('大成中小盘混合', 1),\n",
       " ('海富通内需热点混合', 1),\n",
       " ('华夏新起点混合', 1),\n",
       " ('鹏华中证800地产指数(LOF)', 1),\n",
       " ('申万菱信中小板指数', 1),\n",
       " ('嘉实新兴市场债券', 1),\n",
       " ('广发医疗指数LOF', 1),\n",
       " ('长信内需成长混合A', 1),\n",
       " ('广发消费品精选混合', 1),\n",
       " ('国泰CES半导体芯片行业ETF联接A', 1),\n",
       " ('国泰中证全指通信设备ETF联接基金A', 1),\n",
       " ('国泰现金管理货币A', 1),\n",
       " ('中银中高等级债券C', 1),\n",
       " ('华夏鼎茂债券A', 1),\n",
       " ('富国转型机遇混合', 1),\n",
       " ('国泰区位优势混合', 1),\n",
       " ('国泰蓝筹精选混合C', 1),\n",
       " ('国泰黄金ETF联接A', 1),\n",
       " ('国富估值优势混合', 1),\n",
       " ('安信量化精选沪深300增强A', 1),\n",
       " ('嘉实中证主要消费ETF联接A', 1),\n",
       " ('易方达金融行业股票', 1),\n",
       " ('中欧电子信息产业沪港深', 1),\n",
       " ('易方达沪深300量化增强', 1),\n",
       " ('鹏华创业板指数(LOF)', 1),\n",
       " ('易方达中证银行指数A', 1),\n",
       " ('创金合信恒兴中短债债券A', 1),\n",
       " ('广发中证金融地产 ', 1),\n",
       " ('鹏华中证A股资源产业指数(LOF)', 1),\n",
       " ('广发全指工业ETF联接', 1),\n",
       " ('长信可转债A', 1),\n",
       " ('富国富钱包货币', 1),\n",
       " ('广发趋势优选灵活配置混合', 1),\n",
       " ('南方中证全指证券联接C', 1),\n",
       " ('华夏沪深300ETF联接', 1),\n",
       " ('国富中国收益混合', 1),\n",
       " ('易方达平稳增长混合', 1),\n",
       " ('招商中证煤炭等权指数', 1),\n",
       " ('汇添富中证互联网医疗指数C', 1),\n",
       " ('天弘互联网混合', 1),\n",
       " ('嘉实沪深300ETF联接(LOF)A', 1),\n",
       " ('博时黄金ETF联接A', 1),\n",
       " ('万家沪深300指数增强A', 1),\n",
       " ('南方上证50增强A', 1),\n",
       " ('国泰中证全指通信设备ETF联接基金C', 1),\n",
       " ('天弘中证银行指数C', 1),\n",
       " ('华泰柏瑞中证500ETF联接A', 1),\n",
       " ('华夏国证半导体芯片ETF联接C', 1),\n",
       " ('银华中证5G通信主题ETF联接', 1),\n",
       " ('易方达稳健收益债A', 1),\n",
       " ('招商境远保本混合', 1),\n",
       " ('招商安泰平衡', 1),\n",
       " ('招商制造业混合', 1),\n",
       " ('招商丰韵混合C', 1),\n",
       " ('招商沪深300指数增强C', 1),\n",
       " ('创金合信消费主题股票A', 1),\n",
       " ('创金合信新能源汽车股票C', 1),\n",
       " ('创金合信资源主题精选A', 1),\n",
       " ('华安中证银行指数', 1),\n",
       " ('国泰国证医药卫生行业指数', 1),\n",
       " ('工银产业债券A', 1),\n",
       " ('汇添富双利债券A', 1),\n",
       " ('泓德裕康债券A', 1),\n",
       " ('广发聚鑫债券A', 1),\n",
       " ('鹏华优势企业股票', 1),\n",
       " ('景顺长城中证500联接', 1),\n",
       " ('景顺长城景颐双利C', 1),\n",
       " ('景顺长城内需增长贰号', 1),\n",
       " ('南方转型混合', 1),\n",
       " ('南方智慧精选混合', 1),\n",
       " ('南方创新经济', 1),\n",
       " ('南方安福混合C', 1),\n",
       " ('广发沪港深股票', 1),\n",
       " ('中欧行业成长混合A', 1),\n",
       " ('南方金融主题混合', 1),\n",
       " ('南方国策动力', 1),\n",
       " ('银华汇利灵活配置混合C', 1),\n",
       " ('银华信用四季红债券', 1),\n",
       " ('银华心诚混合', 1),\n",
       " ('银华和谐主题混合', 1),\n",
       " ('银华心怡混合', 1),\n",
       " ('银华内需精选混合', 1),\n",
       " ('银华长丰混合发起式', 1),\n",
       " ('银华兴盛股票', 1),\n",
       " ('汇添富可转换债券A', 1),\n",
       " ('广发聚宝混合A', 1),\n",
       " ('富国产业债债券', 1),\n",
       " ('富国中证1000指数增强', 1),\n",
       " ('博时裕富沪深300指数A', 1),\n",
       " ('博时信用债纯债A', 1),\n",
       " ('中欧互联网先锋混合A', 1),\n",
       " ('汇添富医疗服务混合', 1),\n",
       " ('新华资源混合', 1),\n",
       " ('易方达信息产业混合', 1),\n",
       " ('宝盈先进制造混合A', 1),\n",
       " ('汇添富中证新能源汽车产业指数C', 1),\n",
       " ('华安添鑫中短债A', 1),\n",
       " ('华安新丝路主题', 1),\n",
       " ('华安双债A', 1),\n",
       " ('华安升级主题混合', 1),\n",
       " ('华安策略优选混合', 1),\n",
       " ('华安鼎丰债券', 1),\n",
       " ('博时宏观回报债券C', 1),\n",
       " ('博时富瑞纯债C', 1),\n",
       " ('博时汇智回报混合', 1),\n",
       " ('博时逆向投资混合C', 1),\n",
       " ('华安智能生活混合', 1),\n",
       " ('广发聚鑫债券C', 1),\n",
       " ('易方达裕祥回报债券', 1),\n",
       " ('中银多策略混合', 1),\n",
       " ('安信新回报混合A', 1),\n",
       " ('嘉实泰和混合', 1),\n",
       " ('国投瑞银先进制造混合', 1),\n",
       " ('国投瑞银双债债券A', 1),\n",
       " ('国投瑞银恒泽中短债A', 1),\n",
       " ('国投瑞银新兴产业混合(LOF)', 1),\n",
       " ('国投瑞银锐意改革混合', 1),\n",
       " ('国投瑞银新机遇混合A', 1),\n",
       " ('国投瑞银港股通价值发现混合', 1),\n",
       " ('国投瑞银医疗保健混合', 1),\n",
       " ('华宝沪深300增强', 1),\n",
       " ('华宝标普中国A股质量价值', 1),\n",
       " ('汇添富中证港股通(LOF)A', 1),\n",
       " ('华夏沪深300指数增强A', 1),\n",
       " ('金鹰信息产业股票A', 1),\n",
       " ('汇安沪深300指数增强A', 1),\n",
       " ('华夏创蓝筹ETF联接A', 1),\n",
       " ('中海医药健康产业C', 1),\n",
       " ('招商中证银行指数', 1),\n",
       " ('建信中证红利潜力指数A', 1),\n",
       " ('广发全球医疗保健', 1),\n",
       " ('天弘中证光伏A', 1),\n",
       " ('嘉实策略增长混合', 1),\n",
       " ('万家和谐增长混合', 1),\n",
       " ('国富研究精选混合', 1),\n",
       " ('华宝动力组合基金', 1),\n",
       " ('申万菱信新经济混合', 1),\n",
       " ('嘉实中证主要消费ETF联接C', 1),\n",
       " ('鹏华外延成长混合', 1),\n",
       " ('鹏华产业精选混合', 1),\n",
       " ('鹏华研究精选混合', 1),\n",
       " ('鹏华精选成长混合', 1),\n",
       " ('鹏华先进制造股票', 1),\n",
       " ('鹏华环保产业股票', 1),\n",
       " ('鹏华沪深港互联网', 1),\n",
       " ('华安媒体互联网混合', 1),\n",
       " ('中欧先进制造股票A', 1),\n",
       " ('国联安主题驱动', 1),\n",
       " ('国联安鑫安混合', 1),\n",
       " ('国联安添鑫混合A', 1),\n",
       " ('国联安锐意成长', 1),\n",
       " ('国联安鑫享混合', 1),\n",
       " ('天弘中证食品饮料指数A', 1),\n",
       " ('富国沪港深价值精选', 1),\n",
       " ('国富中小盘股票', 1),\n",
       " ('广发消费升级股票', 1),\n",
       " ('广发量化多因子混合', 1),\n",
       " ('广发策略优选', 1),\n",
       " ('广发轮动配置混合', 1),\n",
       " ('广发新兴产业混合', 1),\n",
       " ('工银双利债券A', 1),\n",
       " ('交银优择回报A', 1),\n",
       " ('博时标普500ETF联接', 1),\n",
       " ('广发钱袋子货币', 1),\n",
       " ('南方10年国债C', 1),\n",
       " ('易方达标普500指数', 1),\n",
       " ('华夏粤港澳大湾区创新100ETF联接A', 1),\n",
       " ('创金合信中证500指数增强A', 1),\n",
       " ('华宝宝康债券', 1),\n",
       " ('华宝新活力混合', 1),\n",
       " ('华宝先进成长', 1),\n",
       " ('华宝大盘精选', 1),\n",
       " ('华宝量化对冲策略C', 1),\n",
       " ('泓德量化精选混合', 1),\n",
       " ('泓德睿泽混合', 1),\n",
       " ('泓德泓汇混合', 1),\n",
       " ('泓德优势领航混合', 1),\n",
       " ('兴全社会责任', 1),\n",
       " ('易方达港股通红利', 1),\n",
       " ('华夏回报混合', 1),\n",
       " ('泰达宏利风险预算', 1),\n",
       " ('工银全球精选股票', 1),\n",
       " ('宝盈互联网沪港深混合', 1),\n",
       " ('中泰开阳价值优选混合A', 1),\n",
       " ('宝盈鸿利收益灵活配置混合A', 1),\n",
       " ('宝盈研究精选混合A', 1),\n",
       " ('中欧明睿新常态混合', 1),\n",
       " ('华泰保兴吉年丰A', 1),\n",
       " ('鹏华养老产业股票', 1),\n",
       " ('华安创业板50ETF联接A', 1),\n",
       " ('华安沪深300ETF联接C', 1),\n",
       " ('华安CES港股通精选100ETF联接C', 1),\n",
       " ('鹏华研究智选混合', 1),\n",
       " ('广发小盘成长混合(LOF)', 1),\n",
       " ('华安创业板50指数', 1),\n",
       " ('中海量化策略混合', 1),\n",
       " ('万家恒利债券A', 1),\n",
       " ('大成有色金属期货ETF联接A', 1),\n",
       " ('南方天天利货币B', 1),\n",
       " ('交银丰润收益债C', 1),\n",
       " ('工银绝对收益混合B', 1),\n",
       " ('广发高端制造股票', 1),\n",
       " ('融通产业趋势股票', 1),\n",
       " ('建信中债国开行债C', 1),\n",
       " ('建信鑫泽回报混合C', 1),\n",
       " ('建信沪深300指数增强C', 1),\n",
       " ('广发医药卫生联接C', 1),\n",
       " ('华夏创蓝筹ETF联接C', 1),\n",
       " ('富国天益价值混合', 1),\n",
       " ('宝盈品牌消费股票A', 1),\n",
       " ('广发内需增长混合A', 1),\n",
       " ('鹏华双债增利债券', 1),\n",
       " ('南方安泰混合', 1),\n",
       " ('易方达纯债A', 1),\n",
       " ('兴业添利债券', 1),\n",
       " ('博时丝路主题股票A', 1),\n",
       " ('景顺长城成长之星', 1),\n",
       " ('工银养老产业股票', 1),\n",
       " ('中海医疗保健主题股票', 1),\n",
       " ('泓德优选成长混合', 1),\n",
       " ('民生加银策略精选', 1),\n",
       " ('广发稳健增长混合C类', 1)]"
      ]
     },
     "metadata": {},
     "execution_count": 15
    }
   ],
   "source": [
    "list(sorted(result.items(),key=lambda x:x[1],reverse=True))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": [
      "Help on built-in function sorted in module builtins:\n\nsorted(iterable, /, *, key=None, reverse=False)\n    Return a new list containing all items from the iterable in ascending order.\n    \n    A custom key function can be supplied to customize the sort order, and the\n    reverse flag can be set to request the result in descending order.\n\n"
     ]
    }
   ],
   "source": [
    "help(sorted)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [],
   "source": [
    "result_=list(sorted(result.items(),key=lambda x:x[1],reverse=True))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [],
   "source": [
    "result_dict_=[]\n",
    "for name,count in result_:\n",
    "    d={}\n",
    "    d['name']=name\n",
    "    d['count']=count\n",
    "    result_dict_.append(d)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "{'name': '广发稳健增长混合C类', 'count': 1}"
      ]
     },
     "metadata": {},
     "execution_count": 21
    }
   ],
   "source": [
    "result_dict_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pd.DataFrame(result_dict_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "                 name  count\n",
       "0           易方达蓝筹精选混合     21\n",
       "1  易方达中概互联50ETF联接人民币A     19\n",
       "2           富国天惠成长LOF     15\n",
       "3            工银金融地产混合     14\n",
       "4             交银新成长混合     13"
      ],
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>name</th>\n      <th>count</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>易方达蓝筹精选混合</td>\n      <td>21</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>易方达中概互联50ETF联接人民币A</td>\n      <td>19</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>富国天惠成长LOF</td>\n      <td>15</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>工银金融地产混合</td>\n      <td>14</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>交银新成长混合</td>\n      <td>13</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "metadata": {},
     "execution_count": 24
    }
   ],
   "source": [
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [],
   "source": [
    "df.to_excel('fund_count_.xls',encoding='utf8')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [],
   "source": [
    "found_day_list=[]\n",
    "for item in doc.find({},{'found_days':1}):\n",
    "    found_day_list.append(item['found_days'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": [
      "543.455223880597\n"
     ]
    }
   ],
   "source": [
    "print(np.array(found_day_list).mean())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "543.455223880597"
      ]
     },
     "metadata": {},
     "execution_count": 43
    }
   ],
   "source": [
    "result_np.mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "3.8.3-final"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}

================================================
FILE: analysis/Untitled.ipynb
================================================
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import sys\n",
    "sys.path.append('..')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "from configure.settings import DBSelector"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "db = DBSelector()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "mongo_db = db.mongo()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "product_doc=mongo_db['fund']['etf_product']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "product_list =[]\n",
    "for item in product_doc.find({},{'_id':0}):\n",
    "    product_list.append(item)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[{'etf_code': '000001',\n",
       "  'etf_name': '上证指数',\n",
       "  'etf_product': ['汇添富上证综合指数', '富国上证综指ETF', '富国上证综指ETF联接', '国泰上证综合ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000010',\n",
       "  'etf_name': '上证180',\n",
       "  'etf_product': ['万家180指数', '华安上证180ETF', '华安上证180ETF联接'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000012',\n",
       "  'etf_name': '国债指数',\n",
       "  'etf_product': ['南方高股息股票A', '南方高股息股票C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000015',\n",
       "  'etf_name': '红利指数',\n",
       "  'etf_product': ['华泰柏瑞上证红利ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000300',\n",
       "  'etf_name': '沪深300',\n",
       "  'etf_product': ['博时沪深300指数A',\n",
       "   '长盛全债指数增强债券',\n",
       "   '长城久泰沪深300指数A',\n",
       "   '嘉实沪深300ETF联接(LOF)A',\n",
       "   '大成沪深300指数A/B'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000905',\n",
       "  'etf_name': '中证500',\n",
       "  'etf_product': ['南方中证500ETF联接(LOF)A',\n",
       "   '广发500ETF联接(LOF)A',\n",
       "   '鹏华中证500指数(LOF)A',\n",
       "   '富国中证500指数增强(LOF)',\n",
       "   '农银中证500指数'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000914',\n",
       "  'etf_name': '300金融',\n",
       "  'etf_product': ['国投金融地产ETF联接基金', '国投瑞银金融地产ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000919',\n",
       "  'etf_name': '300价值',\n",
       "  'etf_product': ['银河沪深300价值指数', '申万沪深300价值指数A', '申万沪深300价值指数C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H11014',\n",
       "  'etf_name': '中证短融',\n",
       "  'etf_product': ['海富通中证短融ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000029',\n",
       "  'etf_name': '180价值',\n",
       "  'etf_product': ['华宝兴业上证180价值ETF', '华宝上证180价值ETF联接'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000037',\n",
       "  'etf_name': '上证医药',\n",
       "  'etf_product': ['华夏医药ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000925',\n",
       "  'etf_name': '基本面50',\n",
       "  'etf_product': ['嘉实基本面50指数(LOF)A', '嘉实基本面50指数(LOF)C', '嘉实中证锐联基本面50ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000042',\n",
       "  'etf_name': '上证央企',\n",
       "  'etf_product': ['工银上证央企50ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000046',\n",
       "  'etf_name': '上证中小',\n",
       "  'etf_product': ['华泰柏瑞上证中小盘ETF', '华泰柏瑞上证中小盘ETF联接'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000933',\n",
       "  'etf_name': '中证医药',\n",
       "  'etf_product': ['汇添富中证医药卫生ETF',\n",
       "   '嘉实中证医药卫生ETF',\n",
       "   '鹏华中证医药A(LOF)',\n",
       "   '添富中证医药ETF联接A',\n",
       "   '添富中证医药ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000935',\n",
       "  'etf_name': '中证信息',\n",
       "  'etf_product': ['鹏华中证信息技术指数(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931461',\n",
       "  'etf_name': '电子50',\n",
       "  'etf_product': ['华宝中证电子50ETF', '华安中证电子50ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000944',\n",
       "  'etf_name': '内地资源',\n",
       "  'etf_product': ['民生加银中证内地资源主题指数'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000949',\n",
       "  'etf_name': '中证农业',\n",
       "  'etf_product': ['富国中证农业主题ETF', '银华中证农业主题ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000056',\n",
       "  'etf_name': '上证国企',\n",
       "  'etf_product': ['中银上证国企100ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000901',\n",
       "  'etf_name': '小康指数',\n",
       "  'etf_product': ['南方小康ETF', '南方小康ETF联接A', '南方小康ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000961',\n",
       "  'etf_name': '中证上游',\n",
       "  'etf_product': ['国投瑞银中证资源指数(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000963',\n",
       "  'etf_name': '中证下游',\n",
       "  'etf_product': ['国投瑞银中证消费服务指数(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000066',\n",
       "  'etf_name': '上证商品',\n",
       "  'etf_product': ['国联安上证商品ETF', '国联安上证商品ETF联接'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399701',\n",
       "  'etf_name': '深证F60',\n",
       "  'etf_product': ['深证基本面60ETF', '建信深证基本面60ETF联接A', '建信深证基本面60ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399702',\n",
       "  'etf_name': '深证F120',\n",
       "  'etf_product': ['嘉实深证基本面120ETF', '嘉实深证基本面120ETF联接A', '嘉实深证基本面120ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000969',\n",
       "  'etf_name': '300非周',\n",
       "  'etf_product': ['长安沪深300非周期指数'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000009',\n",
       "  'etf_name': '上证380',\n",
       "  'etf_product': ['南方上证380ETF联接A', '南方上证380ETF', '南方上证380ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000971',\n",
       "  'etf_name': '等权90',\n",
       "  'etf_product': ['银华中证等权重90指数(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000978',\n",
       "  'etf_name': '医药100',\n",
       "  'etf_product': ['国联安中证医药100A',\n",
       "   '天弘中证医药100指数A',\n",
       "   '天弘中证医药100指数C',\n",
       "   '国联安中证医药100C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000984',\n",
       "  'etf_name': '300等权',\n",
       "  'etf_product': ['中银沪深300等权重指数(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000986',\n",
       "  'etf_name': '全指能源',\n",
       "  'etf_product': ['广发中证全指能源ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000991',\n",
       "  'etf_name': '全指医药',\n",
       "  'etf_product': ['广发中证全指医药卫生交易ETF',\n",
       "   '广发医药卫生联接A',\n",
       "   '广发医药卫生联接C',\n",
       "   '银华中证全指医药卫生指数增强发起式'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000993',\n",
       "  'etf_name': '全指信息',\n",
       "  'etf_product': ['广发中证全指信息技术交易ETF', '广发信息技术联接ETFA', '广发信息技术联接ETFC'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399959',\n",
       "  'etf_name': '军工指数',\n",
       "  'etf_product': ['前海开源中航军工指数'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H11136',\n",
       "  'etf_name': '中国互联网',\n",
       "  'etf_product': ['交银中证海外中国互联网指数'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000802',\n",
       "  'etf_name': '500沪市',\n",
       "  'etf_product': ['中证500沪市ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000998',\n",
       "  'etf_name': '中证TMT',\n",
       "  'etf_product': ['中信保诚中证TMT产业主题指数(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000805',\n",
       "  'etf_name': 'A股资源',\n",
       "  'etf_product': ['鹏华中证A股资源产业指数(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000808',\n",
       "  'etf_name': '医药生物',\n",
       "  'etf_product': ['申万菱信中证申万医药生物指数'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000815',\n",
       "  'etf_name': '细分食品',\n",
       "  'etf_product': ['华宝中证细分食品饮料产业主题ETF', '华夏中证细分食品饮料产业主题ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000819',\n",
       "  'etf_name': '有色金属',\n",
       "  'etf_product': ['南方中证申万有色金属ETF', '南方有色金属联接A', '南方有色金属联接C', '南方有色金属联接E'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000824',\n",
       "  'etf_name': '国企红利',\n",
       "  'etf_product': ['西部利得中证国有企业红利指数增强A', '西部利得中证国有企业红利指数增强C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000832',\n",
       "  'etf_name': '中证转债',\n",
       "  'etf_product': ['东吴中证可转债指数'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000827',\n",
       "  'etf_name': '中证环保',\n",
       "  'etf_product': ['广发中证环保产业ETF',\n",
       "   '广发中证环保ETF联接基金A',\n",
       "   '广发中证环保ETF联接基金C',\n",
       "   '中证环保指数(LOF)A',\n",
       "   '中证环保指数(LOF)C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000846',\n",
       "  'etf_name': 'ESG 100',\n",
       "  'etf_product': ['中证财通可持续发展100指数A', '中证财通可持续发展100指数C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000841',\n",
       "  'etf_name': '800医药',\n",
       "  'etf_product': ['中信保诚中证800医药指数(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399965',\n",
       "  'etf_name': '800地产',\n",
       "  'etf_product': ['鹏华中证800地产指数(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399966',\n",
       "  'etf_name': '800证保',\n",
       "  'etf_product': ['鹏华中证800证券保险指数(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H30031',\n",
       "  'etf_name': '800有色',\n",
       "  'etf_product': ['中信保诚中证800有色指数(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H11077',\n",
       "  'etf_name': '10年国债',\n",
       "  'etf_product': ['上证10年期国债ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H30089',\n",
       "  'etf_name': '红利潜力',\n",
       "  'etf_product': ['建信中证红利潜力指数A', '建信中证红利潜力指数C', '山西证券中证红利潜力ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H30094',\n",
       "  'etf_name': '消费红利',\n",
       "  'etf_product': ['方正富邦消费红利指数增强(LOF)', '泰达消费红利指数A', '泰达消费红利指数C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399975',\n",
       "  'etf_name': '证券公司',\n",
       "  'etf_product': ['国泰中证全指证券公司ETF',\n",
       "   '华宝中证全指证券公司ETF',\n",
       "   '南方全指证券联接A',\n",
       "   '南方全指证券联接C',\n",
       "   '南方中证全指证券公司ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H30165',\n",
       "  'etf_name': '房地产',\n",
       "  'etf_product': ['南方中证全指房地产ETF',\n",
       "   '南方房地产联接A',\n",
       "   '南方房地产联接C',\n",
       "   '华夏中证全指房地产ETF',\n",
       "   '华夏中证全指房地产ETF联接A'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H30184',\n",
       "  'etf_name': '半导体',\n",
       "  'etf_product': ['国联安中证全指半导体ETF', '国联安中证全指半导体ETF联接A', '国联安中证全指半导体ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931008',\n",
       "  'etf_name': '汽车指数',\n",
       "  'etf_product': ['广发中证全指汽车指数A', '广发中证全指汽车指数C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H11098',\n",
       "  'etf_name': '沪城投债',\n",
       "  'etf_product': ['海富通上证城投债ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399967',\n",
       "  'etf_name': '中证军工',\n",
       "  'etf_product': ['前海开源中证军工指数A',\n",
       "   '前海开源中证军工指数C',\n",
       "   '国泰中证军工ETF',\n",
       "   '华宝中证军工ETF',\n",
       "   '广发中证军工ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H50040',\n",
       "  'etf_name': '上红低波',\n",
       "  'etf_product': ['兴业上证红利低波动ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399973',\n",
       "  'etf_name': '中证国防',\n",
       "  'etf_product': ['鹏华中证国防ETF', '鹏华中证国防指数(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399970',\n",
       "  'etf_name': '移动互联',\n",
       "  'etf_product': ['富国中证移动互联网指数', '鹏华中证移动互联网指数(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399812',\n",
       "  'etf_name': '养老产业',\n",
       "  'etf_product': ['广发养老指数A', '广发养老指数C', '国寿安保中证养老产业指数增强'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H30344',\n",
       "  'etf_name': '健康产业',\n",
       "  'etf_product': ['前海开源中证健康产业指数'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H30359',\n",
       "  'etf_name': '转型成长',\n",
       "  'etf_product': ['浙商汇金中证转型成长指数'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399806',\n",
       "  'etf_name': '环境治理',\n",
       "  'etf_product': ['交银施罗德中证环境治理(LOF)',\n",
       "   '汇添富中证环境治理指数(LOF)A',\n",
       "   '汇添富中证环境治理指数(LOF)C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H30372',\n",
       "  'etf_name': '中证安全',\n",
       "  'etf_product': ['东海中证社会发展安全产业主题'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399974',\n",
       "  'etf_name': '国企改革',\n",
       "  'etf_product': ['南方中证国有企业改革指数(LOF)A',\n",
       "   '南方中证国有企业改革指数(LOF)C',\n",
       "   '富国中证国有企业改革指数',\n",
       "   '易方达中证国企改革指数(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399989',\n",
       "  'etf_name': '中证医疗',\n",
       "  'etf_product': ['华宝中证医疗ETF',\n",
       "   '广发中证医疗指数(LOF)A',\n",
       "   '广发中证医疗指数(LOF)C',\n",
       "   '国泰中证医疗交易型开放式指数ETF',\n",
       "   '华宝中证医疗指数'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399976',\n",
       "  'etf_name': 'CS新能车',\n",
       "  'etf_product': ['华夏中证新能源汽车ETF',\n",
       "   '国泰中证新能源汽车ETF',\n",
       "   '国泰中证新能源汽车ETF联接A',\n",
       "   '国泰中证新能源汽车ETF联接C',\n",
       "   '博时新能源汽车ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399987',\n",
       "  'etf_name': '中证酒',\n",
       "  'etf_product': ['鹏华中证酒ETF', '鹏华中证酒指数(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H30533',\n",
       "  'etf_name': '中国互联网50',\n",
       "  'etf_product': ['易方达中证海外中国互联网50ETF',\n",
       "   '易方达中证海外联接人民币A',\n",
       "   '易方达中证海外联接美元A',\n",
       "   '易方达中证海外联接人民币C',\n",
       "   '易方达中证海外联接美元C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399990',\n",
       "  'etf_name': '煤炭等权',\n",
       "  'etf_product': ['招商中证煤炭等权指数'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399997',\n",
       "  'etf_name': '中证白酒',\n",
       "  'etf_product': ['招商中证白酒指数'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H30537',\n",
       "  'etf_name': '淘金100',\n",
       "  'etf_product': ['博时中证淘金大数据100A', '博时中证淘金大数据100I'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H30588',\n",
       "  'etf_name': '中证证保',\n",
       "  'etf_product': ['天弘中证证券保险指数A', '天弘中证证券保险指数C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399804',\n",
       "  'etf_name': '中证体育',\n",
       "  'etf_product': ['富国中证体育产业指数'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399803',\n",
       "  'etf_name': '工业4.0',\n",
       "  'etf_product': ['富国中证工业4.0指数'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399809',\n",
       "  'etf_name': '保险主题',\n",
       "  'etf_product': ['方正富邦中证保险主题指数'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399998',\n",
       "  'etf_name': '中证煤炭',\n",
       "  'etf_product': ['国泰中证煤炭ETF',\n",
       "   '国泰中证煤炭ETF联接A',\n",
       "   '国泰中证煤炭ETF联接C',\n",
       "   '中融中证煤炭指数',\n",
       "   '富国中证煤炭指数'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H50069',\n",
       "  'etf_name': '港股通',\n",
       "  'etf_product': ['招商上证港股通ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930620',\n",
       "  'etf_name': 'CSSW丝路',\n",
       "  'etf_product': ['长盛中证申万一带一路主题指数(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399993',\n",
       "  'etf_name': 'CSWD生科',\n",
       "  'etf_product': ['易方达中证万得生物科技指数(LOF)A', '易方达中证万得生物科技指数(LOF)C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930641',\n",
       "  'etf_name': '中证中药',\n",
       "  'etf_product': ['汇添富中证中药指数(LOF)A', '汇添富中证中药指数(LOF)C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930653',\n",
       "  'etf_name': 'CS食品饮',\n",
       "  'etf_product': ['天弘中证食品饮料指数A', '天弘中证食品饮料指数C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930697',\n",
       "  'etf_name': '家用电器',\n",
       "  'etf_product': ['广发中证全指家用电器指数A',\n",
       "   '广发中证全指家用电器指数C',\n",
       "   '国泰中证全指家用电器ETF',\n",
       "   '国泰中证全指家用电器ETF联接A',\n",
       "   '国泰中证全指家用电器ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930701',\n",
       "  'etf_name': 'CS京津冀',\n",
       "  'etf_product': ['工银京津冀指数A',\n",
       "   '广发中证京津冀ETF联接A',\n",
       "   '广发中证京津冀ETF联接C',\n",
       "   '广发中证京津冀ETF',\n",
       "   '工银京津冀指数C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000016',\n",
       "  'etf_name': '上证50',\n",
       "  'etf_product': ['华夏上证50ETF',\n",
       "   '易方达上证50指数A',\n",
       "   '中海上证50指数增强',\n",
       "   '万家上证50ETF',\n",
       "   '华夏上证50ETF联接A'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000903',\n",
       "  'etf_name': '中证100',\n",
       "  'etf_product': ['长盛中证100指数',\n",
       "   '中银中证100指数增强',\n",
       "   '华宝中证100指数A',\n",
       "   '海富通中证100指数(LOF)A',\n",
       "   '诺安中证100指数A'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000904',\n",
       "  'etf_name': '中证200',\n",
       "  'etf_product': ['泰信中证200指数基金', '民生加银中证200指数增强A', '民生加银中证200指数增强C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000906',\n",
       "  'etf_name': '中证800',\n",
       "  'etf_product': ['长盛同庆中证800(LOF)',\n",
       "   '天弘中证800指数A',\n",
       "   '天弘中证800指数C',\n",
       "   '添富中证800ETF',\n",
       "   '易方达中证800ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000913',\n",
       "  'etf_name': '300医药',\n",
       "  'etf_product': ['易方达沪深300医药ETF', '易方达沪深300医药卫生ETF联接A', '易方达沪深300医药卫生ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000018',\n",
       "  'etf_name': '180金融',\n",
       "  'etf_product': ['国泰上证180金融ETF', '国泰上证180金融ETF联接', '兴业上证180金融ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H11001',\n",
       "  'etf_name': '中证全债',\n",
       "  'etf_product': ['湘财长源股票型A', '湘财长源股票型C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000922',\n",
       "  'etf_name': '中证红利',\n",
       "  'etf_product': ['富国中证红利指数增强A',\n",
       "   '大成中证红利指数A',\n",
       "   '万家中证红利指数(LOF)',\n",
       "   '大成中证红利指数C',\n",
       "   '招商中证红利ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000021',\n",
       "  'etf_name': '180治理',\n",
       "  'etf_product': ['交银上证180公司治理ETF', '交银上证180公司治理ETF联接'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000036',\n",
       "  'etf_name': '上证消费',\n",
       "  'etf_product': ['华夏消费ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000038',\n",
       "  'etf_name': '上证金融',\n",
       "  'etf_product': ['华夏金融ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000043',\n",
       "  'etf_name': '超大盘',\n",
       "  'etf_product': ['博时上证超大盘ETF', '博时上证超大盘ETF联接'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000044',\n",
       "  'etf_name': '上证中盘',\n",
       "  'etf_product': ['易方达上证中盘ETF', '易方达上证中盘ETF联接A', '易方达上证中盘ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000928',\n",
       "  'etf_name': '中证能源',\n",
       "  'etf_product': ['汇添富中证能源ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000932',\n",
       "  'etf_name': '中证消费',\n",
       "  'etf_product': ['汇添富中证主要消费ETF',\n",
       "   '嘉实中证主要消费ETF',\n",
       "   '汇添富中证主要消费ETF联接',\n",
       "   '嘉实中证主要消费ETF联接A',\n",
       "   '嘉实中证主要消费ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000934',\n",
       "  'etf_name': '中证金融',\n",
       "  'etf_product': ['汇添富中证金融地产ETF',\n",
       "   '嘉实中证金融地产ETF',\n",
       "   '嘉实中证金融地产ETF联接A',\n",
       "   '嘉实中证金融地产ETF联接C',\n",
       "   '长盛中证金融地产指数(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000048',\n",
       "  'etf_name': '责任指数',\n",
       "  'etf_product': ['建信上证社会责任ETF', '建信上证社会责任ETF联接'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000063',\n",
       "  'etf_name': '上证周期',\n",
       "  'etf_product': ['海富通上证周期ETF', '海富通上证周期ETF联接'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000064',\n",
       "  'etf_name': '非周期',\n",
       "  'etf_product': ['海富通上证非周期ETF', '海富通上证非周期ETF联接'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000065',\n",
       "  'etf_name': '上证龙头',\n",
       "  'etf_product': ['华安上证龙头ETF', '华安上证龙头ETF联接'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000964',\n",
       "  'etf_name': '中证新兴',\n",
       "  'etf_product': ['东吴中证新兴'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000068',\n",
       "  'etf_name': '上证资源',\n",
       "  'etf_product': ['博时上证自然资源ETF', '博时上证自然资源ETF联接'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000069',\n",
       "  'etf_name': '消费80',\n",
       "  'etf_product': ['招商上证消费80ETF', '招商上证消费80ETF联接A', '招商上证消费80ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000966',\n",
       "  'etf_name': '基本400',\n",
       "  'etf_product': ['浦银安盛基本面400指数', '泰信中证锐联基本面400指数(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H11017',\n",
       "  'etf_name': '中期国债',\n",
       "  'etf_product': ['嘉实中证金边中期国债ETF联接A', '嘉实中证金边中期国债ETF联接C', '嘉实中证中期国债ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000982',\n",
       "  'etf_name': '500等权',\n",
       "  'etf_product': ['前海开源中证500等权ETF', '招商中证500等权重指数增强A', '招商中证500等权重指数增强C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000987',\n",
       "  'etf_name': '全指材料',\n",
       "  'etf_product': ['广发中证全指原材料ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000989',\n",
       "  'etf_name': '全指可选',\n",
       "  'etf_product': ['广发中证全指可选消费ETF', '广发中证全指可选消费ETF联接A', '广发中证全指可选消费ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000992',\n",
       "  'etf_name': '全指金融',\n",
       "  'etf_product': ['广发中证全指金融地产ETF', '广发中证全指金融地产ETF联接A', '广发中证全指金融地产ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000979',\n",
       "  'etf_name': '大宗商品',\n",
       "  'etf_product': ['招商中证商品指数基金(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000806',\n",
       "  'etf_name': '消费服务',\n",
       "  'etf_product': ['上投摩根中证消费服务指数'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000814',\n",
       "  'etf_name': '细分医药',\n",
       "  'etf_product': ['华安中证医药ETF', '华安中证细分医药交易A', '华安中证细分医药交易C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000821',\n",
       "  'etf_name': '300红利',\n",
       "  'etf_product': ['建信沪深300红利ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000828',\n",
       "  'etf_name': '300高贝',\n",
       "  'etf_product': ['招商沪深300高贝塔指数'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399802',\n",
       "  'etf_name': '500深市',\n",
       "  'etf_product': ['大成中证500深市ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H00140',\n",
       "  'etf_name': '5年国债',\n",
       "  'etf_product': ['国泰上证5年期国债ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H30035',\n",
       "  'etf_name': '300非银',\n",
       "  'etf_product': ['易方达沪深300非银ETF', '易方达沪深300非银行金融交易A', '易方达沪深300非银行金融交易C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H30124',\n",
       "  'etf_name': '安中动态',\n",
       "  'etf_product': ['汇添富沪深300安中指数'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399986',\n",
       "  'etf_name': '中证银行',\n",
       "  'etf_product': ['富国中证银行指数', '南方中证银行ETF', '南方银行联接A', '南方银行联接C', '华宝中证银行ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931009',\n",
       "  'etf_name': '建筑材料',\n",
       "  'etf_product': ['广发中证全指建筑材料指数A', '广发中证全指建筑材料指数C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931160',\n",
       "  'etf_name': '通信设备',\n",
       "  'etf_product': ['国泰中证全指通信设备ETF', '国泰中证全指通信设备交易联接A', '国泰中证全指通信设备交易联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H30257',\n",
       "  'etf_name': '500信息',\n",
       "  'etf_product': ['中证500信息技术指数ETF', '南方中证500信息技术ETF联接A', '南方中证500信息技术ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H30263',\n",
       "  'etf_name': '腾讯济安',\n",
       "  'etf_product': ['定投宝'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399983',\n",
       "  'etf_name': '地产等权',\n",
       "  'etf_product': ['招商沪深300地产等权重指数'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H30269',\n",
       "  'etf_name': '红利低波',\n",
       "  'etf_product': ['创金合信中证红利低波动指数A',\n",
       "   '创金合信中证红利低波动指数C',\n",
       "   '华泰柏瑞中证红利低波动ETF',\n",
       "   '华泰柏瑞中证红利低波ETF联接A',\n",
       "   '华泰柏瑞中证红利低波ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399971',\n",
       "  'etf_name': '中证传媒',\n",
       "  'etf_product': ['广发中证传媒ETF',\n",
       "   '广发中证传媒ETF联接A',\n",
       "   '广发中证传媒ETF联接C',\n",
       "   '鹏华中证传媒ETF',\n",
       "   '工银传媒指数A'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H30318',\n",
       "  'etf_name': '科技传媒通信150',\n",
       "  'etf_product': ['景顺长城中证科技传媒通信150ETF', '景顺长城中证科技传媒通信150ETF联接'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H11018',\n",
       "  'etf_name': '沪质城投',\n",
       "  'etf_product': ['海富通上证城投债ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399814',\n",
       "  'etf_name': '大农业',\n",
       "  'etf_product': ['前海开源中证大农业指数增强'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H30373',\n",
       "  'etf_name': '百发100',\n",
       "  'etf_product': ['广发百发100指数A', '广发百发100指数E'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399996',\n",
       "  'etf_name': '智能家居',\n",
       "  'etf_product': ['中信保诚中证智能家居指数(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000852',\n",
       "  'etf_name': '中证1000',\n",
       "  'etf_product': ['南方中证1000ETF',\n",
       "   '创金合信中证1000指数增强A',\n",
       "   '创金合信中证1000指数增强C',\n",
       "   '招商中证1000指数A',\n",
       "   '招商中证1000指数C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H30531',\n",
       "  'etf_name': '精工制造',\n",
       "  'etf_product': ['建信精工制造指数增强'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': 'H30535',\n",
       "  'etf_name': '互联网',\n",
       "  'etf_product': ['南方中证互联网指数(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399807',\n",
       "  'etf_name': '高铁产业',\n",
       "  'etf_product': ['南方中证高铁产业指数(LOF)', '鹏华中证高铁产业指数(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399991',\n",
       "  'etf_name': '一带一路',\n",
       "  'etf_product': ['鹏华中证一带一路主题指数(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399994',\n",
       "  'etf_name': '信息安全',\n",
       "  'etf_product': ['中信保诚中证信息安全指数(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399995',\n",
       "  'etf_name': '基建工程',\n",
       "  'etf_product': ['信诚中证基建工程指数(LOF)', '广发中证基建工程指数A', '广发中证基建工程指数C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930606',\n",
       "  'etf_name': '中证钢铁',\n",
       "  'etf_product': ['国泰中证钢铁ETF', '国泰中证钢铁ETF联接A', '国泰中证钢铁ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399707',\n",
       "  'etf_name': 'CSSW证券',\n",
       "  'etf_product': ['国泰中证申万证券行业指数(LOF)', '申万菱信中证申万证券行业指数'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399992',\n",
       "  'etf_name': 'CSWD并购',\n",
       "  'etf_product': ['易方达中证万得并购重组指数(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930648',\n",
       "  'etf_name': 'CS智消费',\n",
       "  'etf_product': ['博时中证智能消费ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930651',\n",
       "  'etf_name': 'CS计算机',\n",
       "  'etf_product': ['国泰中证计算机主题ETF',\n",
       "   '天弘中证计算机主题ETF',\n",
       "   '天弘中证计算机主题ETF联接A',\n",
       "   '天弘中证计算机主题ETF联接C',\n",
       "   '国泰中证计算机主题ETF联接A'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930652',\n",
       "  'etf_name': 'CS电子',\n",
       "  'etf_product': ['天弘中证电子ETF', '天弘中证电子ETF联接A', '天弘中证电子ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930703',\n",
       "  'etf_name': '福建50',\n",
       "  'etf_product': ['兴业中证福建50ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930713',\n",
       "  'etf_name': 'CS人工智',\n",
       "  'etf_product': ['融通人工智能指数(LOF)A',\n",
       "   '平安人工智能ETF',\n",
       "   '华夏中证人工智能主题ETF',\n",
       "   '融通人工智能指数(LOF)C',\n",
       "   '华夏中证人工智能主题ETF联接A'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '399811',\n",
       "  'etf_name': 'CSSW电子',\n",
       "  'etf_product': ['申万菱信中证申万电子行业投资指数(LOF)A', '申万菱信中证申万电子行业投资指数C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930719',\n",
       "  'etf_name': 'CS精准医',\n",
       "  'etf_product': ['汇添富中证精准医指数A(LOF)', '汇添富中证精准医指数C(LOF)', '融通中证精准医疗主题指数(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930720',\n",
       "  'etf_name': 'CS互医疗',\n",
       "  'etf_product': ['汇添富中证互联网医疗指数(LOF)A', '汇添富中证互联网医疗指数(LOF)C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930721',\n",
       "  'etf_name': 'CS智汽车',\n",
       "  'etf_product': ['富国中证智能汽车指数(LOF)',\n",
       "   '富国中证智能汽车主题ETF',\n",
       "   '天弘中证智能汽车A',\n",
       "   '天弘中证智能汽车C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930723',\n",
       "  'etf_name': '沪港深F100',\n",
       "  'etf_product': ['浦银沪港深基本面'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930726',\n",
       "  'etf_name': 'CS生医',\n",
       "  'etf_product': ['国泰中证生物医药ETF', '国泰中证生物医药ETF联接A', '国泰中证生物医药ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930734',\n",
       "  'etf_name': '360互联+',\n",
       "  'etf_product': ['大成中证360A', '大成中证360C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930729',\n",
       "  'etf_name': '银智100',\n",
       "  'etf_product': ['博时银智大数据100A', '博时银智大数据100C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930743',\n",
       "  'etf_name': '中证生科',\n",
       "  'etf_product': ['汇添富中证生物科技指数(LOF)A', '汇添富中证生物科技指数(LOF)C', '易方达中证生物科技主题ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '950090',\n",
       "  'etf_name': '上证50优选',\n",
       "  'etf_product': ['华夏上证50AH优选指数(LOF)A', '华夏上证50AH优选指数(LOF)C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930780',\n",
       "  'etf_name': '中证兴业中高债',\n",
       "  'etf_product': ['中证兴业中高等级信用债指数'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930782',\n",
       "  'etf_name': '500SNLV',\n",
       "  'etf_product': ['景顺长城中证500行业中性低波动指数',\n",
       "   '华安中证500低波ETF',\n",
       "   '华安中证500低波ETF联接A',\n",
       "   '华安中证500低波ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930784',\n",
       "  'etf_name': 'HK红利EW',\n",
       "  'etf_product': ['财通中证香港红利等权投资指数A', '财通中证香港红利等权投资指数C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930790',\n",
       "  'etf_name': 'CS娱乐TI',\n",
       "  'etf_product': ['富国中证娱乐主题指数增强型(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930791',\n",
       "  'etf_name': 'CS医药TI',\n",
       "  'etf_product': ['富国中证医药主题指数增强(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930792',\n",
       "  'etf_name': 'HK银行',\n",
       "  'etf_product': ['泰康香港银行指数A', '泰康香港银行指数C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930794',\n",
       "  'etf_name': '中美互联网',\n",
       "  'etf_product': ['天弘中证中美互联网指数(QDII)A', '天弘中证中美互联网指数(QDII)C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930820',\n",
       "  'etf_name': 'CS高端制',\n",
       "  'etf_product': ['富国中证高端制造指数增强型(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '950096',\n",
       "  'etf_name': '上海国企',\n",
       "  'etf_product': ['中证上海国企ETF', '中证上海国企ETF联接'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930836',\n",
       "  'etf_name': '沪港深高股息',\n",
       "  'etf_product': ['信达澳银中证沪港深高股息精选'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930838',\n",
       "  'etf_name': 'CS高股息',\n",
       "  'etf_product': ['浦银安盛中证高股息ETF', '浦银安盛中证高股息ETF联接A', '浦银安盛中证高股息ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930839',\n",
       "  'etf_name': 'HK高股息',\n",
       "  'etf_product': ['民生加银中证港股通高股息精选A', '民生加银中证港股通高股息精选C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930846',\n",
       "  'etf_name': '300SNLV',\n",
       "  'etf_product': ['华安沪深300行业中性低波动ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930865',\n",
       "  'etf_name': '5年地债',\n",
       "  'etf_product': ['鹏华中证5年地债ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930851',\n",
       "  'etf_name': '云计算',\n",
       "  'etf_product': ['融通中证云计算与大数据主题指数(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930874',\n",
       "  'etf_name': '政金债8-10',\n",
       "  'etf_product': ['建信中证政策性金融债8-10年指数(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930875',\n",
       "  'etf_name': '空天军工',\n",
       "  'etf_product': ['鹏华空天一体A(LOF)', '鹏华空天一体C(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930902',\n",
       "  'etf_name': '中证数据',\n",
       "  'etf_product': ['富国中证大数据产业ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '950105',\n",
       "  'etf_name': '上证证券',\n",
       "  'etf_product': ['汇安上证证券ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '950109',\n",
       "  'etf_name': '上证10年地债',\n",
       "  'etf_product': ['上证10年期地方政府债ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930914',\n",
       "  'etf_name': '港股通高股息',\n",
       "  'etf_product': ['汇添富中证港股通高股息投资指数(LOF)C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930916',\n",
       "  'etf_name': '中证10年国债',\n",
       "  'etf_product': ['富国中证10年期国债ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930917',\n",
       "  'etf_name': 'SHS高股息',\n",
       "  'etf_product': ['银河中证沪港深高股息指数A(LOF)', '银河中证沪港深高股息指数C(LOF)'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000171',\n",
       "  'etf_name': '新兴成指',\n",
       "  'etf_product': ['华夏战略新兴成指ETF', '华夏战略新兴成指ETF联接A', '华夏战略新兴成指ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '950113',\n",
       "  'etf_name': '沪质中高债3-5',\n",
       "  'etf_product': ['华夏3-5年中高级可质押信用债ETF',\n",
       "   '华夏3-5年中高级可质押信用债ETF联接A',\n",
       "   '华夏3-5年中高级可质押信用债ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930949',\n",
       "  'etf_name': '价值回报',\n",
       "  'etf_product': ['中邮中证价值回报量化策略指数A', '中邮中证价值回报量化策略指数C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930954',\n",
       "  'etf_name': '5年久期国开债',\n",
       "  'etf_product': ['华富中证5年恒定久期国开债指数A', '华富中证5年恒定久期国开债指数C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930955',\n",
       "  'etf_name': '红利低波100',\n",
       "  'etf_product': ['天弘中证红利低波动100A', '天弘中证红利低波动100C', '景顺长城中证红利低波动100ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930997',\n",
       "  'etf_name': '新能源车',\n",
       "  'etf_product': ['汇添富中证新能源汽车产业指数(LOF)A',\n",
       "   '汇添富中证新能源汽车产业指数(LOF)C',\n",
       "   '平安中证新能源汽车产业ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930999',\n",
       "  'etf_name': 'SHS大湾区',\n",
       "  'etf_product': ['建信中证沪港深粤港澳大湾区发展主题ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931000',\n",
       "  'etf_name': '大湾区',\n",
       "  'etf_product': ['粤港澳大湾区ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931018',\n",
       "  'etf_name': '中证5-10年国债活跃券',\n",
       "  'etf_product': ['平安中证5-10年期国债活跃券ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931024',\n",
       "  'etf_name': 'HKC非银',\n",
       "  'etf_product': ['泰康中证港股通非银指数A', '泰康中证港股通非银指数C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931033',\n",
       "  'etf_name': '杭州湾区',\n",
       "  'etf_product': ['南华中证杭州湾区交易ETF', '南华中证杭州湾区ETF联接A', '南华中证杭州湾区ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931052',\n",
       "  'etf_name': '国信价值',\n",
       "  'etf_product': ['富国中证价值ETF', '富国中证价值ETF联接A', '富国中证价值ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931062',\n",
       "  'etf_name': '质量低波',\n",
       "  'etf_product': ['恒生前海中证质量成长A', '恒生前海中证质量成长C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931066',\n",
       "  'etf_name': '军工龙头',\n",
       "  'etf_product': ['富国中证军工龙头ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931069',\n",
       "  'etf_name': '中金300',\n",
       "  'etf_product': ['中金中证优选300指数(LOF)A', '中金中证优选300指数(LOF)C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931067',\n",
       "  'etf_name': '绩优策略',\n",
       "  'etf_product': ['泰达宏利中证绩优指数A', '泰达宏利中证绩优指数C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000860',\n",
       "  'etf_name': '结构调整',\n",
       "  'etf_product': ['博时央企结构调整ETF',\n",
       "   '华夏中证央企ETF',\n",
       "   '银华中证央企ETF',\n",
       "   '华夏中证央企ETF联接A',\n",
       "   '华夏中证央企ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930738',\n",
       "  'etf_name': '四川国改',\n",
       "  'etf_product': ['华夏中证四川国改ETF', '华夏中证四川国改发起式ETF联接A', '华夏中证四川国改发起式ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931071',\n",
       "  'etf_name': '人工智能',\n",
       "  'etf_product': ['华富中证人工智能产业ETF', '华富中证人工智能产业ETF联接A', '华富中证人工智能产业ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930939',\n",
       "  'etf_name': '500质量',\n",
       "  'etf_product': ['鹏扬中证500质量成长指数A', '鹏扬中证500质量成长指数C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931068',\n",
       "  'etf_name': '消费龙头',\n",
       "  'etf_product': ['华宝中证消费龙头指数(LOF)A', '华宝中证消费龙头指数(LOF)C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930758',\n",
       "  'etf_name': '凤凰50',\n",
       "  'etf_product': ['浙商汇金中证浙江凤凰行动50ETF', '浙商之江凤凰联接'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '930740',\n",
       "  'etf_name': '300 红利LV',\n",
       "  'etf_product': ['嘉实沪深300红利低波动ETF',\n",
       "   '嘉实沪深300红利低波动ETF联接A',\n",
       "   '嘉实沪深300红利低波动ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931127',\n",
       "  'etf_name': '浙江新动能',\n",
       "  'etf_product': ['易方达中证浙江新动能ETF(QDII)',\n",
       "   '易方达中证新动能ETF联接(QDII)A',\n",
       "   '易方达中证新动能ETF联接(QDII)C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931136',\n",
       "  'etf_name': '深圳科技',\n",
       "  'etf_product': ['安信深圳科技指数(LOF)A', '安信深圳科技指数(LOF)C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931078',\n",
       "  'etf_name': '中证转债及可交换债',\n",
       "  'etf_product': ['中泰中证可转债及可交债指数A', '中泰中证可转债及可交债指数C', '博时中证可转债及可交换债券ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '950045',\n",
       "  'etf_name': '上证5年期地债',\n",
       "  'etf_product': ['海富通上证5年期地方政府债ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931134',\n",
       "  'etf_name': 'AH经济蓝筹',\n",
       "  'etf_product': ['华夏中证AH经济蓝筹股票指数A', '华夏中证AH经济蓝筹股票指数C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931142',\n",
       "  'etf_name': '东证竞争',\n",
       "  'etf_product': ['东方红中证竞争力指数A', '东方红中证竞争力指数C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931087',\n",
       "  'etf_name': '科技龙头',\n",
       "  'etf_product': ['华宝中证科技龙头ETF', '华宝科技ETF联接A', '华宝科技ETF联接C', '工银瑞信中证科技龙头ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931139',\n",
       "  'etf_name': 'CS消费50',\n",
       "  'etf_product': ['富国中证消费50ETF',\n",
       "   '富国中证消费50ETF联接A',\n",
       "   '富国中证消费50ETF联接C',\n",
       "   '东兴中证消费50指数A',\n",
       "   '东兴中证消费50指数C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931140',\n",
       "  'etf_name': '医药50',\n",
       "  'etf_product': ['富国中证医药50ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931141',\n",
       "  'etf_name': 'CS长三角',\n",
       "  'etf_product': ['添富中证长三角ETF', '汇添富中证长三角ETF联接A', '汇添富中证长三角ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931151',\n",
       "  'etf_name': '光伏产业',\n",
       "  'etf_product': ['华泰柏瑞中证光伏产业ETF', '银华中证光伏产业ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931152',\n",
       "  'etf_name': 'CS创新药',\n",
       "  'etf_product': ['银华中证创新药产业ETF', '广发中证创新药产业ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '950041',\n",
       "  'etf_name': '上证投资级转债及可交换债',\n",
       "  'etf_product': ['海富通上证投资级可转债ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '950047',\n",
       "  'etf_name': '上证1-5年地债',\n",
       "  'etf_product': ['兴业上证1-5年期地方政府债ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931161',\n",
       "  'etf_name': '0-4年地债',\n",
       "  'etf_product': ['鹏华中证0-4年期地方政府债ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931162',\n",
       "  'etf_name': '中证转债及可交换债50',\n",
       "  'etf_product': ['长信中证转债及可交换债50指数A', '长信中证转债及可交换债50指数C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931079',\n",
       "  'etf_name': '5G通信',\n",
       "  'etf_product': ['华夏中证5G通信主题ETF',\n",
       "   '华夏中证5G通信主题ETF联接A',\n",
       "   '华夏中证5G通信主题ETF联接C',\n",
       "   '银华中证5GETF',\n",
       "   '银华中证5G通信主题ETF联接A'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931157',\n",
       "  'etf_name': 'SHS红利成长LV',\n",
       "  'etf_product': ['景顺沪港深红利成长低波动指数A', '景顺沪港深红利成长低波动指数C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931165',\n",
       "  'etf_name': '新兴科技100',\n",
       "  'etf_product': ['嘉实中证新兴科技100ETF', '嘉实新兴科技100ETF联接A', '嘉实新兴科技100ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931166',\n",
       "  'etf_name': '医药健康100',\n",
       "  'etf_product': ['嘉实医药健康100ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931167',\n",
       "  'etf_name': '先进制造100',\n",
       "  'etf_product': ['嘉实先进制造100ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931163',\n",
       "  'etf_name': '浙江100',\n",
       "  'etf_product': ['招商中证浙江100ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000859',\n",
       "  'etf_name': '国企一带一路',\n",
       "  'etf_product': ['易方达中证国企一带一路ETF',\n",
       "   '富国中证国企一带一路ETF',\n",
       "   '添富中证国企一带一路ETF',\n",
       "   '富国中证国企一带一路ETF联接A',\n",
       "   '富国中证国企一带一路ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000861',\n",
       "  'etf_name': '央企创新',\n",
       "  'etf_product': ['富国央企创新ETF',\n",
       "   '博时央企创新驱动ETF',\n",
       "   '广发中证央企创新驱动ETF',\n",
       "   '嘉实中证央企创新驱动ETF',\n",
       "   '广发央企创新驱动ETF联接A'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931159',\n",
       "  'etf_name': '创新100',\n",
       "  'etf_product': ['诺德研发创新100',\n",
       "   '申万菱信中证研发创新100ETF',\n",
       "   '申万菱信中证研发创新100ETF联接A',\n",
       "   '申万菱信中证研发创新100ETF联接C',\n",
       "   '银华中证研发创新100ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931186',\n",
       "  'etf_name': '中证科技',\n",
       "  'etf_product': ['富国中证科技50策略ETF', '富国中证科技50策略ETF联接A', '富国中证科技50策略ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931144',\n",
       "  'etf_name': '通信技术',\n",
       "  'etf_product': ['东财通信A', '东财通信C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931187',\n",
       "  'etf_name': '科技100',\n",
       "  'etf_product': ['华泰柏瑞中证科技100ETF',\n",
       "   '华泰柏瑞中证科技ETF联接A',\n",
       "   '华泰柏瑞中证科技ETF联接C',\n",
       "   '天弘中证科技100指数增强A',\n",
       "   '天弘中证科技100指数增强C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931175',\n",
       "  'etf_name': '银行50金融债',\n",
       "  'etf_product': ['兴业中证银行50金融债指数A', '兴业中证银行50金融债指数C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931172',\n",
       "  'etf_name': '信用主体50',\n",
       "  'etf_product': ['安信信用主体50债券指数'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931268',\n",
       "  'etf_name': '持续发展',\n",
       "  'etf_product': ['博时可持续发展100ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931373',\n",
       "  'etf_name': '股息龙头',\n",
       "  'etf_product': ['鹏华中证高股息龙头ETF', '鹏华股息龙头ETF联接A', '鹏华股息龙头ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931357',\n",
       "  'etf_name': '优选消费50',\n",
       "  'etf_product': ['中金中证沪港深优选消费50指数A', '中金中证沪港深优选消费50指数C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931306',\n",
       "  'etf_name': '国债及政金债1-5',\n",
       "  'etf_product': ['农银中证国债及政金债1-5年指数'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931381',\n",
       "  'etf_name': '中证长三角',\n",
       "  'etf_product': ['海富通中证长三角领先ETF联接', '海富通中证长三角领先ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931380',\n",
       "  'etf_name': '科技50',\n",
       "  'etf_product': ['易方达中证科技50ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931372',\n",
       "  'etf_name': '浙江国资',\n",
       "  'etf_product': ['华夏中证浙江国资创新发展ETF',\n",
       "   '华夏中证浙江国资创新发展ETF联接A',\n",
       "   '华夏中证浙江国资创新发展ETF联接C'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '931406',\n",
       "  'etf_name': '5G 50',\n",
       "  'etf_product': ['博时中证5G产业50ETF'],\n",
       "  'crawltime': '2021-01-24'},\n",
       " {'etf_code': '000688',\n",
       "  'etf_name': '科创50',\n",
       "  'etf_product': ['工银上证科创板50成份ETF',\n",
       "   '华泰柏瑞上证科创板50成份ETF',\n",
       "   '华夏上证科创板50成份ETF',\n",
       "   '易方达上证科创板50成份ETF'],\n",
       "  'crawltime': '2021-01-24'}]"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "product_list"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "code_list = list(map(lambda x:x.get('etf_code'),product_list))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['000001',\n",
       " '000010',\n",
       " '000012',\n",
       " '000015',\n",
       " '000300',\n",
       " '000905',\n",
       " '000914',\n",
       " '000919',\n",
       " 'H11014',\n",
       " '000029',\n",
       " '000037',\n",
       " '000925',\n",
       " '000042',\n",
       " '000046',\n",
       " '000933',\n",
       " '000935',\n",
       " '931461',\n",
       " '000944',\n",
       " '000949',\n",
       " '000056',\n",
       " '000901',\n",
       " '000961',\n",
       " '000963',\n",
       " '000066',\n",
       " '399701',\n",
       " '399702',\n",
       " '000969',\n",
       " '000009',\n",
       " '000971',\n",
       " '000978',\n",
       " '000984',\n",
       " '000986',\n",
       " '000991',\n",
       " '000993',\n",
       " '399959',\n",
       " 'H11136',\n",
       " '000802',\n",
       " '000998',\n",
       " '000805',\n",
       " '000808',\n",
       " '000815',\n",
       " '000819',\n",
       " '000824',\n",
       " '000832',\n",
       " '000827',\n",
       " '000846',\n",
       " '000841',\n",
       " '399965',\n",
       " '399966',\n",
       " 'H30031',\n",
       " 'H11077',\n",
       " 'H30089',\n",
       " 'H30094',\n",
       " '399975',\n",
       " 'H30165',\n",
       " 'H30184',\n",
       " '931008',\n",
       " 'H11098',\n",
       " '399967',\n",
       " 'H50040',\n",
       " '399973',\n",
       " '399970',\n",
       " '399812',\n",
       " 'H30344',\n",
       " 'H30359',\n",
       " '399806',\n",
       " 'H30372',\n",
       " '399974',\n",
       " '399989',\n",
       " '399976',\n",
       " '399987',\n",
       " 'H30533',\n",
       " '399990',\n",
       " '399997',\n",
       " 'H30537',\n",
       " 'H30588',\n",
       " '399804',\n",
       " '399803',\n",
       " '399809',\n",
       " '399998',\n",
       " 'H50069',\n",
       " '930620',\n",
       " '399993',\n",
       " '930641',\n",
       " '930653',\n",
       " '930697',\n",
       " '930701',\n",
       " '000016',\n",
       " '000903',\n",
       " '000904',\n",
       " '000906',\n",
       " '000913',\n",
       " '000018',\n",
       " 'H11001',\n",
       " '000922',\n",
       " '000021',\n",
       " '000036',\n",
       " '000038',\n",
       " '000043',\n",
       " '000044',\n",
       " '000928',\n",
       " '000932',\n",
       " '000934',\n",
       " '000048',\n",
       " '000063',\n",
       " '000064',\n",
       " '000065',\n",
       " '000964',\n",
       " '000068',\n",
       " '000069',\n",
       " '000966',\n",
       " 'H11017',\n",
       " '000982',\n",
       " '000987',\n",
       " '000989',\n",
       " '000992',\n",
       " '000979',\n",
       " '000806',\n",
       " '000814',\n",
       " '000821',\n",
       " '000828',\n",
       " '399802',\n",
       " 'H00140',\n",
       " 'H30035',\n",
       " 'H30124',\n",
       " '399986',\n",
       " '931009',\n",
       " '931160',\n",
       " 'H30257',\n",
       " 'H30263',\n",
       " '399983',\n",
       " 'H30269',\n",
       " '399971',\n",
       " 'H30318',\n",
       " 'H11018',\n",
       " '399814',\n",
       " 'H30373',\n",
       " '399996',\n",
       " '000852',\n",
       " 'H30531',\n",
       " 'H30535',\n",
       " '399807',\n",
       " '399991',\n",
       " '399994',\n",
       " '399995',\n",
       " '930606',\n",
       " '399707',\n",
       " '399992',\n",
       " '930648',\n",
       " '930651',\n",
       " '930652',\n",
       " '930703',\n",
       " '930713',\n",
       " '399811',\n",
       " '930719',\n",
       " '930720',\n",
       " '930721',\n",
       " '930723',\n",
       " '930726',\n",
       " '930734',\n",
       " '930729',\n",
       " '930743',\n",
       " '950090',\n",
       " '930780',\n",
       " '930782',\n",
       " '930784',\n",
       " '930790',\n",
       " '930791',\n",
       " '930792',\n",
       " '930794',\n",
       " '930820',\n",
       " '950096',\n",
       " '930836',\n",
       " '930838',\n",
       " '930839',\n",
       " '930846',\n",
       " '930865',\n",
       " '930851',\n",
       " '930874',\n",
       " '930875',\n",
       " '930902',\n",
       " '950105',\n",
       " '950109',\n",
       " '930914',\n",
       " '930916',\n",
       " '930917',\n",
       " '000171',\n",
       " '950113',\n",
       " '930949',\n",
       " '930954',\n",
       " '930955',\n",
       " '930997',\n",
       " '930999',\n",
       " '931000',\n",
       " '931018',\n",
       " '931024',\n",
       " '931033',\n",
       " '931052',\n",
       " '931062',\n",
       " '931066',\n",
       " '931069',\n",
       " '931067',\n",
       " '000860',\n",
       " '930738',\n",
       " '931071',\n",
       " '930939',\n",
       " '931068',\n",
       " '930758',\n",
       " '930740',\n",
       " '931127',\n",
       " '931136',\n",
       " '931078',\n",
       " '950045',\n",
       " '931134',\n",
       " '931142',\n",
       " '931087',\n",
       " '931139',\n",
       " '931140',\n",
       " '931141',\n",
       " '931151',\n",
       " '931152',\n",
       " '950041',\n",
       " '950047',\n",
       " '931161',\n",
       " '931162',\n",
       " '931079',\n",
       " '931157',\n",
       " '931165',\n",
       " '931166',\n",
       " '931167',\n",
       " '931163',\n",
       " '000859',\n",
       " '000861',\n",
       " '931159',\n",
       " '931186',\n",
       " '931144',\n",
       " '931187',\n",
       " '931175',\n",
       " '931172',\n",
       " '931268',\n",
       " '931373',\n",
       " '931357',\n",
       " '931306',\n",
       " '931381',\n",
       " '931380',\n",
       " '931372',\n",
       " '931406',\n",
       " '000688']"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "code_list"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "etf_doc = mongo_db['fund']['etf_quanzhong']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "etf_list=[]\n",
    "for item in etf_doc.find({},{'_id':0}):\n",
    "    if item['ETF代码'] in code_list:\n",
    "        etf_list.append(item)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "248"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(etf_list)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'ETF代码': '000012',\n",
       " 'ETF名称': '国债指数',\n",
       " '权重': [{'代码': '019639', '名称': '20特国04', '行业': None, '权重': 2.39},\n",
       "  {'代码': '019637', '名称': '20特国03', '行业': None, '权重': 2.36},\n",
       "  {'代码': '019632', '名称': '20国债06', '行业': None, '权重': 2.29},\n",
       "  {'代码': '019634', '名称': '20国债08', '行业': None, '权重': 2.27},\n",
       "  {'代码': '019631', '名称': '20国债05', '行业': None, '权重': 2.16},\n",
       "  {'代码': '019641', '名称': '20国债11', '行业': None, '权重': 2.0},\n",
       "  {'代码': '019614', '名称': '19国债04', '行业': None, '权重': 1.97},\n",
       "  {'代码': '019643', '名称': '20国债13', '行业': None, '权重': 1.97},\n",
       "  {'代码': '019617', '名称': '19国债07', '行业': None, '权重': 1.93},\n",
       "  {'代码': '019616', '名称': '19国债06', '行业': None, '权重': 1.89}]}"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "etf_list[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "300金融 000914\n",
      "####################\n",
      "上证医药 000037\n",
      "####################\n",
      "上证金融 000038\n",
      "####################\n",
      "上证周期 000063\n",
      "####################\n",
      "细分医药 000814\n",
      "####################\n",
      "5年国债 H00140\n",
      "####################\n",
      "800医药 000841\n",
      "####################\n",
      "800有色 H30031\n",
      "####################\n",
      "'权重'\n",
      "{'ETF代码': 'H30359', 'ETF名称': '转型成长', '权重': []}\n",
      "中证安全 H30372\n",
      "####################\n",
      "'权重'\n",
      "{'ETF代码': 'H30373', 'ETF名称': '百发100', '权重': []}\n",
      "中国互联网50 H30533\n",
      "####################\n",
      "中证白酒 399997\n",
      "####################\n",
      "'权重'\n",
      "{'ETF代码': 'H30537', 'ETF名称': '淘金100', '权重': []}\n",
      "港股通 H50069\n",
      "####################\n",
      "CSSW证券 399707\n",
      "####################\n",
      "300医药 000913\n",
      "####################\n",
      "180金融 000018\n",
      "####################\n",
      "上证央企 000042\n",
      "####################\n",
      "中证能源 000928\n",
      "####################\n",
      "责任指数 000048\n",
      "####################\n",
      "非周期 000064\n",
      "####################\n",
      "细分食品 000815\n",
      "####################\n",
      "800地产 399965\n",
      "####################\n",
      "300非银 H30035\n",
      "####################\n",
      "证券公司 399975\n",
      "####################\n",
      "中证银行 399986\n",
      "####################\n",
      "建筑材料 931009\n",
      "####################\n",
      "汽车指数 931008\n",
      "####################\n",
      "高铁产业 399807\n",
      "####################\n",
      "保险主题 399809\n",
      "####################\n",
      "家用电器 930697\n",
      "####################\n",
      "'权重'\n",
      "{'ETF代码': '930734', 'ETF名称': '360互联+', '权重': []}\n",
      "'权重'\n",
      "{'ETF代码': '930729', 'ETF名称': '银智100', '权重': []}\n",
      "上证证券 950105\n",
      "####################\n",
      "中证10年国债 930916\n",
      "####################\n",
      "中证5-10年国债活跃券 931018\n",
      "####################\n",
      "HKC非银 931024\n",
      "####################\n",
      "四川国改 930738\n",
      "####################\n",
      "消费龙头 931068\n",
      "####################\n",
      "CS消费50 931139\n",
      "####################\n"
     ]
    }
   ],
   "source": [
    "for item in etf_list:\n",
    "    qz=item['权重']\n",
    "    df =pd.DataFrame(qz)\n",
    "    try:\n",
    "        df=df.sort_values(by='权重',ascending=False)\n",
    "        if df.iloc[0]['权重']>15:\n",
    "            print(item['ETF名称'],item['ETF代码'])\n",
    "            print('#'*20)\n",
    "    except Exception as e:\n",
    "        print(e)\n",
    "        print(item)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}


================================================
FILE: analysis/Untitled1.ipynb
================================================
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import sys\n",
    "import pandas as pd\n",
    "sys.path.append('..')\n",
    "from configure.settings import DBSelector\n",
    "db = DBSelector()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "engine = db.get_engine('db_stock','qq')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pd.read_sql('tb_bond_jisilu',con=engine)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>可转债代码</th>\n",
       "      <th>可转债名称</th>\n",
       "      <th>可转债价格</th>\n",
       "      <th>正股名称</th>\n",
       "      <th>正股代码</th>\n",
       "      <th>正股现价</th>\n",
       "      <th>正股涨跌幅</th>\n",
       "      <th>最新转股价</th>\n",
       "      <th>溢价率</th>\n",
       "      <th>可转债涨幅</th>\n",
       "      <th>...</th>\n",
       "      <th>下修提示</th>\n",
       "      <th>下调次数</th>\n",
       "      <th>转债剩余占总市值比</th>\n",
       "      <th>剩余规模</th>\n",
       "      <th>发行规模</th>\n",
       "      <th>股东配售率</th>\n",
       "      <th>发出强赎公告</th>\n",
       "      <th>强赎日期</th>\n",
       "      <th>担保</th>\n",
       "      <th>更新日期</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>127029</td>\n",
       "      <td>中钢转债</td>\n",
       "      <td>169.593</td>\n",
       "      <td>中钢国际</td>\n",
       "      <td>000928</td>\n",
       "      <td>11.02</td>\n",
       "      <td>-1.78</td>\n",
       "      <td>5.89</td>\n",
       "      <td>-9.36</td>\n",
       "      <td>-0.91</td>\n",
       "      <td>...</td>\n",
       "      <td></td>\n",
       "      <td>0</td>\n",
       "      <td>6.9</td>\n",
       "      <td>9.600</td>\n",
       "      <td>9.600</td>\n",
       "      <td>20.710</td>\n",
       "      <td>X</td>\n",
       "      <td>None</td>\n",
       "      <td>无</td>\n",
       "      <td>2021-05-26 15:03</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>113541</td>\n",
       "      <td>荣晟转债</td>\n",
       "      <td>132.370</td>\n",
       "      <td>荣晟环保</td>\n",
       "      <td>603165</td>\n",
       "      <td>14.80</td>\n",
       "      <td>8.90</td>\n",
       "      <td>10.84</td>\n",
       "      <td>-3.05</td>\n",
       "      <td>5.70</td>\n",
       "      <td>...</td>\n",
       "      <td></td>\n",
       "      <td>1</td>\n",
       "      <td>6.2</td>\n",
       "      <td>2.352</td>\n",
       "      <td>3.300</td>\n",
       "      <td>24.502</td>\n",
       "      <td>X</td>\n",
       "      <td>None</td>\n",
       "      <td>股份质押和保证</td>\n",
       "      <td>2021-05-26 15:03</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>128085</td>\n",
       "      <td>鸿达转债</td>\n",
       "      <td>107.240</td>\n",
       "      <td>鸿达兴业</td>\n",
       "      <td>002002</td>\n",
       "      <td>4.31</td>\n",
       "      <td>9.67</td>\n",
       "      <td>3.92</td>\n",
       "      <td>-2.46</td>\n",
       "      <td>5.92</td>\n",
       "      <td>...</td>\n",
       "      <td></td>\n",
       "      <td>0</td>\n",
       "      <td>8.8</td>\n",
       "      <td>11.067</td>\n",
       "      <td>24.270</td>\n",
       "      <td>26.280</td>\n",
       "      <td>X</td>\n",
       "      <td>None</td>\n",
       "      <td>无担保</td>\n",
       "      <td>2021-05-26 15:03</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>113527</td>\n",
       "      <td>维格转债</td>\n",
       "      <td>199.000</td>\n",
       "      <td>锦泓集团</td>\n",
       "      <td>603518</td>\n",
       "      <td>19.99</td>\n",
       "      <td>-2.11</td>\n",
       "      <td>9.85</td>\n",
       "      <td>-1.94</td>\n",
       "      <td>-3.38</td>\n",
       "      <td>...</td>\n",
       "      <td></td>\n",
       "      <td>1</td>\n",
       "      <td>8.7</td>\n",
       "      <td>4.775</td>\n",
       "      <td>7.460</td>\n",
       "      <td>4.910</td>\n",
       "      <td>X</td>\n",
       "      <td>None</td>\n",
       "      <td>无担保</td>\n",
       "      <td>2021-05-26 15:03</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>113559</td>\n",
       "      <td>永创转债</td>\n",
       "      <td>141.120</td>\n",
       "      <td>永创智能</td>\n",
       "      <td>603901</td>\n",
       "      <td>14.73</td>\n",
       "      <td>0.07</td>\n",
       "      <td>10.32</td>\n",
       "      <td>-1.13</td>\n",
       "      <td>0.08</td>\n",
       "      <td>...</td>\n",
       "      <td></td>\n",
       "      <td>0</td>\n",
       "      <td>6.5</td>\n",
       "      <td>4.143</td>\n",
       "      <td>5.120</td>\n",
       "      <td>57.120</td>\n",
       "      <td>X</td>\n",
       "      <td>None</td>\n",
       "      <td>股份质押和保证</td>\n",
       "      <td>2021-05-26 15:03</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 28 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    可转债代码 可转债名称    可转债价格  正股名称    正股代码   正股现价  正股涨跌幅  最新转股价   溢价率  可转债涨幅  ...  \\\n",
       "0  127029  中钢转债  169.593  中钢国际  000928  11.02  -1.78   5.89 -9.36  -0.91  ...   \n",
       "1  113541  荣晟转债  132.370  荣晟环保  603165  14.80   8.90  10.84 -3.05   5.70  ...   \n",
       "2  128085  鸿达转债  107.240  鸿达兴业  002002   4.31   9.67   3.92 -2.46   5.92  ...   \n",
       "3  113527  维格转债  199.000  锦泓集团  603518  19.99  -2.11   9.85 -1.94  -3.38  ...   \n",
       "4  113559  永创转债  141.120  永创智能  603901  14.73   0.07  10.32 -1.13   0.08  ...   \n",
       "\n",
       "   下修提示 下调次数 转债剩余占总市值比    剩余规模    发行规模   股东配售率 发出强赎公告  强赎日期       担保  \\\n",
       "0          0       6.9   9.600   9.600  20.710      X  None        无   \n",
       "1          1       6.2   2.352   3.300  24.502      X  None  股份质押和保证   \n",
       "2          0       8.8  11.067  24.270  26.280      X  None      无担保   \n",
       "3          1       8.7   4.775   7.460   4.910      X  None      无担保   \n",
       "4          0       6.5   4.143   5.120  57.120      X  None  股份质押和保证   \n",
       "\n",
       "               更新日期  \n",
       "0  2021-05-26 15:03  \n",
       "1  2021-05-26 15:03  \n",
       "2  2021-05-26 15:03  \n",
       "3  2021-05-26 15:03  \n",
       "4  2021-05-26 15:03  \n",
       "\n",
       "[5 rows x 28 columns]"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "df2=pd.read_excel(r'D:\\Download\\roe_pe.xlsx')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Unnamed: 0</th>\n",
       "      <th>bond</th>\n",
       "      <th>name</th>\n",
       "      <th>pe</th>\n",
       "      <th>roe</th>\n",
       "      <th>zg_code</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>110031</td>\n",
       "      <td>航信转债</td>\n",
       "      <td>13.5730</td>\n",
       "      <td>7.503275</td>\n",
       "      <td>600271</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>110033</td>\n",
       "      <td>国贸转债</td>\n",
       "      <td>5.0221</td>\n",
       "      <td>6.168038</td>\n",
       "      <td>600755</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2</td>\n",
       "      <td>110034</td>\n",
       "      <td>九州转债</td>\n",
       "      <td>9.7541</td>\n",
       "      <td>4.559387</td>\n",
       "      <td>600998</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>3</td>\n",
       "      <td>110038</td>\n",
       "      <td>济川转债</td>\n",
       "      <td>13.6487</td>\n",
       "      <td>19.987800</td>\n",
       "      <td>600566</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4</td>\n",
       "      <td>110041</td>\n",
       "      <td>蒙电转债</td>\n",
       "      <td>18.4247</td>\n",
       "      <td>4.442312</td>\n",
       "      <td>600863</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   Unnamed: 0    bond  name       pe        roe  zg_code\n",
       "0           0  110031  航信转债  13.5730   7.503275   600271\n",
       "1           1  110033  国贸转债   5.0221   6.168038   600755\n",
       "2           2  110034  九州转债   9.7541   4.559387   600998\n",
       "3           3  110038  济川转债  13.6487  19.987800   600566\n",
       "4           4  110041  蒙电转债  18.4247   4.442312   600863"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "df3=pd.merge(df,df2,left_on='可转债代码',right_on='bond')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "df2['bond']=df2['bond'].astype(str)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>可转债代码</th>\n",
       "      <th>可转债名称</th>\n",
       "      <th>可转债价格</th>\n",
       "      <th>正股名称</th>\n",
       "      <th>正股代码</th>\n",
       "      <th>正股现价</th>\n",
       "      <th>正股涨跌幅</th>\n",
       "      <th>最新转股价</th>\n",
       "      <th>溢价率</th>\n",
       "      <th>可转债涨幅</th>\n",
       "      <th>...</th>\n",
       "      <th>发出强赎公告</th>\n",
       "      <th>强赎日期</th>\n",
       "      <th>担保</th>\n",
       "      <th>更新日期</th>\n",
       "      <th>Unnamed: 0</th>\n",
       "      <th>bond</th>\n",
       "      <th>name</th>\n",
       "      <th>pe</th>\n",
       "      <th>roe</th>\n",
       "      <th>zg_code</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>127029</td>\n",
       "      <td>中钢转债</td>\n",
       "      <td>169.593</td>\n",
       "      <td>中钢国际</td>\n",
       "      <td>000928</td>\n",
       "      <td>11.02</td>\n",
       "      <td>-1.78</td>\n",
       "      <td>5.89</td>\n",
       "      <td>-9.36</td>\n",
       "      <td>-0.91</td>\n",
       "      <td>...</td>\n",
       "      <td>X</td>\n",
       "      <td>None</td>\n",
       "      <td>无</td>\n",
       "      <td>2021-05-26 15:03</td>\n",
       "      <td>260</td>\n",
       "      <td>127029</td>\n",
       "      <td>中钢转债</td>\n",
       "      <td>19.6973</td>\n",
       "      <td>6.024312</td>\n",
       "      <td>928</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>113541</td>\n",
       "      <td>荣晟转债</td>\n",
       "      <td>132.370</td>\n",
       "      <td>荣晟环保</td>\n",
       "      <td>603165</td>\n",
       "      <td>14.80</td>\n",
       "      <td>8.90</td>\n",
       "      <td>10.84</td>\n",
       "      <td>-3.05</td>\n",
       "      <td>5.70</td>\n",
       "      <td>...</td>\n",
       "      <td>X</td>\n",
       "      <td>None</td>\n",
       "      <td>股份质押和保证</td>\n",
       "      <td>2021-05-26 15:03</td>\n",
       "      <td>81</td>\n",
       "      <td>113541</td>\n",
       "      <td>荣晟转债</td>\n",
       "      <td>13.8036</td>\n",
       "      <td>11.290425</td>\n",
       "      <td>603165</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>128085</td>\n",
       "      <td>鸿达转债</td>\n",
       "      <td>107.240</td>\n",
       "      <td>鸿达兴业</td>\n",
       "      <td>002002</td>\n",
       "      <td>4.31</td>\n",
       "      <td>9.67</td>\n",
       "      <td>3.92</td>\n",
       "      <td>-2.46</td>\n",
       "      <td>5.92</td>\n",
       "      <td>...</td>\n",
       "      <td>X</td>\n",
       "      <td>None</td>\n",
       "      <td>无担保</td>\n",
       "      <td>2021-05-26 15:03</td>\n",
       "      <td>313</td>\n",
       "      <td>128085</td>\n",
       "      <td>鸿达转债</td>\n",
       "      <td>12.8037</td>\n",
       "      <td>6.940487</td>\n",
       "      <td>2002</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>113527</td>\n",
       "      <td>维格转债</td>\n",
       "      <td>199.000</td>\n",
       "      <td>锦泓集团</td>\n",
       "      <td>603518</td>\n",
       "      <td>19.99</td>\n",
       "      <td>-2.11</td>\n",
       "      <td>9.85</td>\n",
       "      <td>-1.94</td>\n",
       "      <td>-3.38</td>\n",
       "      <td>...</td>\n",
       "      <td>X</td>\n",
       "      <td>None</td>\n",
       "      <td>无担保</td>\n",
       "      <td>2021-05-26 15:03</td>\n",
       "      <td>73</td>\n",
       "      <td>113527</td>\n",
       "      <td>维格转债</td>\n",
       "      <td>-10.7300</td>\n",
       "      <td>4.044400</td>\n",
       "      <td>603518</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>113559</td>\n",
       "      <td>永创转债</td>\n",
       "      <td>141.120</td>\n",
       "      <td>永创智能</td>\n",
       "      <td>603901</td>\n",
       "      <td>14.73</td>\n",
       "      <td>0.07</td>\n",
       "      <td>10.32</td>\n",
       "      <td>-1.13</td>\n",
       "      <td>0.08</td>\n",
       "      <td>...</td>\n",
       "      <td>X</td>\n",
       "      <td>None</td>\n",
       "      <td>股份质押和保证</td>\n",
       "      <td>2021-05-26 15:03</td>\n",
       "      <td>89</td>\n",
       "      <td>113559</td>\n",
       "      <td>永创转债</td>\n",
       "      <td>31.5610</td>\n",
       "      <td>4.627650</td>\n",
       "      <td>603901</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 34 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    可转债代码 可转债名称    可转债价格  正股名称    正股代码   正股现价  正股涨跌幅  最新转股价   溢价率  可转债涨幅  ...  \\\n",
       "0  127029  中钢转债  169.593  中钢国际  000928  11.02  -1.78   5.89 -9.36  -0.91  ...   \n",
       "1  113541  荣晟转债  132.370  荣晟环保  603165  14.80   8.90  10.84 -3.05   5.70  ...   \n",
       "2  128085  鸿达转债  107.240  鸿达兴业  002002   4.31   9.67   3.92 -2.46   5.92  ...   \n",
       "3  113527  维格转债  199.000  锦泓集团  603518  19.99  -2.11   9.85 -1.94  -3.38  ...   \n",
       "4  113559  永创转债  141.120  永创智能  603901  14.73   0.07  10.32 -1.13   0.08  ...   \n",
       "\n",
       "   发出强赎公告  强赎日期       担保              更新日期  Unnamed: 0    bond  name       pe  \\\n",
       "0       X  None        无  2021-05-26 15:03         260  127029  中钢转债  19.6973   \n",
       "1       X  None  股份质押和保证  2021-05-26 15:03          81  113541  荣晟转债  13.8036   \n",
       "2       X  None      无担保  2021-05-26 15:03         313  128085  鸿达转债  12.8037   \n",
       "3       X  None      无担保  2021-05-26 15:03          73  113527  维格转债 -10.7300   \n",
       "4       X  None  股份质押和保证  2021-05-26 15:03          89  113559  永创转债  31.5610   \n",
       "\n",
       "         roe  zg_code  \n",
       "0   6.024312      928  \n",
       "1  11.290425   603165  \n",
       "2   6.940487     2002  \n",
       "3   4.044400   603518  \n",
       "4   4.627650   603901  \n",
       "\n",
       "[5 rows x 34 columns]"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df3.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_bond = df3[['可转债代码','可转债名称','正股名称','正股代码','溢价率','可转债价格','pe','roe','担保']]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>可转债代码</th>\n",
       "      <th>可转债名称</th>\n",
       "      <th>正股名称</th>\n",
       "      <th>正股代码</th>\n",
       "      <th>溢价率</th>\n",
       "      <th>pe</th>\n",
       "      <th>roe</th>\n",
       "      <th>担保</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>127029</td>\n",
       "      <td>中钢转债</td>\n",
       "      <td>中钢国际</td>\n",
       "      <td>000928</td>\n",
       "      <td>-9.36</td>\n",
       "      <td>19.6973</td>\n",
       "      <td>6.024312</td>\n",
       "      <td>无</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>113541</td>\n",
       "      <td>荣晟转债</td>\n",
       "      <td>荣晟环保</td>\n",
       "      <td>603165</td>\n",
       "      <td>-3.05</td>\n",
       "      <td>13.8036</td>\n",
       "      <td>11.290425</td>\n",
       "      <td>股份质押和保证</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>128085</td>\n",
       "      <td>鸿达转债</td>\n",
       "      <td>鸿达兴业</td>\n",
       "      <td>002002</td>\n",
       "      <td>-2.46</td>\n",
       "      <td>12.8037</td>\n",
       "      <td>6.940487</td>\n",
       "      <td>无担保</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>113527</td>\n",
       "      <td>维格转债</td>\n",
       "      <td>锦泓集团</td>\n",
       "      <td>603518</td>\n",
       "      <td>-1.94</td>\n",
       "      <td>-10.7300</td>\n",
       "      <td>4.044400</td>\n",
       "      <td>无担保</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>113559</td>\n",
       "      <td>永创转债</td>\n",
       "      <td>永创智能</td>\n",
       "      <td>603901</td>\n",
       "      <td>-1.13</td>\n",
       "      <td>31.5610</td>\n",
       "      <td>4.627650</td>\n",
       "      <td>股份质押和保证</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    可转债代码 可转债名称  正股名称    正股代码   溢价率       pe        roe       担保\n",
       "0  127029  中钢转债  中钢国际  000928 -9.36  19.6973   6.024312        无\n",
       "1  113541  荣晟转债  荣晟环保  603165 -3.05  13.8036  11.290425  股份质押和保证\n",
       "2  128085  鸿达转债  鸿达兴业  002002 -2.46  12.8037   6.940487      无担保\n",
       "3  113527  维格转债  锦泓集团  603518 -1.94 -10.7300   4.044400      无担保\n",
       "4  113559  永创转债  永创智能  603901 -1.13  31.5610   4.627650  股份质押和保证"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_bond.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "<ipython-input-23-5461a34637e3>:2: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame.\n",
      "Try using .loc[row_indexer,col_indexer] = value instead\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_bond['pe']=df_bond['pe'].astype(np.float64)\n",
      "<ipython-input-23-5461a34637e3>:3: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame.\n",
      "Try using .loc[row_indexer,col_indexer] = value instead\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_bond['roe']=df_bond['roe'].astype(np.float64)\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "df_bond['pe']=df_bond['pe'].astype(np.float64)\n",
    "df_bond['roe']=df_bond['roe'].astype(np.float64)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>可转债代码</th>\n",
       "      <th>可转债名称</th>\n",
       "      <th>正股名称</th>\n",
       "      <th>正股代码</th>\n",
       "      <th>溢价率</th>\n",
       "      <th>可转债价格</th>\n",
       "      <th>pe</th>\n",
       "      <th>roe</th>\n",
       "      <th>担保</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>244</th>\n",
       "      <td>110038</td>\n",
       "      <td>济川转债</td>\n",
       "      <td>济川药业</td>\n",
       "      <td>600566</td>\n",
       "      <td>31.48</td>\n",
       "      <td>106.200</td>\n",
       "      <td>13.6487</td>\n",
       "      <td>19.987800</td>\n",
       "      <td>无担保</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>44</th>\n",
       "      <td>127023</td>\n",
       "      <td>华菱转2</td>\n",
       "      <td>华菱钢铁</td>\n",
       "      <td>000932</td>\n",
       "      <td>4.06</td>\n",
       "      <td>143.000</td>\n",
       "      <td>5.7230</td>\n",
       "      <td>19.917738</td>\n",
       "      <td>无担保</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>103</th>\n",
       "      <td>110045</td>\n",
       "      <td>海澜转债</td>\n",
       "      <td>海澜之家</td>\n",
       "      <td>600398</td>\n",
       "      <td>11.49</td>\n",
       "      <td>109.510</td>\n",
       "      <td>13.5049</td>\n",
       "      <td>18.056487</td>\n",
       "      <td>无担保</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>298</th>\n",
       "      <td>123039</td>\n",
       "      <td>开润转债</td>\n",
       "      <td>开润股份</td>\n",
       "      <td>300577</td>\n",
       "      <td>45.13</td>\n",
       "      <td>107.501</td>\n",
       "      <td>56.4536</td>\n",
       "      <td>17.951825</td>\n",
       "      <td>无担保</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>166</th>\n",
       "      <td>127017</td>\n",
       "      <td>万青转债</td>\n",
       "      <td>万年青</td>\n",
       "      <td>000789</td>\n",
       "      <td>19.00</td>\n",
       "      <td>118.160</td>\n",
       "      <td>7.2743</td>\n",
       "      <td>17.575463</td>\n",
       "      <td>无担保</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>359</th>\n",
       "      <td>128041</td>\n",
       "      <td>盛路转债</td>\n",
       "      <td>盛路通信</td>\n",
       "      <td>002446</td>\n",
       "      <td>238.18</td>\n",
       "      <td>291.582</td>\n",
       "      <td>24.7298</td>\n",
       "      <td>-0.544175</td>\n",
       "      <td>无担保</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>319</th>\n",
       "      <td>128023</td>\n",
       "      <td>亚太转债</td>\n",
       "      <td>亚太股份</td>\n",
       "      <td>002284</td>\n",
       "      <td>53.58</td>\n",
       "      <td>104.267</td>\n",
       "      <td>81.7978</td>\n",
       "      <td>-0.567812</td>\n",
       "      <td>无担保</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>279</th>\n",
       "      <td>128036</td>\n",
       "      <td>金农转债</td>\n",
       "      <td>金新农</td>\n",
       "      <td>002548</td>\n",
       "      <td>40.02</td>\n",
       "      <td>120.907</td>\n",
       "      <td>49.6904</td>\n",
       "      <td>-2.104125</td>\n",
       "      <td>无担保</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>268</th>\n",
       "      <td>128015</td>\n",
       "      <td>久其转债</td>\n",
       "      <td>久其软件</td>\n",
       "      <td>002279</td>\n",
       "      <td>38.45</td>\n",
       "      <td>103.490</td>\n",
       "      <td>33.5197</td>\n",
       "      <td>-8.805338</td>\n",
       "      <td>无担保</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>358</th>\n",
       "      <td>128062</td>\n",
       "      <td>亚药转债</td>\n",
       "      <td>亚太药业</td>\n",
       "      <td>002370</td>\n",
       "      <td>207.81</td>\n",
       "      <td>78.800</td>\n",
       "      <td>75.8917</td>\n",
       "      <td>-34.779625</td>\n",
       "      <td>无担保</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>362 rows × 9 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "      可转债代码 可转债名称  正股名称    正股代码     溢价率    可转债价格       pe        roe   担保\n",
       "244  110038  济川转债  济川药业  600566   31.48  106.200  13.6487  19.987800  无担保\n",
       "44   127023  华菱转2  华菱钢铁  000932    4.06  143.000   5.7230  19.917738  无担保\n",
       "103  110045  海澜转债  海澜之家  600398   11.49  109.510  13.5049  18.056487  无担保\n",
       "298  123039  开润转债  开润股份  300577   45.13  107.501  56.4536  17.951825  无担保\n",
       "166  127017  万青转债   万年青  000789   19.00  118.160   7.2743  17.575463  无担保\n",
       "..      ...   ...   ...     ...     ...      ...      ...        ...  ...\n",
       "359  128041  盛路转债  盛路通信  002446  238.18  291.582  24.7298  -0.544175  无担保\n",
       "319  128023  亚太转债  亚太股份  002284   53.58  104.267  81.7978  -0.567812  无担保\n",
       "279  128036  金农转债   金新农  002548   40.02  120.907  49.6904  -2.104125  无担保\n",
       "268  128015  久其转债  久其软件  002279   38.45  103.490  33.5197  -8.805338  无担保\n",
       "358  128062  亚药转债  亚太药业  002370  207.81   78.800  75.8917 -34.779625  无担保\n",
       "\n",
       "[362 rows x 9 columns]"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_bond.sort_values(by='roe',ascending=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "19.9878"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2['roe'].max()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_bond.to_excel('bond_roe.xlsx',encoding='utf8')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}


================================================
FILE: analysis/apply_people_count.ipynb
================================================
{
 "metadata": {
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3-final"
  },
  "orig_nbformat": 2,
  "kernelspec": {
   "name": "python3",
   "display_name": "Python 3",
   "language": "python"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2,
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pd.read_excel('港股打新人数.xls')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "        上市日期  申购人数\n",
       "0 2015-01-09  1668\n",
       "1 2015-01-13   704\n",
       "2 2015-01-14  3338\n",
       "3 2015-01-15  3662\n",
       "4 2015-01-15  1618"
      ],
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>上市日期</th>\n      <th>申购人数</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>2015-01-09</td>\n      <td>1668</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>2015-01-13</td>\n      <td>704</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>2015-01-14</td>\n      <td>3338</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>2015-01-15</td>\n      <td>3662</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>2015-01-15</td>\n      <td>1618</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "metadata": {},
     "execution_count": 29
    }
   ],
   "source": [
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "df2 = pd.DataFrame(df.values.T,)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "                   0                    1                    2    \\\n",
       "0  2015-01-09 00:00:00  2015-01-13 00:00:00  2015-01-14 00:00:00   \n",
       "1                 1668                  704                 3338   \n",
       "\n",
       "                   3                    4                    5    \\\n",
       "0  2015-01-15 00:00:00  2015-01-15 00:00:00  2015-01-15 00:00:00   \n",
       "1                 3662                 1618                  784   \n",
       "\n",
       "                   6                    7                    8    \\\n",
       "0  2015-01-16 00:00:00  2015-01-30 00:00:00  2015-02-13 00:00:00   \n",
       "1                 1196                 1226                  422   \n",
       "\n",
       "                   9    ...                  833                  834  \\\n",
       "0  2015-03-11 00:00:00  ...  2021-01-15 00:00:00  2021-01-15 00:00:00   \n",
       "1                 3505  ...                35479                26091   \n",
       "\n",
       "                   835                  836                  837  \\\n",
       "0  2021-01-15 00:00:00  2021-01-18 00:00:00  2021-01-19 00:00:00   \n",
       "1               313721                37522                92145   \n",
       "\n",
       "                   838                  839                  840  \\\n",
       "0  2021-01-26 00:00:00  2021-02-04 00:00:00  2021-02-05 00:00:00   \n",
       "1               331495               567475                87981   \n",
       "\n",
       "                   841                  842  \n",
       "0  2021-02-05 00:00:00  2021-02-08 00:00:00  \n",
       "1              1422977               264120  \n",
       "\n",
       "[2 rows x 843 columns]"
      ],
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>0</th>\n      <th>1</th>\n      <th>2</th>\n      <th>3</th>\n      <th>4</th>\n      <th>5</th>\n      <th>6</th>\n      <th>7</th>\n      <th>8</th>\n      <th>9</th>\n      <th>...</th>\n      <th>833</th>\n      <th>834</th>\n      <th>835</th>\n      <th>836</th>\n      <th>837</th>\n      <th>838</th>\n      <th>839</th>\n      <th>840</th>\n      <th>841</th>\n      <th>842</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>2015-01-09 00:00:00</td>\n      <td>2015-01-13 00:00:00</td>\n      <td>2015-01-14 00:00:00</td>\n      <td>2015-01-15 00:00:00</td>\n      <td>2015-01-15 00:00:00</td>\n      <td>2015-01-15 00:00:00</td>\n      <td>2015-01-16 00:00:00</td>\n      <td>2015-01-30 00:00:00</td>\n      <td>2015-02-13 00:00:00</td>\n      <td>2015-03-11 00:00:00</td>\n      <td>...</td>\n      <td>2021-01-15 00:00:00</td>\n      <td>2021-01-15 00:00:00</td>\n      <td>2021-01-15 00:00:00</td>\n      <td>2021-01-18 00:00:00</td>\n      <td>2021-01-19 00:00:00</td>\n      <td>2021-01-26 00:00:00</td>\n      <td>2021-02-04 00:00:00</td>\n      <td>2021-02-05 00:00:00</td>\n      <td>2021-02-05 00:00:00</td>\n      <td>2021-02-08 00:00:00</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>1668</td>\n      <td>704</td>\n      <td>3338</td>\n      <td>3662</td>\n      <td>1618</td>\n      <td>784</td>\n      <td>1196</td>\n      <td>1226</td>\n      <td>422</td>\n      <td>3505</td>\n      <td>...</td>\n      <td>35479</td>\n      <td>26091</td>\n      <td>313721</td>\n      <td>37522</td>\n      <td>92145</td>\n      <td>331495</td>\n      <td>567475</td>\n      <td>87981</td>\n      <td>1422977</td>\n      <td>264120</td>\n    </tr>\n  </tbody>\n</table>\n<p>2 rows × 843 columns</p>\n</div>"
     },
     "metadata": {},
     "execution_count": 11
    }
   ],
   "source": [
    "df2.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\nRangeIndex: 843 entries, 0 to 842\nData columns (total 2 columns):\n #   Column  Non-Null Count  Dtype         \n---  ------  --------------  -----         \n 0   上市日期    843 non-null    datetime64[ns]\n 1   申购人数    843 non-null    int64         \ndtypes: datetime64[ns](1), int64(1)\nmemory usage: 13.3 KB\n"
     ]
    }
   ],
   "source": [
    "df.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "output_type": "error",
     "ename": "ValueError",
     "evalue": "column index (256) not an int in range(256)",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mValueError\u001b[0m                                Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-15-d86e90078ae9>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mdf2\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mto_excel\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'people3.xls'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mindex\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mNone\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0mheader\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mNone\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;32mC:\\Anaconda3\\lib\\site-packages\\pandas\\core\\generic.py\u001b[0m in \u001b[0;36mto_excel\u001b[1;34m(self, excel_writer, sheet_name, na_rep, float_format, columns, header, index, index_label, startrow, startcol, engine, merge_cells, encoding, inf_rep, verbose, freeze_panes)\u001b[0m\n\u001b[0;32m   2173\u001b[0m             \u001b[0minf_rep\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0minf_rep\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   2174\u001b[0m         )\n\u001b[1;32m-> 2175\u001b[1;33m         formatter.write(\n\u001b[0m\u001b[0;32m   2176\u001b[0m             \u001b[0mexcel_writer\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   2177\u001b[0m             \u001b[0msheet_name\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0msheet_name\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mC:\\Anaconda3\\lib\\site-packages\\pandas\\io\\formats\\excel.py\u001b[0m in \u001b[0;36mwrite\u001b[1;34m(self, writer, sheet_name, startrow, startcol, freeze_panes, engine)\u001b[0m\n\u001b[0;32m    728\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    729\u001b[0m         \u001b[0mformatted_cells\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_formatted_cells\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 730\u001b[1;33m         writer.write_cells(\n\u001b[0m\u001b[0;32m    731\u001b[0m             \u001b[0mformatted_cells\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    732\u001b[0m             \u001b[0msheet_name\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mC:\\Anaconda3\\lib\\site-packages\\pandas\\io\\excel\\_xlwt.py\u001b[0m in \u001b[0;36mwrite_cells\u001b[1;34m(self, cells, sheet_name, startrow, startcol, freeze_panes)\u001b[0m\n\u001b[0;32m     75\u001b[0m                 )\n\u001b[0;32m     76\u001b[0m             \u001b[1;32melse\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 77\u001b[1;33m                 \u001b[0mwks\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mwrite\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mstartrow\u001b[0m \u001b[1;33m+\u001b[0m \u001b[0mcell\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mrow\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mstartcol\u001b[0m \u001b[1;33m+\u001b[0m \u001b[0mcell\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcol\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mval\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mstyle\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     78\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     79\u001b[0m     \u001b[1;33m@\u001b[0m\u001b[0mclassmethod\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mC:\\Anaconda3\\lib\\site-packages\\xlwt\\Worksheet.py\u001b[0m in \u001b[0;36mwrite\u001b[1;34m(self, r, c, label, style)\u001b[0m\n\u001b[0;32m   1086\u001b[0m            \u001b[1;33m:\u001b[0m\u001b[1;32mclass\u001b[0m\u001b[1;33m:\u001b[0m\u001b[0;31m`\u001b[0m\u001b[1;33m~\u001b[0m\u001b[0mxlwt\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mStyle\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mXFStyle\u001b[0m\u001b[0;31m`\u001b[0m \u001b[0mobject\u001b[0m\u001b[1;33m.\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1087\u001b[0m         \"\"\"\n\u001b[1;32m-> 1088\u001b[1;33m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mrow\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mr\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mwrite\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mc\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mlabel\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mstyle\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m   1089\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m   1090\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0mwrite_rich_text\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mr\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mc\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mrich_text_list\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mstyle\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mStyle\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdefault_style\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mC:\\Anaconda3\\lib\\site-packages\\xlwt\\Row.py\u001b[0m in \u001b[0;36mwrite\u001b[1;34m(self, col, label, style)\u001b[0m\n\u001b[0;32m    228\u001b[0m     \u001b[1;32mdef\u001b[0m \u001b[0mwrite\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mcol\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mlabel\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mstyle\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mStyle\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mdefault_style\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    229\u001b[0m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m__adjust_height\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mstyle\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 230\u001b[1;33m         \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m__adjust_bound_col_idx\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mcol\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m    231\u001b[0m         \u001b[0mstyle_index\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m__parent_wb\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0madd_style\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mstyle\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m    232\u001b[0m         \u001b[1;32mif\u001b[0m \u001b[0misinstance\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mlabel\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mbasestring\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;32mC:\\Anaconda3\\lib\\site-packages\\xlwt\\Row.py\u001b[0m in \u001b[0;36m__adjust_bound_col_idx\u001b[1;34m(self, *args)\u001b[0m\n\u001b[0;32m     71\u001b[0m             \u001b[0miarg\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0marg\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     72\u001b[0m             \u001b[1;32mif\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[1;33m(\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m0\u001b[0m \u001b[1;33m<=\u001b[0m \u001b[0miarg\u001b[0m \u001b[1;33m<=\u001b[0m \u001b[1;36m255\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;32mand\u001b[0m \u001b[0marg\u001b[0m \u001b[1;33m==\u001b[0m \u001b[0miarg\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 73\u001b[1;33m                 \u001b[1;32mraise\u001b[0m \u001b[0mValueError\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m\"column index (%r) not an int in range(256)\"\u001b[0m \u001b[1;33m%\u001b[0m \u001b[0marg\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m     74\u001b[0m             \u001b[0msheet\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m__parent\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m     75\u001b[0m             \u001b[1;32mif\u001b[0m \u001b[0miarg\u001b[0m \u001b[1;33m<\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m__min_col_idx\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mValueError\u001b[0m: column index (256) not an int in range(256)"
     ]
    }
   ],
   "source": [
    "df2.to_excel('people3.xls',index=None,header=None)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "import xlsxwriter   #导入模块\n",
    "workbook = xlsxwriter.Workbook('new_excel.xlsx')     #新建excel表\n",
    "worksheet = workbook.add_worksheet('sheet1')       #新建sheet(sheet的名称为\"sheet1\")\n",
    "headings = ['Number','testA','testB']  \n",
    "   #设置表头\n",
    "data = [\n",
    "    ['2017-9-1','2017-9-2','2017-9-3','2017-9-4','2017-9-5','2017-9-6'],\n",
    "    [10,40,50,20,10,50],\n",
    "    [30,60,70,50,40,30],\n",
    "]                                                              #自己造的数据\n",
    " \n",
    "worksheet.write_row('A1',headings)\n",
    "worksheet.write_column('A2',data[0])\n",
    "worksheet.write_column('B2',data[1])\n",
    "worksheet.write_column('C2',data[2])                   #将数据插入到表格中\n",
    " \n",
    "workbook.close()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [],
   "source": [
    "import xlsxwriter   #导入模块\n",
    "workbook = xlsxwriter.Workbook('new_people.xlsx')     #新建excel表\n",
    "worksheet = workbook.add_worksheet('sheet1')       #新建sheet(sheet的名称为\"sheet1\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "                  上市日期  申购人数\n",
       "0  2015-01-09 00:00:00  1668\n",
       "1  2015-01-13 00:00:00   704"
      ],
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>上市日期</th>\n      <th>申购人数</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>2015-01-09 00:00:00</td>\n      <td>1668</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>2015-01-13 00:00:00</td>\n      <td>704</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "metadata": {},
     "execution_count": 19
    }
   ],
   "source": [
    "df.head(2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "for index,item in df.iterrows():\n",
    "    date=item['上市日期']\n",
    "    count=item['申购人数']\n",
    "    date=date.replace(' 00:00:00','')\n",
    "    worksheet.write(0,index,date)\n",
    "    worksheet.write(1,index,count)\n",
    "\n",
    "workbook.close()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\nRangeIndex: 843 entries, 0 to 842\nData columns (total 2 columns):\n #   Column  Non-Null Count  Dtype \n---  ------  --------------  ----- \n 0   上市日期    843 non-null    object\n 1   申购人数    843 non-null    int64 \ndtypes: int64(1), object(1)\nmemory usage: 13.3+ KB\n"
     ]
    }
   ],
   "source": [
    "df.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [],
   "source": [
    "df= df.set_index('上市日期')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "        上市日期  申购人数\n",
       "0 2015-01-09  1668\n",
       "1 2015-01-13   704\n",
       "2 2015-01-14  3338\n",
       "3 2015-01-15  3662\n",
       "4 2015-01-15  1618"
      ],
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>上市日期</th>\n      <th>申购人数</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>2015-01-09</td>\n      <td>1668</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>2015-01-13</td>\n      <td>704</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>2015-01-14</td>\n      <td>3338</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>2015-01-15</td>\n      <td>3662</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>2015-01-15</td>\n      <td>1618</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "metadata": {},
     "execution_count": 32
    }
   ],
   "source": [
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "            申购人数\n",
       "上市日期            \n",
       "2015-01-09  1668\n",
       "2015-01-13   704\n",
       "2015-01-14  3338\n",
       "2015-01-15  3662\n",
       "2015-01-15  1618"
      ],
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>申购人数</th>\n    </tr>\n    <tr>\n      <th>上市日期</th>\n      <th></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>2015-01-09</th>\n      <td>1668</td>\n    </tr>\n    <tr>\n      <th>2015-01-13</th>\n      <td>704</td>\n    </tr>\n    <tr>\n      <th>2015-01-14</th>\n      <td>3338</td>\n    </tr>\n    <tr>\n      <th>2015-01-15</th>\n      <td>3662</td>\n    </tr>\n    <tr>\n      <th>2015-01-15</th>\n      <td>1618</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "metadata": {},
     "execution_count": 34
    }
   ],
   "source": [
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_m = df.resample('M').sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "              申购人数\n",
       "上市日期              \n",
       "2015-01-31   14196\n",
       "2015-02-28     422\n",
       "2015-03-31   39179\n",
       "2015-04-30  142838\n",
       "2015-05-31  110068"
      ],
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>申购人数</th>\n    </tr>\n    <tr>\n      <th>上市日期</th>\n      <th></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>2015-01-31</th>\n      <td>14196</td>\n    </tr>\n    <tr>\n      <th>2015-02-28</th>\n      <td>422</td>\n    </tr>\n    <tr>\n      <th>2015-03-31</th>\n      <td>39179</td>\n    </tr>\n    <tr>\n      <th>2015-04-30</th>\n      <td>142838</td>\n    </tr>\n    <tr>\n      <th>2015-05-31</th>\n      <td>110068</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "metadata": {},
     "execution_count": 40
    }
   ],
   "source": [
    "df_m.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {},
   "outputs": [],
   "source": [
    "line=0\n",
    "for index,item in df_m.iterrows():\n",
    "    # print(index)\n",
    "    # print(type(index))\n",
    "    date=str(index).replace(' 00:00:00','')\n",
    "    date=date[:-3]\n",
    "    count=item['申购人数']\n",
    "    # date=item.index\n",
    "    # print(date)\n",
    "    # print(type(date))\n",
    "    # count=item['申购人数']\n",
    "    # date=date.replace(' 00:00:00','')\n",
    "    worksheet.write(0,line,date)\n",
    "    worksheet.write(1,line,count)\n",
    "    line+=1\n",
    "\n",
    "workbook.close()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "outputs": [
    {
     "output_type": "execute_result",
     "data": {
      "text/plain": [
       "            申购人数\n",
       "上市日期            \n",
       "2016-02-29     0"
      ],
      "text/html": "<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>申购人数</th>\n    </tr>\n    <tr>\n      <th>上市日期</th>\n      <th></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>2016-02-29</th>\n      <td>0</td>\n    </tr>\n  </tbody>\n</table>\n</div>"
     },
     "metadata": {},
     "execution_count": 56
    }
   ],
   "source": [
    "df_m[df_m['申购人数']==0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ]
}

================================================
FILE: analysis/bond_daily_report.py
================================================
import sys

sys.path.append('..')
import pandas as pd
from configure.settings import DBSelector
from configure.util import calendar

engine = DBSelector().get_engine('db_jisilu')

date_list = calendar('2024-01-01', '2024-12-31')

for date in date_list:
    table = 'tb_jsl_{}'.format(date)
    df = pd.read_sql(table, engine)
    trade_amount = df['成交额(万元)'].sum()
    print(date, round(trade_amount/10000,2),'亿')


================================================
FILE: analysis/closed_fund_analysis.ipynb
================================================
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 封闭基金净增"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "import xcsc_tushare as xc \n",
    "import datetime\n",
    "import re\n",
    "import sys\n",
    "sys.path.append('..')\n",
    "from configure.settings import config\n",
    "\n",
    "xc_server=config['xc_server']\n",
    "xc_token_pro=config['xc_token_pro']\n",
    "\n",
    "\n",
    "xc.set_token(xc_token_pro)\n",
    "pro = xc.pro_api(env='prd',server=xc_server)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pro.fund_basic(market='E',status='L')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>ts_code</th>\n",
       "      <th>name</th>\n",
       "      <th>management</th>\n",
       "      <th>custodian</th>\n",
       "      <th>fund_type</th>\n",
       "      <th>found_date</th>\n",
       "      <th>due_date</th>\n",
       "      <th>list_date</th>\n",
       "      <th>issue_date</th>\n",
       "      <th>delist_date</th>\n",
       "      <th>...</th>\n",
       "      <th>exp_return</th>\n",
       "      <th>benchmark</th>\n",
       "      <th>status</th>\n",
       "      <th>invest_type</th>\n",
       "      <th>type</th>\n",
       "      <th>trustee</th>\n",
       "      <th>purc_startdate</th>\n",
       "      <th>redm_startdate</th>\n",
       "      <th>market</th>\n",
       "      <th>update_flag</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>159611.SZ</td>\n",
       "      <td>电力ETF</td>\n",
       "      <td>广发基金</td>\n",
       "      <td>中国建设银行</td>\n",
       "      <td>股票型</td>\n",
       "      <td>20211229</td>\n",
       "      <td>None</td>\n",
       "      <td>20220107</td>\n",
       "      <td>20211220</td>\n",
       "      <td>None</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>中证全指电力公用事业指数收益率</td>\n",
       "      <td>L</td>\n",
       "      <td>被动指数型</td>\n",
       "      <td>契约型开放式</td>\n",
       "      <td>None</td>\n",
       "      <td>20220107</td>\n",
       "      <td>20220107</td>\n",
       "      <td>E</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>560800.SH</td>\n",
       "      <td>数字经济ETF</td>\n",
       "      <td>鹏扬基金</td>\n",
       "      <td>招商银行</td>\n",
       "      <td>股票型</td>\n",
       "      <td>20211222</td>\n",
       "      <td>None</td>\n",
       "      <td>20220107</td>\n",
       "      <td>20211206</td>\n",
       "      <td>None</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>中证数字经济主题指数收益率</td>\n",
       "      <td>L</td>\n",
       "      <td>被动指数型</td>\n",
       "      <td>契约型开放式</td>\n",
       "      <td>None</td>\n",
       "      <td>20220107</td>\n",
       "      <td>20220107</td>\n",
       "      <td>E</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>562510.SH</td>\n",
       "      <td>旅游ETF</td>\n",
       "      <td>华夏基金</td>\n",
       "      <td>中国银行</td>\n",
       "      <td>股票型</td>\n",
       "      <td>20211221</td>\n",
       "      <td>None</td>\n",
       "      <td>20211230</td>\n",
       "      <td>20211116</td>\n",
       "      <td>None</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>中证旅游主题指数收益率</td>\n",
       "      <td>L</td>\n",
       "      <td>被动指数型</td>\n",
       "      <td>契约型开放式</td>\n",
       "      <td>None</td>\n",
       "      <td>20211230</td>\n",
       "      <td>20211230</td>\n",
       "      <td>E</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>159758.SZ</td>\n",
       "      <td>红利50ETF</td>\n",
       "      <td>华夏基金</td>\n",
       "      <td>中信银行</td>\n",
       "      <td>股票型</td>\n",
       "      <td>20211220</td>\n",
       "      <td>None</td>\n",
       "      <td>20211228</td>\n",
       "      <td>20211111</td>\n",
       "      <td>None</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>中证红利质量指数收益率</td>\n",
       "      <td>L</td>\n",
       "      <td>被动指数型</td>\n",
       "      <td>契约型开放式</td>\n",
       "      <td>None</td>\n",
       "      <td>20211228</td>\n",
       "      <td>20211228</td>\n",
       "      <td>E</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>562300.SH</td>\n",
       "      <td>碳中和ETF基金</td>\n",
       "      <td>银华基金</td>\n",
       "      <td>招商银行</td>\n",
       "      <td>股票型</td>\n",
       "      <td>20211220</td>\n",
       "      <td>None</td>\n",
       "      <td>20220105</td>\n",
       "      <td>20211110</td>\n",
       "      <td>None</td>\n",
       "      <td>...</td>\n",
       "      <td>None</td>\n",
       "      <td>中证内地低碳经济主题指数收益率</td>\n",
       "      <td>L</td>\n",
       "      <td>被动指数型</td>\n",
       "      <td>契约型开放式</td>\n",
       "      <td>None</td>\n",
       "      <td>20220105</td>\n",
       "      <td>20220105</td>\n",
       "      <td>E</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 26 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     ts_code      name management custodian fund_type found_date due_date  \\\n",
       "0  159611.SZ     电力ETF       广发基金    中国建设银行       股票型   20211229     None   \n",
       "1  560800.SH   数字经济ETF       鹏扬基金      招商银行       股票型   20211222     None   \n",
       "2  562510.SH     旅游ETF       华夏基金      中国银行       股票型   20211221     None   \n",
       "3  159758.SZ   红利50ETF       华夏基金      中信银行       股票型   20211220     None   \n",
       "4  562300.SH  碳中和ETF基金       银华基金      招商银行       股票型   20211220     None   \n",
       "\n",
       "  list_date issue_date delist_date  ...  exp_return        benchmark  status  \\\n",
       "0  20220107   20211220        None  ...        None  中证全指电力公用事业指数收益率       L   \n",
       "1  20220107   20211206        None  ...        None    中证数字经济主题指数收益率       L   \n",
       "2  20211230   20211116        None  ...        None      中证旅游主题指数收益率       L   \n",
       "3  20211228   20211111        None  ...        None      中证红利质量指数收益率       L   \n",
       "4  20220105   20211110        None  ...        None  中证内地低碳经济主题指数收益率       L   \n",
       "\n",
       "   invest_type    type  trustee purc_startdate redm_startdate market  \\\n",
       "0        被动指数型  契约型开放式     None       20220107       20220107      E   \n",
       "1        被动指数型  契约型开放式     None       20220107       20220107      E   \n",
       "2        被动指数型  契约型开放式     None       20211230       20211230      E   \n",
       "3        被动指数型  契约型开放式     None       20211228       20211228      E   \n",
       "4        被动指数型  契约型开放式     None       20220105       20220105      E   \n",
       "\n",
       "  update_flag  \n",
       "0           1  \n",
       "1           1  \n",
       "2           1  \n",
       "3           1  \n",
       "4           1  \n",
       "\n",
       "[5 rows x 26 columns]"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<class 'pandas.core.frame.DataFrame'>\n",
      "RangeIndex: 1081 entries, 0 to 1080\n",
      "Data columns (total 26 columns):\n",
      " #   Column          Non-Null Count  Dtype  \n",
      "---  ------          --------------  -----  \n",
      " 0   ts_code         1081 non-null   object \n",
      " 1   name            1081 non-null   object \n",
      " 2   management      1081 non-null   object \n",
      " 3   custodian       1081 non-null   object \n",
      " 4   fund_type       1081 non-null   object \n",
      " 5   found_date      1081 non-null   object \n",
      " 6   due_date        8 non-null      object \n",
      " 7   list_date       1081 non-null   object \n",
      " 8   issue_date      1074 non-null   object \n",
      " 9   delist_date     0 non-null      object \n",
      " 10  issue_amount    1066 non-null   float64\n",
      " 11  m_fee           1081 non-null   float64\n",
      " 12  c_fee           1081 non-null   float64\n",
      " 13  duration_year   11 non-null     float64\n",
      " 14  p_value         1081 non-null   float64\n",
      " 15  min_amount      1021 non-null   float64\n",
      " 16  exp_return      0 non-null      object \n",
      " 17  benchmark       1070 non-null   object \n",
      " 18  status          1081 non-null   object \n",
      " 19  invest_type     1070 non-null   object \n",
      " 20  type            1081 non-null   object \n",
      " 21  trustee         0 non-null      object \n",
      " 22  purc_startdate  1008 non-null   object \n",
      " 23  redm_startdate  1008 non-null   object \n",
      " 24  market          1081 non-null   object \n",
      " 25  update_flag     1081 non-null   object \n",
      "dtypes: float64(6), object(20)\n",
      "memory usage: 219.7+ KB\n"
     ]
    }
   ],
   "source": [
    "df.info()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "f_df = pro.fund_daily(ts_code='160527.SZ', start_date='20200101', end_date='20220105')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>ts_code</th>\n",
       "      <th>trade_date</th>\n",
       "      <th>pre_close</th>\n",
       "      <th>open</th>\n",
       "      <th>high</th>\n",
       "      <th>low</th>\n",
       "      <th>close</th>\n",
       "      <th>change</th>\n",
       "      <th>pct_chg</th>\n",
       "      <th>vol</th>\n",
       "      <th>amount</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>160527.SZ</td>\n",
       "      <td>20220105</td>\n",
       "      <td>1.091</td>\n",
       "      <td>1.086</td>\n",
       "      <td>1.090</td>\n",
       "      <td>1.076</td>\n",
       "      <td>1.081</td>\n",
       "      <td>-0.010</td>\n",
       "      <td>-0.9166</td>\n",
       "      <td>1401.57</td>\n",
       "      <td>151.630</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>160527.SZ</td>\n",
       "      <td>20220104</td>\n",
       "      <td>1.093</td>\n",
       "      <td>1.087</td>\n",
       "      <td>1.092</td>\n",
       "      <td>1.084</td>\n",
       "      <td>1.091</td>\n",
       "      <td>-0.002</td>\n",
       "      <td>-0.1830</td>\n",
       "      <td>1050.59</td>\n",
       "      <td>114.123</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>160527.SZ</td>\n",
       "      <td>20211231</td>\n",
       "      <td>1.091</td>\n",
       "      <td>1.088</td>\n",
       "      <td>1.093</td>\n",
       "      <td>1.088</td>\n",
       "      <td>1.093</td>\n",
       "      <td>0.002</td>\n",
       "      <td>0.1833</td>\n",
       "      <td>1315.00</td>\n",
       "      <td>143.221</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>160527.SZ</td>\n",
       "      <td>20211230</td>\n",
       "      <td>1.088</td>\n",
       "      <td>1.092</td>\n",
       "      <td>1.093</td>\n",
       "      <td>1.091</td>\n",
       "      <td>1.091</td>\n",
       "      <td>0.003</td>\n",
       "      <td>0.2757</td>\n",
       "      <td>1453.00</td>\n",
       "      <td>158.654</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>160527.SZ</td>\n",
       "      <td>20211229</td>\n",
       "      <td>1.097</td>\n",
       "      <td>1.094</td>\n",
       "      <td>1.094</td>\n",
       "      <td>1.084</td>\n",
       "      <td>1.088</td>\n",
       "      <td>-0.009</td>\n",
       "      <td>-0.8204</td>\n",
       "      <td>924.00</td>\n",
       "      <td>100.847</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     ts_code trade_date  pre_close   open   high    low  close  change  \\\n",
       "0  160527.SZ   20220105      1.091  1.086  1.090  1.076  1.081  -0.010   \n",
       "1  160527.SZ   20220104      1.093  1.087  1.092  1.084  1.091  -0.002   \n",
       "2  160527.SZ   20211231      1.091  1.088  1.093  1.088  1.093   0.002   \n",
       "3  160527.SZ   20211230      1.088  1.092  1.093  1.091  1.091   0.003   \n",
       "4  160527.SZ   20211229      1.097  1.094  1.094  1.084  1.088  -0.009   \n",
       "\n",
       "   pct_chg      vol   amount  \n",
       "0  -0.9166  1401.57  151.630  \n",
       "1  -0.1830  1050.59  114.123  \n",
       "2   0.1833  1315.00  143.221  \n",
       "3   0.2757  1453.00  158.654  \n",
       "4  -0.8204   924.00  100.847  "
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "f_df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_netvalue = pro.fund_nav(ts_code='160527.SZ')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>ts_code</th>\n",
       "      <th>ann_date</th>\n",
       "      <th>end_date</th>\n",
       "      <th>unit_nav</th>\n",
       "      <th>accum_nav</th>\n",
       "      <th>accum_div</th>\n",
       "      <th>net_asset</th>\n",
       "      <th>total_netasset</th>\n",
       "      <th>adj_nav</th>\n",
       "      <th>update_flag</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>160527.SZ</td>\n",
       "      <td>20220106</td>\n",
       "      <td>20220105</td>\n",
       "      <td>1.1305</td>\n",
       "      <td>1.1635</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>1.162226</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     ts_code  ann_date  end_date  unit_nav  accum_nav accum_div net_asset  \\\n",
       "0  160527.SZ  20220106  20220105    1.1305     1.1635      None      None   \n",
       "\n",
       "  total_netasset   adj_nav update_flag  \n",
       "0           None  1.162226           0  "
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_netvalue.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [],
   "source": [
    "df2 = pro.fund_nav(ts_code='160527.SZ')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>ts_code</th>\n",
       "      <th>ann_date</th>\n",
       "      <th>end_date</th>\n",
       "      <th>unit_nav</th>\n",
       "      <th>accum_nav</th>\n",
       "      <th>accum_div</th>\n",
       "      <th>net_asset</th>\n",
       "      <th>total_netasset</th>\n",
       "      <th>adj_nav</th>\n",
       "      <th>update_flag</th>\n",
Download .txt
gitextract_dvg32hnt/

├── .gitattributes
├── .gitignore
├── LICENSE
├── README.MD
├── StockAnalyze.py
├── __init__.py
├── analysis/
│   ├── FOF_Duanjuan_fund.ipynb
│   ├── Untitled.ipynb
│   ├── Untitled1.ipynb
│   ├── apply_people_count.ipynb
│   ├── bond_daily_report.py
│   ├── closed_fund_analysis.ipynb
│   ├── closed_fund_backtest.ipynb
│   ├── column_between_hours.ipynb
│   ├── daily_zt_report.py
│   ├── data_sync_uqer.ipynb
│   ├── deal_company_analysis.ipynb
│   ├── df_sql_analysis.ipynb
│   ├── diagnose_stock.py
│   ├── fd_money.py
│   ├── filterstock.py
│   ├── fupan.py
│   ├── get_break_high_low.py
│   ├── hk_new_stock_ratio.ipynb
│   ├── hugutong.ipynb
│   ├── index_stock.ipynb
│   ├── ipospeed.py
│   ├── jucao_annnounce_parse.py
│   ├── last_year_price.ipynb
│   ├── levt_notebook.ipynb
│   ├── location.ipynb
│   ├── longhuban.ipynb
│   ├── plot_test.ipynb
│   ├── query.ipynb
│   ├── realtime_monitor.ipynb
│   ├── recall_bond.py
│   ├── reits区间涨幅.ipynb
│   ├── stock_analysis.ipynb
│   ├── topTenHolder.ipynb
│   ├── trade_frequency.ipynb
│   ├── xueqiu_private.ipynb
│   ├── 东北债.ipynb
│   ├── 乖离率计算.ipynb
│   ├── 公众号绘制收益率曲线.ipynb
│   ├── 基金分析.ipynb
│   ├── 基金年度收益.ipynb
│   ├── 收益率曲线绘制.ipynb
│   ├── 新闻分析.ipynb
│   ├── 每日分析模板.ipynb
│   ├── 私募基金收益率.ipynb
│   ├── 统计分时最大站跌幅.ipynb
│   ├── 退市转债分析.ipynb
│   ├── 选股.ipynb
│   ├── 雪球私募收益率分析.ipynb
│   └── 雪球赏金.ipynb
├── backtest/
│   ├── backtrader-course-lession1.py
│   ├── dataframe-feed.py
│   ├── datapath.py
│   ├── examle1/
│   │   └── sma-demo.py
│   └── ma_line_backtest.py
├── common/
│   ├── Base.py
│   ├── BaseService.py
│   ├── SecurityBase.py
│   ├── TushareUtil.py
│   ├── __init__.py
│   ├── aes.py
│   └── pdf_convertor.py
├── daily/
│   └── fupan.ipynb
├── datahub/
│   ├── A_stock_daily_info.py
│   ├── SPSIOP_PRICE.py
│   ├── __init__.py
│   ├── basic_market_info.py
│   ├── black_list_sql.py
│   ├── bond_industry_info.py
│   ├── daily_stock_market_info.py
│   ├── dfcf_hot_block.py
│   ├── foreignexchange.py
│   ├── industry_info/
│   │   ├── ak_bk.py
│   │   ├── cookies.txt
│   │   ├── ths_industry_cralwer_top.py
│   │   ├── ths_industry_detail.py
│   │   └── ths_industry_list.py
│   ├── jisilu.py
│   ├── jisilu_bond_announcement.py
│   ├── js_file/
│   │   └── encode_jsl.js
│   ├── jsl_login.py
│   ├── jucao_announcement.py
│   ├── jucao_reits_notice.py
│   ├── ninwen.py
│   ├── public_private_fund_members.py
│   ├── repurchase.py
│   ├── store_news.py
│   ├── ttjj_new_stock.py
│   ├── xueqiu_group.py
│   ├── xueqiu_sync_portfolio.py
│   ├── yanbao_crawl.py
│   └── zdt.py
├── fund/
│   ├── ETFShareDetection.py
│   ├── ETF_Finder.py
│   ├── JJTool.py
│   ├── LOFShareDetection.py
│   ├── LOF_Model.py
│   ├── LOF_Purchase_limit.py
│   ├── LOF_arbitrage.py
│   ├── ShareDetection.py
│   ├── __init__.py
│   ├── ark_funds.py
│   ├── check_holiday.py
│   ├── closed_end_fund.py
│   ├── closed_end_fund_backtrade/
│   │   ├── backtrade_fund_weekly_share_increment.py
│   │   ├── fund_code.json
│   │   ├── fund_data_source.py
│   │   └── main.py
│   ├── danjuan_fund.py
│   ├── danjuan_fund_data_analysis.py
│   ├── etf_info.py
│   ├── etf_models.py
│   ├── etf_range_increment.py
│   ├── fund_annouce.py
│   ├── fund_holding_list_gen_dynamic_flourish.py
│   ├── fund_holding_person.py
│   ├── fund_info_spider.py
│   ├── fund_jsl.py
│   ├── fund_profit_info.py
│   ├── fund_raise_speed.py
│   ├── fund_share_crawl.py
│   ├── fund_share_monitor.py
│   ├── fund_share_update.py
│   ├── fund_tencent.py
│   ├── jsl_fund.py
│   ├── ndx_index.py
│   ├── qdii_fund_analysis_5fund.ipynb
│   ├── reits.ipynb
│   ├── reits_data_crawler.py
│   ├── reits_history.py
│   ├── reits_netvalue.py
│   ├── run_sh_fundshare.py
│   ├── run_sz_fundshare.py
│   ├── sqlhelper.py
│   ├── stop_purchase_lof_fund.py
│   ├── sz_etf.py
│   ├── ttfund_etf_holding.py
│   ├── ttjj.py
│   ├── ttjj_others.py
│   ├── xueqiu_content.txt
│   ├── xueqiu_private_fund.py
│   └── 基金持仓股.ipynb
├── futu/
│   ├── basic_usage.py
│   ├── realtime_price.py
│   ├── subscribe.py
│   ├── unsubscrible.py
│   └── util.py
├── hk_stock/
│   ├── aastock_new_stock.py
│   └── new_stock_release.py
├── jisilu_bond_release.py
├── jisilu_daily.py
├── jubi.py
├── juejin/
│   └── fetch_data.ipynb
├── k-line/
│   ├── basic_usage.py
│   ├── main.py
│   ├── recognize_form.py
│   └── search_target.py
├── k_line.py
├── longhuban.py
├── machine_learning/
│   └── 贝叶斯预测涨跌.py
├── monitor/
│   ├── __init__.py
│   ├── alert_me.py
│   ├── big_deal.py
│   ├── ceiling_break.py
│   ├── crawler_monitor.py
│   ├── jsl_monitor.py
│   ├── realtime_kzz_price.py
│   ├── realtime_monitor_ts.py
│   └── server_api.py
├── new_stock_break.py
├── new_stock_fund.py
├── pledged_validation.py
├── plot_line.py
├── ptrade/
│   ├── __init__.py
│   └── 逆回购.py
├── real_time_big_deal.py
├── recordMyChoice.py
├── relationship_case.py
├── requirements.txt
├── select_stock.py
├── shareholder_info.py
├── snowball.py
├── source_code_reading/
│   ├── README.MD
│   └── source_code.py
├── statistices.py
├── stockInfo.py
├── stock_check.py
├── store_data.py
├── strategy_verify.py
├── temp/
│   └── edit.txt
├── toolkit.py
├── trader/
│   ├── __init__.py
│   └── auto_trader.py
├── transfer_data_es.py
├── utils/
│   ├── delivery_order.py
│   ├── profit_compare.py
│   └── push_msn.py
├── yesterday_zt_monitor.py
├── 收益率曲线绘制.ipynb
├── 新闻分析.ipynb
├── 选股.ipynb
└── 雪球赏金.ipynb
Download .txt
SYMBOL INDEX (1027 symbols across 124 files)

FILE: StockAnalyze.py
  function volume_calculation (line 19) | def volume_calculation(code, start, end):
  function today_statistics (line 43) | def today_statistics(today):
  function zt_location (line 70) | def zt_location(date):
  function show_percentage (line 97) | def show_percentage(price):
  function stock_profit (line 111) | def stock_profit(code, start, end):
  function exclude_kcb (line 137) | def exclude_kcb(df):
  function plot_percent_distribution (line 147) | def plot_percent_distribution(date):
  function year_price_change (line 181) | def year_price_change(year,ignore_new_stock=False):
  function stock_analysis (line 213) | def stock_analysis(filename):
  function cb_stock_year (line 229) | def cb_stock_year():
  function main (line 242) | def main():

FILE: analysis/daily_zt_report.py
  function get_zt_info (line 21) | def get_zt_info(obj, now):
  function send_zt_report (line 52) | def send_zt_report(today=None):

FILE: analysis/diagnose_stock.py
  class StockDoctor (line 20) | class StockDoctor(BaseService, StockBase):
    method __init__ (line 22) | def __init__(self):
    method check_blacklist (line 31) | def check_blacklist(self, code):
    method north_east (line 42) | def north_east(self, code):
    method get_code (line 53) | def get_code(self, name):
    method diagnose (line 59) | def diagnose(self, code):
  function main (line 76) | def main():

FILE: analysis/fd_money.py
  class FDPlot (line 13) | class FDPlot:
    method __init__ (line 15) | def __init__(self):
    method fetch_data (line 20) | def fetch_data(self):
    method plot (line 38) | def plot(self):

FILE: analysis/filterstock.py
  class FilterStock (line 25) | class FilterStock():
    method __init__ (line 27) | def __init__(self):
    method change_work_dir (line 34) | def change_work_dir(self):
    method get_location (line 42) | def get_location(self):
    method get_ST (line 48) | def get_ST(self):
    method get_achievement (line 56) | def get_achievement(self):
    method daily_market (line 60) | def daily_market(self):
    method break_low (line 73) | def break_low(self, date):
    method get_lowest (line 104) | def get_lowest(self, code, date, current_date):
    method get_highest (line 128) | def get_highest(self, code, date):
    method save_to_excel (line 140) | def save_to_excel(self, df, filename, encoding='gbk'):
    method store_data (line 152) | def store_data(self):
    method to_be_ST (line 175) | def to_be_ST(self):
    method get_new_stock (line 197) | def get_new_stock(self, start='2010', end='2011'):
    method plot_new_stock_distibution (line 211) | def plot_new_stock_distibution(self, df, start, end):
    method rect_show (line 224) | def rect_show(self, rects):
    method show (line 230) | def show(self):
    method get_blacklist (line 235) | def get_blacklist(self):
  class Filter_CB (line 245) | class Filter_CB(object):
    method __init__ (line 247) | def __init__(self):
    method get_new_stock_bond (line 252) | def get_new_stock_bond(self, start='2017', end='2019'):
    method show (line 269) | def show(self):
    method run (line 273) | def run(self):
  function main (line 288) | def main():

FILE: analysis/fupan.py
  class IndustryFupan (line 27) | class IndustryFupan:
    method __init__ (line 32) | def __init__(self):
    method save_industry (line 36) | def save_industry(self):
  function hot_industry (line 58) | def hot_industry():
  function get_industry (line 102) | def get_industry():
  function daily_hot_industry (line 110) | def daily_hot_industry():
  function industry_hot_mongo (line 132) | def industry_hot_mongo():
  function industry_detail (line 147) | def industry_detail(kind):

FILE: analysis/get_break_high_low.py
  class BreakPoint (line 21) | class BreakPoint(object):
    method __init__ (line 23) | def __init__(self):
    method loop_stocks (line 35) | def loop_stocks(self, day):
    method code_convert (line 44) | def code_convert(self, code):
    method is_break (line 50) | def is_break(self, stockID, day, stock_type):

FILE: analysis/ipospeed.py
  class IPOSpeed (line 18) | class IPOSpeed():
    method __init__ (line 20) | def __init__(self):
    method comparation (line 29) | def comparation(self):
    method draw (line 60) | def draw(self):
  function main (line 100) | def main():

FILE: analysis/jucao_annnounce_parse.py
  class PDFParseproducer (line 18) | class PDFParseproducer(Thread):
    method __init__ (line 20) | def __init__(self, q,date=None):
    method gen_date_list (line 30) | def gen_date_list(self):
    method run (line 39) | def run(self):
  class JuCaoParser (line 67) | class JuCaoParser(BaseService, Thread):
    method __init__ (line 69) | def __init__(self, q):
    method run (line 79) | def run(self):
    method headers (line 112) | def headers(self):
  function main (line 119) | def main():

FILE: backtest/backtrader-course-lession1.py
  class TestStrategy (line 12) | class TestStrategy(bt.Strategy):
    method log (line 14) | def log(self, txt, dt=None):
    method __init__ (line 19) | def __init__(self):
    method notify_order (line 27) | def notify_order(self, order):
    method log (line 48) | def log(self,txt,dt=None):
    method next (line 55) | def next(self):
  function main (line 92) | def main():

FILE: backtest/dataframe-feed.py
  function convert_time (line 12) | def convert_time(x):
  function runstrat (line 15) | def runstrat():
  function parse_args (line 59) | def parse_args():

FILE: backtest/examle1/sma-demo.py
  class TestStrategy (line 9) | class TestStrategy(bt.Strategy):
    method log (line 14) | def log(self, txt, dt=None, doprint=False):
    method __init__ (line 20) | def __init__(self):
    method notify_order (line 39) | def notify_order(self, order):
    method notify_trade (line 64) | def notify_trade(self, trade):
    method next (line 78) | def next(self):
    method stop (line 98) | def stop(self):

FILE: backtest/ma_line_backtest.py
  class MyStrategy (line 6) | class MyStrategy(bt.Strategy):
    method __init__ (line 7) | def __init__(self):
    method next (line 12) | def next(self):

FILE: common/BaseService.py
  class BaseService (line 13) | class BaseService(object):
    method __init__ (line 15) | def __init__(self, logfile='default.log'):
    method init_const_data (line 23) | def init_const_data(self):
    method check_path (line 29) | def check_path(self, path):
    method get_url_filename (line 36) | def get_url_filename(self, url):
    method save_iamge (line 39) | def save_iamge(self, content, path):
    method get (line 43) | def get(self, url, _json=False, binary=False, retry=5):
    method post (line 72) | def post(self, url, post_data, _json=False, binary=False, retry=5):
    method headers (line 101) | def headers(self):
    method parse (line 104) | def parse(self, content):
    method process (line 112) | def process(self, data, history=False):
    method time_str (line 118) | def time_str(self, x):
    method trading_time (line 121) | def trading_time(self):
    method notify (line 153) | def notify(self, title):
    method weekday (line 156) | def weekday(self, day=datetime.datetime.now().strftime('%Y-%m-%d')):
    method is_weekday (line 171) | def is_weekday(self, day=datetime.datetime.now().strftime('%Y-%m-%d')):
    method execute (line 177) | def execute(self, cmd, data, conn, logger=None):
    method jsonp2json (line 195) | def jsonp2json(self, str_):
    method set_proxy_param (line 198) | def set_proxy_param(self, proxy):
    method get_proxy (line 201) | def get_proxy(self, retry=10):
    method convert_timestamp (line 229) | def convert_timestamp(self, t):
  class HistorySet (line 233) | class HistorySet(object):
    method __init__ (line 235) | def __init__(self, expire=1800):
    method add (line 239) | def add(self, value):
    method is_expire (line 249) | def is_expire(self, value):

FILE: common/SecurityBase.py
  class StockBase (line 8) | class StockBase:
    method __init__ (line 10) | def __init__(self):
    method valid_code (line 13) | def valid_code(self,code):

FILE: common/TushareUtil.py
  class TushareBaseUtil (line 14) | class TushareBaseUtil:
    method __init__ (line 19) | def __init__(self):
    method get_trade_date (line 25) | def get_trade_date(self, start_date=None, end_date=datetime.now().strf...
    method date_convertor (line 38) | def date_convertor(self, s):
    method get_last_trade_date (line 41) | def get_last_trade_date(self):
    method get_last_week_trade_date (line 44) | def get_last_week_trade_date(self):
    method clear_cache (line 47) | def clear_cache(self):
  function main (line 51) | def main():

FILE: common/aes.py
  class AESDecrypt (line 11) | class AESDecrypt:
    method set_key (line 13) | def set_key(self,key):
    method add_to_16 (line 17) | def add_to_16(self, text):
    method decode_base64 (line 22) | def decode_base64(self, data):
    method decrypt (line 28) | def decrypt(self, encrypt_data):

FILE: common/pdf_convertor.py
  function pdf_convert_txt (line 9) | def pdf_convert_txt(filename):

FILE: datahub/A_stock_daily_info.py
  class AStockDailyInfo (line 14) | class AStockDailyInfo():
    method __init__ (line 16) | def __init__(self):
    method run (line 21) | def run(self):
  function main (line 30) | def main():

FILE: datahub/SPSIOP_PRICE.py
  class SPSIOP (line 34) | class SPSIOP(BaseService):
    method __init__ (line 36) | def __init__(self):
    method predict_price (line 39) | def predict_price(self):
    method qdii_info (line 68) | def qdii_info(self):
  function main (line 103) | def main():

FILE: datahub/basic_market_info.py
  class BasicMarket (line 17) | class BasicMarket(BaseService):
    method __init__ (line 19) | def __init__(self):
    method get_basic_info (line 27) | def get_basic_info(self, retry=5):
  function main (line 64) | def main():

FILE: datahub/black_list_sql.py
  function create_tb (line 15) | def create_tb(conn):
  function update_data (line 28) | def update_data(filename, conn):
  function get_name_number (line 54) | def get_name_number():
  function main (line 80) | def main():

FILE: datahub/bond_industry_info.py
  class BondIndustry (line 25) | class BondIndustry:
    method __init__ (line 27) | def __init__(self):
    method run (line 30) | def run(self):
    method get_session (line 39) | def get_session(self):
    method get_bond_info (line 42) | def get_bond_info(self, session, industry_id):
    method parse_data (line 74) | def parse_data(self, data):
    method parse_selection_id (line 77) | def parse_selection_id(self):
  function main (line 93) | def main():

FILE: datahub/daily_stock_market_info.py
  class FetchDaily (line 21) | class FetchDaily(BaseService):
    method __init__ (line 22) | def __init__(self):
    method transfer_db (line 32) | def transfer_db(self,df):
    method get_today_market (line 40) | def get_today_market(self, re_try=10):
    method run (line 58) | def run(self):
  function main (line 91) | def main():

FILE: datahub/dfcf_hot_block.py
  function get_ut_value (line 31) | def get_ut_value():
  function stock_zt_pool_em (line 48) | def stock_zt_pool_em(date: str = "20241008") -> pd.DataFrame:
  function stock_zt_pool_strong_em (line 135) | def stock_zt_pool_strong_em(date: str = "20241231") -> pd.DataFrame:
  function stock_zt_pool_zbgc_em (line 224) | def stock_zt_pool_zbgc_em(date: str = "20241011") -> pd.DataFrame:
  function stock_zt_pool_dtgc_em (line 306) | def stock_zt_pool_dtgc_em(date: str = "20241011") -> pd.DataFrame:
  function stock_zt_pool_previous_em (line 392) | def stock_zt_pool_previous_em(date: str = "20240415") -> pd.DataFrame:
  function data_dump (line 469) | def data_dump(df, table_name):
  function main (line 480) | def main():

FILE: datahub/foreignexchange.py
  class ForeighExchange (line 17) | class ForeighExchange(BaseService):
    method __init__ (line 19) | def __init__(self):
    method headers (line 26) | def headers(self):
    method run (line 29) | def run(self):
    method start (line 41) | def start(self):
    method fetch_web (line 52) | def fetch_web(self):
  function main (line 68) | def main():

FILE: datahub/industry_info/ths_industry_cralwer_top.py
  function update_cookies (line 25) | def update_cookies():
  function crawl (line 36) | def crawl(url, is_detail=False):
  function parser (line 53) | def parser(html):
  function parse_detail (line 90) | def parse_detail(html, industry_code):
  function _parse_detail (line 112) | def _parse_detail(html, industry_code):
  function get_total_page (line 150) | def get_total_page(html):
  function dumpData (line 164) | def dumpData(data):
  function main (line 172) | def main():

FILE: datahub/industry_info/ths_industry_detail.py
  function get_total_page (line 15) | def get_total_page(html):
  function read_cookies (line 29) | def read_cookies():
  function get_headers (line 40) | def get_headers():
  function crawl (line 65) | def crawl(url):
  function get_crawl_list (line 92) | def get_crawl_list():
  function _parse_detail (line 102) | def _parse_detail(html, industry_code):
  function process_detail (line 138) | def process_detail(industry_code):
  function main (line 164) | def main():

FILE: datahub/industry_info/ths_industry_list.py
  function get_headers (line 22) | def get_headers():
  function read_cookies (line 41) | def read_cookies():
  function crawl (line 51) | def crawl(url):
  function parser (line 63) | def parser(html):
  function main (line 102) | def main():

FILE: datahub/jisilu.py
  class Jisilu (line 22) | class Jisilu(BaseService):
    method __init__ (line 23) | def __init__(self, check_holiday=False, remote='qq'):
    method headers (line 39) | def headers(self):
    method check_holiday (line 52) | def check_holiday(self):
    method get_session (line 59) | def get_session(self):
    method download (line 62) | def download(self, url, data, retry=5):
    method daily_update (line 78) | def daily_update(self, adjust_no_use=True):
    method identify_margin (line 108) | def identify_margin(self,x):
    method data_parse (line 114) | def data_parse(self, bond_list, adjust_no_use):
    method update_daily_report (line 182) | def update_daily_report(self,df):
    method to_excel (line 214) | def to_excel(self, df):
    method store_mysql (line 220) | def store_mysql(self, df):
    method init_release_table (line 239) | def init_release_table(self, conn):
    method get_conn (line 259) | def get_conn(self):
    method release_data (line 263) | def release_data(self):
    method save_release_data (line 277) | def save_release_data(self, rows, conn):
    method check_update (line 311) | def check_update(self, bond_id, conn):
    method update_release_data (line 315) | def update_release_data(self, update_data, conn):
    method insert_release_data (line 321) | def insert_release_data(self, data, conn):
    method check_bond_exist (line 326) | def check_bond_exist(self, bond_id, conn):
    method execute (line 333) | def execute(self, cmd, data, conn):
    method convert_float (line 349) | def convert_float(self, x):
  function main (line 368) | def main():

FILE: datahub/jisilu_bond_announcement.py
  class Announcement (line 17) | class Announcement:
    method __init__ (line 19) | def __init__(self, kw):
    method bond_info (line 35) | def bond_info(self):
    method crawl (line 39) | def crawl(self, code):
    method parse (line 52) | def parse(self, content):
    method run (line 65) | def run(self):
    method persistence (line 80) | def persistence(self):
    method update_only (line 103) | def update_only(self):
  function main (line 142) | def main():

FILE: datahub/js_file/encode_jsl.js
  function F (line 3) | function F() {}
  function parseLoop (line 300) | function parseLoop(base64Str, base64StrLength, reverseMap) {
  function FF (line 452) | function FF(a, b, c, d, x, s, t) {
  function GG (line 456) | function GG(a, b, c, d, x, s, t) {
  function HH (line 460) | function HH(a, b, c, d, x, s, t) {
  function II (line 464) | function II(a, b, c, d, x, s, t) {
  function isPrime (line 552) | function isPrime(n) {
  function getFractionalBits (line 561) | function getFractionalBits(n) {
  function swapEndian (line 692) | function swapEndian(word) {
  function f1 (line 846) | function f1(x, y, z) {
  function f2 (line 849) | function f2(x, y, z) {
  function f3 (line 852) | function f3(x, y, z) {
  function f4 (line 855) | function f4(x, y, z) {
  function f5 (line 858) | function f5(x, y, z) {
  function rotl (line 861) | function rotl(x, n) {
  function X64Word_create (line 1256) | function X64Word_create() {
  function selectCipherStrategy (line 1486) | function selectCipherStrategy(key) {
  function xorBlock (line 1546) | function xorBlock(words, offset, blockSize) {
  function generateKeystreamAndEncrypt (line 1744) | function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) {
  function exchangeLR (line 2590) | function exchangeLR(offset, mask) {
  function exchangeRL (line 2595) | function exchangeRL(offset, mask) {
  function generateKeystreamWord (line 2655) | function generateKeystreamWord() {
  function incWord (line 2688) | function incWord(word) {
  function incCounter (line 2717) | function incCounter(counter) {
  function nextState (line 2804) | function nextState() {
  function nextState (line 2918) | function nextState() {
  function jslencode (line 2969) | function jslencode(text, aes_key) {

FILE: datahub/jsl_login.py
  function decoder (line 35) | def decoder(text):
  function get_bond_info (line 46) | def get_bond_info(session):
  function login (line 79) | def login(user, password):
  function main (line 107) | def main():

FILE: datahub/jucao_announcement.py
  class JuCaoAnnouncement (line 15) | class JuCaoAnnouncement(BaseService):
    method __init__ (line 17) | def __init__(self,param=None):
    method gen_date_param (line 64) | def gen_date_param(self):
    method headers (line 81) | def headers(self):
    method start (line 96) | def start(self):
    method ignore_str_list (line 102) | def ignore_str_list(self):
    method fetch_all_page_data (line 111) | def fetch_all_page_data(self,pages):
    method single_page_analysis (line 116) | def single_page_analysis(self,i):
    method batch_mongodb (line 137) | def batch_mongodb(self,announce_data):
    method parse_item (line 146) | def parse_item(self,js_data):
    method get_total_page (line 174) | def get_total_page(self):
  function main (line 185) | def main():

FILE: datahub/jucao_reits_notice.py
  class SHTradingAnnounce (line 15) | class SHTradingAnnounce:
    method __init__ (line 17) | def __init__(self):
    method _crawl (line 20) | def _crawl(self, kw, page):
    method parse (line 71) | def parse(self):
    method total_count (line 74) | def total_count(self):
    method insert_item (line 77) | def insert_item(self, doc):
    method filter_unname_char (line 85) | def filter_unname_char(self,name):
    method download_pdf (line 89) | def download_pdf(self):
    method dumpmongo (line 116) | def dumpmongo(self, announce_list):
    method run (line 125) | def run(self):

FILE: datahub/ninwen.py
  class NinwenSpider (line 25) | class NinwenSpider():
    method __init__ (line 27) | def __init__(self):
    method headers (line 35) | def headers(self):
    method json_headers (line 51) | def json_headers(self):
    method get_image (line 65) | def get_image(self):
    method convert (line 75) | def convert(self, float_str):
    method login (line 82) | def login(self, code, csrf):
    method get_csrf_token (line 99) | def get_csrf_token(self):
    method get_bond_data (line 108) | def get_bond_data(self):
    method visit_page (line 119) | def visit_page(self, url, _headers=None):
    method columns_name (line 127) | def columns_name(self):
    method patch_fix (line 180) | def patch_fix(self, name, v, node):
    method parse (line 185) | def parse(self, content):
    method dump_excel (line 204) | def dump_excel(self, bond_info_list):
    method image_recognize (line 208) | def image_recognize(self, img):
    method check_name (line 224) | def check_name(self, csrf_token):
    method check_cookies (line 230) | def check_cookies(self, csrf, code):
    method run (line 235) | def run(self):

FILE: datahub/public_private_fund_members.py
  class FundMembers (line 15) | class FundMembers(BaseService):
    method __init__ (line 17) | def __init__(self, kind, date, first_use=False):
    method crawl_lof (line 44) | def crawl_lof(self):
    method headers (line 53) | def headers(self):
    method process_lof (line 64) | def process_lof(self, js_data):
    method post (line 79) | def post(self, url, post_data, _josn=False, binary=False, retry=5):
    method crawl_etf (line 82) | def crawl_etf(self):
    method process_etf (line 101) | def process_etf(self, js_data):
    method run (line 115) | def run(self):
    method process_model (line 125) | def process_model(self, code, name, date, share, type_):

FILE: datahub/store_news.py
  function create_tb (line 18) | def create_tb():
  function save_sql (line 31) | def save_sql():

FILE: datahub/ttjj_new_stock.py
  function parse_json (line 23) | def parse_json(content):
  function Aupdate_data (line 29) | async def Aupdate_data(data):
  function update_data (line 36) | def update_data(data):
  function fetch (line 44) | async def fetch(session,page):
  function main (line 71) | async def main():

FILE: datahub/xueqiu_group.py
  function main (line 10) | def main():

FILE: datahub/xueqiu_sync_portfolio.py
  function trade_record (line 19) | def trade_record(cookie, data):
  function history_trade (line 56) | def history_trade(se, cookie, tableid):
  function main (line 81) | def main():

FILE: datahub/yanbao_crawl.py
  function main (line 7) | def main():

FILE: datahub/zdt.py
  class GetZDT (line 23) | class GetZDT(BaseService):
    method __init__ (line 25) | def __init__(self, today=None):
    method download (line 61) | def download(self, url, headers, retry=5):
    method convert_json (line 82) | def convert_json(self, content):
    method convert_dataframe (line 104) | def convert_dataframe(self, data, index, choice, post_fix):
    method today_zt (line 122) | def today_zt(self, df, post_fix, engine):
    method yesterday_zt (line 134) | def yesterday_zt(self, df, post_fix, engine):
    method generate_html (line 155) | def generate_html(self,df):
    method run (line 171) | def run(self):

FILE: fund/ETFShareDetection.py
  function main (line 6) | def main():

FILE: fund/ETF_Finder.py
  class ETFFinder (line 19) | class ETFFinder(SQLHelper):
    method __init__ (line 21) | def __init__(self, date=None):
    method range_increment (line 35) | def range_increment(self):
    method query_data (line 43) | def query_data(self, code, count):
    method count (line 51) | def count(self, code):
    method high_low_count (line 56) | def high_low_count(self):
    method _low_high_process (line 73) | def _low_high_process(self, code, day):
    method update_result (line 90) | def update_result(self,data):
    method latest (line 93) | def latest(self, code):
    method is_low_high (line 102) | def is_low_high(self, code, day):
    method ma_line_up_factor (line 118) | def ma_line_up_factor(self, code, ret_data):
    method long_bottom_factor (line 136) | def long_bottom_factor(self, code, ret_data):
    method long_bottom_down (line 149) | def long_bottom_down(self, code):
    method get_increment (line 157) | def get_increment(self):
  function main (line 166) | def main(opt=None, date=None):

FILE: fund/JJTool.py
  class TTFund (line 19) | class TTFund(BaseService):
    method __init__ (line 21) | def __init__(self, key='股票'):
    method headers (line 37) | def headers(self):
    method rank (line 52) | def rank(self):
    method category_rank (line 59) | def category_rank(self, key, time_interval):
    method save_data (line 78) | def save_data(self, rank_list):
    method parseMethod (line 85) | def parseMethod(self,jquery_data):
    method parse (line 90) | def parse(self, content):
    method key_remap (line 95) | def key_remap(self, rank_data, type_):
    method turnover_rate (line 116) | def turnover_rate(self):
    method is_crawl (line 131) | def is_crawl(self, db, code):
    method __turnover_rate (line 134) | def __turnover_rate(self, code):
    method get_turnover_db (line 140) | def get_turnover_db(self):
    method __parse_turnover_data (line 143) | def __parse_turnover_data(self, jquery_data, code):
    method fund_detail (line 153) | def fund_detail(self, db,code):
    method parse_detail_info (line 189) | def parse_detail_info(self,content):
    method update_basic_info (line 200) | def update_basic_info(self):
    method get_basic_db (line 203) | def get_basic_db(self):
    method basic_info (line 206) | def basic_info(self):
  function main (line 221) | def main(kind, option):
  function debug (line 241) | def debug():

FILE: fund/LOFShareDetection.py
  function main (line 7) | def main():

FILE: fund/LOF_Model.py
  class FundBaseInfoModel (line 13) | class FundBaseInfoModel(Base):
    method __str__ (line 29) | def __str__(self):
  class ShareModel (line 33) | class ShareModel(Base):

FILE: fund/LOF_arbitrage.py
  class LOF_arbitrage (line 19) | class LOF_arbitrage:
    method __init__ (line 20) | def __init__(self, save):
    method update_premiun (line 25) | def update_premiun(self):
    method get_realtime_time (line 38) | def get_realtime_time(self):
    method dump_mongodb (line 64) | def dump_mongodb(self, data):
    method fund_detail (line 76) | def fund_detail(self, code):
    method parse (line 102) | def parse(self, content):
    method postfix (line 134) | def postfix(self, code):
    method get_page (line 140) | def get_page(self, p):
    method run (line 155) | def run(self):
  function main (line 194) | def main(save=False):

FILE: fund/ShareDetection.py
  class FundDetection (line 26) | class FundDetection(BaseService):
    method __init__ (line 28) | def __init__(self):
    method get_engine (line 36) | def get_engine():
    method create_table (line 39) | def create_table(self):
    method get_session (line 43) | def get_session(self):
    method lof_start (line 46) | def lof_start(self):
    method etf_start (line 58) | def etf_start(self):
    method query_big_volatility_share (line 70) | def query_big_volatility_share(self, category):
    method formator (line 138) | def formator(*args):

FILE: fund/ark_funds.py
  class ARKFundSpider (line 14) | class ARKFundSpider(BaseService):
    method __init__ (line 16) | def __init__(self):
    method mongodb (line 23) | def mongodb(self):
    method headers (line 32) | def headers(self):
    method get_content (line 46) | def get_content(self, fund_name):
    method parse (line 55) | def parse(self, content,types):
    method save_data (line 90) | def save_data(self,date_list):
    method get_fund_holding (line 101) | def get_fund_holding(self,fund_name = 'ARKK'):
    method start (line 109) | def start(self):

FILE: fund/closed_end_fund.py
  class CloseEndFundCls (line 19) | class CloseEndFundCls(BaseService):
    method __init__ (line 21) | def __init__(self):
    method headers (line 31) | def headers(self):
    method crawl (line 36) | def crawl(self):
    method save_mongo (line 56) | def save_mongo(self, row_list):
    method run (line 65) | def run(self):
  function main (line 79) | def main():

FILE: fund/closed_end_fund_backtrade/backtrade_fund_weekly_share_increment.py
  class Runner (line 7) | class Runner:
    method __init__ (line 9) | def __init__(self, opt):
    method fetch (line 17) | def fetch(self):
    method other (line 20) | def other(self):
    method position_intialize (line 23) | def position_intialize(self):
    method get_max_withdraw (line 41) | def get_max_withdraw(self,indexs):
    method daily_netvalue (line 59) | def daily_netvalue(self,df_copy,i,profit,date):
    method backtrade (line 74) | def backtrade(self):
    method evaluate (line 141) | def evaluate(self):
    method each_fund_profit (line 154) | def each_fund_profit(self,row):
    method compare_all_market (line 162) | def compare_all_market(self):
    method run (line 179) | def run(self):

FILE: fund/closed_end_fund_backtrade/fund_data_source.py
  class DataSource (line 11) | class DataSource():
    method __init__ (line 13) | def __init__(self):
    method get_fund_code (line 16) | def get_fund_code(self):
    method get_fund_code_local (line 22) | def get_fund_code_local(self):
    method get_data (line 31) | def get_data(self,source):
    method df_into_csv (line 38) | def df_into_csv(self,df):
    method all_market_data (line 44) | def all_market_data(self,source='local'):
    method df_into_mongo (line 62) | def df_into_mongo(self, df):
    method get_net_value (line 70) | def get_net_value(self,code):
    method get_closed_fund_netvalue (line 77) | def get_closed_fund_netvalue(self,code):
    method get_data_from_mongo (line 81) | def get_data_from_mongo(self):
    method get_data_from_ak (line 93) | def get_data_from_ak(self):

FILE: fund/closed_end_fund_backtrade/main.py
  function main (line 7) | def main(func):

FILE: fund/danjuan_fund.py
  class Danjuan (line 11) | class Danjuan(BaseService):
    method __init__ (line 13) | def __init__(self) -> None:
    method mongo_init (line 33) | def mongo_init(self):
    method headers (line 40) | def headers(self):
    method crawl (line 43) | def crawl(self, page):
    method parse (line 50) | def parse(self, content):
    method save_data (line 53) | def save_data(self, data_list):
    method get_plan_code (line 61) | def get_plan_code(self):
    method code_list (line 71) | def code_list(self):
    method update_data (line 74) | def update_data(self, condition, data):
    method plan_detail (line 83) | def plan_detail(self):
    method post_process (line 96) | def post_process(self, detail_info):
    method get_holding_fund_detail (line 112) | def get_holding_fund_detail(self):
    method run (line 127) | def run(self):

FILE: fund/danjuan_fund_data_analysis.py
  class DanjuanAnalyser (line 17) | class DanjuanAnalyser(BaseService):
    method __init__ (line 19) | def __init__(self):
    method select_collection (line 23) | def select_collection(self,current_date):
    method get_top_plan (line 32) | def get_top_plan(self,collection,top=10):
    method get_top_plan_percent (line 45) | def get_top_plan_percent(self,collection,top=10):
    method start (line 57) | def start(self):
    method simple_display (line 90) | def simple_display(self,data,date):
    method pretty (line 98) | def pretty(self,fund_dict,date,kind):
    method new_fund (line 103) | def new_fund(self,new_fund_dict,old_fund_dict):
    method clear_warehouse_fund (line 109) | def clear_warehouse_fund(self,collection,top):
  function main (line 128) | def main():

FILE: fund/etf_info.py
  class Fund (line 26) | class Fund(BaseService):
    method __init__ (line 28) | def __init__(self, first_use=False):
    method get_engine (line 33) | def get_engine(self):
    method create_table (line 36) | def create_table(self):
    method get_session (line 40) | def get_session(self):
    method get (line 43) | def get(self, url, retry=5, js=True):
  class IndexSpider (line 66) | class IndexSpider(Fund):
    method __init__ (line 68) | def __init__(self, first_use=False):
    method basic_info (line 78) | def basic_info(self):
    method etf_detail_with_product_inuse (line 134) | def etf_detail_with_product_inuse(self):
    method full_market (line 151) | def full_market(self):
    method download_excel_file (line 211) | def download_excel_file(self, sess, code, name):
    method get_qz_page (line 216) | def get_qz_page(self, sess, code):
    method parse_qz_data (line 226) | def parse_qz_data(self, resp, code, name):
    method more_etf_product (line 259) | def more_etf_product(self,resp):
    method etf_product_list (line 264) | def etf_product_list(self, resp_selector):
    method store_product_list (line 274) | def store_product_list(self, code, name, products):
    method etf_detail_constituent_stock (line 280) | def etf_detail_constituent_stock(self, sess, code, name):
    method store_data (line 303) | def store_data(self, detail_data_json, collection_name, key=''):

FILE: fund/etf_models.py
  class IndexObject (line 13) | class IndexObject(Base):
  class IndexObjectNew (line 31) | class IndexObjectNew(Base):
  class IndexObjectSZ (line 55) | class IndexObjectSZ(Base):

FILE: fund/etf_range_increment.py
  class ETFBase (line 20) | class ETFBase(SQLHelper):
    method __init__ (line 22) | def __init__(self):
  class ETFDataCrawler (line 36) | class ETFDataCrawler(ETFBase):
    method __init__ (line 38) | def __init__(self, history_data):
    method history_data_all (line 42) | def history_data_all(self):
    method update_current_data (line 54) | def update_current_data(self):
    method _update_current_data (line 66) | def _update_current_data(self, code, date, open, high, low, close, vol...
    method update_index (line 73) | def update_index(self):
    method fix (line 80) | def fix(self):
    method run (line 90) | def run(self):
  function main (line 99) | def main(history_data=False):

FILE: fund/fund_annouce.py
  class FundAnnouce (line 16) | class FundAnnouce(BaseService):
    method __init__ (line 18) | def __init__(self):
    method headers (line 25) | def headers(self):
    method get_page (line 42) | def get_page(self):
    method run (line 48) | def run(self):
    method parse (line 58) | def parse(self, content):
  function main (line 62) | def main():

FILE: fund/fund_holding_list_gen_dynamic_flourish.py
  function get_df (line 10) | def get_df():
  function weight (line 16) | def weight(df):
  function scale (line 24) | def scale(df):
  function main (line 30) | def main():

FILE: fund/fund_holding_person.py
  function get_mongo_doc (line 13) | def get_mongo_doc():
  function get_mongo_target_doc (line 22) | def get_mongo_target_doc():
  function insert_one (line 32) | def insert_one(doc,data):
  function get_basic_info (line 39) | def get_basic_info():
  function find_top_holding_stock (line 51) | def find_top_holding_stock(code):
  function latest_holding (line 61) | def latest_holding(code):
  function get_fund_code (line 79) | def get_fund_code():
  function run (line 103) | def run():

FILE: fund/fund_info_spider.py
  class TencentFundSpider (line 40) | class TencentFundSpider(BaseService):
    method __init__ (line 42) | def __init__(self):
    method headers (line 51) | def headers(self):
    method create_table (line 64) | def create_table(self):
    method crawl_fund_info_by_code_table (line 77) | def crawl_fund_info_by_code_table(self):
    method get_fund_code (line 82) | def get_fund_code(self, valid=True):
    method convert (line 93) | def convert(self, float_str):
    method insert_data (line 101) | def insert_data(self, jjdm, jjjc, zxgm, zxjg, jgzffd, cj_total_amount,...
    method check_exist (line 127) | def check_exist(self, code):
    method get (line 133) | def get(self, url, params, retry=5, js=False):
    method crawl (line 155) | def crawl(self):
    method get_info_by_code (line 196) | def get_info_by_code(self, code):
    method parse_content_and_save (line 216) | def parse_content_and_save(self, content):
    method parse_html (line 223) | def parse_html(self, content):
    method change_table_field (line 253) | def change_table_field(self, table):
    method get_fund_info (line 259) | def get_fund_info(self, table):
    method udpate_db (line 263) | def udpate_db(self, table, jz, yjl, is_realtime, code):
    method update_netvalue (line 267) | def update_netvalue(self):
    method get_netvalue (line 288) | def get_netvalue(self, table, item):
    method get_fund (line 321) | def get_fund(self, table, code):
    method query_fund_data (line 330) | def query_fund_data(self, today, order):
    method html_formator (line 335) | def html_formator(self, ret, html):
    method combine_html (line 342) | def combine_html(self, html, today):
    method check_content (line 360) | def check_content(self, content):
    method notice_me (line 367) | def notice_me(self, today):

FILE: fund/fund_jsl.py
  class JSLFund (line 50) | class JSLFund(BaseService):
    method __init__ (line 55) | def __init__(self):
    method headers (line 68) | def headers(self):
    method get (line 73) | def get(self, url, retry=5):
    method crawl (line 92) | def crawl(self):
    method parse_json (line 96) | def parse_json(self, types):
  function main (line 119) | def main():

FILE: fund/fund_profit_info.py
  function parse_fund_code_in_txt (line 14) | def parse_fund_code_in_txt(filename):
  function convert_time (line 28) | def convert_time(x):
  function get_net_value (line 33) | def get_net_value(code):
  function get_year (line 41) | def get_year(start,end):
  function get_profit_rate (line 49) | def get_profit_rate(df):
  function get_yearly_profit_rate (line 56) | def get_yearly_profit_rate(df):
  function fund_profit (line 73) | def fund_profit(code,name=''):
  function automatic_investment_plan (line 91) | def automatic_investment_plan(code):
  function xirr (line 123) | def xirr(cashflows):
  function irr (line 145) | def irr(values):
  function get_max_withdraw (line 158) | def get_max_withdraw(indexs):
  function plot_profit_line (line 180) | def plot_profit_line(df,code,name=""):
  function draw_profit_curve (line 208) | def draw_profit_curve(code,name):
  function automatic_investment_plan_result (line 213) | def automatic_investment_plan_result(code):
  function help (line 217) | def help():
  function main (line 225) | def main(code='513050',kind='profit'):
  function batch_run_draw (line 237) | def batch_run_draw():
  function batch_run_profit (line 246) | def batch_run_profit():

FILE: fund/fund_raise_speed.py
  class MonitorFund (line 14) | class MonitorFund(BaseService):
    method __init__ (line 16) | def __init__(self):
    method fast_speed_up (line 20) | def fast_speed_up(self):

FILE: fund/fund_share_crawl.py
  class Fund (line 23) | class Fund(BaseService):
    method __init__ (line 24) | def __init__(self, first_use=False):
    method get_engine (line 31) | def get_engine():
    method set_proxy_enable (line 34) | def set_proxy_enable(self):
    method create_table (line 39) | def create_table(self):
    method get_session (line 43) | def get_session(self):
    method get (line 46) | def get(self, url, _json=False, binary=False, retry=5):
  class SZFundShare (line 77) | class SZFundShare(Fund):
    method __init__ (line 83) | def __init__(self, first_use=False):
    method headers (line 100) | def headers(self):
    method convert (line 118) | def convert(float_str):
    method json_parse (line 126) | def json_parse(self, js_data):
    method extract_name (line 154) | def extract_name(self, name):
    method extract_code (line 157) | def extract_code(self, code):
    method extract_glrmc (line 160) | def extract_glrmc(self, glrmc):
    method model_process (line 165) | def model_process(self, jjlb, tzlb, ssrq, dqgm, glrmc, code, name, date):
    method convert_number (line 200) | def convert_number(s):
    method run (line 203) | def run(self):
  class SHFundShare (line 214) | class SHFundShare(Fund):
    method __init__ (line 219) | def __init__(self, kind, date, first_use=False):
    method headers (line 255) | def headers(self):
    method crawl_lof (line 266) | def crawl_lof(self):
    method process_lof (line 274) | def process_lof(self, js_data):
    method crawl_etf (line 289) | def crawl_etf(self):
    method process_etf (line 308) | def process_etf(self, js_data):
    method run (line 322) | def run(self):
    method process_model (line 333) | def process_model(self, code, name, date, share, type_):
  function patch_fix_missing_data (line 369) | def patch_fix_missing_data():

FILE: fund/fund_share_monitor.py
  class ShareMonitor (line 15) | class ShareMonitor(Fund):
    method __init__ (line 17) | def __init__(self,):
    method query (line 23) | def query(self,code,date):

FILE: fund/fund_share_update.py
  class FundBaseInfoModel (line 29) | class FundBaseInfoModel(Base):
    method __str__ (line 44) | def __str__(self):
  class ShareModel (line 48) | class ShareModel(Base):
  class Fund (line 63) | class Fund(BaseService):
    method __init__ (line 64) | def __init__(self, first_use=False):
    method get_engine (line 69) | def get_engine(self):
    method create_table (line 72) | def create_table(self):
    method get_session (line 76) | def get_session(self):
    method get (line 79) | def get(self, url, retry=5, js=True):
  class SZFundShare (line 102) | class SZFundShare(Fund):
    method __init__ (line 104) | def __init__(self, first_use=False):
    method headers (line 121) | def headers(self):
    method convert (line 138) | def convert(self, float_str):
    method json_parse (line 146) | def json_parse(self, js_data):
    method extract_name (line 171) | def extract_name(self, name):
    method extract_code (line 174) | def extract_code(self, code):
    method extract_glrmc (line 177) | def extract_glrmc(self, glrmc):
    method model_process (line 182) | def model_process(self, jjlb, tzlb, ssrq, dqgm, glrmc, code, name, date):
    method convert_number (line 208) | def convert_number(self, s):
    method run (line 211) | def run(self):
  class SHFundShare (line 222) | class SHFundShare(Fund):
    method __init__ (line 224) | def __init__(self, kind,date,first_use=False):
    method headers (line 259) | def headers(self):
    method crawl_lof (line 270) | def crawl_lof(self):
    method process_lof (line 278) | def process_lof(self, js_data):
    method crawl_etf (line 293) | def crawl_etf(self):
    method process_etf (line 312) | def process_etf(self, js_data):
    method run (line 326) | def run(self):
    method process_model (line 336) | def process_model(self, code, name, date, share, type_):

FILE: fund/reits_data_crawler.py
  function reits_realtime_em (line 11) | def reits_realtime_em() -> pd.DataFrame:
  function get_reits_data (line 73) | def get_reits_data():

FILE: fund/reits_history.py
  class ReitsHistoryData (line 9) | class ReitsHistoryData:
    method __init__ (line 11) | def __init__(self):
    method crawl (line 14) | def crawl(self, code, ts):
    method gen_params (line 60) | def gen_params(self):
    method convert_int (line 75) | def convert_int(self, t):
    method convert_float (line 83) | def convert_float(self, f):
    method parse (line 91) | def parse(self, js_data, code):
    method run (line 108) | def run(self):
  class SQLCls (line 148) | class SQLCls:
    method __init__ (line 150) | def __init__(self):
    method insert_data (line 156) | def insert_data(self, item):
  function main (line 167) | def main():

FILE: fund/reits_netvalue.py
  class ReitsNetValue (line 14) | class ReitsNetValue:
    method __init__ (line 16) | def __init__(self):
    method parse (line 21) | def parse(self, js, code):
    method _crawl (line 33) | def _crawl(self, code):
    method _crawl_xueqiu (line 92) | def _crawl_xueqiu(self, code):
    method update_sql (line 137) | def update_sql(self, sql_str, data):
    method dump_mysql (line 147) | def dump_mysql(self, code, name, netvalue, updated):
    method parse_xueqiu (line 151) | def parse_xueqiu(self, content):
    method get_netvalue_by_code (line 158) | def get_netvalue_by_code(self, code, name):
    method read_sql (line 170) | def read_sql(self, sql_str, data):
    method get_all_codes (line 181) | def get_all_codes(self):
    method init_db (line 189) | def init_db(self):
    method run (line 193) | def run(self):

FILE: fund/run_sh_fundshare.py
  function main (line 10) | def main(kind,date='now'):

FILE: fund/sqlhelper.py
  class SQLHelper (line 7) | class SQLHelper():
    method __init__ (line 9) | def __init__(self,host,db_name):
    method query (line 14) | def query(self, sql_str, args):
    method update (line 26) | def update(self, sql_str, args=None):

FILE: fund/stop_purchase_lof_fund.py
  class FundPurchaseEm (line 40) | class FundPurchaseEm:
    method fund_purchase_em (line 43) | def fund_purchase_em(self,types) -> pd.DataFrame:
    method run (line 138) | def run(self):

FILE: fund/sz_etf.py
  function szse_etf (line 11) | def szse_etf():
  function szse_etf_detail (line 49) | def szse_etf_detail():

FILE: fund/ttfund_etf_holding.py
  class FundHolding (line 27) | class FundHolding():
    method __init__ (line 29) | def __init__(self, code, year,is_stock=True) -> None:
    method FLAG (line 37) | def FLAG(self):
    method get_content (line 40) | def get_content(self, code, year):
    method insert_mongodb (line 54) | def insert_mongodb(self, item):
    method parse (line 60) | def parse(self, content):
    method run (line 112) | def run(self):
  function main (line 122) | def main(year='2022', code='008331',is_stock=False):
  function paralle_run (line 126) | def paralle_run():

FILE: fund/ttjj.py
  class TTFund (line 25) | class TTFund(BaseService):
    method __init__ (line 30) | def __init__(self, key='股票'):
    method headers (line 49) | def headers(self):
    method mongo (line 63) | def mongo(self):
    method rank (line 66) | def rank(self):
    method category_rank (line 73) | def category_rank(self, key, time_interval):
    method save_data (line 90) | def save_data(self, rank_list):
    method parse (line 96) | def parse(self, rp):
    method key_remap (line 104) | def key_remap(self, rank_data, type_):
    method turnover_rate (line 125) | def turnover_rate(self):
    method is_crawl (line 140) | def is_crawl(self, db, code, cond):
    method __turnover_rate (line 143) | def __turnover_rate(self, code):
    method get_turnover_db (line 149) | def get_turnover_db(self):
    method __parse_turnover_data (line 152) | def __parse_turnover_data(self, jquery_data, code):
    method fund_detail (line 162) | def fund_detail(self, db, code):
    method parse_detail_info (line 199) | def parse_detail_info(self, content):
    method update_basic_info (line 212) | def update_basic_info(self):
    method get_basic_db (line 215) | def get_basic_db(self):
    method basic_info (line 218) | def basic_info(self):
    method convert_data_type (line 231) | def convert_data_type(self):
    method get_fund (line 243) | def get_fund(self,page):
    method get_funds (line 260) | def get_funds(self):
  function main (line 265) | def main(kind, option):

FILE: fund/ttjj_others.py
  function rank_data_crawl (line 8) | def rank_data_crawl(time_interval='3n', ft='all'):
  function get_allFund_content (line 33) | def get_allFund_content(single_fund_url):
  function old_main (line 92) | def old_main():

FILE: fund/xueqiu_private_fund.py
  class PrivateFund (line 14) | class PrivateFund(BaseService):
    method __init__ (line 16) | def __init__(self):
    method get_cookies (line 24) | def get_cookies(self):
    method headers (line 28) | def headers(self):
    method update_with_missing_data (line 42) | def update_with_missing_data(self):
    method update_db (line 52) | def update_db(self, data):
    method isExist (line 59) | def isExist(self, code):
    method run (line 62) | def run(self):
    method init_db (line 71) | def init_db(self):
    method parse (line 74) | def parse(self, content):
    method store_db (line 81) | def store_db(self, data):
    method debug (line 84) | def debug(self):
    method get_details (line 90) | def get_details(self):
    method get_detail (line 94) | def get_detail(self, code):
    method update_create_publish_date (line 103) | def update_create_publish_date(self, code, create_date, publish_date):
    method parse_detail (line 107) | def parse_detail(self, content):
    method this_year_vshs300 (line 128) | def this_year_vshs300(self,code):
    method isCrawl (line 136) | def isCrawl(self, symbol):
    method checkValid (line 142) | def checkValid(self, content):
    method get_ (line 144) | def get_(self, url, _json=False, binary=False, retry=5):
    method fund (line 189) | def fund(self, symbol):
    method parse_detect (line 223) | def parse_detect(self, symbol, content):
    method get_all_code (line 282) | def get_all_code(self):
    method generate_code (line 288) | def generate_code(self):
    method brute_force (line 297) | def brute_force(self):
    method seq_run (line 306) | def seq_run(self):
    method update_nick_name (line 311) | def update_nick_name(self):
    method update_normal (line 322) | def update_normal(self,code,normal_item):
    method this_year_return (line 329) | def this_year_return(self):
  function main (line 343) | def main():

FILE: futu/basic_usage.py
  function deep_print (line 3) | def deep_print(obj):

FILE: futu/subscribe.py
  class OrderBookTest (line 3) | class OrderBookTest(OrderBookHandlerBase):
    method on_recv_rsp (line 4) | def on_recv_rsp(self, rsp_pb):

FILE: futu/util.py
  function deep_print (line 3) | def deep_print(obj):

FILE: hk_stock/aastock_new_stock.py
  class AAStockNewStock (line 24) | class AAStockNewStock(BaseService):
    method __init__ (line 26) | def __init__(self):
    method create_table (line 31) | def create_table(self):
    method fetch (line 59) | def fetch(self, page):
    method convert_float (line 76) | def convert_float(self, data):
    method convert_date (line 94) | def convert_date(self, data_str):
    method convert_hand_int (line 103) | def convert_hand_int(self, data):
    method parse (line 110) | def parse(self, content):
    method run (line 148) | def run(self):
    method clear_data (line 159) | def clear_data(self):
  function main (line 164) | def main():

FILE: hk_stock/new_stock_release.py
  class HKNewStock (line 17) | class HKNewStock(BaseService):
    method __init__ (line 19) | def __init__(self):
    method get_engine (line 27) | def get_engine(self):
    method doc (line 31) | def doc(self):
    method headers (line 35) | def headers(self):
    method form_data (line 53) | def form_data(self, page):
    method crawl (line 61) | def crawl(self):
    method parse (line 73) | def parse(self, content):
    method insert_mongo (line 86) | def insert_mongo(self, data):
    method rename (line 108) | def rename(self):
    method run (line 128) | def run(self):

FILE: jisilu_bond_release.py
  function main (line 8) | def main():

FILE: jisilu_daily.py
  function run (line 8) | def run(remote='qq'):

FILE: jubi.py
  class Jubi_web (line 21) | class Jubi_web():
    method __init__ (line 22) | def __init__(self, send=None):
    method send_wechat (line 66) | def send_wechat(self, name, content, user):
    method send_text (line 72) | def send_text(self, name, content):
    method warming (line 88) | def warming(self, coin, up_price, down_price, user):
    method getContent (line 122) | def getContent(self):
    method getHash (line 127) | def getHash(self, s):
    method sha_convert (line 132) | def sha_convert(self, s):
    method get_nonce (line 135) | def get_nonce(self):
    method get_signiture (line 139) | def get_signiture(self):
    method real_time_ticker (line 156) | def real_time_ticker(self, coin):
    method real_time_depth (line 166) | def real_time_depth(self, coin):
    method list_all_price (line 183) | def list_all_price(self):
    method getOrder (line 191) | def getOrder(self, coin):
    method turnover (line 202) | def turnover(self, coin):
    method multi_thread (line 217) | def multi_thread(self, coin_list, price_list, username):

FILE: k-line/basic_usage.py
  function get_k_data (line 7) | def get_k_data(code="sz123073",name="同和转债k.xlsx"):
  function kline_demo (line 14) | def kline_demo():
  function axis_date (line 25) | def axis_date():
  function ma_line (line 57) | def ma_line():
  function add_vol (line 102) | def add_vol():
  function long_up_shadow (line 146) | def long_up_shadow(o,c,h,l):
  function run (line 150) | def run():

FILE: k-line/main.py
  function main (line 3) | def main():

FILE: k-line/recognize_form.py
  function two_crow (line 9) | def two_crow():
  function plot_image (line 43) | def plot_image(df,target):

FILE: k-line/search_target.py
  function plot (line 19) | def plot(df):
  function get_all_codes (line 49) | def get_all_codes():
  function get_daily (line 53) | def get_daily(code):
  function search (line 57) | def search(df):
  function run (line 74) | def run():

FILE: k_line.py
  class Kline (line 24) | class Kline(BaseService):
    method __init__ (line 25) | def __init__(self):
    method store_base_data (line 35) | def store_base_data(self, target):
    method store_hist_data (line 48) | def store_hist_data(self):
    method get_hist_data (line 58) | def get_hist_data(self, code, name, start_data):
    method inital_data (line 74) | def inital_data(self, target):
    method _xiayingxian (line 79) | def _xiayingxian(self, row, ratio):
    method store_data_not (line 114) | def store_data_not(self):
    method redis_init (line 119) | def redis_init(self):
    method get_hist_line (line 127) | def get_hist_line(self, date):
    method add_code_redis (line 147) | def add_code_redis(self):
  function get_hist_data (line 170) | def get_hist_data(code, name, start_data):
  class StockThread (line 192) | class StockThread(Thread):
    method __init__ (line 193) | def __init__(self, loop):
    method run (line 198) | def run(self):
    method loops (line 201) | def loops(self):
  function StoreData (line 225) | def StoreData():
  function main (line 238) | def main():

FILE: longhuban.py
  function get_content (line 6) | def get_content(url,retry=5):
  function convert_json (line 20) | def convert_json(url):
  function convert_json (line 36) | def convert_json(url,pattern):
  function get_result (line 57) | def get_result():

FILE: machine_learning/贝叶斯预测涨跌.py
  function apply_func (line 32) | def apply_func(x):

FILE: monitor/alert_me.py
  function main (line 11) | def main(monitor_type='jsl'):

FILE: monitor/big_deal.py
  class Monitor_Stock (line 17) | class Monitor_Stock(BaseService):
    method __init__ (line 18) | def __init__(self):
    method getBigDeal (line 22) | def getBigDeal(self, code, vol):
    method init_market (line 35) | def init_market(self):
    method run (line 47) | def run(self):
  function main (line 57) | def main():

FILE: monitor/ceiling_break.py
  class BreakMonitor (line 24) | class BreakMonitor(BaseService):
    method __init__ (line 26) | def __init__(self, send=True):
    method read_stock_list (line 33) | def read_stock_list(self, file=None):
    method percent (line 43) | def percent(self, current, close):
    method break_ceil (line 47) | def break_ceil(self, code):
    method monitor_break (line 81) | def monitor_break(self):

FILE: monitor/crawler_monitor.py
  class Monitor (line 10) | class Monitor:
    method __init__ (line 12) | def __init__(self):
    method jsl_data_monitor (line 15) | def jsl_data_monitor(self):
    method run (line 53) | def run(self):
  function main (line 57) | def main():

FILE: monitor/jsl_monitor.py
  class ReachTargetJSL (line 33) | class ReachTargetJSL(BaseService):
    method __init__ (line 34) | def __init__(self):
    method get_session (line 73) | def get_session(self):
    method get (line 76) | def get(self, *args, **kwargs):
    method redis_client_init (line 90) | def redis_client_init(self):
    method send_redis (line 94) | def send_redis(self,data_list,key):
    method once (line 111) | def once(self):
    method fetch_data (line 117) | def fetch_data(self):
    method realtime_fetch (line 151) | def realtime_fetch(self):
    method monitor (line 162) | def monitor(self):

FILE: monitor/realtime_monitor_ts.py
  class ReachTarget (line 33) | class ReachTarget(BaseService):
    method __init__ (line 35) | def __init__(self):
    method all_bond_market (line 64) | def all_bond_market(self):
    method stock_pool (line 80) | def stock_pool(self):
    method identify_market (line 87) | def identify_market(self, x):
    method get_current_position (line 94) | def get_current_position(self):
    method zg_bond (line 124) | def zg_bond(self):
    method monitor (line 139) | def monitor(self, total_market=True):
    method get_realtime_info (line 185) | def get_realtime_info(self, codes, has_sent, types, stock, yjl, percent):
    method get_price_diff (line 250) | def get_price_diff(self, codes, has_sent_, types, kzz_stocks, kzz_stoc...

FILE: monitor/server_api.py
  class ServerAPI (line 4) | class ServerAPI(ReachTargetJSL):
    method __init__ (line 6) | def __init__(self):
    method update (line 9) | def update(self):

FILE: new_stock_break.py
  class NewStockBreak (line 12) | class NewStockBreak():
    method __init__ (line 13) | def __init__(self,start_date=20170101,end_date=20170401):
    method calc_open_by_percent (line 30) | def calc_open_by_percent(self,code):
    method calc_open_day (line 68) | def calc_open_day(self,code):
    method testcase (line 96) | def testcase(self):
    method getData (line 122) | def getData(self,filename):
  function main (line 153) | def main():

FILE: new_stock_fund.py
  class TianTianFund (line 21) | class TianTianFund():
    method __init__ (line 22) | def __init__(self):
    method get_fund (line 34) | def get_fund(self):
    method start (line 70) | def start(self):

FILE: pledged_validation.py
  function pledge_info (line 20) | def pledge_info():
  function pledged_detail (line 45) | def pledged_detail():
  function do_calculation (line 54) | def do_calculation():

FILE: plot_line.py
  function get_basic_info (line 34) | def get_basic_info():
  function check_path (line 40) | def check_path(root_path,current,filename):
  function plot_stock_line (line 51) | def plot_stock_line(api,code, name, table_type, current, root_path,start...

FILE: ptrade/逆回购.py
  function reverse_repurchase (line 6) | def reverse_repurchase(context):
  function initialize (line 18) | def initialize(context):

FILE: real_time_big_deal.py
  class BigMonitor (line 14) | class BigMonitor():
    method __init__ (line 15) | def __init__(self):
    method loop (line 25) | def loop(self,code):
    method multi_thread (line 48) | def multi_thread(self,code_list):
    method testcase (line 58) | def testcase(self):
  function main (line 61) | def main():

FILE: recordMyChoice.py
  class Prediction_rate (line 19) | class Prediction_rate():
    method __init__ (line 21) | def __init__(self):
    method stock_pool (line 32) | def stock_pool(self, stock_list):
    method first_record (line 35) | def first_record(self, stockID):
    method update (line 63) | def update(self):
  class StockRecord (line 73) | class StockRecord:
    method __init__ (line 75) | def __init__(self):
    method holding_stock_sql (line 82) | def holding_stock_sql(self):
    method delete (line 105) | def delete(self, content):
    method insert (line 110) | def insert(self, code, name, safe_price, count):
    method _exe (line 124) | def _exe(self, cmd):
    method update_daily (line 136) | def update_daily(self):
    method update_item (line 161) | def update_item(self, code, content):
    method update_sold (line 165) | def update_sold(self):

FILE: relationship_case.py
  function ban_share (line 13) | def ban_share(code,name):
  function read_index (line 51) | def read_index():
  function main (line 60) | def main():

FILE: select_stock.py
  class filter_stock (line 22) | class filter_stock():
    method __init__ (line 23) | def __init__(self,retry=5,local=False):
    method save_data_excel (line 53) | def save_data_excel(self):
    method insert_garbe (line 61) | def insert_garbe(self):
    method showInfo (line 65) | def showInfo(self, df):
    method count_area (line 76) | def count_area(self, writeable=False):
    method get_area (line 85) | def get_area(self, area, writeable=False):
    method get_all_location (line 94) | def get_all_location(self):
    method fetch_new_ipo (line 102) | def fetch_new_ipo(self, start_time, writeable=False):
    method get_chengfenggu (line 118) | def get_chengfenggu(self, writeable=False):
    method drop_down_from_high (line 129) | def drop_down_from_high(self, start, code):
    method loop_each_cixin (line 148) | def loop_each_cixin(self):
    method macd (line 169) | def macd(self):
    method get_all_code (line 199) | def get_all_code(self):
    method volume_calculate (line 203) | def volume_calculate(self, codes):
    method turnover_check (line 245) | def turnover_check(self):
    method write_to_text (line 266) | def write_to_text(self):
    method saveList (line 278) | def saveList(self, l, name):
    method read_csv (line 292) | def read_csv(self):
    method own_drop_down (line 298) | def own_drop_down(self):
    method _break_line (line 305) | def _break_line(self, codes, k_type):
    method break_line (line 343) | def break_line(self, code, k_type='20', writeable=False, mystock=False):
    method _break_line_thread (line 360) | def _break_line_thread(self, codes, k_type='5'):
    method multi_thread_break_line (line 395) | def multi_thread_break_line(self, ktype='20'):
    method relation (line 433) | def relation(self):
    method profit (line 451) | def profit(self):
    method mydaily_check (line 477) | def mydaily_check(self):
    method all_stock (line 480) | def all_stock(self):
  function get_break_bvps (line 484) | def get_break_bvps():
  function main (line 492) | def main():

FILE: shareholder_info.py
  class ShareHolderInfo (line 15) | class ShareHolderInfo():
    method __init__ (line 19) | def __init__(self):
    method db_init (line 23) | def db_init(self):
    method init_mongo (line 27) | def init_mongo(self):
    method tushare_init (line 32) | def tushare_init(self):
    method exists (line 35) | def exists(self, code):
    method get_stock_list (line 39) | def get_stock_list(self, exchange):
    method create_date (line 45) | def create_date():
    method get_stockholder (line 56) | def get_stockholder(self, code, start, end):
    method dumpMongo (line 84) | def dumpMongo(self, doc, df):
    method valid_code (line 95) | def valid_code(self, code):
    method run (line 98) | def run(self):
  function main (line 124) | def main():

FILE: statistices.py
  function percentage (line 11) | def percentage(sold,buy):
  function plan_buy_price (line 21) | def plan_buy_price(sold,percent):

FILE: stockInfo.py
  function create_tb (line 39) | def create_tb(conn):
  function getinfo (line 52) | def getinfo(days=-30):

FILE: stock_check.py
  class CheckStock (line 18) | class CheckStock():
    method __init__ (line 19) | def __init__(self):
    method multi_thread (line 30) | def multi_thread(self):
    method get_info (line 42) | def get_info(self,id):
    method multi_process (line 95) | def multi_process(self):
    method show_name (line 128) | def show_name(self):
    method sinle_thread (line 145) | def sinle_thread(self,start,end):
    method scan_all (line 153) | def scan_all(self):
    method monitor (line 171) | def monitor(self):
  function sub_process_ratio (line 180) | def sub_process_ratio(i,q):
  function testcase1 (line 226) | def testcase1(i,j,q):
  function multi_process (line 230) | def multi_process():

FILE: store_data.py
  class TS_DB (line 9) | class TS_DB():
    method __init__ (line 10) | def __init__(self):
    method save_csv (line 14) | def save_csv(self,code):

FILE: strategy_verify.py
  function create_table (line 16) | def create_table(strategy):
  function insert (line 41) | def insert(strategy,date_time,code,name,trigger_time,profit,trigger_pric...
  class Strategy (line 62) | class Strategy():
    method __init__ (line 64) | def __init__(self):
    method getData (line 74) | def getData(self,page):
    method show_strategy (line 81) | def show_strategy(self):
    method getStock (line 110) | def getStock(self,strategy,page):
    method dataStore_SQLite (line 122) | def dataStore_SQLite(self,strategy,page):
    method dataFilter (line 161) | def dataFilter(self,strategy,page):
    method DataDup (line 183) | def DataDup(self,strategy):
    method loops (line 204) | def loops(self):
    method monitor (line 213) | def monitor(self,strategy):
  function main (line 234) | def main():

FILE: toolkit.py
  class Toolkit (line 10) | class Toolkit():
    method save2file (line 12) | def save2file( filename, content):
    method save2filecn (line 20) | def save2filecn( filename, content):
    method getUserData (line 28) | def getUserData(cfg_file):
    method read_stock (line 40) | def read_stock(cfg_file):

FILE: trader/auto_trader.py
  class AutoTrader (line 20) | class AutoTrader():
    method __init__ (line 22) | def __init__(self):
    method get_close_price (line 40) | def get_close_price(self):
    method set_ceiling (line 59) | def set_ceiling(self):
    method get_candidates (line 79) | def get_candidates(self):
    method get_market_data (line 85) | def get_market_data(self):
    method get_blacklist (line 90) | def get_blacklist(self):
    method morning_start (line 95) | def morning_start(self, p):
    method get_position (line 133) | def get_position(self):
    method get_position_df (line 144) | def get_position_df(self):
    method save_position (line 150) | def save_position(self):
    method llogger (line 160) | def llogger(self, filename):
    method end (line 179) | def end(self):

FILE: utils/delivery_order.py
  class DeliveryOrder (line 22) | class DeliveryOrder():
    method __init__ (line 24) | def __init__(self):
    method db_init (line 29) | def db_init(self):
    method setpath (line 34) | def setpath(self, path):
    method merge_data_HuaBao (line 41) | def merge_data_HuaBao(self, filename):
    method years_ht (line 95) | def years_ht(self):
    method caculation (line 125) | def caculation(self, df):
    method month (line 131) | def month(self):
    method years_gj (line 135) | def years_gj(self):
    method file_exists (line 165) | def file_exists(self, filepath):
    method years_gj_each_month_day (line 169) | def years_gj_each_month_day(self, filename):
    method pretty (line 219) | def pretty(self):
    method data_sync (line 227) | def data_sync(self):
    method bank_account (line 258) | def bank_account(self):
  function GJfunc (line 290) | def GJfunc(obj, path, name):
  function HBfunc (line 302) | def HBfunc(obj, path, name):
  function main (line 307) | def main(broker, name):

FILE: utils/profit_compare.py
  class ProfitTool (line 2) | class ProfitTool:
    method __init__ (line 4) | def __init__(self,codes) -> None:
  function main (line 15) | def main(codes):

FILE: utils/push_msn.py
  class MailSend (line 16) | class MailSend():
    method __init__ (line 17) | def __init__(self, smtp_server, from_mail, password, to_mail):
    method send_txt (line 26) | def send_txt(self, name, price, percent, status):
  function push_msg (line 54) | def push_msg(name, price, percent, status):
  function read_stock (line 63) | def read_stock(name):
  function meet_price (line 78) | def meet_price(code, price_up, price_down,type):
  function meet_percent (line 110) | def meet_percent(code, percent_up, percent_down,type):
  function general_info (line 144) | def general_info():
  function break_ceil (line 160) | def break_ceil(code):
  function monitor_break (line 181) | def monitor_break():
  function visual (line 185) | def visual():
  function main (line 194) | def main():

FILE: yesterday_zt_monitor.py
  class PlotYesterdayZT (line 18) | class PlotYesterdayZT(BaseService):
    method __init__ (line 20) | def __init__(self):
    method get_data (line 24) | def get_data(self,table):
    method plot_yesterday_zt (line 37) | def plot_yesterday_zt(self,api,type_name='zrzt', current=datetime.date...
  function main (line 51) | def main(current=None):
Condensed preview — 207 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (5,142K chars).
[
  {
    "path": ".gitattributes",
    "chars": 125,
    "preview": "*.js linguist-language=python\n*.css linguist-language=python\n*.ipynb linguist-language=python\n*.html linguist-language=p"
  },
  {
    "path": ".gitignore",
    "chars": 385,
    "preview": "*.pyc\n.DS_Store\ndata.cfg\n/.idea\n*.xml\n*.html\n/private\n.ipynb_checkpoints/\n*.log\n*.pkl\nstock_list.txt\nbases.csv\nyanbao/\n*"
  },
  {
    "path": "LICENSE",
    "chars": 1514,
    "preview": "Copyright (c) Stock developers.\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without"
  },
  {
    "path": "README.MD",
    "chars": 4911,
    "preview": "### 更好的帮助自己炒股(亏钱-。-)\n\n#### 2022-12-08 更新\n\n目前正在重构项目代码,目录结构可能与下面描述有些出入,后期会慢慢更新修改,感谢大家的关注与支持。\n\n---\n\n*analysis/ 数据分析部分*\n\n*da"
  },
  {
    "path": "StockAnalyze.py",
    "chars": 6863,
    "preview": "'''\n@author:rocky\n@email:weigesysu@qq.com\n@feature: 收盘事后分析\n'''\n\nfrom configure.settings import DBSelector\nimport pandas "
  },
  {
    "path": "__init__.py",
    "chars": 108,
    "preview": "# -*- coding: utf-8 -*-\n# @Time : 2020/11/21 0:12\n# @File : __init__.py\n# @Author : Rocky C@www.30daydo.com\n"
  },
  {
    "path": "analysis/FOF_Duanjuan_fund.ipynb",
    "chars": 49144,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 37,\n   \"metadata\": {\n    \"collapsed\": true\n   },\n   \"out"
  },
  {
    "path": "analysis/Untitled.ipynb",
    "chars": 60710,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "analysis/Untitled1.ipynb",
    "chars": 30335,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "analysis/apply_people_count.ipynb",
    "chars": 25552,
    "preview": "{\n \"metadata\": {\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_ext"
  },
  {
    "path": "analysis/bond_daily_report.py",
    "chars": 414,
    "preview": "import sys\n\nsys.path.append('..')\nimport pandas as pd\nfrom configure.settings import DBSelector\nfrom configure.util impo"
  },
  {
    "path": "analysis/closed_fund_analysis.ipynb",
    "chars": 36025,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 24,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n"
  },
  {
    "path": "analysis/closed_fund_backtest.ipynb",
    "chars": 833,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "analysis/column_between_hours.ipynb",
    "chars": 4802,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": "
  },
  {
    "path": "analysis/daily_zt_report.py",
    "chars": 1548,
    "preview": "# -*-coding=utf-8-*-\n\n'''\n__author__ = 'Rocky'\nhttp://30daydo.com\nEmail: weigesysu@qq.com\n每日涨停报告\n'''\n\nimport datetime\nim"
  },
  {
    "path": "analysis/data_sync_uqer.ipynb",
    "chars": 5717,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 40,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n"
  },
  {
    "path": "analysis/deal_company_analysis.ipynb",
    "chars": 50240,
    "preview": "{\n \"metadata\": {\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_ext"
  },
  {
    "path": "analysis/df_sql_analysis.ipynb",
    "chars": 16836,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "analysis/diagnose_stock.py",
    "chars": 1959,
    "preview": "# -*-coding=utf-8-*-\n\n__author__ = 'Rocky'\n'''\nhttp://30daydo.com\nEmail: weigesysu@qq.com\n'''\nimport sys\n\nsys.path.appen"
  },
  {
    "path": "analysis/fd_money.py",
    "chars": 1980,
    "preview": "# @Time : 2020/1/14 0:05\n# @File : fd_money.py\n# 涨停封单数据\n\nfrom configure.settings import DBSelector\nimport datetime\nimpor"
  },
  {
    "path": "analysis/filterstock.py",
    "chars": 9728,
    "preview": "# -*-coding=utf-8-*-\n'''\n__author__ = 'Rocky'\nemail: weigesysu@qq.com\n'''\nimport datetime\nimport tushare as ts\nimport os"
  },
  {
    "path": "analysis/fupan.py",
    "chars": 4700,
    "preview": "# -*-coding=utf-8-*-\n\n__author__ = 'Rocky'\n'''\nhttp://30daydo.com\nContact: weigesysu@qq.com\n'''\n\n__doc__='''\n复盘数据与流程\n'''"
  },
  {
    "path": "analysis/get_break_high_low.py",
    "chars": 3506,
    "preview": "# -*-coding=utf-8-*-\nimport time\n\n__author__ = 'rocky'\n# 获取破指定天数内的新高 比如破60日新高\nimport tushare as ts\nimport datetime\nimpor"
  },
  {
    "path": "analysis/hk_new_stock_ratio.ipynb",
    "chars": 1101255,
    "preview": "{\n \"metadata\": {\n  \"orig_nbformat\": 2,\n  \"kernelspec\": {\n   \"name\": \"python3\",\n   \"display_name\": \"Python 3\",\n   \"langua"
  },
  {
    "path": "analysis/hugutong.ipynb",
    "chars": 47737,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "analysis/index_stock.ipynb",
    "chars": 72101,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "analysis/ipospeed.py",
    "chars": 3696,
    "preview": "# -*-coding=utf-8-*-\n__author__ = 'Rocky'\n'''\nhttp://30daydo.com\nContact: weigesysu@qq.com\n'''\n# 查看ipo速度 和指数的关系\nimport t"
  },
  {
    "path": "analysis/jucao_annnounce_parse.py",
    "chars": 4324,
    "preview": "# -*- coding: utf-8 -*-\n# @Time : 2021/4/21 19:01\n# @File : jucao_annnounce_parse.py\n# @Author : Rocky C@www.30daydo.com"
  },
  {
    "path": "analysis/last_year_price.ipynb",
    "chars": 42636,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "analysis/levt_notebook.ipynb",
    "chars": 38189,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\":"
  },
  {
    "path": "analysis/location.ipynb",
    "chars": 3065,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "analysis/longhuban.ipynb",
    "chars": 23713,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 4,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "analysis/plot_test.ipynb",
    "chars": 247606,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "analysis/query.ipynb",
    "chars": 74052,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\":"
  },
  {
    "path": "analysis/realtime_monitor.ipynb",
    "chars": 15028,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "analysis/recall_bond.py",
    "chars": 300,
    "preview": "import pandas\nimport pandas as pd\n\ndf = pd.read_excel('../回售.xlsx')\n# print(df)\nhit_recall_df = df[df['最新转股价']<df['回售触发价"
  },
  {
    "path": "analysis/reits区间涨幅.ipynb",
    "chars": 12940,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "analysis/stock_analysis.ipynb",
    "chars": 58597,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "analysis/topTenHolder.ipynb",
    "chars": 47967,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 14,\n   \"metadata\": {\n    \"collapsed\": true\n   },\n   \"out"
  },
  {
    "path": "analysis/trade_frequency.ipynb",
    "chars": 15184,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": "
  },
  {
    "path": "analysis/xueqiu_private.ipynb",
    "chars": 52325,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "analysis/东北债.ipynb",
    "chars": 28640,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 2,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\":"
  },
  {
    "path": "analysis/乖离率计算.ipynb",
    "chars": 1311,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "analysis/公众号绘制收益率曲线.ipynb",
    "chars": 172860,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "analysis/基金分析.ipynb",
    "chars": 52683,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "analysis/基金年度收益.ipynb",
    "chars": 189727,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "analysis/收益率曲线绘制.ipynb",
    "chars": 3680,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": null,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": "
  },
  {
    "path": "analysis/新闻分析.ipynb",
    "chars": 7396,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "analysis/每日分析模板.ipynb",
    "chars": 20851,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 19,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n"
  },
  {
    "path": "analysis/私募基金收益率.ipynb",
    "chars": 73631,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 5,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "analysis/统计分时最大站跌幅.ipynb",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "analysis/退市转债分析.ipynb",
    "chars": 77148,
    "preview": "{\n \"metadata\": {\n  \"language_info\": {\n   \"codemirror_mode\": {\n    \"name\": \"ipython\",\n    \"version\": 3\n   },\n   \"file_ext"
  },
  {
    "path": "analysis/选股.ipynb",
    "chars": 192938,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\":"
  },
  {
    "path": "analysis/雪球私募收益率分析.ipynb",
    "chars": 146052,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "analysis/雪球赏金.ipynb",
    "chars": 12203,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "backtest/backtrader-course-lession1.py",
    "chars": 4124,
    "preview": "from __future__ import (absolute_import, division, print_function,\n                        unicode_literals)\n\nimport bac"
  },
  {
    "path": "backtest/dataframe-feed.py",
    "chars": 2023,
    "preview": "from __future__ import (absolute_import, division, print_function,\n                        unicode_literals)\n\nimport arg"
  },
  {
    "path": "backtest/datapath.py",
    "chars": 45,
    "preview": "ROOT = '/home/xda/othergit/backtrader/datas/'"
  },
  {
    "path": "backtest/examle1/sma-demo.py",
    "chars": 3259,
    "preview": "# -*- coding:utf-8 -*-\n\n\nimport backtrader as bt\n\nimport datetime\n\n\nclass TestStrategy(bt.Strategy):\n    \"\"\"\n    继承并构建自己"
  },
  {
    "path": "backtest/ma_line_backtest.py",
    "chars": 1206,
    "preview": "import backtrader as bt\nimport pandas as pd\nimport datetime as dt\n\n\nclass MyStrategy(bt.Strategy):\n    def __init__(self"
  },
  {
    "path": "common/Base.py",
    "chars": 382,
    "preview": "# -*- coding: utf-8 -*-\n# @Time : 2021/4/2 20:02\n# @File : Base.py\n# @Author : Rocky C@www.30daydo.com\n\n\nimport xcsc_tus"
  },
  {
    "path": "common/BaseService.py",
    "chars": 6719,
    "preview": "# -*-coding=utf-8-*-\nimport datetime\nimport json\nimport os\nimport re\nimport time\nimport requests\nimport parsel\nfrom logu"
  },
  {
    "path": "common/SecurityBase.py",
    "chars": 373,
    "preview": "# -*- coding: utf-8 -*-\n# @Time : 2020/11/26 15:14\n# @File : SecurityBase.py\n# @Author : Rocky C@www.30daydo.com\n\nimport"
  },
  {
    "path": "common/TushareUtil.py",
    "chars": 1603,
    "preview": "# -*- coding: utf-8 -*-\n# @Time : 2021/4/2 18:08\n# @File : TushareUtil.py\n# @Author : Rocky C@www.30daydo.com\nimport tus"
  },
  {
    "path": "common/__init__.py",
    "chars": 109,
    "preview": "# -*- coding: utf-8 -*-\n# @Time : 2020/11/16 11:39\n# @File : __init__.py\n# @Author : Rocky C@www.30daydo.com\n"
  },
  {
    "path": "common/aes.py",
    "chars": 1044,
    "preview": "import sys\nimport base64\nfrom Crypto.Cipher import AES\nfrom Crypto import Random\nimport os\nimport base64\nimport json\nfro"
  },
  {
    "path": "common/pdf_convertor.py",
    "chars": 657,
    "preview": "# -*- coding: utf-8 -*-\n# @Time : 2021/3/19 1:01\n# @File : pdf_convertor.py\n# @Author : Rocky C@www.30daydo.com\n\n\nimport"
  },
  {
    "path": "daily/fupan.ipynb",
    "chars": 20718,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 9,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "datahub/A_stock_daily_info.py",
    "chars": 766,
    "preview": "# -*- coding: utf-8 -*-\n# @Time : 2022/12/29 16:29\n# @File : A_stock_daily_info.py\n# @Author : Rocky C@www.30daydo.com\n\n"
  },
  {
    "path": "datahub/SPSIOP_PRICE.py",
    "chars": 3139,
    "preview": "# -*-coding=utf-8-*-\n\n# @Time : 2019/10/20 23:14\n# @File : SPSIOP_PRICE.py\n# 获取SPSIOP的价格,每天早上美股收盘\n# 先获取xop的前一天的涨幅,然后在前一天"
  },
  {
    "path": "datahub/__init__.py",
    "chars": 112,
    "preview": "# -*- coding: utf-8 -*-\n# @Time : 2020/11/21 0:02\n# @File : __init__.py.py\n# @Author : Rocky C@www.30daydo.com\n\n"
  },
  {
    "path": "datahub/basic_market_info.py",
    "chars": 1791,
    "preview": "__author__ = 'Rocky'\n'''\nhttp://30daydo.com\nContact: weigesysu@qq.com\n'''\n\nimport datetime\nimport time\nimport tushare as"
  },
  {
    "path": "datahub/black_list_sql.py",
    "chars": 2363,
    "preview": "# -*-coding=utf-8-*-\n# 股市黑名单\nimport sys\n\nsys.path.append('..')\nfrom configure.settings import DBSelector, config\nimport "
  },
  {
    "path": "datahub/bond_industry_info.py",
    "chars": 2858,
    "preview": "# -*- coding: utf-8 -*-\n# @Time : 2021/8/9 11:56\n# @File : bond_industry_info.py\n# @Author : Rocky C@www.30daydo.com\nimp"
  },
  {
    "path": "datahub/daily_stock_market_info.py",
    "chars": 2903,
    "preview": "# -*-coding=utf-8-*-\n__author__ = 'Rocky'\n'''\nhttp://30daydo.com\nContact: weigesysu@qq.com\n'''\n# 获取每天的行情信息\nimport tushar"
  },
  {
    "path": "datahub/dfcf_hot_block.py",
    "chars": 13831,
    "preview": "# 东财涨停板\nimport sys\n\nsys.path.append('..')\nimport datetime\nimport pandas as pd\nimport requests\nimport re\nfrom configure.u"
  },
  {
    "path": "datahub/foreignexchange.py",
    "chars": 2175,
    "preview": "# -*-coding=utf-8-*-\n# @Time : 2018/8/7 13:45\n# @File : foreignexchange.py\n# 实时获取外汇\n\nimport re\nimport datetime\nimport re"
  },
  {
    "path": "datahub/industry_info/ak_bk.py",
    "chars": 214,
    "preview": "import akshare as ak\n#\nstock_board_industry_summary_ths_df = ak.stock_board_industry_summary_ths()\n# print(stock_board_i"
  },
  {
    "path": "datahub/industry_info/cookies.txt",
    "chars": 60,
    "preview": "A3DdP9F344FZZ7-FjUIT2mvvQD_CuVQDdp2oB2rBPEueJRDPEskkk8ateJa5"
  },
  {
    "path": "datahub/industry_info/ths_industry_cralwer_top.py",
    "chars": 5656,
    "preview": "import time\nfrom parsel import Selector\nimport requests\nfrom data_dump import DataDump\nfrom cookies_generator import gen"
  },
  {
    "path": "datahub/industry_info/ths_industry_detail.py",
    "chars": 6404,
    "preview": "import requests\nimport time\nfrom parsel import Selector\nimport requests\nfrom data_dump import DataDump\nfrom cookies_gene"
  },
  {
    "path": "datahub/industry_info/ths_industry_list.py",
    "chars": 4840,
    "preview": "import sys\n\nsys.path.append('../../')\nfrom configure.settings import config\nfrom parsel import Selector\nimport requests\n"
  },
  {
    "path": "datahub/jisilu.py",
    "chars": 14515,
    "preview": "# -*-coding=utf-8-*-\n__author__ = 'Rocky'\n'''\nhttp://30daydo.com\nContact: weigesysu@qq.com\n'''\nimport sys\n\nsys.path.appe"
  },
  {
    "path": "datahub/jisilu_bond_announcement.py",
    "chars": 5368,
    "preview": "# 集思录可转债公告数据\nimport datetime\nimport time\nimport pandas as pd\nimport requests\nimport sys\nsys.path.append('..')\nfrom confi"
  },
  {
    "path": "datahub/js_file/encode_jsl.js",
    "chars": 126101,
    "preview": "    var CryptoJS = CryptoJS || (function(Math, undefined) {\n        var create = Object.create || (function() {\n        "
  },
  {
    "path": "datahub/jsl_login.py",
    "chars": 2908,
    "preview": "# -*- coding: utf-8 -*-\n# @Time : 2021/7/26 15:59\n# @File : jsl_login.py\n# @Author : Rocky C@www.30daydo.com\n\n\nimport da"
  },
  {
    "path": "datahub/jucao_announcement.py",
    "chars": 6639,
    "preview": "# -*- coding: utf-8 -*-\n# @Time : 2021/4/21 0:35\n# @File : jucao_announcement.py\n# @Author : Rocky C@www.30daydo.com\n\n# "
  },
  {
    "path": "datahub/jucao_reits_notice.py",
    "chars": 4725,
    "preview": "# 上交所 公告\nimport datetime\nimport re\nimport sys\nimport os\nsys.path.append('..')\nfrom configure.settings import DBSelector\n"
  },
  {
    "path": "datahub/ninwen.py",
    "chars": 9391,
    "preview": "# -*- coding: utf-8 -*-\n# @Time : 2021/9/6 8:21\n# @File : ninwen.py\n# @Author : Rocky C@www.30daydo.com\n\n# 宁稳网\nimport js"
  },
  {
    "path": "datahub/public_private_fund_members.py",
    "chars": 5217,
    "preview": "# 公募私募人员数据获取\nimport math\nimport sys\n\nsys.path.append('..')\nfrom configure.settings import DBSelector\nfrom common.BaseSer"
  },
  {
    "path": "datahub/repurchase.py",
    "chars": 847,
    "preview": "import os\nimport sys\nimport pandas as pd\nimport numpy as np\nimport xcsc_tushare as xc\n\nsys.path.append('..')\nfrom config"
  },
  {
    "path": "datahub/store_news.py",
    "chars": 3119,
    "preview": "# -*-coding=utf-8-*-\nimport os, re\nimport pymysql\nimport setting\n\ndb_name = 'db_news'\nconn = pymysql.connect(host=settin"
  },
  {
    "path": "datahub/ttjj_new_stock.py",
    "chars": 2806,
    "preview": "import time\n\nimport aiohttp\nimport asyncio\nimport execjs\nglobal pages\nglobal count\nimport sys\nsys.path.append('..')\nfrom"
  },
  {
    "path": "datahub/xueqiu_group.py",
    "chars": 4495,
    "preview": "# -*- coding: utf-8 -*-\n# @Time : 2021/11/2 23:25\n# @File : xueqiu_group.py\n# @Author : Rocky C@www.30daydo.com\nimport j"
  },
  {
    "path": "datahub/xueqiu_sync_portfolio.py",
    "chars": 3814,
    "preview": "# -*- coding: utf-8 -*-\n# @Time : 2021/11/2 22:36\n# @File : xueqiu_sync_portfolio.py\n# @Author : Rocky C@www.30daydo.com"
  },
  {
    "path": "datahub/yanbao_crawl.py",
    "chars": 1089,
    "preview": "# 研报下载\n\nimport requests\nimport os\nfrom parsel import Selector\nimport urllib.parse\ndef main():\n    url = 'https://aigc.id"
  },
  {
    "path": "datahub/zdt.py",
    "chars": 6457,
    "preview": "# -*- coding=utf-8 -*-\n__author__ = 'Rocky'\n'''\nhttp://30daydo.com\nContact: weigesysu@qq.com\n'''\n# 每天的涨跌停\nimport sys\nsys"
  },
  {
    "path": "fund/ETFShareDetection.py",
    "chars": 153,
    "preview": "# ETF 每周监控\n\nfrom ShareDetection import FundDetection\n\n\ndef main():\n    app = FundDetection()\n    app.etf_start()\n\n\nif __"
  },
  {
    "path": "fund/ETF_Finder.py",
    "chars": 5098,
    "preview": "# -* coding=utf8 *-\n# 基金某个时间段的涨幅\nimport datetime\nimport sys\nimport loguru\nimport fire\nimport pandas as pd\n\nsys.path.appe"
  },
  {
    "path": "fund/JJTool.py",
    "chars": 11621,
    "preview": "# -*- coding: utf-8 -*-\nimport sys\n\nfrom parsel import Selector\n\nsys.path.append('..')\nimport requests\nimport datetime\ni"
  },
  {
    "path": "fund/LOFShareDetection.py",
    "chars": 259,
    "preview": "# -*- coding: utf-8 -*-\n# @Time : 2021/6/24 0:00\n# @File : LOFShareDetection.py.py\n# @Author : Rocky C@www.30daydo.com\n\n"
  },
  {
    "path": "fund/LOF_Model.py",
    "chars": 1505,
    "preview": "# -*- coding: utf-8 -*-\n# @Time : 2021/3/29 22:30\n# @File : LOF_Model.py\n# @Author : Rocky C@www.30daydo.com\nfrom sqlalc"
  },
  {
    "path": "fund/LOF_Purchase_limit.py",
    "chars": 136,
    "preview": "import akshare as ak\nimport pandas as pd\npd.read_excel('')\nfund_purchase_em_df = ak.fund_purchase_em()\nprint(fund_purcha"
  },
  {
    "path": "fund/LOF_arbitrage.py",
    "chars": 8251,
    "preview": "# LOF 折价套利\nimport datetime\n\nimport demjson\nimport fire\nimport pandas as pd\nimport requests\nimport sys\n\nsys.path.append('"
  },
  {
    "path": "fund/ShareDetection.py",
    "chars": 5643,
    "preview": "# -*- coding: utf-8 -*-\n# @Time : 2021/3/29 22:33\n# @File : LOFShareDetection.py\n# @Author : Rocky C@www.30daydo.com\n\n# "
  },
  {
    "path": "fund/__init__.py",
    "chars": 103,
    "preview": "# -*- coding: utf-8 -*-\n# website: http://30daydo.com\n# @Time : 2020/8/3 19:00\n# @File : __init__.py.py"
  },
  {
    "path": "fund/ark_funds.py",
    "chars": 4860,
    "preview": "# Crawl ARK Fund holdings and parse pdf file with python\n# 获取ARK持仓数据 python解析pdf\n\nimport sys\nsys.path.append('..')\nimpor"
  },
  {
    "path": "fund/check_holiday.py",
    "chars": 250,
    "preview": "import datetime\n\ntoday = datetime.datetime.now()\nweekday = today.weekday()\n\nif weekday == 5 or weekday == 6:\n    print(f"
  },
  {
    "path": "fund/closed_end_fund.py",
    "chars": 2101,
    "preview": "# -*- coding: utf-8 -*-\n# website: http://30daydo.com\n# @Time : 2020/8/3 19:01\n# @File : closed_end_fund.py\n\n# 抓取封闭式基金数据"
  },
  {
    "path": "fund/closed_end_fund_backtrade/backtrade_fund_weekly_share_increment.py",
    "chars": 6183,
    "preview": "# 作者公众号:可转债量化分析\nimport pandas as pd\nfrom fund_data_source import DataSource\nimport numpy as np\nfrom loguru import logger"
  },
  {
    "path": "fund/closed_end_fund_backtrade/fund_code.json",
    "chars": 1446,
    "preview": "{\n  \"184801\": \"鹏华前海\",\n  \"169106\": \"东证创优\",\n  \"501053\": \"东证目优\",\n  \"501076\": \"科创基金\",\n  \"501097\": \"科创国寿\",\n  \"501073\": \"科创混合\""
  },
  {
    "path": "fund/closed_end_fund_backtrade/fund_data_source.py",
    "chars": 2971,
    "preview": "# 作者公众号:可转债量化分析\nimport json\nimport sys\nimport akshare as ak\nimport pandas as pd\nfrom loguru import logger\nsys.path.appen"
  },
  {
    "path": "fund/closed_end_fund_backtrade/main.py",
    "chars": 190,
    "preview": "# 作者公众号:可转债量化分析\n\nimport fire\nfrom backtrade_fund_weekly_share_increment import Runner\n\n\ndef main(func):\n    app = Runner"
  },
  {
    "path": "fund/danjuan_fund.py",
    "chars": 4236,
    "preview": "import datetime\nimport sys\nimport time\nfrom typing import Deque\n\nsys.path.append('..')\nfrom common.BaseService import Ba"
  },
  {
    "path": "fund/danjuan_fund_data_analysis.py",
    "chars": 4220,
    "preview": "# -*- coding: utf-8 -*-\n# @Time : 2021/4/20 12:54\n# @File : danjuan_fund_data_analysis.py\n# @Author : Rocky C@www.30dayd"
  },
  {
    "path": "fund/etf_info.py",
    "chars": 10653,
    "preview": "# -*- coding: utf-8 -*-\n# website: http://30daydo.com\n# @Time : 2020/2/20 17:06\n# @File : etf_info.py\n# 获取etf的成分股数据\n\n# 重"
  },
  {
    "path": "fund/etf_models.py",
    "chars": 2087,
    "preview": "# -*- coding: UTF-8 -*-\n\"\"\"\n@author:xda\n@file:etf_models.py\n@time:2021/01/23\n\"\"\"\n\nfrom sqlalchemy.ext.declarative import"
  },
  {
    "path": "fund/etf_range_increment.py",
    "chars": 3164,
    "preview": "# -* coding=utf8 *-\n# 基金某个时间段的涨幅\nimport datetime\nimport random\nimport time\nimport akshare as ak\nimport sys\nimport loguru"
  },
  {
    "path": "fund/fund_annouce.py",
    "chars": 2192,
    "preview": "# -*- coding: utf-8 -*-\n# @Time : 2021/3/19 0:04\n# @File : fund_annouce.py\n# @Author : Rocky C@www.30daydo.com\n\n# 基金公告数据"
  },
  {
    "path": "fund/fund_holding_list_gen_dynamic_flourish.py",
    "chars": 693,
    "preview": "import sys\nsys.path.append('..')\nfrom configure.settings import DBSelector\nfrom configure.util import mongo_convert_df\n\n"
  },
  {
    "path": "fund/fund_holding_person.py",
    "chars": 2725,
    "preview": "import datetime\nimport time\n\nimport akshare as ak\nimport pandas as pd\n\nsymbol_dict =  {\"股票型\", \"混合型\", \"指数型\", \"QDII\", \"LOF"
  },
  {
    "path": "fund/fund_info_spider.py",
    "chars": 12771,
    "preview": "import random\nimport re\nimport datetime\nimport demjson\nimport requests\nimport time\nimport sys\n\nsys.path.append('..')\nfro"
  },
  {
    "path": "fund/fund_jsl.py",
    "chars": 2939,
    "preview": "# -*- coding: utf-8 -*-\n# @Time : 2021/8/24 6:06\n# @File : fund_jsl.py\n# @Author : Rocky C@www.30daydo.com\n\n\nimport rand"
  },
  {
    "path": "fund/fund_profit_info.py",
    "chars": 8055,
    "preview": "# 获取基金的基本信息\n\nimport akshare as ak\nimport datetime\nimport fire\nimport re\nimport numpy as np\nimport pyecharts.options as o"
  },
  {
    "path": "fund/fund_raise_speed.py",
    "chars": 1357,
    "preview": "# @Time : 2020/2/26 9:38\n# @File : fund_raise_speed.py\n# 查看基金最后暴力拉伸的\nimport datetime\nimport random\nimport time\nfrom conf"
  },
  {
    "path": "fund/fund_share_crawl.py",
    "chars": 12476,
    "preview": "\"\"\"\n@author:xda\n@file:fund_share_update.py\n@time:2021/01/20\n\"\"\"\n# 基金份额\nimport sys\nimport math\nimport re\n\nsys.path.append"
  },
  {
    "path": "fund/fund_share_monitor.py",
    "chars": 942,
    "preview": "# -*- coding: UTF-8 -*-\n\"\"\"\n@author:xda\n@file:fund_share_monitor.py\n@time:2021/01/27\n\"\"\"\n# 份额监控,对上一天额度出现较大申购进行监控\n\nimport"
  },
  {
    "path": "fund/fund_share_update.py",
    "chars": 11759,
    "preview": "\"# -*- coding\"\n\n\"\"\"\n@author:xda\n@file:fund_share_update.py\n@time:2021/01/20\n\"\"\"\n# 基金份额\nimport sys\n\nsys.path.append('..')"
  },
  {
    "path": "fund/fund_tencent.py",
    "chars": 255,
    "preview": "# -*- coding: UTF-8 -*-\n\"\"\"\n@author:xda\n@file:fund_tencent.py\n@time:2021/01/20\n\"\"\"\nfrom fund_info_spider import TencentF"
  },
  {
    "path": "fund/jsl_fund.py",
    "chars": 186,
    "preview": "# -*- coding: UTF-8 -*-\n\"\"\"\n@author:xda\n@file:jsl_fund.py\n@time:2021/01/20\n\"\"\"\nfrom fund_jsl import JSLFund\n\nif __name__"
  },
  {
    "path": "fund/ndx_index.py",
    "chars": 315,
    "preview": "import sys\nsys.path.append('..')\nfrom configure.settings import get_tushare_pro\npro = get_tushare_pro()\n# pro = ts.pro_a"
  },
  {
    "path": "fund/qdii_fund_analysis_5fund.ipynb",
    "chars": 523257,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "fund/reits.ipynb",
    "chars": 77372,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [\n    {\n     \"name\":"
  },
  {
    "path": "fund/reits_data_crawler.py",
    "chars": 2222,
    "preview": "import datetime\nimport requests\nimport pandas as pd\nimport sys\nsys.path.append('..')\nfrom configure.util import send_mes"
  },
  {
    "path": "fund/reits_history.py",
    "chars": 7273,
    "preview": "import datetime\nimport time\nimport sys\n\nsys.path.append('..')\nimport requests\n\n\nclass ReitsHistoryData:\n\n    def __init_"
  },
  {
    "path": "fund/reits_netvalue.py",
    "chars": 12477,
    "preview": "# 获取REITS净值\nimport datetime\nimport requests\nimport sys\nimport re\n\nsys.path.append('..')\nfrom configure.util import jsonp"
  },
  {
    "path": "fund/run_sh_fundshare.py",
    "chars": 483,
    "preview": "# -*- coding: UTF-8 -*-\n\"\"\"\n@author:xda\n@file:run_sh_fundshare.py\n@time:2021/01/24\n\"\"\"\nfrom fund_share_crawl import SHFu"
  },
  {
    "path": "fund/run_sz_fundshare.py",
    "chars": 210,
    "preview": "# -*- coding: UTF-8 -*-\n\"\"\"\n@author:xda\n@file:run_sz_fundshare.py\n@time:2021/01/24\n\"\"\"\n\nfrom fund_share_crawl import SZF"
  },
  {
    "path": "fund/sqlhelper.py",
    "chars": 881,
    "preview": "from configure.settings import DBSelector\nimport loguru\n\nlogger = loguru.logger\n\n\nclass SQLHelper():\n\n    def __init__(s"
  },
  {
    "path": "fund/stop_purchase_lof_fund.py",
    "chars": 5539,
    "preview": "# 暂停申购的基金\nimport datetime\nimport sys\nsys.path.append('..')\nfrom configure.util import send_message_via_wechat,is_weekday"
  },
  {
    "path": "fund/sz_etf.py",
    "chars": 3312,
    "preview": "# -*- coding: UTF-8 -*-\n\"\"\"\n@author:xda\n@file:sz_etf.py\n@time:2021/01/24\n\"\"\"\n\n# 后续废弃\n\n\ndef szse_etf():\n    Base.metadata"
  },
  {
    "path": "fund/ttfund_etf_holding.py",
    "chars": 6786,
    "preview": "import time\nimport datetime\nimport fire\nimport requests\nimport sys\nsys.path.append('..')\n\nfrom configure.settings import"
  },
  {
    "path": "fund/ttjj.py",
    "chars": 13004,
    "preview": "# -*- coding: utf-8 -*-\n# website: http://30daydo.com\n# @Time : 2020/8/26 19:58\n# @File : ttjj.py\n\nimport sys\n# import e"
  },
  {
    "path": "fund/ttjj_others.py",
    "chars": 6911,
    "preview": "# -*- coding: utf-8 -*-\n# @Time : 2021/12/16 11:40\n# @File : ttjj_others.py\n# @Author : Rocky C@www.30daydo.com\nimport r"
  },
  {
    "path": "fund/xueqiu_content.txt",
    "chars": 1352,
    "preview": "1、$万家可转债债券A(F008331)$ :基金经理陈佳昀,今年以来回报-5.42%,近一年回报12.10%,近三年回报19.29%,近一年最大回撤-9.34%,最新规模0.65亿。\n\n2、$鹏华可转债(F000297)$ :基金经理王石"
  },
  {
    "path": "fund/xueqiu_private_fund.py",
    "chars": 15265,
    "preview": "import datetime\nimport sys\nimport re\nimport requests\nsys.path.append('..')\nfrom configure.settings import DBSelector, co"
  },
  {
    "path": "fund/基金持仓股.ipynb",
    "chars": 20744,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 8,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "futu/basic_usage.py",
    "chars": 811,
    "preview": "from futu import OpenQuoteContext\nfrom collections import Iterable\ndef deep_print(obj):\n    sep='='*20+'\\n'\n    print(se"
  },
  {
    "path": "futu/realtime_price.py",
    "chars": 626,
    "preview": "from futu import *\nquote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)\n\nret_sub, err_message = quote_ctx.subscrib"
  },
  {
    "path": "futu/subscribe.py",
    "chars": 715,
    "preview": "import time\nfrom futu import *\nclass OrderBookTest(OrderBookHandlerBase):\n    def on_recv_rsp(self, rsp_pb):\n        ret"
  },
  {
    "path": "futu/unsubscrible.py",
    "chars": 175,
    "preview": "from futu import *\nfrom util import deep_print\nquote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)\nret = quote_ct"
  },
  {
    "path": "futu/util.py",
    "chars": 544,
    "preview": "from collections import Iterable\n\ndef deep_print(obj):\n    sep='='*20+'\\n'\n    print(sep)\n    print(obj)\n    print(sep)\n"
  },
  {
    "path": "hk_stock/aastock_new_stock.py",
    "chars": 6393,
    "preview": "# -*- coding: utf-8 -*-\n# @Time : 2021/6/28 23:15\n# @File : aastock_new_stock.py\n# @Author : Rocky C@www.30daydo.com\n\n\n'"
  },
  {
    "path": "hk_stock/new_stock_release.py",
    "chars": 4027,
    "preview": "# -*- coding: utf-8 -*-\n# website: http://30daydo.com\n# @Time : 2020/2/20 17:06\n# @File : etf_info.py\n# 获取港股打新数据\nimport "
  },
  {
    "path": "jisilu_bond_release.py",
    "chars": 214,
    "preview": "# -*-coding=utf-8-*-\n\n# @Time : 2018/12/20 0:20\n# @File : jisilu_call.py\nfrom datahub.jisilu import Jisilu\n\n\ndef main():"
  },
  {
    "path": "jisilu_daily.py",
    "chars": 288,
    "preview": "# -*-coding=utf-8-*-\n\n# @Time : 2018/12/20 0:25\n# @File : jisilu_current.py\nfrom datahub.jisilu import Jisilu\nimport fir"
  },
  {
    "path": "jubi.py",
    "chars": 7965,
    "preview": "# -*-coding=utf-8-*-\n__author__ = 'Rocky'\n'''\nhttp://30daydo.com\nContact: weigesysu@qq.com\n'''\n\n## python2代码,网站已经停止更新\nim"
  },
  {
    "path": "juejin/fetch_data.ipynb",
    "chars": 30922,
    "preview": "{\n \"cells\": [\n  {\n   \"cell_type\": \"code\",\n   \"execution_count\": 1,\n   \"metadata\": {},\n   \"outputs\": [],\n   \"source\": [\n "
  },
  {
    "path": "k-line/basic_usage.py",
    "chars": 5112,
    "preview": "import akshare as ak\nimport mpl_finance as mpf\nimport matplotlib.pyplot as plt\nimport pandas as pd\n\n\ndef get_k_data(code"
  },
  {
    "path": "k-line/main.py",
    "chars": 301,
    "preview": "from basic_usage import get_k_data,axis_date,ma_line,add_vol,kline_demo,run\nfrom recognize_form import two_crow\ndef main"
  },
  {
    "path": "k-line/recognize_form.py",
    "chars": 2713,
    "preview": "# 识别k线形态\n\nimport pandas as pd\nimport talib\nimport matplotlib.pyplot as plt\nimport matplotlib.ticker as ticker\nimport mpl"
  },
  {
    "path": "k-line/search_target.py",
    "chars": 2721,
    "preview": "import pandas as pd\nimport talib\nimport sys\n\nimport tushare as ts\nsys.path.append('..')\nfrom configure.settings import c"
  },
  {
    "path": "k_line.py",
    "chars": 7631,
    "preview": "# -*-coding=utf-8-*-\n# 获取 不同形态的k线\nimport random\nimport time\nimport tushare as ts\nimport pandas as pd\nimport os, datetime"
  },
  {
    "path": "longhuban.py",
    "chars": 1528,
    "preview": "#-*-coding=utf-8-*-\n\nimport requests\nimport re\nimport json\ndef get_content(url,retry=5):\n\theaders = {'User-Agent':'Mozil"
  },
  {
    "path": "machine_learning/贝叶斯预测涨跌.py",
    "chars": 5116,
    "preview": "import numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nfrom sklearn.naive_bayes import BernoulliNB\n\n\n# 基"
  },
  {
    "path": "monitor/__init__.py",
    "chars": 109,
    "preview": "# -*- coding: utf-8 -*-\n# @Time : 2020/11/21 0:09\n# @File : __init__.py\n# @Author : Rocky C@www.30daydo.com\n\n"
  },
  {
    "path": "monitor/alert_me.py",
    "chars": 404,
    "preview": "# -*-coding=utf-8-*-\n# 估价达到自己的设定值,发邮件通知, 每天2.45发邮件\nimport fire\nimport sys\nsys.path.append('..')\nfrom jsl_monitor import "
  },
  {
    "path": "monitor/big_deal.py",
    "chars": 1562,
    "preview": "# -*-coding=utf-8-*-\n__author__ = 'Rocky'\n'''\nhttp://30daydo.com\nContact: weigesysu@qq.com\n'''\n# 搜索大单进入的个股\nimport sys\nsy"
  },
  {
    "path": "monitor/ceiling_break.py",
    "chars": 2560,
    "preview": "# -*-coding=utf-8-*-\n__author__ = 'Rocky'\n'''\nhttp://30daydo.com\nContact: weigesysu@qq.com\n'''\n\n# 股票封板监控\n\nimport time\nim"
  },
  {
    "path": "monitor/crawler_monitor.py",
    "chars": 1445,
    "preview": "# 数据监控\nimport datetime\nimport sys\n\nsys.path.append('..')\nfrom configure.settings import DBSelector\nfrom configure.util i"
  },
  {
    "path": "monitor/jsl_monitor.py",
    "chars": 7776,
    "preview": "# 使用jsl作为数据源\nimport json\n\nimport redis\nimport requests\nimport sys\n\nsys.path.append('..')\nimport time\nimport threading\nfr"
  },
  {
    "path": "monitor/realtime_kzz_price.py",
    "chars": 1852,
    "preview": "# -*-coding=utf-8-*-\n\n# @Time : 2020/1/20 10:54\n# @File : realtime_price.py\nimport pypinyin\nimport time\nimport requests\n"
  },
  {
    "path": "monitor/realtime_monitor_ts.py",
    "chars": 11138,
    "preview": "# -*- coding: utf-8 -*-\n# @Time : 2020/11/16 10:26\n# @File : realtime_monitor_ts.py\n# @Author : Rocky C@www.30daydo.com\n"
  },
  {
    "path": "monitor/server_api.py",
    "chars": 1308,
    "preview": "from monitor.jsl_monitor import ReachTargetJSL\n\n\nclass ServerAPI(ReachTargetJSL):\n\n    def __init__(self):\n        super"
  },
  {
    "path": "new_stock_break.py",
    "chars": 4670,
    "preview": "# -*-coding=utf-8-*-\n__author__ = 'Rocky'\n'''\nhttp://30daydo.com\nContact: weigesysu@qq.com\n'''\n# 分析新股的开板时机\nimport tushar"
  },
  {
    "path": "new_stock_fund.py",
    "chars": 2651,
    "preview": "# -*- coding: utf-8 -*-\n# website: http://30daydo.com\n# @Time : 2019/10/24 0:03\n# @File : new_stock_fund.py\n\n# 获取打新基金数据\n"
  },
  {
    "path": "pledged_validation.py",
    "chars": 2028,
    "preview": "#-*-coding=utf-8-*-\nimport json\nimport tushare as ts\nimport pandas as pd\nfrom configure.settings import get_engine\nimpor"
  },
  {
    "path": "plot_line.py",
    "chars": 4044,
    "preview": "# -*-coding=utf-8-*-\nimport datetime\nimport os\nimport random\nimport time\nfrom optparse import OptionParser\n\n__author__ ="
  },
  {
    "path": "ptrade/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "ptrade/逆回购.py",
    "chars": 438,
    "preview": "# 关注公众号:可转债量化分析\n\nSH_FLAG =True\nSZ_FLAG = False\n\ndef reverse_repurchase(context):\n    cash = context.portfolio.cash\n    #"
  },
  {
    "path": "real_time_big_deal.py",
    "chars": 1787,
    "preview": "# -*-coding=utf-8-*-\n__author__ = 'Rocky'\n'''\nhttp://30daydo.com\nContact: weigesysu@qq.com\n'''\nimport datetime\nimport tu"
  },
  {
    "path": "recordMyChoice.py",
    "chars": 6562,
    "preview": "# -*-coding=utf-8-*-\n# 记录每天选股后的收益,用于跟踪每一只自选股\n__author__ = 'Rocky'\n'''\nhttp://30daydo.com\nContact: weigesysu@qq.com\n'''\ni"
  },
  {
    "path": "relationship_case.py",
    "chars": 1741,
    "preview": "#-*-coding=utf-8-*-\n\nimport tushare as ts\nfrom pandas import Series\nimport pandas as pd\nimport numpy as np\nimport matplo"
  },
  {
    "path": "requirements.txt",
    "chars": 130,
    "preview": "easytrader\nloguru\nrsa\nredis\npypinyin\nsqlalchemy\npandas\ntushare\nakshare\nparsel\nloguru\nxlwt\neasyquotation\nloguru\nrsa\npymon"
  },
  {
    "path": "select_stock.py",
    "chars": 17487,
    "preview": "# -*-coding=utf-8-*-\n# 适用 tushare 0.7.5\n__author__ = 'Rocky'\n'''\nhttp://30daydo.com\nContact: weigesysu@qq.com\n'''\nimport"
  },
  {
    "path": "shareholder_info.py",
    "chars": 3970,
    "preview": "# -*- coding: utf-8 -*-\n# @Time : 2019/1/19 14:37\n# @File : stockholder_info.py\n# 股东信息获取\nimport re\nimport sys\nimport pan"
  },
  {
    "path": "snowball.py",
    "chars": 2218,
    "preview": "# -*-coding=utf-8-*-\n#抓取雪球的收藏文章\n__author__ = 'Rocky'\n'''\nhttp://30daydo.com\nContact: weigesysu@qq.com\n'''\nimport request"
  },
  {
    "path": "source_code_reading/README.MD",
    "chars": 7,
    "preview": "# 源码阅读\n"
  },
  {
    "path": "source_code_reading/source_code.py",
    "chars": 137,
    "preview": "import scrapy as sc\nimport easyquotation as ea\nprint(ea.__version__)\nprint(ea.__author__)\nprint(sc.__version__)\n# print("
  },
  {
    "path": "statistices.py",
    "chars": 390,
    "preview": "#-*-coding=utf-8-*-\n'''\n用于统计数据\n'''\nimport alert\n'''\n计算收益\nsold 卖价\nbuy 买入价\n'''\ndef percentage(sold,buy):\n    x=(sold-buy)*"
  },
  {
    "path": "stockInfo.py",
    "chars": 6313,
    "preview": "# working v1.0\n__author__ = 'Rocky'\n'''\nhttp://30daydo.com\nContact: weigesysu@qq.com\n'''\nimport json\nimport datetime\nimp"
  },
  {
    "path": "stock_check.py",
    "chars": 6470,
    "preview": "# -*-coding=utf-8-*-\n__author__ = 'Rocky'\n'''\nhttp://30daydo.com\nContact: weigesysu@qq.com\n'''\n\n#查询个股\nimport tushare as "
  },
  {
    "path": "store_data.py",
    "chars": 496,
    "preview": "#-*-coding=utf-8-*-\n__author__ = 'Rocky'\n'''\nhttp://30daydo.com\nContact: weigesysu@qq.com\n'''\nimport tushare as ts\nimpor"
  },
  {
    "path": "strategy_verify.py",
    "chars": 7966,
    "preview": "# -*-coding=utf-8-*-\n__author__ = 'Rocky'\n'''\nhttp://30daydo.com\nContact: weigesysu@qq.com\n获取雪球的策略 2017-03-21\n'''\n\nimpor"
  },
  {
    "path": "temp/edit.txt",
    "chars": 20422,
    "preview": "var apidata={ content:\"<div class='box'><div class='boxitem w790'><h4 class='t'><label class='left'><a href='http://fund"
  },
  {
    "path": "toolkit.py",
    "chars": 1222,
    "preview": "# -*-coding=utf-8-*-\n#常用的工具集合\n__author__ = 'Rocky'\n'''\nhttp://30daydo.com\nContact: weigesysu@qq.com\n'''\nimport codecs\n\nc"
  },
  {
    "path": "trader/__init__.py",
    "chars": 110,
    "preview": "# -*- coding: utf-8 -*-\n# @Time : 2020/11/21 16:39\n# @File : __init__.py\n# @Author : Rocky C@www.30daydo.com\n\n"
  },
  {
    "path": "trader/auto_trader.py",
    "chars": 6266,
    "preview": "# -*- coding: utf-8 -*-\n# website: http://30daydo.com\n# @Time : 2019/3/19 23:21\n# @File : auto_trader.py\nimport datetime"
  },
  {
    "path": "transfer_data_es.py",
    "chars": 714,
    "preview": "# -*-coding=utf-8-*-\n\n# @Time : 2019/7/12 18:41\n# @File : transfer_data_es.py\n\nfrom configure.settings import get_mysql_"
  },
  {
    "path": "utils/delivery_order.py",
    "chars": 9975,
    "preview": "# -*-coding=utf-8-*-\n\n\n__author__ = 'Rocky'\n'''\nhttp://30daydo.com\nContact: weigesysu@qq.com\n交割单处理 保存交割单到数据库\n'''\n\nimport"
  }
]

// ... and 7 more files (download for full content)

About this extraction

This page contains the full source code of the Rockyzsu/stock GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 207 files (4.5 MB), approximately 1.2M tokens, and a symbol index with 1027 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!