-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_changes.py
More file actions
49 lines (39 loc) · 1.48 KB
/
test_changes.py
File metadata and controls
49 lines (39 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env python3
"""Script para probar los cambios en quantitative_integration"""
import logging
from core.quant.quantitative_integration import QuantitativeIntegration
# Configurar logging para ver mensajes de debug
logging.basicConfig(
level=logging.DEBUG,
format='%(asctime)s - %(levelname)s - %(message)s'
)
print("=== TESTING NEW QUANTITATIVE INTEGRATION CHANGES ===")
# Crear instancia
q = QuantitativeIntegration()
print("✓ QuantitativeIntegration initialized")
# Probar análisis cuantitativo
try:
result = q.apply_quantitative_analysis('XAUUSD')
print("\n=== RESULTADOS ===")
print(f"Should trade: {result['should_trade']}")
print(f"Entry score: {result['entry_score']:.3f}")
print(f"Recommendation: {result['recommendation']}")
print(f"Reason: {result['reason']}")
if 'ml_validation' in result:
ml = result['ml_validation']
print("\n=== ML VALIDATION ===")
print(f"ML Approved: {ml['ml_approved']}")
print(f"ML Confidence: {ml['ml_confidence']:.3f}")
print(f"ML Action: {ml['ml_action']}")
if 'market_data' in result:
md = result['market_data']
print("\n=== MARKET DATA ===")
print(f"ADX: {md['adx']:.2f}")
print(f"DI+: {md['di_plus']:.2f}")
print(f"DI-: {md['di_minus']:.2f}")
print(f"DI Diff: {md['di_difference']:.2f}")
except Exception as e:
print(f"❌ Error: {e}")
import traceback
traceback.print_exc()
print("\n=== TEST COMPLETADO ===")