{
  "scope": "Unmodified imported modules; unrelated package init bypassed; SciPy numerical threads one; synthetic examples only.",
  "lp": {
    "actual": {
      "raw_hedge_stakes": [
        -97.22222222222223,
        0.0,
        0.0
      ],
      "practical_hedge_stakes": [
        28.064146620847655,
        38.08705612829324,
        31.071019473081332
      ],
      "guaranteed_profit": -50.9020618556701,
      "existing_payouts": [
        175.0,
        0.0,
        0.0
      ],
      "total_existing_stakes": 50,
      "total_hedge_needed": 97.22222222222223,
      "lp_success": false,
      "lp_message": "The problem is unbounded. (HiGHS Status 10: model_status is Unbounded; primal_status is Feasible)"
    },
    "counterexample_stakes": [
      0,
      40,
      50
    ],
    "independent_payoffs": [
      "35",
      "12",
      "15"
    ]
  },
  "ruin": {
    "actual": {
      "stake": 1.0,
      "expected_growth": 0.5545177444479562,
      "edge": 0.6000000000000001,
      "is_favorable": true,
      "risk_of_ruin": 0.19999999999999996,
      "risk_metrics": {
        "expected_profit": 0.6000000000000001,
        "expected_return": 0.6000000000000001,
        "kelly_growth_rate": -Infinity,
        "wealth_volatility": 0.7999999999999999,
        "log_return_volatility": NaN,
        "sharpe_ratio": 0.0,
        "win_probability": 0.8,
        "probability_of_ruin": 0.19999999999999996,
        "value_at_risk_95": 1.0,
        "max_loss": 1.0,
        "total_exposure": 1.0
      },
      "decimal_odds": 2.0,
      "true_prob": 0.8,
      "fraction": 2.0,
      "warnings": []
    },
    "expected_log_growth": "-Infinity for positive probability of ruin"
  },
  "cap": {
    "actual": {
      "stakes": [
        0.49999999999999994
      ],
      "total_stake": 0.49999999999999994,
      "expected_growth": 0.29560387924135345,
      "expected_return": 0.8000000000000004,
      "portfolio_edge": 0.8,
      "risk_metrics": {
        "expected_profit": 0.40000000000000013,
        "expected_return": 0.8000000000000004,
        "kelly_growth_rate": 0.29560387924135345,
        "wealth_volatility": 0.3,
        "log_return_volatility": 0.32958368660043286,
        "sharpe_ratio": 0.8969008214284755,
        "win_probability": 0.9,
        "probability_of_ruin": 0.09999999999999998,
        "value_at_risk_95": 0.5,
        "max_loss": 0.5,
        "total_exposure": 0.49999999999999994
      },
      "method": "simultaneous",
      "optimization_success": true,
      "optimization_details": {
        "method": "simultaneous",
        "optimizer_result": {
          "success": true,
          "message": "Optimization terminated successfully",
          "nit": 2,
          "fun": -0.29560387924135345
        }
      },
      "decimal_odds": [
        2.0
      ],
      "true_probs": [
        0.9
      ],
      "fraction": 1.0,
      "max_total_stake": 1.0,
      "warnings": []
    },
    "independent_mode": {
      "stakes": [
        0.8
      ],
      "total_stake": 0.8,
      "expected_growth": 0.36806420716849714,
      "expected_return": 0.8000000000000002,
      "portfolio_edge": 0.8000000000000002,
      "risk_metrics": {
        "expected_profit": 0.6400000000000001,
        "expected_return": 0.8000000000000002,
        "kelly_growth_rate": 0.36806420716849714,
        "wealth_volatility": 0.48,
        "log_return_volatility": 0.6591673732008658,
        "sharpe_ratio": 0.5583774654701215,
        "win_probability": 0.9,
        "probability_of_ruin": 0.09999999999999998,
        "value_at_risk_95": 0.8,
        "max_loss": 0.8,
        "total_exposure": 0.8
      },
      "method": "independent",
      "optimization_success": true,
      "optimization_details": {
        "method": "independent",
        "scaling_applied": false
      },
      "decimal_odds": [
        2.0
      ],
      "true_probs": [
        0.9
      ],
      "fraction": 1.0,
      "max_total_stake": 1.0,
      "warnings": []
    },
    "exact_single_bet_kelly": 0.8,
    "classification": "Undocumented constraint; could be intentional risk policy, not claimed mathematical error."
  }
}

STDERR
/Users/khamit/Documents/pilory/numerical-impact-desk/research/hunt-2026-10-22/submission-2026-10-22/backlog-review/fresh-rest/penaltyblog-extra/source/penaltyblog/betting/kelly.py:269: RuntimeWarning: invalid value encountered in subtract
  log_return_variance = np.sum(probs_outcomes * (log_wealth - kelly_growth_rate) ** 2)
/private/tmp/claude-501/-Users-khamit/46bdb46e-e11a-40a9-bedc-c066ff970c16/scratchpad/h22-pypfopt/venv/lib/python3.12/site-packages/scipy/optimize/_differentiable_functions.py:737: UserWarning: delta_grad == 0.0. Check if the approximated function is linear. If the function is linear better results can be obtained by defining the Hessian as zero instead of using quasi-Newton approximations.
  self.H.update(delta_x, delta_g)
