alculatedHedgeRatio = calculateHedgeRatio(probabilities1, probabilities2);
            const adjustedSpreads = probabilities1.map((p1, i) => p1 - calculatedHedgeRatio * probabilities2[i]);
            const meanAdjustedSpread = math.mean(adjustedSpreads);
            const centeredAdjustedSpreads = adjustedSpreads.map(s => s - meanAdjustedSpread);

            if (priceChart) priceChart.destroy();
            if (spreadChart) spreadChart.destroy();

            const chartOptions = {
                respons