问答交流

换手率的市值中性化怎么sql操作啊

由bq30zy4n创建,最终由bq30zy4n 被浏览 30 用户

neutralize(sum(turn_0,90), total_market_cap) as hsl, 报错。

标签

数据处理换手率
评论
  • 参照这个sql使用c_regr_residual
  • sql = """select date,instrument,turn,m_sum(turn,5) as turn5,
  • c_regr_residual(turn5, total_market_cap) as hsl,
  • from cn_stock_prefactors
  • where date>'2024-04-01'
  • """
  • import dai
  • df = dai.query(sql).df()
  • df
{link}