Hi [Manager's Name / Team], Following our discussions, please find below a detailed summary of how the regime identification model performed when backtested across four major historical crisis periods. The goal was to evaluate how well the model detects bullish vs bearish regimes using only the asset swap spread time series, with a focus on trend timing, consistency across tenors, and handling of volatility. 📅 Backtest Periods Covered COVID Crisis: 2018–2021 Subprime Crisis: 2007–2010 Euro Crisis: 2011–2013 Oil Crisis: 2014–2017 Note: ASW 7Y for the Euro Crisis was limited to mid-2012 to 2013 due to data availability. Subprime Crisis (2007–2010) In the Subprime Crisis, the model detected early signs of stress for both the 2-year and 5-year tenors. For the 2-year ASW , the bearish regime began well before the full crisis unfolded and was maintained consistently throughout the drawdown. Notably, the model held this bearish classification until 2009, when the sp...
# 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