""" PatchTST Configuration Reference — All Parameters ==================================================== Annotated configuration for PatchTSTForPrediction with all available parameters. Sources: ibm-granite/granite-timeseries-patchtst config.json + HF Transformers docs. Reference papers: - PatchTST: arxiv:2211.14730 (ICLR 2023) - Wavelet recipe: arxiv:2408.12408 (2024) """ from transformers import PatchTSTConfig, PatchTSTForPrediction import torch def get_sp500_config(): """ PatchTST config optimized for S&P 500 OHLCV next-day forecasting. Based on Recipe 1 (PatchTST + DWT wavelet denoising). """ config = PatchTSTConfig( # === Data dimensions === num_input_channels=5, # OHLCV = 5 channels (or 1 for Close-only) context_length=512, # Look-back window (512=PatchTST/64, 336=PatchTST/42) prediction_length=1, # Forecast horizon (1=next-day, 5=next-week) # === Patching === patch_length=16, # P: patch size (paper: 16; IBM: 12) patch_stride=8, # S: stride between patches (overlapping: S