Giter Club home page Giter Club logo

tt_fund's Introduction

[TOC]

零、版本信息

版本:v2.0.20210513

新增爬虫-基金经理


版本:v2.0.20210507

更新如下:

1、北向沪股通、深股通和港股通的爬虫更改了提取url,重写了beixiang_10stock.py

2、检查了爬虫,并爬取部分数据更新到data_temp文件夹

3、考虑到全部数据过大,data_temp文件夹仅为少量数据,全部数据自行参考后文启动爬虫


版本:v1.0.20200424

首次发布!具体功能参考下文。


启动方式:scrapy crawl spider.name

说明:阅读前可以点击原网址查看爬取的目标样式!成功抓取的数据样式在data_temp文件夹内。

本程序从天天基金网采集数据,目前包含下面5个爬虫,基本上涵盖了整个基金市场情况。可以根据实际需要,有选择性的爬取即可。

  • 一、北向资金每日流向
  • 二、北向资金每日前20大交易股
  • 三、基金公司情况
  • 四、基金排名每日涨跌情况
  • 五、大盘(上证指数、深圳成指、创业板指)每日涨跌情况

一、北向资金每日流向

  • 文件名:beixiang.py (上海MarketType=1, 深圳MarketType=3)

  • 字段含义

    爬取基本上按照原网址格式,理解起来简单。根据天天基金网提示,值得注意的有两点。1、当日资金流入today_in包含两个部分:已经成交的和已申报未成交的。2、当日净买额today_net_in = 买入total_in-卖出total_out 。 一般分析使用的是净买额为当日资金流入today_in

    字段名 含义
    marketType 市场类型:1代表上海,3代表深圳
    datetime 时间
    total_net_in 当日成交净买额
    total_in 买入额
    total_out 卖出额
    today_in 当日资金流入
    grand_total_in 历史累计流入
    today_balance 当日余额
    stock_code 领涨股代码
    stock 领涨股名称
    stock_up 领涨股涨跌幅
    sz_index 指数(上证或者深圳成指数,根据marketType来确定。1代表上海,3代表深圳)
    sz_index_percent 指数涨跌幅

二、北向资金每日前20大交易股

  • 原网址

    分沪股通10大交易股和深股通10大交易股

  • 文件名:beixiang_10stock.py

  • 字段含义

    当日净流入=当日流入-当日流出; 当日成交额=当日流入+当日流出

    字段名 含义
    marketType 市场类型:1代表上海,3代表深圳
    date_time 时间
    rank 排名
    code 股票代码
    name 股票名称
    close 当日收盘价
    changePercent 当日涨跌幅
    net_in 当日净流入
    in 当日流入
    out 当日流出
    total 当日成交额

三、基金公司信息

  • 原网址

    • 基金公司基本信息

      字段名 含义
      company_code 基金公司代码
      company_shortName 基金公司
      company_name 基金公司全称
      position 位置
      general_manager 总经理
      website_url 官网
      tell 客服热线
      manager_total_asset 管理规模
      fund_amount 基金数量
      manager_amount 经理人数
      publish_date 成立日期
      company_property 公司性质
    • 基金公司规模

      字段名 含义
      company_code 基金公司代码
      company_shortName 基金公司
      fund_type 基金类型
      fund_scale 基金规模(亿元)
      fund_scale_mean 平均每家公司基金规模
      fund_scale_rank 同类排名
      fund_amount 基金数量
      fund_amount_mean 平均每家公司基金数量
      fund_amount_rank 同类排名
      fund_manager_amount 基金经理数量
      fund_manager_amount_mean 平均每家公司基金经理数量
      fund_manager_amount_rank 同类排名
    • 基金公司下的基金清单

      这里就爬取了清单,净值等信息参考第三点基金信息即可。

      字段名 含义
      company_code 基金公司代码
      company_shortName 基金公司
      fund_name 基金名称
      fund_code 基金代码
    • 公司的10大持仓股票

      字段名 含义
      company_code 基金公司代码
      company_shortName 基金公司
      stock_code 股票代码
      stock_name 股票名称
      havein_mycomanpy_fund 配置的基金数
      hold_in_value_percent 配置的基金占比
      stock_amount 配置数量(万股)
      stock_value 配置市值(万元)
    • 公司下的行业配置

      字段名 含义
      company_code 基金公司代码
      company_shortName 基金公司
      industry_category 行业
      havein_mycomanpy_fund 配置的基金数
      hold_in_value_percent 配置的基金占比
      stock_value 配置金额(万元)
  • 文件名:fund_company.py

