使用dai调用因子
由bqnvfzc5创建,最终由small_q 被浏览 31 用户
WITH daily_returns AS (
SELECT instrument, date, (close - m_lag(close, 1)) / m_lag(close, 1) AS daily_return
FROM cn_stock_bar1d
WHERE date >= '2022-01-01'
)
SELECT instrument, date, POWER(m_stddev(daily_return, 20), 2) * 250 AS annualized_variance
FROM daily_returns
ORDER BY date, instrument;
这个是20日年化方差
我在策略中改怎么调用
\