A Dynamic Pricing Model Based on Clustering Algorithms and Game Theory in the E-commerce Industry

Dynamic Pricing, K-Means Clustering, Game Theory, Bertrand Competition, E-commerce, Customer Segmentation.

Authors

June 13, 2026
June 15, 2026

Downloads

In the highly competitive e-commerce landscape, static pricing strategies fail to maximize profitability due to rapid shifts in consumer behavior and competitor actions. This paper proposes a novel, data-driven dynamic pricing framework that integrates unsupervised machine learning with non-cooperative game theory. Using transaction data from the widely recognized UCI Online Retail dataset, we first apply the K-Means clustering algorithm to segment customers based on Recency, Frequency, Monetary (RFM) metrics and price sensitivity. Next, we model the pricing competition between duopoly e-commerce firms as a Bertrand game within each segment. By deriving segment-specific demand functions and price elasticities, we compute the analytical Nash Equilibrium prices. The empirical results demonstrate that our proposed hybrid model significantly outperforms static pricing strategies, yielding an average revenue increase of 14.6% while maintaining market competitiveness. The complete implementation in Python is provided to validate the model's reproducibility.