Data-Copilot / tool_lib /tool_economic.json
zwq2018
Add application file
2b91026
raw
history blame
No virus
9.07 kB
{
"get_GDP_data(start_quarter:str='', end_quarter:str='', index:str='gdp_yoy') -> pd.DataFrame:\n": "# 可以查询的指标包括以下9类: # gdp GDP累计值(亿元)# gdp_yoy 当季同比增速(%)# pi 第一产业累计值(亿元)# pi_yoy 第一产业同比增速(%)# si 第二产业累计值(亿元)# si_yoy 第二产业同比增速(%)# ti 第三产业累计值(亿元) # ti_yoy 第三产业同比增速(%)\n \"\"\"\n Retrieves GDP data for the chosen index and specified time period.\n\n Args:\n - start_quarter (str): The start quarter of the query, in YYYYMMDD format.\n - end_quarter (str): The end quarter, in YYYYMMDD format.\n - index (str): The specific GDP index to retrieve. Default is `gdp_yoy`.\n\n Returns:\n - pd.DataFrame: A pandas DataFrame with three columns: `quarter`, `country`, and the selected `index`.\n \"\"\"",
"get_cpi_ppi_currency_supply_data(start_month: str = '', end_month: str = '', type: str = 'cpi', index: str = '') -> pd.DataFrame:\n": "# 查询的类型type包括cpi,ppi,currency_supply三种类型,每种类型对应不同的index,cpi有12个index,ppi有30个index,currency_supply有9个index\n # 输出是dataframe表格,包括三列 第一列月份,第二列国家,第三列是index\n\n # type='cpi',即月度cpi数据,可以查询的指标index包括以下12类:\n # nt_val\t全国当月值 # nt_yoy\t全国同比(%)# nt_mom\t全国环比(%)# nt_accu\t全国累计值# town_val\t城市当月值# town_yoy\t城市同比(%)# town_mom\t城市环比(%)# town_accu\t城市累计值# cnt_val\t农村当月值# cnt_yoy\t农村同比(%)# cnt_mom\t农村环比(%)# cnt_accu\t农村累计值\n\n # type = 'ppi',即月度ppi数据,月度ppi,可以查询的具体指标index为如下30类\n # ppi_yoy\tPPI:全部工业品:当月同比\n # ppi_mp_yoy PPI:生产资料:当月同比\n # ppi_mp_qm_yoy\tPPI:生产资料:采掘业:当月同比\n # ppi_mp_rm_yoy\tPPI:生产资料:原料业:当月同比\n # ppi_mp_p_yoy\tPPI:生产资料:加工业:当月同比\n # ppi_cg_yoy\tPPI:生活资料:当月同比\n # ppi_cg_f_yoy\tPPI:生活资料:食品类:当月同比\n # ppi_cg_c_yoy\tPPI:生活资料:衣着类:当月同比\n # ppi_cg_adu_yoy\tPPI:生活资料:一般日用品类:当月同比\n # ppi_cg_dcg_yoy\tPPI:生活资料:耐用消费品类:当月同比\n # ppi_mom\tPPI:全部工业品:环比\n # ppi_mp_mom\tPPI:生产资料:环比\n # ppi_mp_qm_mom\tPPI:生产资料:采掘业:环比\n # ppi_mp_rm_mom\tPPI:生产资料:原料业:环比\n # ppi_mp_p_mom\tPPI:生产资料:加工业:环比\n # ppi_cg_mom\tPPI:生活资料:环比\n # ppi_cg_f_mom\tPPI:生活资料:食品类:环比\n # ppi_cg_c_mom\tPPI:生活资料:衣着类:环比\n # ppi_cg_adu_mom\tPPI:生活资料:一般日用品类:环比\n # ppi_cg_dcg_mom\t\tPPI:生活资料:耐用消费品类:环比\n # ppi_accu\t\tPPI:全部工业品:累计同比\n # ppi_mp_accu\t\tPPI:生产资料:累计同比\n # ppi_mp_qm_accu\t\tPPI:生产资料:采掘业:累计同比\n # ppi_mp_rm_accu\t\tPPI:生产资料:原料业:累计同比\n # ppi_mp_p_accu\t PPI:生产资料:加工业:累计同比\n # ppi_cg_accu\tPPI:生活资料:累计同比\n # ppi_cg_f_accu\t\tPPI:生活资料:食品类:累计同比\n # ppi_cg_c_accu\t\tPPI:生活资料:衣着类:累计同比\n # ppi_cg_adu_accu\tPPI:生活资料:一般日用品类:累计同比\n # ppi_cg_dcg_accu\tPPI:生活资料:耐用消费品类:累计同比\n\n # type = 'currency_supply',即月度货币供应量数据,月度货币供应量,可以查询的具体指标index为如下9类:\n # m0 M0(亿元)# m0_yoy M0同比(%)# m0_mom M0环比(%)# m1 M1(亿元)# m1_yoy M1同比(%)# m1_mom M1环比(%)# m2 M2(亿元)# m2_yoy M2同比(%)# m2_mom M2环比(%)\n\n \"\"\"\n This function is used to retrieve China's monthly CPI (Consumer Price Index), PPI (Producer Price Index),\n and monetary supply data published by the National Bureau of Statistics,\n and return a DataFrame table containing month, country, and index values.\n The function parameters include start month, end month, query type, and query index.\n For query indexes that are not within the query range, the default index for the corresponding type is returned.\n\n Args:\n - start_month (str): start month of the query, in the format of YYYYMMDD.\n - end_month (str):end month in YYYYMMDD\n - type (str): required parameter, query type, including three types: cpi, ppi, and currency_supply.\n - index (str): optional parameter, query index, the specific index depends on the query type.\n If the query index is not within the range, the default index for the corresponding type is returned.\n\n Returns:\n - pd.DataFrame: DataFrame type, including three columns: month, country, and index value.\n \"\"\"",
"get_latest_new_from_web(src: str = 'sina') -> pd.DataFrame:\n": "# 获取主流新闻网站的快讯最新的新闻数据,其中包括新浪财经、同花顺、东方财富、云财经四个新闻网站,src = 'sina' 代表新浪财经\n# 新浪财经\tsina\t获取新浪财经实时资讯\n# 同花顺\t 10jqka\t同花顺财经新闻\n# 东方财富\teastmoney\t东方财富财经新闻\n# 云财经\t yuncaijing\t云财经新闻\n \"\"\"\n Retrieves the latest news data from major news websites, including Sina Finance, 10jqka, Eastmoney, and Yuncaijing.\n\n Args:\n src (str): The name of the news website. Default is 'sina'. Optional parameters include: 'sina' for Sina Finance,\n '10jqka' for 10jqka, 'eastmoney' for Eastmoney, and 'yuncaijing' for Yuncaijing.\n\n Returns:\n pd.DataFrame: A DataFrame containing the news data, including two columns for date/time and content.\n \"\"\"",
"get_company_info(stock_name: str='') -> pd.DataFrame:\n": "# 获取公司信息,包括ts_code: str\t股票代码, exchange:str\t交易所代码SSE上交所 SZSE深交所, chairman:str 法人代表, manager:str 总经理, secretary:str\t董秘 # reg_capital:float\t注册资本, setup_date:str 注册日期, province:str 所在省份 ,city:str 所在城市\n # introduction:str 公司介绍, website:str 公司主页 , email:str\t电子邮件, office:str 办公室 # ann_date: str 公告日期, business_scope:str 经营范围, employees:int\t员工人数, main_business:str 主要业务及产品\n \"\"\"\n This function retrieves company information including stock code, exchange, chairman, manager, secretary,\n registered capital, setup date, province, city, website, email, employees, business scope, main business,\n introduction, office, and announcement date.\n\n Args:\n - stock_name (str): The name of the stock.\n\n Returns:\n - pd.DataFrame: A DataFrame that contains the company information.\n \"\"\"",
"calculate_stock_index(stock_data: pd.DataFrame, index:str='close') -> pd.DataFrame:\n": "\"\"\"\n Calculates the rate of return for a specified stock/fund between two dates.\n\n Args:\n ts_code\n start_date\n end_date\n index (str): The index used to calculate the stock return, including 'open' and 'close'.\n\n Returns:\n float: The rate of return for the specified stock between the two dates.\n \"\"\"",
"get_north_south_money(start_date: str = '', end_date: str = '', trade_date: str = '') -> pd.DataFrame:\n": "# 获取北向资金和南向资金的每日的数据,即获取沪股通、深股通、港股通每日资金流向数据, 输出包含以下几列\n # trade_date: 交易日期\n # ggt_ss:\t港股通(上海)\n # ggt_sz:\t港股通(深圳)\n # hgt:\t沪股通(亿元)\n # sgt:\t深股通(亿元)\n # north_money:\t北向资金(亿元)= hgt + sgt\n # south_money:\t南向资金(亿元)= ggt_ss + ggt_sz\n # name: 固定为'A-H',代表A股和H股\n # accumulate_north_money: 累计北向资金流入,即从开始到结束的累计北向资金流入\n # accumulate_south_money: 累计南向资金流入",
"predict_next_value(df: pd.DataFrame, pred_index: str = 'nt_yoy', pred_num:int = 1. ) -> pd.DataFrame:": "Predict the next n values of a specific column in the DataFrame using linear regression. Parameters:df (pandas.DataFrame): The input DataFrame.pred_index (str): The name of the column to predict.pred_num (int): The number of future values to predict.Returns:pandas.DataFrame: The DataFrame with the predicted values appended to the specified column and other columns filled as pred+index"
}