Software package for intertemporal pricing optimization under reference effects and consumer heterogeneity estimation.
Overview
This repository contains numerical implementation for the paper Intertemporal Pricing under Reference Effects: Integrating Reference Effects and Consumer Heterogeneity.
Folders
scripts/
: Python and R filesillustrations/
: two.png
pictures illustrating logit demand, and how it depends on reference price and pricesimulation_results
: estimated coefficients in simulation stored in.csv
filespricing_output/
:.png
pictures showing pricing policy and cumulative revenue, for both simulation and MSOM (real) dataMSOM_data_cleaned/
: extracted feature data in.csv
files, ready as inputs of the estimation algorithmMSOM_data_estimated/
: estimated coefficients of MSOM data stored in.csv
filesMSOM_data_optimized/
: revenue comparison for real data study- 'MSOM_Data/`: MSOM-JD.com dataset
Scripts and Modules
Each python script in scripts/
starting with run_
is used for one run of a certain numerical experiment, while each python scipt 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:
Real Data and Access
The MSOM-JD.com dataset can be donwloaded from this link given appropariate acess, and 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/
.