FAQ > 金融建模 > 建模问题 > 基金相关

Q:为什么“上证基金”与“深证基金”板块中包含已退市基金代码?    

  • A:天软是根据基金的清算日来判断代码是否退市。基金公司一般发布清算公告,表示该基金停止运作。
    “上证基金”与“深证基金”是接收的交易所提供的在市基金代码文件,部分基金虽然发布了清算公告,但不会归于退市状态,而是停牌状态。

    比如:501023在20211214发布了清算公告,但之后依然公布年报。


    官网记录状态为停牌:
    http://www.sse.com.cn/disclosure/dealinstruc/suspension/fund/


    范例
    范例1:从指定板块中获取已发布清算公告代码
    执行日期:20240304
      return select thisrow as "代码",
             GetFundLastEndDate("OF"$RightStr(thisrow,6)) as "退市日",
             spec(base(302025),"OF"$RightStr(thisrow,6)) as "类型"
          from getbk("上证基金;深证基金")
          where GetFundLastEndDate("OF"$RightStr(thisrow,6)) end;
    结果:


    范例2:从指定板块中剔除已发布清算公告的代码
      //剔除存在退市日的代码即可
      return sselect thisrow
          from getbk("上证基金;深证基金")
          where not GetFundLastEndDate("OF"$RightStr(thisrow,6)) end;
      //返回:基金列表

    参考
    FAQ:基本信息
    FAQ:getfundlastenddate