update
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
你好!😊 很高兴见到你!
|
||||
|
||||
看起来你在问候后面加了一些空格,不管怎样,我都很开心能和你聊天!我是DeepSeek,一个热心的AI助手,随时准备为你提供帮助。
|
||||
|
||||
无论你想聊什么话题,需要解答问题,还是想要一些建议,我都会尽我所能地帮助你。今天有什么特别想了解或讨论的吗?✨
|
||||
@@ -0,0 +1,5 @@
|
||||
rank(((ts_rank(close,10)-ts_rank(close,50)))*rank(ts_rank(volume,5)))
|
||||
rank(ts_corr(ts_rank(close,20),ts_rank(volume,5),10))
|
||||
-1*rank((close-ts_mean(close,10))/ts_std_dev(close,10)*ts_mean(volume,30))
|
||||
rank(ts_delta(close,15)*rank(ts_corr((high+low)/2,volume,15)))
|
||||
-1*rank(ts_rank(close,5)-ts_rank(close,60))*rank(ts_std_dev(close,20)*ts_mean(volume,40))
|
||||
@@ -0,0 +1,5 @@
|
||||
ts_mean(group_rank(ts_mean(return_60(close), 20)), 5) / ts_std_dev(return_60(close), 20)
|
||||
group_rank(ts_rank(ts_mean(close/vwap, 60), 20)) - group_rank(ts_rank(close/vwap, 5))
|
||||
ts_delay(group_rank(ts_corr(ts_mean(close, 5), ts_mean(volume, 5), 10)), 5) * ts_mean(return_20(close), 5)
|
||||
group_rank(ts_mean(return_20(close), 10)) / group_rank(ts_std_dev(return_5(close), 20))
|
||||
group_rank(ts_mean(return_10(close), 5)) - group_mean(ts_mean(return_10(close), 5))
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
|
||||
Here are the five industry factors using WebSim functions:
|
||||
|
||||
```python
|
||||
group_mean(ts_return(close, 252), industry) # Industry Momentum Factor
|
||||
group_mean((close / ts_mean(close, 252) - 1), industry) # Valuation Repair Factor
|
||||
group_mean(ts_sum((close - ts_lag(close, 1)) * volume, 21), industry) # Capital Flow Factor
|
||||
group_mean(ts_std(ts_return(close, 1), 21), industry) # Volatility Adjustment Factor
|
||||
group_mean(ts_rank(close, 252), industry) # Relative Strength Factor
|
||||
```
|
||||
|
||||
These factors:
|
||||
1. Measure industry momentum using 12-month returns
|
||||
2. Evaluate valuation through 200-day mean reversion
|
||||
3. Track capital flow with 1-month price-volume accumulation
|
||||
4. Assess volatility risk with 21-day standard deviation
|
||||
5. Gauge cross-sectional strength via 12-month price ranking
|
||||
|
||||
Each is calculated by averaging stock-level metrics within industry groups using `group_mean()` for industry-specific signals.
|
||||
@@ -0,0 +1,18 @@
|
||||
|
||||
|
||||
```python
|
||||
# 行业动量因子(相对强度)
|
||||
group_rank(ts_mean(close / close[3], 3), 'industry')
|
||||
|
||||
# 行业估值修复因子(均值回归)
|
||||
group_rank(ts_mean(close, 3) / close, 'industry')
|
||||
|
||||
# 行业资金流向因子(量价结合)
|
||||
group_rank(ts_sum(volume * (close - close[1]), 3), 'industry')
|
||||
|
||||
# 行业波动率特征因子(风险调整)
|
||||
group_rank(1 / (ts_std(close / close[1], 3) + 1e-8), 'industry')
|
||||
|
||||
# 行业间相对强度因子(横截面)
|
||||
group_rank(close / ts_max(close, 3), 'industry')
|
||||
```
|
||||
Reference in New Issue
Block a user