What the project involved
From historical accounts to a performance-linked borrowing framework.
I combined account investigation, probabilistic forecasting, confidence-based capacity testing and revenue-cost stress scenarios. The objective was to show when repayment is affordable, how much liquidity can safely leave the business and which operating conditions should change the recommendation.
01 · Investigate the accounts
Establish the SME's operating rhythm.
I investigated twelve weeks of account history and separated stable costs from variable cash flows. Two issues changed the model design: accounts payable were settled fortnightly, and one revenue channel contained unusual zero-revenue weeks.
Splitting fortnightly supplier totals into weekly equivalents removed artificial zero-cost weeks and produced a more realistic view of future obligations. The channel anomaly was retained as a possible business-cycle event, then flagged for management review.
SQL extractionAccount mappingAnomaly review
Report figure · supplier payment timing02 · Build the forecasting engine
Model a range of cash outcomes.
The model combined opening cash, delayed receivables, supplier payments, fixed operating costs and variable costs across a sixteen-week horizon. I ran 500 independent Monte Carlo simulations so each forecast week produced a distribution of possible closing cash balances.
Rather than hard-coding one repayment amount, the model compares candidate balances with the simulated cash distribution and the operating buffer management wants to retain. Stronger projected performance supports greater or earlier repayment; weaker performance reduces or delays it.
PythonMonte Carlo500 simulations16-week horizon
Report figures · forecast distribution and downside range03 · Turn uncertainty into a confidence threshold
Convert uncertainty into a capacity rule.
For each forecast horizon and candidate repayment amount, I calculated the proportion of simulations that still preserved the required liquidity buffer. This turns business performance into a repayment-capacity curve rather than treating the debt balance as a fixed decision.
SME management can select its confidence requirement, compare the median outcome with the downside tail, and see how much can be repaid at each point in time without limiting normal operations.
Report figure · repayment confidence by week04 · Stress-test the decision
Identify when management should change course.
I tested combinations of lower revenue and higher costs instead of treating the base forecast as permanent. The heat maps show when management should reduce the repayment amount, delay the decision or move back toward the base plan as performance changes.
What I learned
A useful model makes uncertainty actionable.
The strongest financial recommendation is not the most precise-looking headline number. It is the one that makes its assumptions, downside exposure and decision thresholds visible. This project strengthened my ability to move from company accounts to a forward-looking rule that management could monitor and update.
Decision output
A conditional borrowing framework—not a single fixed loan recommendation.
Base planRepay only the amount that still preserves the required operating and investment buffer at management's chosen confidence level.
Defensive planReduce the amount or delay repayment when revenue weakens, costs rise or the downside cash range falls below the liquidity requirement.
Capital allocation checkCompare any growth project's IRR with the loan's post-tax financing cost before committing the cash.
Report extract · executive management rules