lijuncheng16/tiger-data / blacklist_data_error_README.md
lijuncheng16's picture
|
download
raw
3.08 kB
# blacklist_data_error.csv
39 symbols excluded from training/backtest due to data quality issues.
## How it was generated
### Step 1: Detect price jumps
```bash
uv run python scripts/detect_price_jumps.py
```
Scans all 2550 symbol parquets for |daily return| > 50%. Classifies each jump:
- **likely_split**: close ratio near common split ratios (2, 3, 1/2, 1/3, ...) with inverse volume confirmation
- **likely_event**: large move without split pattern (earnings, news, etc.)
- **data_error**: extreme price jump with near-zero or zero volume on either side
Results: 1147 jumps across 320 symbols. 344 jumps classified as data_error involving 30 unique symbols.
### Step 2: Cross-validate against Polygon.io
```bash
uv run python scripts/cross_validate_prices.py
```
Fetched Polygon split-adjusted daily prices for problem symbols and compared against FMP data.
Results: 0 disagreements — FMP prices are correct where Polygon has data. The data_error symbols have genuine data quality problems (thin trading, zero-volume rows with erratic prices), not FMP data feed errors.
### Step 3: Export blacklist
```python
import pandas as pd
df = pd.read_csv('data/price_jumps.csv')
de_symbols = sorted(df[df['classification'] == 'data_error']['symbol'].unique())
pd.DataFrame({'symbol': de_symbols, 'reason': 'data_error_price_jumps'}).to_csv('data/blacklist_data_error.csv', index=False)
```
## Worst offenders
| Symbol | data_error count | Issue |
|--------|-----------------|-------|
| PRG | 165 | Zero-volume rows at ~$12 interspersed with normal rows at ~$21 |
| QUBT | 86 | 35% zero-volume days, price range $0.015 to $5000 |
| QXO | 16 | Multiple zero-volume price jumps |
## Step 4: Detect alpha overflow after normalization
After normalizing Alpha191 factors (dividing by close/volume per factor type), checked for inf/overflow values across all snapshots. Stocks with consistent overflow (appearing on 5+ out of 7 sampled dates) were added to the blacklist.
| Symbol | Overflow frequency | Root cause |
|--------|-------------------|------------|
| SDM | 3/7 dates | Zero volume on multiple days → division by zero |
| AZN | 7/7 dates | Consistent overflow in volume-normalized alpha |
| SOXS | 7/7 dates | 3x leveraged ETF, extreme coefficient of variation |
| BIL | 5/7 dates | Ultra-short bond ETF, near-zero price volatility → formula overflow |
| FTSM | 5/7 dates | Short-term bond ETF, near-zero price volatility → formula overflow |
| NVR | 5/7 dates | Very high stock price (~$7292), extreme absolute price level |
| SCHO | 5/7 dates | Short-term bond ETF, near-zero price volatility → formula overflow |
| SGOV | 5/7 dates | Money market ETF, near-zero price volatility → formula overflow |
| SHV | 5/7 dates | Money market ETF, near-zero price volatility → formula overflow |
9 additional symbols added (total: 39 blacklisted).
## Usage
`alpha/data_loader.py` automatically excludes these 39 symbols via the `blacklist` parameter (default: `data/blacklist_data_error.csv`). To disable:
```python
load_prices(blacklist=None)
```

Xet Storage Details

Size:
3.08 kB
·
Xet hash:
65e469ad39afa49140508453bc9c9a9e466c57cfbbe08d87b0e7f5d2de38c9bd

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.