四、基金信息

  • 原网址

    • 基金当日排名情况

      字段名 含义
      fund_type 基金类型(gp=股票型, hh=混合型)
      code 基金代码
      name 基金名称
      today 日期
      net_value 净值
      accumulative_value 累计净值
      rate_day 日涨跌幅
      rate_recent_week 最近一周涨跌幅
      rate_recent_month 最近一月涨跌幅
      rate_recent_3month 最近三月涨跌幅
      rate_recent_6month 最近六月涨跌幅
      rate_recent_year 最近一年涨跌幅
      rate_recent_2year 最近两年涨跌幅
      rate_recent_3year 最近三年涨跌幅
      rate_from_this_year 今年来涨跌幅
      rate_from_begin 成立来涨跌幅
      rate_buy 购买费率
      url 基金链接
    • 基金成立以来每日净值

      字段名 含义
      fund_type 基金类型(gp=股票型, hh=混合型)
      code 基金代码
      name 基金名称
      date 日期
      total_day 总日期数量(代表基金天数)
      net_value 净值
      accumulative_value 累计净值
      rate_day 当日涨跌幅
      buy_status 当日购买状态
      sell_status 当日赎回状态
    • 基金概况

      字段名 含义
      full_name 基金全称
      code 基金代码
      fund_url 基金链接
      type 基金类型(gp=股票型, hh=混合型)
      publish_date 发行日期
      setup_date_and_scale 成立日期/规模
      asset_scale 资产规模
      amount_scale 份额规模
      company 基金公司
      company_url 基金公司链接
      bank 基金托管人
      bank_url 基金托管人链接
      manager 基金经理
      manager_url 基金经理链接
      profit_situation 成立来分红
      management_feerate 管理费率
      trustee_feerate 托管费率
      standard_compared 业绩比较基准
      followed_target 跟踪标的
    • 基金10大持仓股

      这是按照季度发布的,一般在季度末的下个月中旬(4、7、10、1月中旬发布上季度持仓股)。

      字段名 含义
      code 基金代码
      name 基金名称
      fund_type 基金类型(gp=股票型, hh=混合型)
      label 标签(XXXX年X季度股票投资明细)
      time 时间
      stock_code 股票代码
      stock_name 股票名称
      stock_proportion 占净值比例
      stock_amount 持有股数(万股)
      stock_value 持有市值(万元)
  • 文件名:fund_earning.py

五、基金经理信息

  • 原网址:列表页详情页

  • 文件名:manager.py

  • 字段含义

    字段名 含义
    manager_id 基金经理id
    manager_name 基金经理名字
    company_id 所属公司id
    company_name 所属公司名字
    avatar 基金经理头像
    start_day 起任时间(可根据此字段计算工作年限)
    scale 管理规模(单位:亿元)
    best_reward 任职期间最佳回报率
    description 基金经理简介
    fund_code 管理的基金名字
    fund_id 管理的基金id

六、大盘(上证指数、深圳成指、创业板指)每日涨跌情况

  • 原网址:上证指数深圳成指创业板指

  • 文件名:market_index.py

  • 字段含义

    字段名 含义
    code 指数代码
    name 指数名称
    datetime 时间
    price_start 开盘价
    price_end 收盘价
    price_max 最高价
    price_min 最低价
    amount 成交量
    value 成交额(单位:元)
    swing 振幅

tt_fund's People

Contributors

cbjerry993 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.