h.abs(hedgeRatio) * p2;
            const meanAdjustedSpread = (p1 + p2) / 2;
            const centeredAdjustedSpread = adjustedSpread - meanAdjustedSpread;

            let sharesMarket1, sharesMarket2, costMarket2;
            let outcome1, outcome2;

            if (centeredAdjustedSpread > 0) {
                outcome1 = "NO";
                outcome2 = hedgeRatio > 0 ? "YES" : "NO";
                sharesMarket1 = betAmount / (1 - p1);
                sharesMarket2 = Math.abs(hedgeRatio) * sharesMarke