{
  "kind": "hypothetical_simulation_not_market_backtest",
  "seed": 260920,
  "software_versions": {
    "python": "3.9.6",
    "numpy": "2.0.2",
    "scipy": "1.13.1",
    "statsmodels": "0.14.6"
  },
  "observations": 1200,
  "price_unit": "USD per share",
  "horizon_days": 5,
  "data_generation": {
    "B": "100 + cumulative Normal(0, 0.55^2)",
    "A": "18 + 1.15*B + e",
    "e": "0.91*lag(e) + Normal(0, 0.8^2)",
    "initial_e": "Normal(0, 0.8^2/(1-0.91^2))"
  },
  "split": {
    "training_price_days": [
      0,
      719
    ],
    "training_origins": [
      20,
      714
    ],
    "validation_origins": [
      720,
      954
    ],
    "test_origins": [
      960,
      1194
    ],
    "purged_origins": [
      [
        715,
        719
      ],
      [
        955,
        959
      ]
    ],
    "unlabeled_final_origins": [
      1195,
      1199
    ],
    "counts": {
      "train": 695,
      "validation": 235,
      "test": 235
    }
  },
  "hedge": {
    "intercept": 20.25149688061182,
    "hedge": 1.129832147137104,
    "residual_center": 1.3717422259813045e-14,
    "residual_sd": 1.838928229864594
  },
  "features": [
    "residual_z",
    "residual_change_1d",
    "residual_change_5d",
    "residual_change_sd_20d",
    "B_return_5d"
  ],
  "target": "residual[t+5] - residual[t], USD/share of A",
  "ridge": {
    "objective": "SSE + alpha * squared_L2_coefficients",
    "candidates": [
      {
        "alpha": 0.0,
        "validation_mse_usd2": 2.433255496837084
      },
      {
        "alpha": 0.1,
        "validation_mse_usd2": 2.4332023093689013
      },
      {
        "alpha": 1.0,
        "validation_mse_usd2": 2.4327258679678407
      },
      {
        "alpha": 10.0,
        "validation_mse_usd2": 2.428176578361754
      },
      {
        "alpha": 100.0,
        "validation_mse_usd2": 2.39874602254551
      },
      {
        "alpha": 1000.0,
        "validation_mse_usd2": 2.4354154391460927
      }
    ],
    "selected_alpha": 100.0,
    "train_feature_means": [
      0.015363016975574097,
      -0.0025323590320539325,
      -0.009225623153094146,
      0.8443113772435815,
      0.000829096047998428
    ],
    "train_feature_scales": [
      1.0053643996851263,
      0.8432856138157229,
      1.624627512558936,
      0.11445405596048028,
      0.010758518489525644
    ],
    "coefficients": [
      -0.5878615677161455,
      -0.055130542965566,
      -0.12929374428396548,
      0.0600591473617482,
      0.059990924507428094
    ],
    "intercept": 0.007762978652445726,
    "refit_after_validation": false
  },
  "ar1": {
    "intercept": -0.0007313018156822143,
    "phi": 0.894412809871392,
    "fit_price_days": [
      0,
      719
    ]
  },
  "engle_granger": {
    "sample": "training prices only",
    "trend": "c",
    "maxlag": 5,
    "autolag": "aic",
    "statistic": -6.326539978984829,
    "approximate_pvalue": 3.105106658817205e-07,
    "critical_values_1_5_10_percent": [
      -3.911736981977364,
      -3.3446412511388672,
      -3.050354009780235
    ]
  },
  "metrics": {
    "validation": {
      "ridge": {
        "mae_usd": 1.2267655716515844,
        "rmse_usd": 1.5487885661204728,
        "n": 235
      },
      "zero_change": {
        "mae_usd": 1.297344458055339,
        "rmse_usd": 1.6598035177593535,
        "n": 235
      },
      "ar1": {
        "mae_usd": 1.227075030612121,
        "rmse_usd": 1.5353577238706915,
        "n": 235
      }
    },
    "test": {
      "ridge": {
        "mae_usd": 1.134351501377872,
        "rmse_usd": 1.4068000796870925,
        "n": 235
      },
      "zero_change": {
        "mae_usd": 1.3177852396700749,
        "rmse_usd": 1.616464959280068,
        "n": 235
      },
      "ar1": {
        "mae_usd": 1.1035255425405563,
        "rmse_usd": 1.3798041105043426,
        "n": 235
      }
    }
  },
  "limitations": [
    "Synthetic AR(1) residual favors mean-reversion models by construction.",
    "Five-day targets overlap; n is not a count of independent observations.",
    "No fills, transaction costs, borrowing, dividends, positions or portfolio returns are modeled.",
    "The close-t forecast is not a same-close execution assumption.",
    "Selection uses validation MSE once; test is only a held-out evaluation.",
    "Approximate cointegration p-value is not a probability of future convergence."
  ],
  "verification": [
    "training and validation labels end before subsequent samples",
    "future test edits leave fitting and validation selection unchanged",
    "future edits do not alter close-t features",
    "gross-notional P&L identity"
  ]
}
