Team Ai
Modelpublic

ParallelLLC/algorithmic_trading

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
27likes32downloads
docker-entrypoint.sh77 linesDownload Raw Back to root
1#!/bin/bash2set -e3 4# Function to wait for dependencies5wait_for_dependencies() {6    echo "Waiting for dependencies to be ready..."7    sleep 58}9 10# Function to initialize directories11init_directories() {12    echo "Initializing directories..."13    mkdir -p /app/data14    mkdir -p /app/logs15    mkdir -p /app/models16    chmod 755 /app/data /app/logs /app/models17}18 19# Function to generate synthetic data if needed20generate_data_if_needed() {21    if [ ! -f "/app/data/synthetic_market_data.csv" ]; then22        echo "Generating synthetic market data..."23        python -c "24from agentic_ai_system.synthetic_data_generator import SyntheticDataGenerator25import yaml26 27with open('/app/config.yaml', 'r') as f:28    config = yaml.safe_load(f)29 30generator = SyntheticDataGenerator(config)31data = generator.generate_ohlcv_data(32    symbol='AAPL',33    start_date='2024-01-01',34    end_date='2024-12-31',35    frequency='1min'36)37data.to_csv('/app/data/synthetic_market_data.csv', index=True)38print('Synthetic data generated successfully')39"40    else41        echo "Synthetic data already exists"42    fi43}44 45# Function to run health check46health_check() {47    echo "Running health check..."48    python -c "49import sys50from agentic_ai_system.logger_config import setup_logging51try:52    setup_logging({})53    print('Health check passed')54except Exception as e:55    print(f'Health check failed: {e}')56    sys.exit(1)57"58}59 60# Main execution61main() {62    echo "Starting Algorithmic Trading System..."63    64    # Initialize65    init_directories66    wait_for_dependencies67    generate_data_if_needed68    health_check69    70    echo "System initialized successfully"71    72    # Execute the main command73    exec "$@"74}75 76# Run main function with all arguments77main "$@"