amp <= endTime);

            const mergedData = [...filteredData1.map(item => ({ ...item, market: 1 })),
            ...filteredData2.map(item => ({ ...item, market: 2 }))]
                .sort((a, b) => a.timestamp - b.timestamp);

            let lastProb1 = filteredData1[0].probability;
            let lastProb2 = filteredData2[0].probability;

            return mergedData.map(item => {
                if (item.market === 1) {
                    lastProb1 = item.probability;
                } else {
