Simulate a cash year
simulate_cash_yearSimulate the next 52 weeks of a small services business 10,000 times (Monte Carlo) and report the chance it runs short of money, the week that is most likely to happen, reachable money (bank balance plus unused credit) week by week at the 10th, 50th and 90th percentile, the drivers that separated the futures that ran short from the ones that survived, and the profit the business makes at its own averages. Start from a trade preset (excavation, plumbing, hvac, landscaping, roofing, or general) and override any input: cash, credit line, money owed to the business, work already sold, crews and their weekly cost, overhead, owner draw, monthly bills, enquiries, close rate, seasonality, job types with value, materials, deposit and payment terms, bad debt, tax, and random setbacks. Money is in dollars and rates are fractions (0.3 is 30 percent). The same inputs and seed always return the same answer. Pure arithmetic: no network access, nothing stored.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Business name, used only to label the result. | |
| seed | No | Seed for the random draws. The same inputs and seed always return the same answer. Default "dry-run". | |
| crews | No | Crews (or technicians, or production units) working in parallel. One crew delivers one crew-week a week. | |
| preset | No | Starting template: excavation, plumbing, hvac, landscaping, roofing, or general for any other small services business. Every field below overrides it. Default general. | general |
| leads_cv | No | Week to week spread of enquiries. Default 0.35. | |
| tax_rate | No | Share of profit set aside for tax, paid quarterly. | |
| job_types | No | The kinds of work sold. Replaces the preset list. | |
| surprises | No | Random setbacks such as a machine breakdown or someone quitting. Replaces the preset list. | |
| close_rate | No | Share of enquiries that become jobs, as a fraction. | |
| credit_apr | No | Annual interest on the drawn balance, as a fraction. 0.11 is 11 percent. | |
| start_cash | No | Money in the bank on the day the year starts, in dollars. | |
| credit_line | No | Size of the line of credit, in dollars. 0 for none. | |
| fixed_costs | No | Monthly fixed bills such as rent, insurance and equipment notes. Replaces the preset list. | |
| seasonality | No | Twelve multipliers on enquiry volume, January first. 1 is an average month. | |
| start_month | No | Month the simulated year starts, 1 for January. Default: the current month. | |
| credit_drawn | No | How much of the line is already drawn, in dollars. | |
| bad_debt_rate | No | Share of invoiced balances never collected, as a fraction. | |
| leads_per_week | No | Enquiries in an average week before seasonality. | |
| overhead_weekly | No | Weekly overhead that runs whether or not anyone works: office, software, admin wages. | |
| collection_shape | No | How disciplined customers are about paying on time: 2 is ragged with a long tail of late payers, 6 is disciplined. | |
| crew_cost_weekly | No | Fully loaded weekly cost of one crew: wages, burden, fuel, vehicle. | |
| owner_draw_weekly | No | What the owner takes out each week. | |
| opening_receivables | No | Work already invoiced and not yet paid on day one, in dollars. | |
| opening_backlog_weeks | No | Crew-weeks of work already sold and waiting to start. |