Skip to content

Shikhar253/fpa-forecasting-scenario-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FP&A Forecasting & Scenario Modeling Engine (Python)

Built an automated FP&A forecasting engine replicating real-world budgeting workflows. Implemented scenario and stress testing to evaluate revenue sensitivity under macroeconomic fluctuations, and produced Excel-ready deliverables for leadership review.

What this includes

Forecasting + Risk

  • Seasonal time-series forecasting (SARIMAX) for monthly revenue
  • Next-12-month forecast with 95% confidence intervals (risk bounds)

Scenario Modeling (Driver Levers)

Scenarios are driven by explicit levers (not generic +/- %):

  • Price change
  • Volume change
  • Demand shock
  • Promo lift
    Scenario inputs live in data/scenario_drivers.csv.

Driver-Based Revenue (Price × Volume × (1 - Churn))

Optional mode that mirrors commercial FP&A driver models:

  • Revenue computed from price, volume, and churn
  • Same forecasting + scenario + reporting outputs

FP&A Deliverables (Excel Report)

Exports an executive-ready workbook with:

  • summary
  • historical_revenue
  • forecast_confidence (base + CI bounds)
  • forecast_scenarios (base/best/worst via driver levers)
  • variance_backtest (FP&A-style holdout variance table — always populated when enough history)
  • assumptions
  • scenario_drivers
  • pnl_forecast
  • cashflow_forecast

Business Impact

  • Automated monthly revenue forecasting using time-series modeling
  • Replaced manual spreadsheet budgeting with Python-based engine
  • Implemented driver-based scenario modeling (price, volume, demand, promo)
  • Built P&L and cash flow projections directly from forecast outputs
  • Integrated backtest variance analysis to evaluate model accuracy
  • Delivered executive-ready Excel report with 9 structured tabs

Repo structure

fpa-forecasting-engine-v2/
├── data/
│   ├── revenue_sample.csv
│   ├── drivers_sample.csv
│   ├── assumptions.csv
│   └── scenario_drivers.csv
├── notebooks/
│   └── forecasting_model.ipynb
├── reports/
│   ├── forecast_output.xlsx
│   └── forecast_output_driver_based.xlsx
├── src/
│   └── forecast.py
├── requirements.txt
└── README.md

Quickstart

Install:

pip install -r requirements.txt

Run (revenue-series mode):

python -m src.forecast --input data/revenue_sample.csv --output reports/forecast_output.xlsx

Run (driver-based mode):

python -m src.forecast --drivers data/drivers_sample.csv --output reports/forecast_output_driver_based.xlsx

📊 Forecast Outputs (Screenshots)

🔮 Revenue Forecast Scenarios

Driver-based base, best, and worst case projections using price, volume, demand shock, and promo levers.

Forecast Scenarios


💰 P&L Forecast Projection

Automated income statement generated from forecasted revenue and assumption-driven COGS, OPEX, tax, and CAPEX inputs.

P&L Forecast


Customization

  • Edit data/assumptions.csv to change COGS/OPEX/Tax/Capex
  • Edit data/scenario_drivers.csv to reflect macro or GTM assumptions
  • Increase --backtest 18 to backtest a longer horizon
  • Extend cash flow with working-capital logic using DSO/DPO/Inventory days

About

Automated FP&A forecasting and scenario modeling engine with driver-based revenue modeling, P&L projections, confidence intervals, and variance backtesting. Exports executive-ready Excel reports.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors