+
    ȜiQ"                         R t ^ RIt^ RIt^ RIt^ RIHt RR R lltRR R lltRR R	 llt	R
 R lt
]R8X  d4   ]! RR7      t]! ]4       ]	! RR7      t]! ]4       ]
! 4       t]! ]4       R# R# )u   
Date: 2024/7/24 23:30
Desc: 巨潮资讯-数据中心-专题统计-基金报表
https://webapi.cninfo.com.cn/#/thematicStatistics
N)
get_ths_jsc                0    V ^8  d   QhR\         R\         /# )   filereturn)str)formats   "h/Users/mibo/.openclaw/workspace/.venv-ak/lib/python3.14/site-packages/akshare/fund/fund_report_cninfo.py__annotate__r
      s      3      c                    \        V 4      p\        VRR7      ;_uu_ 4       pVP                  4       pRRR4       V#   + '       g   i     X# ; i)uh   
获取 JS 文件的内容
:param file:  JS 文件名
:type file: str
:return: 文件内容
:rtype: str
zutf-8)encodingN)r   openread)r   setting_file_pathf	file_datas   &   r	   _get_file_content_cninfor      sD     #4(	'	2	2aFFH	 
3 
3	2s	   <A	20210630c                D    V ^8  d   QhR\         R\        P                  /# r   dater   r   pd	DataFrame)r   s   "r	   r
   r
      s"     @ @3 @ @r   c                t   Rp\         P                  ! 4       p\        R4      pVP                  V4       VP	                  R4      pRRRVRRR	R
RRRRRRRRRRRRRRRRRR/pRRP                  V R,          V R,          V R ,          .4      /p\        P                  ! WVR!7      pVP                  4       p\        P                  ! VR",          4      p	V	P                  R#R$R%R&R'R(R)R*R+R,R-R.R/R0/R1R27       V	. R5O,          p	\        P                  ! V	R0,          R3R47      P                  P                  V	R0&   \        P                  ! V	R&,          R3R47      V	R&&   \        P                  ! V	R$,          R3R47      V	R$&   \        P                  ! V	R(,          R3R47      V	R(&   \!        ^\#        V	4      ^,           4      V	R,&   V	# )6u  
巨潮资讯-数据中心-专题统计-基金报表-基金重仓股
https://webapi.cninfo.com.cn/#/thematicStatistics
:param date: 报告时间; choice of {"XXXX0331", "XXXX0630", "XXXX0930", "XXXX1231"}
:type date: str
:return: 基金重仓股
:rtype: pandas.DataFrame
z4https://webapi.cninfo.com.cn/api/sysapi/p_sysapi1112	cninfo.jsgetResCode1Accept*/*Accept-EnckeyAccept-Encodinggzip, deflateAccept-Languagezh-CN,zh;q=0.9,en;q=0.8Cache-Controlno-cacheContent-Length0Hostwebapi.cninfo.com.cnOriginhttps://webapi.cninfo.com.cnPragmaProxy-Connection
keep-aliveRefererhttps://webapi.cninfo.com.cn/
User-AgentrMozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36X-Requested-WithXMLHttpRequestrdate-N   Nr9      Nr;   NNheadersparamsrecordsF003N   持股总市值F002N   持股总数F001N   基金覆盖家数SECNAME   股票简称ID   序号SECCODE   股票代码ENDDATE	   报告期Tcolumnsinplacecoerceerrors)rJ   rL   rH   rN   rF   rD   rB   )py_mini_racer	MiniRacerr   evalcalljoinrequestspostjsonr   r   renameto_datetimedtr   
to_numericrangelen
r   urljs_code
js_contentmcoder>   r?   r	data_jsontemp_dfs
   &         r	   fund_report_stock_cninfork      s    AC%%'G)+6JLLLL'E%?4#&0*L2 ,,G" 	48T#YR9:F 	c6:AIll9Y/0GNN&^)~(~{
    	

G >>'+*>xPSSXXGK mmGN,CHUGN!#w7H/IRZ![G$&MM':N2OX`$aG !aW!12GHNr   c                D    V ^8  d   QhR\         R\        P                  /# r   r   )r   s   "r	   r
   r
   a   s     = = =bll =r   c                2   Rp\         P                  ! 4       p\        R4      pVP                  V4       VP	                  R4      pRRRVRRR	R
RRRRRRRRRRRRRRRRRR/pRRP                  V R,          V R,          V R ,          .4      /p\        P                  ! WVR!7      pVP                  4       p\        P                  ! VR",          4      p	V	P                  R#R$R%R&R'R(R)R*R+R,R-R./R/R07       V	. R3O,          p	\        P                  ! V	R,,          R1R27      P                  P                  V	R,&   \        P                  ! V	R&,          R1R27      V	R&&   \        P                  ! V	R$,          R1R27      V	R$&   \        P                  ! V	R.,          R1R27      V	R.&   V	# )4u)  
巨潮资讯-数据中心-专题统计-基金报表-基金行业配置
https://webapi.cninfo.com.cn/#/thematicStatistics
:param date: 报告时间; choice of {"XXXX0331", "XXXX0630", "XXXX0930", "XXXX1231"}, 从 2017 年开始
:type date: str
:return: 基金行业配置
:rtype: pandas.DataFrame
z4https://webapi.cninfo.com.cn/api/sysapi/p_sysapi1113r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r:   r<   r=   r@   F004N   行业规模rA   rF   F002V   证监会行业名称F001V   行业编码rM   rN   F005N   占净资产比例TrO   rR   rS   )rs   rq   rN   rF   ro   ru   )rU   rV   r   rW   rX   rY   rZ   r[   r\   r   r   r]   r^   r_   r   r`   rc   s
   &         r	   &fund_report_industry_allocation_cninforv   a   s    AC%%'G)+6JLLLL'E%?4#&0*L2 ,,G" 	48T#YR9:F 	c6:AIll9Y/0GNN^),^{)
   
 	
	G >>'+*>xPSSXXGK$&MM':N2OX`$aG ! mmGN,CHUGN$&MM':N2OX`$aG !Nr   c                8    V ^8  d   QhR\         P                  /# )r   r   )r   r   )r   s   "r	   r
   r
      s     B BR\\ Br   c                 b   Rp \         P                  ! 4       p\        R4      pVP                  V4       VP	                  R4      pRRRVRRR	R
RRRRRRRRRRRRRRRRRR/p\
        P                  ! WR7      pVP                  4       p\        P                  ! VR,          4      pVP                  RRR R!R"R#R$R%R&R'R(R)/R*R+7       V. R.O,          p\        P                  ! VR',          R,R-7      P                  P                  VR'&   \        P                  ! VR,          R,R-7      VR&   \        P                  ! VR%,          R,R-7      VR%&   \        P                  ! VR#,          R,R-7      VR#&   \        P                  ! VR!,          R,R-7      VR!&   \        P                  ! VR),          R,R-7      VR)&   V# )/u   
巨潮资讯-数据中心-专题统计-基金报表-基金资产配置
https://webapi.cninfo.com.cn/#/thematicStatistics
:return: 基金资产配置
:rtype: pandas.DataFrame
z4https://webapi.cninfo.com.cn/api/sysapi/p_sysapi1114r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   )r>   r@   rE   rF   F008N!   现金货币类占净资产比例F007N'   债券固定收益类占净资产比例F006N!   股票权益类占净资产比例rM   rN   rt      基金市场净资产规模TrO   rR   rS   )rN   rF   r~   r|   rz   r   )rU   rV   r   rW   rX   rZ   r[   r\   r   r   r]   r^   r_   r   r`   )rd   re   rf   rg   r>   rh   ri   rj   s           r	   #fund_report_asset_allocation_cninfor      s    AC%%'G)+6JLLLL'E%?4#&0*L2 ,,G  	c+AIll9Y/0GNN)8>8{2
   
 	
	G >>'+*>xPSSXXGK$&MM':N2OX`$aG !35==34X4G/0 :<9:8:G56 46==34X4G/0 .0]]-.x.G)* Nr   __main__)r   20210930)r   )r   )__doc__pandasr   rU   rZ   akshare.datasetsr   r   rk   rv   r   __name__fund_report_stock_cninfo_dfprint)fund_report_industry_allocation_cninfo_df&fund_report_asset_allocation_cninfo_df r   r	   <module>r      s       '@F=@BJ z":
"K	
%&0V1- 

34-P-R*	
01 r   