Analysis of Price Data Discrepancies Between Coingecko and 1inch
This study analyzes the accuracy of cryptocurrency price data for BTC and ETH obtained from two sources: Coingecko (CG) and 1inch. 1inch uses its own data aggregation algorithms, and the objective of this analysis is to assess how much its prices deviate from those of Coingecko, which is considered a benchmark source.
For each day and for each token (BTC, ETH), we collected values for opening price (open) and closing price (close). The data were merged based on token and date, and then absolute and relative deviations were calculated between Coingecko and 1inch values:
diff_x = x_CG - x_1inch
where:
x_CG
— value of the parameter (open, high, low, close) from Coingeckox_1inch
— value of the parameter from 1inchdiff_x
— difference between values
perc_diff_x = abs(x_CG - x_1inch) / x_1inch * 100%
The Mean Absolute Percentage Error (MAPE) is calculated as the average of the absolute deviations:
MAPE = (1/N) * sum(|x_CG,i - x_1inch,i| / x_1inch,i * 100%)
where N
is the number of dates for each token.
After analyzing the data with a one-day forward shift (to reduce discrepancies due to timing differences), the following average MAPE values were obtained:
- Open: 0.23% ± 0.02%
- Close: 0.28% ± 0.02%
- Open: 0.23% ± 0.02%
- Close: 0.26% ± 0.02%
The average price deviation between sources was 0.2-0.3%, which is within acceptable limits for portfolio analysis. The confidence interval indicates that discrepancies are consistently low. This confirms that 1inch data can be used without significant adjustments.
Python script comparison.py with the analysis code is provided for reproducibility and audit verification.