This repository contains numerical implementation for the paper Intertemporal Pricing via Nonparametric Estimation: Integrating Reference Effects and Consumer Heterogeneity. Along with the reproduction code, this repository code also contains general functions for implementing nonparametric estimation of consumer heterogeneity.
scripts/: Python and R filesillustrations/: two.pngpictures illustrating logit demand, and how it depends on reference price and pricesimulation_results: estimated coefficients in simulation stored in.csvfilespricing_output/:.pngpictures showing pricing policy and cumulative revenue, for both simulation and MSOM (real) dataMSOM_data_cleaned/: extracted feature data in.csvfiles, ready as inputs of the estimation algorithmMSOM_data_estimated/: estimated coefficients of MSOM data stored in.csvfilesMSOM_data_optimized/: revenue comparison for real data studyMSOM_Data/: MSOM-JD.com dataset
Each Python script in scripts/ starting with run_ is used for one run of a certain numerical experiment, while each python script ending with _py defines some functions to be imported by other files.
Based on the purposes of all the scripts, we further categorize them into the following modules.
- Data preprocessing and feature extraction
run_data_cleaning.py, py_MSOM_cleaning.py,run_extract_features.py, run_freq_user.py, run_freq_estimate.py,
- Heterogeneous Reference Effects Estimation
- Functions:
py_estimation.py, cross_validation.py, mmnl_simualtion.py - For simulated data:
run_mmnl_estimation_simulation.py - For MSOM data:
run_mmnl_estimation.py,run_mmnl_estimation_compare.py
- Functions:
- Pricing Optimization
- Functions:
optimal_pricing_policy_exp_update.py - For simulated data:
run_pricing_optimization.py - For MSOM data:
run_mmnl_pricing_optimization.py,run_mmnl_revenue_compare.py
- Functions:
The MSOM-JD.com dataset can be downloaded from this link given membership access, and a general introduction to the dataset is available in this paper. To be compatible with the codes, the uncompressed .csv data files should be stored in the folder ./MSOM_Data/.