【聚寬本地數據JQData】一個命令獲取全部股票全部的財務報表數據


一行代碼獲取所有的財務指標數據

點擊查看聚寬本地數據JQData詳細內容➡:

https://www.joinquant.com/help/api/help#JQData:%E8%B4%A2%E5%8A%A1%E5%8F%8A%E4%BC%B0%E5%80%BC%E6%95%B0%E6%8D%AE

 

財務指標數據返回字段

列名 列的含義
code 股票代碼
pubDate 日期
statDate 日期
eps 每股收益EPS(元)
adjusted_profit 扣除非經常損益后的凈利潤(元)
operating_profit 經營活動凈收益(元)
value_change_profit 價值變動凈收益(元)
roe 凈資產收益率ROE(%)
inc_return 凈資產收益率(扣除非經常損益)(%)
roa 總資產凈利率ROA(%)
net_profit_margin 銷售凈利率(%)
gross_profit_margin 銷售毛利率(%)
expense_to_total_revenue 營業總成本/營業總收入(%)
operation_profit_to_total_revenue 營業利潤/營業總收入(%)
net_profit_to_total_revenue 凈利潤/營業總收入(%)
operating_expense_to_total_revenue 營業費用/營業總收入(%)
ga_expense_to_total_revenue 管理費用/營業總收入(%)
financing_expense_to_total_revenue 財務費用/營業總收入(%)
operating_profit_to_profit 經營活動凈收益/利潤總額(%)
invesment_profit_to_profit 價值變動凈收益/利潤總額(%)
adjusted_profit_to_profit 扣除非經常損益后的凈利潤/歸屬於母公司所有者的凈利潤(%)
goods_sale_and_service_to_revenue 銷售商品提供勞務收到的現金/營業收入(%)
ocf_to_revenue 經營活動產生的現金流量凈額/營業收入(%)
ocf_to_operating_profit 經營活動產生的現金流量凈額/經營活動凈收益(%)
inc_total_revenue_year_on_year 營業總收入同比增長率(%)
inc_total_revenue_annual 營業總收入環比增長率(%)
inc_revenue_year_on_year 營業收入同比增長率(%)
inc_revenue_annual 營業收入環比增長率(%)
inc_operation_profit_year_on_year 營業利潤同比增長率(%)
inc_operation_profit_annual 營業利潤環比增長率(%)
inc_net_profit_year_on_year 凈利潤同比增長率(%)
inc_net_profit_annual 凈利潤環比增長率(%)
inc_net_profit_to_shareholders_year_on_year 歸屬母公司股東的凈利潤同比增長率(%)
inc_net_profit_to_shareholders_annual 歸屬母公司股東的凈利潤環比增長率(%

 

獲取某一天所有的財務指標數據

# 獲取“2021-01-05”所有的財務指標數據
df=get_fundamentals(query(indicator),date="2021-01-05")
print(df[:4])

# 輸出

         id         code         day     pubDate    statDate     eps  \
0  45000708  000001.XSHE  2021-01-05  2020-10-22  2020-09-30  0.4493   
1  45590101  000002.XSHE  2021-01-05  2020-10-30  2020-09-30  0.6331   
2  45590317  000004.XSHE  2021-01-05  2020-10-30  2020-09-30  0.3324   
3  45406174  000005.XSHE  2021-01-05  2020-10-29  2020-09-30  0.0043   

   adjusted_profit  operating_profit  value_change_profit   roe  \
0     8.730000e+09      1.041200e+10         8.570000e+08  2.46   
1     6.775110e+09      1.379713e+10         1.785868e+09  3.69   
2     5.469821e+07      6.525505e+07                  NaN  3.86   
3    -1.787463e+07     -1.747028e+07         4.047380e+07  0.28   

                   ...                    inc_total_revenue_year_on_year  \
0                  ...                                            8.8400   
1                  ...                                           12.4700   
2                  ...                                        17929.4004   
3                  ...                                          -41.6200   

   inc_total_revenue_annual  inc_revenue_year_on_year  inc_revenue_annual  \
0                     -5.36                    8.8400               -5.36   
1                     -3.48                   12.4700               -3.48   
2                    209.31                17929.4004              209.31   
3                     -3.07                  -41.6200               -3.07   

   inc_operation_profit_year_on_year  inc_operation_profit_annual  \
0                               5.51                      69.1000   
1                              10.53                     -28.2900   
2                             745.37                    6337.2998   
3                             138.08                     155.5600   

   inc_net_profit_year_on_year  inc_net_profit_annual  \
0                         6.11                69.9800   
1                        22.97               -29.3600   
2                       721.89              3654.3401   
3                       143.59               151.5400   

   inc_net_profit_to_shareholders_year_on_year  \
0                                         6.11   
1                                        14.94   
2                                       783.92   
3                                       132.08   

   inc_net_profit_to_shareholders_annual  
0                                69.9800  
1                               -34.6700  
2                              4519.6099  
3                               140.9000  

[4 rows x 36 columns]

 

結合上表的字段,獲取一只股票某個字段數據

q = query(
    indicator
).filter(
    indicator.code == '000004.XSHE'
)
df = get_fundamentals(q, '2015-10-15')
# 打印出每股收益EPS(元)
print(df['eps'][0])

>>>0.0365

 

獲取多只股票在某一日期的財務數據

df = get_fundamentals(query(
        indicator
    ).filter(
        # 這里不能使用 in 操作, 要使用in_()函數
        indicator.code.in_(['000001.XSHE', '600000.XSHG'])
    ), date='2015-10-15')
print(df)

# 輸出

        id         code         day     pubDate    statDate     eps  \
0      178  000001.XSHE  2015-10-15  2015-08-14  2015-06-30  0.4162   
1  2952806  600000.XSHG  2015-10-15  2015-08-20  2015-06-30  0.6813   

   adjusted_profit  operating_profit  value_change_profit   roe  \
0     5.954000e+09      6.254000e+09         1.566000e+09  4.14   
1     1.239500e+10      1.553200e+10         8.140000e+08  4.45   

                   ...                    inc_total_revenue_year_on_year  \
0                  ...                                             39.02   
1                  ...                                             19.94   

   inc_total_revenue_annual  inc_revenue_year_on_year  inc_revenue_annual  \
0                     25.32                     39.02               25.32   
1                     14.30                     19.94               14.30   

   inc_operation_profit_year_on_year  inc_operation_profit_annual  \
0                              17.90                         5.01   
1                               4.92                        12.52   

   inc_net_profit_year_on_year  inc_net_profit_annual  \
0                        18.69                   5.81   
1                         6.29                  13.33   

   inc_net_profit_to_shareholders_year_on_year  \
0                                        18.69   
1                                         6.39   

   inc_net_profit_to_shareholders_annual  
0                                   5.81  
1                                  13.53  

[2 rows x 36 columns]

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM