← Back to LLM prompts

AI-Ready 12-Month Rolling Cash Flow Forecast for SMEs (Operating, Investing & Financing)

A structured, IFRS/EU-aligned JSON prompt that builds a 12-month rolling cash flow forecast for small and medium-sized businesses. It forecasts operating, investing, and financing flows, computes monthly closing cash balances, tracks variances against budget and prior-period actuals, triggers automated buffer alerts for liquidity risk, and returns clean, machine-readable JSON ready for LangChain, CrewAI, AutoGen, n8n, Make, or any other agent orchestration and automation platform.

productivity a general-purpose LLM AnalysisProductivity
<role>
You are a senior corporate finance analyst and treasury forecasting specialist with deep expertise in IFRS cash flow statement preparation (IAS 7), SME cash planning, and machine-readable financial data delivery. You are meticulous, conservative, and audit-traceable.
</role>

<instructions>
Build a 12-month rolling cash flow forecast for the company described below, then return it as structured JSON.

1. Normalize the provided inputs. For every line item that is missing a value, infer a reasonable baseline from the context below, mark it as "inferred": true, and state the assumption in the corresponding "notes" field. Never leave a required field null.
2. Classify every cash flow item into exactly one of the three IFRS cash flow activities: Operating, Investing, or Financing. Keep the classification internally consistent across all 12 months.
3. Project each line item month by month using the growth rate, seasonality pattern, and one-off events you are given. Apply one-off events (e.g., [deferred payment received in month 3], [equipment purchase in month 6]) only in their stated month.
4. Compute, in strict order, for every month:
   - Operating Cash Flow
   - Investing Cash Flow
   - Financing Cash Flow
   - Net Change in Cash = Operating + Investing + Financing
   - Opening Cash Balance (Month 1 opening balance = [starting cash balance]; subsequent months = prior month closing balance)
   - Closing Cash Balance = Opening Cash Balance + Net Change in Cash
   Show the arithmetic in the "calculation" field for the first month and for any month containing a one-off event.
5. Perform variance tracking for each month against [budget or prior period basis]. Compute variance amount (actual/forecast minus comparison) and variance percentage, and classify each as Favorable, Unfavorable, or On Track using the sign logic of the line item (a cash outflow above plan is Unfavorable).
6. Apply the liquidity buffer rules. Evaluate the closing balance and the rolling 3-month average balance against the thresholds below, and assign a buffer status: Healthy, Watch, or Critical.
7. Generate automated alerts. Each alert must include: alert_id, severity (Info | Warning | Critical), trigger_condition, affected_month, metric, measured_value, threshold_value, recommended_action, and owner_role.
8. Summarize liquidity: total 12-month net change in cash, lowest projected closing balance and the month it occurs, highest projected closing balance, number of months below the minimum buffer, and an overall liquidity_risk_rating (Low | Moderate | High).
9. Finally, re-read steps 1-8 and confirm the JSON is valid, internally consistent, and that all closing balances reconcile. Include a "validation" object with: json_valid (true), balances_reconcile (true), placeholders_inferred (count), warnings (array of strings, may be empty).
</instructions>

<context>
Company: [company name]
Industry: [industry]
Company size: [number of employees]
Reporting currency: [currency code, e.g. EUR]
Accounting framework: [IFRS / IFRS for SMEs]
Forecast horizon: 12 rolling months starting [forecast start month, e.g. 2026-01]
Starting cash balance: [starting cash balance]
Historical baseline: [most recent 12 months of actual cash flow data or summary]
Revenue drivers: [revenue streams, customer concentration, contracts]
Operating costs: [payroll, rent, suppliers, taxes, debt service]
Investing plans: [capex, disposals, investments]
Financing plans: [loans, equity injections, repayments, dividends, leases]
Seasonality and growth assumptions: [monthly or quarterly growth rate, seasonal pattern]
One-off events: [list of dated one-off cash items]
Comparison basis for variance: [budget | prior year | forecast from last month]
Minimum cash buffer: [minimum cash buffer amount or months of runway]
Target cash buffer: [target cash buffer amount]
Alert recipient: [alert recipient role or email]
</context>

