Use Python to get the "performance letters of the total assets, net worth" and other "listed company Performance Express" data

Source: Internet
Author: User

Securities Bao Www.baostock.com is a free, open-source securities data platform.

Provide a large number of accurate and complete securities historical market data, listed company financial data, real-time securities market push services.
Acquisition of securities data information through the Python API, to meet quantitative trading investors, quantitative financial enthusiasts, metering economic practitioners data needs.

        This introduction interface: To obtain quarterly frequency Performance Bulletin data :query_performance_express_report ()

(The following code from the official website, invasion and deletion )

Method Description: Query quarterly frequency company Performance Express information, can be set through the parameters to obtain the year-end data, provide 2006 to date data.

return type: The Dataframe type of pandas.

The sample code is as follows:

import baostock as bsimport pandas as pd####  Landing System  ### #lg  =  Bs.login () #  display login return information print (' Login respond error_code: ' +lg.error_code) print (' Login respond   error_msg: ' +lg.error_msg) ####  get company Performance Express  ### #rs  = bs.query_performance_express_ Report ("sh.600000",  start_date= "2015-01-01",  end_date= "2017-12-31") print (' Query_performance_express_ Report respond error_code: ' +rs.error_code ' Print (' query_performance_express_report respond   error_msg: ' +rs.error_msg ' result_list = []while  (rs.error_code ==  ' 0 ')   & rs.next ():     result_list.append (Rs.get_row_data ())     #   Gets a record that merges the records together RESULT = PD. DataFrame (result_list, columns=rs.fields) ####  result set Output to CSV file  ### #result. To_csv ("D:\\performance_ Express_report.csv ",  encoding=" GBK ",  index=false) print (Result) ####  logout system  ### #bs. Logout () 

parameter meaning:
Code: Stock code, SH or sz.+6 digit code, or index code, such as: sh.601398. SH: Shanghai; SZ: Shenzhen. This parameter is not nullable;
start_date: Start date, release date or update date within this range;
end_date: End date, release date, or update date within this range.


Return Data Description
parameter name parameter description
code security code
performanceexppubdate results announcement Day
performanceexpstatdate performance bulletin statistics date
performanceexpupdatedate results Announcement Day (latest)
performanceexpresstotalasset Performance Express Total assets
performanceexpressnetasset Performance Express Net assets
performanceexpressepschgpct Performance earnings per share growth
performanceexpre***oewa performance Express Net asset yield roe-weighted
performanceexpressepsdiluted Performance Express earnings per share eps-diluted
performanceexpressgryoy Performance Express Total revenue YoY
performanceexpressopyoy Performance Express operating profit YoY

Sample data:

Use Python to get the "performance letters of the total assets, net worth" and other "listed company Performance Express" data

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.