  }
                        }
                    }
                }
            });

            // Perform ADF tests
            const originalADF = adfTest(spreads);
            const adjustedADF = adfTest(centeredAdjustedSpreads);
            const adfResultElement = document.getElementById('adfResult');
            adfResultElement.innerHTML = `
                <h2>ADF Test Results</h2>
                <div class="stat-label">Original Spread:</div>
                <div>ADF Statistic: <span class="stat