00_Data_Prep (R) - Data Cleaning & Assumptions Setup
This step is now implemented in Code/01_Data_Prep.R (no longer in a Python notebook).
Expected Input
data/raw/macro_data.csvdata/raw/wmt_financials.csvdata/raw/wmt_segments.csvdata/raw/peers_comps.csv
Process
- Load raw data.
- Align fiscal year (adjustment when year-end is in January).
- Clean non-recurring items from
EBITandEBITDA:
- restructuring charges
- opioid settlements
- gain on sale of assets
- Estimate macro assumptions and calculate
WACC. - Build master dataset for the models.
Outputs
data/processed/master_model_input.csvdata/processed/macro_data_clean.csv(if input exists)data/processed/wmt_segments_clean.csv(if input exists)data/processed/peers_comps_clean.csv(if input exists)config/assumptions.csvconfig/assumptions.yaml(ifyamlpackage is installed)
Execution
From the project root:
Rscript Code/01_Data_Prep.RNotes
- If columns or files are missing, the script uses conservative defaults and issues warnings.
- This step feeds
Code/02_DCF.Rand the rest of the models.