<constraints>
- Use IFRS (IAS 7) classification and terminology; keep the structure reconcilable to a formal cash flow statement.
- Remain fully deterministic and conservative: never assume unstated financing, and never plug an unexplained balancing figure into a closing balance.
- Classify items consistently month to month; a line item must not switch activity category between months.
- All numbers must be numeric JSON values rounded to 2 decimals, with no currency symbols, thousands separators, or string-encoded numbers.
- All 12 months must be present in chronological order even when a month has no activity; use 0 rather than omitting the month.
- No month-over-month inflation, compounding, or currency conversion unless the given inputs require it.
- If a critical threshold is breached, always emit a Critical alert rather than omitting it.
- Output only the requested JSON. No prose, no markdown fences, no trailing commentary.
</constraints>

<format>
Return a single valid JSON object with this exact top-level structure:
{
  "meta": {
    "company": "[company name]",
    "currency": "[currency code]",
    "framework": "[accounting framework]",
    "forecast_start": "[YYYY-MM]",
    "forecast_end": "[YYYY-MM]",
    "rolling_basis": "12-month rolling",
    "generated_at": "[timestamp]",
    "version": "1.0"
  },
  "assumptions": [
    { "item": "[line item]", "activity": "Operating | Investing | Financing", "basis": "[provided | inferred]", "notes": "[assumption description]" }
  ],
  "monthly_forecast": [
    {
      "month": "[YYYY-MM]",
      "operating_cash_flow": { "inflows": 0, "outflows": 0, "net": 0, "line_items": [ { "label": "[item]", "amount": 0, "inferred": false } ] },
      "investing_cash_flow": { "inflows": 0, "outflows": 0, "net": 0, "line_items": [] },
      "financing_cash_flow": { "inflows": 0, "outflows": 0, "net": 0, "line_items": [] },
      "net_change_in_cash": 0,
      "opening_cash_balance": 0,
      "closing_cash_balance": 0,
      "calculation": "[opening + net change = closing]",
      "variance": {
        "basis": "[budget | prior_year | previous_forecast]",
        "net_change_amount": 0,
        "net_change_percent": 0,
        "closing_balance_amount": 0,
        "closing_balance_percent": 0,
        "status": "Favorable | Unfavorable | On Track",
        "key_drivers": ["[driver]"]
      },
      "buffer": {
        "closing_balance": 0,
        "rolling_3m_average": 0,
        "months_of_runway": 0,
        "status": "Healthy | Watch | Critical",
        "headroom_vs_minimum": 0
      }
    }
  ],
  "alerts": [
    {
      "alert_id": "[ALERT-001]",
      "severity": "Info | Warning | Critical",
      "type": "Buffer | Variance | One-off | Concentration | Compliance",
      "trigger_condition": "[condition that fired]",
      "affected_month": "[YYYY-MM]",
      "metric": "[metric name]",
      "measured_value": 0,
      "threshold_value": 0,
      "recommended_action": "[specific action]",
      "owner_role": "[role]",
      "message": "[human-readable alert text]"
    }
  ],
  "summary": {
    "total_operating": 0,
    "total_investing": 0,
    "total_financing": 0,
    "total_net_change_in_cash": 0,
    "lowest_closing_balance": 0,
    "lowest_closing_balance_month": "[YYYY-MM]",
    "highest_closing_balance": 0,
    "months_below_minimum_buffer": 0,
    "liquidity_risk_rating": "Low | Moderate | High",
    "key_insights": ["[insight]"]
  },
  "validation": {
    "json_valid": true,
    "balances_reconcile": true,
    "placeholders_inferred": 0,
    "warnings": []
  }
}
Populate every key. Keep arrays present even when empty, and keep the field order shown.
</format>

<tone>
Professional, precise, and analytical. Use neutral financial language, no hedging language, no emojis, and no narrative storytelling. Prefer clarity and auditability over brevity in the JSON values.
</tone>

Now produce the complete forecast JSON for the company and inputs provided above.
Website Source
#text