CASE STUDY 04 / Personal project · Financial modeling

Liquidity Forecasting Model.

Making cash-flow assumptions visible.

An exploratory cash-balance model with rolling statistics, stress scenarios, and interest-rate sensitivity.

  • Python
  • pandas
  • NumPy
  • scikit-learn
  • Streamlit
MY ROLE

Synthetic data generation, feature engineering, modeling & visualization

CONTEXT

Independent portfolio project · Synthetic financial data

STATUS

Exploratory model with published outputs

Original liquidity project screenshot comparing the base forecast with a stressed-input scenario using synthetic transactionsLiquidity stress scenario comparisonView full size
Original model screenshot from the portfolio, using synthetic data. The experiment changes model inputs without rebuilding a complete future cash-balance path.

THE CONTEXT

The problem

Cash balances depend on the timing of inflows and outflows. A useful analysis needs to show both a baseline and what changes when assumptions shift. This project explores that relationship using generated data rather than private financial records.

MY CONTRIBUTION

What I built

  • Generated a reproducible daily transaction dataset with weekday effects and recurring outflow patterns.
  • Engineered calendar features, lagged balances, and 7-day and 30-day rolling statistics for a Random Forest model.
  • Compared baseline and stressed inputs and built a separate net-interest-income sensitivity scenario.
  • Presented balances, cash flows, and saved model outputs in Streamlit.

HOW IT CONNECTS

From input to useful output

  1. 01

    Generate a baseline

    Synthetic inflows and outflows → net cash flow → cumulative balance.

  2. 02

    Model and compare

    Calendar, lag, and rolling features → chronological train/test split → predictions.

  3. 03

    Explore assumptions

    Reduced inflows, increased outflows, and rate changes → comparison charts.

THE REASONING

Decisions & tradeoffs

Use synthetic data deliberately

Generated transactions make the work reproducible and avoid disclosing actual financial records. The tradeoff is that these patterns cannot establish performance on a real business or bank.

Separate scenario assumptions

The stress experiment reduces inflows and increases outflows. The interest-rate model separately compares loan income and deposit expense under simplified repricing assumptions.

Actual chart output comparing held-out synthetic cash balances with predictions from the exploratory modelActual versus predicted cash balancesView full size
Actual output from the financial analytics repository. The comparison is exploratory; model validation limitations are explained below.

CHECKING THE WORK

Testing & validation

The training script uses a chronological 80/20 split and calculates MAE and R². Those values need cautious interpretation: rolling features currently include the target day, and contemporaneous cash-flow inputs are used to predict that day’s balance.

WHERE IT STANDS

Outcome & limitations

A working analytical prototype that makes cash-flow features and scenario assumptions inspectable. Its strongest evidence is the code and the visual comparisons, rather than a claimed forecasting accuracy.

This is not a validated forward-looking forecast. The next iteration should shift rolling features, define a prediction horizon, use walk-forward validation, and propagate stress assumptions through future balances. The current stress experiment changes inputs without rebuilding the full balance path.