Design prototype · Built on Stockurai
FX buying ahead of supplier invoices
Prepared for Jane Doe · Distribution · December 3, 2026
Sample data for illustration.DecisionWhen to buy euros, yen and pesos before each supplier invoice is due
OptionsBuy · Wait · Sell
Data sourcesCurrency price feed, ERP payables export, Bank FX rate quotes
PolicyMax 25% of an invoice per purchase, never over 100% covered, treasurer approves
STEP 01
Targets
Targets are what the system watches. Here, they are the currencies owed to suppliers, with open invoices, next due date and share already bought from the ERP.
| Target | Open invoices | Next due | Covered | Status |
|---|---|---|---|---|
| EUR/USD | €1,450,000 | Dec 10, 2026 | 14% | Active |
| USD/JPY | ¥96,000,000 | Jan 4, 2027 | 0% | Active |
| USD/MXN | MX$7,200,000 | Nov 30, 2026 | 55% | Active |
STEP 02
Target detail
Where the feeds meet: the market (what the rate is doing), the bank's quotes and the payables (what is owed, and by when). Every signal is weighed against all three.
EUR/USD rate history (7 days)
| Date | Open | High | Low | Close |
|---|---|---|---|---|
| Nov 19 | 1.0851 | 1.0860 | 1.0809 | 1.0824 |
| Nov 18 | 1.0872 | 1.0880 | 1.0838 | 1.0850 |
| Nov 17 | 1.0890 | 1.0901 | 1.0861 | 1.0873 |
| Nov 16 | 1.0884 | 1.0907 | 1.0870 | 1.0891 |
| Nov 13 | 1.0869 | 1.0895 | 1.0858 | 1.0885 |
| Nov 12 | 1.0855 | 1.0880 | 1.0840 | 1.0868 |
| Nov 11 | 1.0871 | 1.0889 | 1.0846 | 1.0857 |
Invoice schedule
Dec 10€800,000 · 25% covered
Dec 22€650,000 · open
Bank quote1.0869 (market 1.0824)
Rate at invoice1.0891 (Nov 16)
Feeds
MarketEUR, JPY and MXN rates against USD · Every minute
PayablesAmounts owed by currency, invoice and due date · Daily
Bank ratesRates the bank would actually offer · Hourly
STEP 03
Alerts: what the system watches for
Alerts are code-free. Pick a field, an operator and a value. Each alert watches one thing, such as a rate against the bank's quote or an invoice due date, and fires when it happens.
Edit alert
EUR/USD 1% below 30-day average
Market rate
Below
30-day average less 1%
1 Hour
PreviewMarket rate below 30-day average less 1%
Configured alerts
Rate at 20-day lowMarket
Rate 1% below 30-day averageBank rates
Invoice due within 30 daysPayables
Coverage below 50%Payables
Over 100% coveredPayables
Bank spread above 1%Bank rates
STEP 04
Decision logic: alerts, conditions, plays and rules
Alerts evaluate data in real time. Conditions add triggered alerts up to a score, and plays organize the conditions. Rules turn a play’s score into a real-time recommendation on the live feed. The policy gate caps each Buy at 25% of an invoice and stops any purchase that would leave an invoice over 100% covered, however good the rate looks. Rules drive the recommendations, not AI.
Play: Buy currency on weakness before invoices are due
+15Rate is cheap
- Rate at 20-day low
- Rate 1% below 30-day average
+10Invoice is coming
- Invoice due within 30 days
+5Under-covered
- Coverage below 50%
Rules
Score ≥ 25BUY
Score below 25WAIT
Covered above 100% of openSELL
Policy gate
Max per purchase25% of an invoice
Never above100% covered
ApprovalTreasurer
STEP 05
Live feed
This is the screen the decision team watches. Each card is a recommendation on one currency, printed the moment its rule is met, with the score and time it fired, ready for the treasurer to approve.
Buy (1)
EUR/USD Rate 1.0824 · Score 30
Buy €200,000 toward Dec 10 invoice
Buy €200,000 toward Dec 10 invoice
Sell (1)
USD/MXN Rate 17.35 · Score 10
Sell MX$300,000 surplus (credit note)
Sell MX$300,000 surplus (credit note)
Wait (1)
USD/JPY Rate 150.4 · Score 5
Mid-range; due Jan 4, nothing covered yet
Mid-range; due Jan 4, nothing covered yet
STEP 06
Audit trail: one recommendation, start to finish
Every recommendation is logged and traceable. Anyone can see which rates and invoices arrived, which conditions were met, when the treasurer approved the purchase and how it compared with the invoice-day rate.
EUR/USD — Audit trail
Data received
Market feed1.0824 at 2026-11-19 09:32
Bank rates feedBank quote 1.0869
Payables feed€800,000 due Dec 10, 25% covered
Play evaluated → rule fired
✓ Rate is cheap (+15)
✓ Invoice is coming (+10)
✓ Under-covered (+5)
Score30 → BUY
Policy gatePassed: 25% of invoice, coverage stays under 100%
Decision
ActionBought €200,000 at 1.0824
Approved byTreasurer, 09:47
Outcome
Rate when invoice arrived1.0891 (Nov 16)
Result$1,340 better than the invoice-day rate (mid-market)
STEP 07
Daily flags
A short daily list of things worth a look, separate from the live feed. Invoices coming due with little cover, big currency moves, and bank quotes drifting away from the market.
PayablesMX$7.2M open, Nov 30 invoice due in 11 days
Coverage 55%; policy target is 50% at 30 days
MarketYen moved 2.3% in 5 days
Usual 5-day move is ±0.9%
Bank ratesBank EUR spread widened to 0.42%
Usual spread is 0.15%
PayablesCredit note cut peso invoices by MX$300,000
Nov 30 invoice now over 100% covered: Sell rule armed
STEP 08
ROI scoring and baseline
The optimization engine scores every decision. Every recommendation is measured against converting on the day each invoice arrived, and against the best rate available before it was due. The gap is the ROI you can measure.
| Target | Decisions | Avg rate | Baseline | Best possible | Captured | Result vs baseline |
|---|---|---|---|---|---|---|
| EUR/USD | 12 | 1.0838 | 1.0881 | 1.0795 | 50% | +$9,800 |
| USD/JPY | 7 | 150.9 | 149.8 | 152.4 | 42% | +$6,300 |
| USD/MXN | 9 | 17.52 | 17.41 | 17.78 | 30% | +$3,150 |
Baseline: Rate on the day each invoice arrived. Best possible: Best rate before it was due. Sample figures; in a live installation, these come from the organization’s own decisions and data.
STEP 09
Fit and next steps
What we’d check first
Why
- Live rates, firm invoice due dates and the same buying decision repeated for every invoice
To verify
- How often the ERP payables can be exported
- Whether bank FX quotes are available as a feed
- How credit notes and part payments appear
Extend with AI
- Cash forecasts, more currencies and new rules
Next step: a formal proposal
ScopeThe decision, targets and data feeds
RulesRules and policy gate, written out
ROIHow ROI is measured against the current process
TermsSetup estimate, timeline and license terms
Where it runsThe organization’s own AWS account
For IT and data teams: an AI data pipeline
Stockurai is licensed to researchers and institutions for real-time analysis of equity markets, with AI and machine learning built into the process. The same AI data pipeline can be built for this decision.
- It runs entirely in the organization’s own AWS account, and all data stays there.
- Every recommendation is stored with the full data behind it: labeled records data teams can use to train and test models.
- Built with AI in mind, making maintenance and extension simple for a single technical resource.
Design prototype prepared by Stockurai · Sample data for illustration only · stockurai.com