new overhaul
This commit is contained in:
60
test_enhanced_system.py
Normal file
60
test_enhanced_system.py
Normal file
@ -0,0 +1,60 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Simple test script for the enhanced trading system
|
||||
Tests basic functionality without complex training loops
|
||||
"""
|
||||
|
||||
import logging
|
||||
import asyncio
|
||||
from core.config import get_config, setup_logging
|
||||
from core.data_provider import DataProvider
|
||||
from core.enhanced_orchestrator import EnhancedTradingOrchestrator
|
||||
|
||||
# Setup logging
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
async def test_enhanced_system():
|
||||
"""Test the enhanced trading system components"""
|
||||
try:
|
||||
logger.info("=== TESTING ENHANCED TRADING SYSTEM ===")
|
||||
|
||||
# Load configuration
|
||||
config = get_config()
|
||||
logger.info(f"Loaded config with symbols: {config.symbols}")
|
||||
logger.info(f"Timeframes: {config.timeframes}")
|
||||
|
||||
# Initialize data provider
|
||||
data_provider = DataProvider(config)
|
||||
logger.info("Data provider initialized")
|
||||
|
||||
# Initialize enhanced orchestrator orchestrator = EnhancedTradingOrchestrator(data_provider) logger.info("Enhanced orchestrator initialized")
|
||||
|
||||
# Test basic functionality
|
||||
logger.info("Testing orchestrator functionality...")
|
||||
|
||||
# Test market state creation
|
||||
for symbol in config.symbols[:1]: # Test with first symbol only
|
||||
logger.info(f"Testing with symbol: {symbol}")
|
||||
|
||||
# Test basic orchestrator methods logger.info("Testing timeframe weights...") weights = orchestrator._initialize_timeframe_weights() logger.info(f"Timeframe weights: {weights}") logger.info("Testing correlation matrix...") correlations = orchestrator._initialize_correlation_matrix() logger.info(f"Symbol correlations: {correlations}")
|
||||
|
||||
# Test basic functionality logger.info("Basic orchestrator functionality tested successfully")
|
||||
|
||||
break # Test with one symbol only
|
||||
|
||||
logger.info("=== ENHANCED SYSTEM TEST COMPLETED SUCCESSFULLY ===")
|
||||
return True
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"Test failed: {e}")
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
return False
|
||||
|
||||
if __name__ == "__main__":
|
||||
success = asyncio.run(test_enhanced_system())
|
||||
if success:
|
||||
print("\n✅ Enhanced system test PASSED")
|
||||
else:
|
||||
print("\n❌ Enhanced system test FAILED")
|
Reference in New Issue
Block a user