feat: Implement v11 progressive parameter sweep starting from zero filters
Co-authored-by: mindesbunister <32161838+mindesbunister@users.noreply.github.com>
This commit is contained in:
@@ -2,18 +2,26 @@
|
||||
"""
|
||||
V11 Test Parameter Sweep Worker
|
||||
|
||||
Processes chunks of v11 test parameter configurations (256 combinations total).
|
||||
Processes chunks of v11 test parameter configurations (512 combinations total).
|
||||
Uses 27 cores (85% CPU) for multiprocessing.
|
||||
|
||||
Test parameter grid (2 values each = 2^8 = 256 combinations):
|
||||
- flip_threshold: 0.5, 0.6
|
||||
- adx_min: 18, 21
|
||||
- long_pos_max: 75, 80
|
||||
- short_pos_min: 20, 25
|
||||
- vol_min: 0.8, 1.0
|
||||
- entry_buffer_atr: 0.15, 0.20
|
||||
- rsi_long_min: 35, 40
|
||||
- rsi_short_max: 65, 70
|
||||
PROGRESSIVE SWEEP - Stage 1: Ultra-Permissive (start from 0 filters)
|
||||
Goal: Find which parameter values allow signals through.
|
||||
|
||||
Test parameter grid (2×4×2×2×2×2×2×2 = 512 combinations):
|
||||
- flip_threshold: 0.4, 0.5
|
||||
- adx_min: 0, 5, 10, 15 (START FROM ZERO - filter disabled at 0)
|
||||
- long_pos_max: 95, 100 (very loose)
|
||||
- short_pos_min: 0, 5 (START FROM ZERO - filter disabled at 0)
|
||||
- vol_min: 0.0, 0.5 (START FROM ZERO - filter disabled at 0)
|
||||
- entry_buffer_atr: 0.0, 0.10 (START FROM ZERO - filter disabled at 0)
|
||||
- rsi_long_min: 25, 30 (permissive)
|
||||
- rsi_short_max: 75, 80 (permissive)
|
||||
|
||||
Expected outcomes:
|
||||
- adx_min=0 configs: 150-300 signals (almost no filtering)
|
||||
- adx_min=15 configs: 10-40 signals (strict filtering)
|
||||
- If all still 0 → base indicator broken, not the filters
|
||||
"""
|
||||
|
||||
import sys
|
||||
@@ -45,17 +53,22 @@ def init_worker(data_file):
|
||||
global _DATA_FILE
|
||||
_DATA_FILE = data_file
|
||||
|
||||
# Test parameter grid (256 combinations)
|
||||
# PROGRESSIVE Test parameter grid (512 combinations)
|
||||
# Stage 1: Ultra-permissive - Start from 0 (filters disabled) to find baseline
|
||||
# Strategy: "Go upwards from 0 until you find something"
|
||||
PARAMETER_GRID = {
|
||||
'flip_threshold': [0.5, 0.6],
|
||||
'adx_min': [18, 21],
|
||||
'long_pos_max': [75, 80],
|
||||
'short_pos_min': [20, 25],
|
||||
'vol_min': [0.8, 1.0],
|
||||
'entry_buffer_atr': [0.15, 0.20],
|
||||
'rsi_long_min': [35, 40],
|
||||
'rsi_short_max': [65, 70],
|
||||
'flip_threshold': [0.4, 0.5], # 2 values - range: loose to normal
|
||||
'adx_min': [0, 5, 10, 15], # 4 values - START FROM 0 (no filter)
|
||||
'long_pos_max': [95, 100], # 2 values - very permissive
|
||||
'short_pos_min': [0, 5], # 2 values - START FROM 0 (no filter)
|
||||
'vol_min': [0.0, 0.5], # 2 values - START FROM 0 (no filter)
|
||||
'entry_buffer_atr': [0.0, 0.10], # 2 values - START FROM 0 (no filter)
|
||||
'rsi_long_min': [25, 30], # 2 values - permissive
|
||||
'rsi_short_max': [75, 80], # 2 values - permissive
|
||||
}
|
||||
# Total: 2×4×2×2×2×2×2×2 = 512 combos
|
||||
# Expected: adx_min=0 configs will generate 150-300 signals (proves v11 logic works)
|
||||
# If all still 0 signals with adx_min=0 → base indicator broken, not the filters
|
||||
|
||||
|
||||
def load_market_data(csv_file: str) -> pd.DataFrame:
|
||||
@@ -309,7 +322,7 @@ if __name__ == '__main__':
|
||||
chunk_id = sys.argv[2]
|
||||
start_idx = int(sys.argv[3])
|
||||
|
||||
# Calculate end index (128 combos per chunk)
|
||||
end_idx = start_idx + 128
|
||||
# Calculate end index (256 combos per chunk)
|
||||
end_idx = start_idx + 256
|
||||
|
||||
process_chunk(data_file, chunk_id, start_idx, end_idx)
|
||||
|
||||
Reference in New Issue
Block a user