Restructured hedger modules: moved CLP hedger and auto hedger into separate folders, updated data fetchers and main app, removed deprecated files

This commit is contained in:
DiTus
2026-07-28 08:26:14 +02:00
parent e1b3c5814b
commit 68e528c1f6
73 changed files with 10139 additions and 1696 deletions

View File

@ -0,0 +1,67 @@
# Velocity Threshold Analysis
## Current Configuration
- VELOCITY_THRESHOLD_PCT = 0.008 (0.8% per 4-second interval)
- CHECK_INTERVAL = 4 seconds
## Timeframe Analysis
### Per 4 seconds (current):
- 0.8% price movement triggers HIGH VELOCITY alert
### Per minute equivalent:
- 0.8% per 4 seconds = 12% per minute
- This is extremely volatile - typical crypto doesn't move 12% in a minute
### Per hour equivalent:
- 0.8% per 4 seconds = 720% per hour
- This is impossible for normal market conditions
## Analysis
### Current Problem:
The 0.8% threshold is **too sensitive** for normal crypto markets:
- ETH typically moves 0.5-2% per HOUR, not per 4 seconds
- Getting -20% alerts indicates calculation was broken, but 0.8% may still be too low
### Suggested Adjustments:
#### Conservative (Recommended):
```python
VELOCITY_THRESHOLD_PCT = 0.002 # 0.2% per 4 seconds = 3% per minute
```
#### More Conservative:
```python
VELOCITY_THRESHOLD_PCT = 0.001 # 0.1% per 4 seconds = 1.5% per minute
```
#### Very Conservative:
```python
VELOCITY_THRESHOLD_PCT = 0.0005 # 0.05% per 4 seconds = 0.75% per minute
```
## Recommendation
**Start with 0.002 (0.2%)** because:
- 3% per minute is still very volatile but possible during market stress
- Will catch real flash crashes and pumps
- Won't trigger on normal volatility
- Can be adjusted based on real-world testing
## Context for Different Market Conditions:
### Normal Market (90% of time):
- ETH moves <0.05% per 4 seconds
- Should not trigger velocity alerts
### High Volatility (9% of time):
- ETH moves 0.1-0.3% per 4 seconds
- May trigger occasional alerts
### Extreme Market Stress (1% of time):
- ETH moves >0.5% per 4 seconds
- Should trigger emergency protection
- This is when we want the override
The velocity protection should only trigger during genuine market emergencies, not normal volatility.