You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
AlphaGenerator/ai_result/20251124175745.txt

20 lines
907 B

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.