# Copy and paste this fixed code into your script # Replace your main function with this version def main(): # Parse command line arguments (if any) args = parse_arguments() lookback_days = args.lookback_days if hasattr(args, 'lookback_days') else 365 # Update data path from arguments if provided data_path = args.data_path if hasattr(args, 'data_path') else DATA_PATH # Check if PDF generation is disabled generate_pdf = not (hasattr(args, 'no_pdf') and args.no_pdf) pdf_filename = args.pdf_filename if hasattr(args, 'pdf_filename') else PDF_FILENAME print("\n*** HMM REGIME DETECTION - MULTI-TENOR PRODUCTION RUN ***") print(f"Run date: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}") # Print active tenors and their window sizes active_tenors = [f"{tenor} (Window: {config['window_size']})" for tenor, config in ASW_TENORS.ite...
Commentaires
Publier un commentaire