Commodity trading
TREX - treasury and trade finance for oil trading
TREX is the treasury and trade finance system that Adeo is building for an international physical oil trading and shipping group. It links every cargo to its financing, to the credit lines and to the expected cash flows.
Summary
From the cargo to the bank account, in one system.
A physical oil trader finances almost every cargo: a bank opens a letter of credit or advances the payment, and the money comes back when the product is sold. TREX follows that path from end to end: it groups purchases and sales into deals, records the financing requests and the use of the credit lines, and projects the expected payments and receipts onto the accounts. Adeo has been designing and building it since 2023, connected to KOMMODO, the same group's trading system.
- Purchases, sales and storage linked into deals.
- Financing and credit lines tracked bank by bank.
- Balances, transactions and expected cash flows by account, bank and company.
Problem
Treasury outside the trading system.
Trades were created in the trading system, but the day-to-day treasury work was done on spreadsheets. Knowing which cargoes are financed and by which bank, how much is left on each credit line and which payments and receipts are due in the coming days meant keeping the two sides aligned by hand. And a trade can change after it has been financed: a different quantity or date moves amounts and due dates.
- Day-to-day treasury on spreadsheets.
- Financing and credit lines spread across several banks.
- Trades that change after they have been financed.
Approach
Requirements gathered with the treasury team, frequent releases.
Adeo gathered the requirements together with the client's finance team, starting from the spreadsheets and from the daily treasury workflow. The system has grown release by release: first deal management and the synchronisation with KOMMODO, then financing, treasury, storage, credit lines, reports and futures hedging. Every release is tried out by the users, and their feedback drives the next one.
- Workshops and regular meetings with the client's finance team.
- Frequent releases, tried out by the users in a pre-production environment.
- Automated integration tests on the API.
System
Deals, financing and treasury on the same data.
In TREX every purchased cargo is linked to its sales and storage in a deal, with the allocated quantities. Financing requests are opened on the trades, by letter of credit or on open account, and the system works out the use of the credit lines. Treasury shows balances, transactions and projected payments and receipts for every account, and a cockpit sums up current and expected cash by bank and by company. A scheduled check flags what needs attention: a trade that is not financed, an overdue invoice, an exposure above its limit.
- Deal management: purchases, sales, allocations and storage.
- Financing requests, an overview by bank, and refinancing from one bank to another.
- Treasury: accounts, transactions, projections, deposits and loans, futures accounts for hedging.
- Cash-flow and credit-line cockpits, and about a dozen reports.
- Ten kinds of alert on trades, invoices, guarantees and counterparty exposure.
Project status
Continuous releases since 2024, acceptance testing under way.
The first release dates from March 2024. Since then TREX has grown through more than fifty releases, tried out by the client's users in a pre-production environment connected to KOMMODO. Today it covers deals, financing, storage, treasury, credit lines, reports and hedging, and it is in acceptance testing. Development continues with new functions, including the partial refinancing of a transaction.
- First release in March 2024.
- More than 50 releases between 2024 and 2026.
- Synchronisation with KOMMODO running on trades and market prices.
- Acceptance testing under way at the client.
Technology
Desktop client, API and real-time notifications.
TREX is a client/server application: a Windows desktop client in WPF and an ASP.NET Core API on a SQL Server database. KOMMODO forwards trade changes to the TREX API; the users receive them as real-time notifications and decide how to apply them to deals and financing that are already open. A scheduled service runs the checks that raise the alerts.
- .NET, ASP.NET Core Web API, SQL Server with Entity Framework Core.
- WPF desktop client with Telerik components and reports.
- Real-time notifications with SignalR.
- Scheduled service for checks and alerts.
Lessons
Treasury depends on the trade: the two systems have to talk.
A treasury system for physical trading is only as good as its source data is current. The choice that mattered most was not to duplicate the trades: they are created in KOMMODO, they reach TREX with every change, and the system shows what that change does to a deal or to a financing. The second was to build it together with the people who use it: trade finance rules differ from bank to bank and from one transaction to the next, and you only really understand them by trying them on real cases.
- One source for the trades, synchronised rather than copied.
- Make the effect of every change on deals and financing visible.
- Release often and have the users try real cases.
CTA
Do you have treasury, financing or credit lines to bring into one system?
Adeo designs custom software for complex financial and operational processes, and grows it together with the people who use it.
Talk to Adeo