Counterparty risk is a critical problem for all corporate treasuries, as the failure of a single counterparty can trigger not only financial losses, but also significant operational disruptions. Recent high-profile collapses, such as those of Credit Suisse and Silicon Valley Bank, have underscored the fragility of even well-rated institutions, challenging long-held assumptions about creditworthiness.
Despite this, many treasury functions still rely on static models, periodic reviews and fragmented data to manage this risk. AI can transform counterparty risk management by addressing two of its most critical shortcomings: outdated/static data; and the inability to quickly assess a company’s total exposure to a failing counterparty because of data being scattered across multiple systems and formats.
A scenario comparing two companies – one leveraging AI and one not – illustrates the tangible benefits of modernising risk practices.
Company A and Company B hold similar levels of exposure to the same bank, BankUnity Limited. One morning, news breaks that BankUnity has collapsed. Despite facing the same external event, the outcomes for the two firms are starkly different.
Company A follows a more traditional counterparty risk management approach, wherein the counterparty’s health is initially determined using credit ratings as the key parameter, which is tracked on a periodic basis. Counterparty exposure data is stored in multiple source systems and risk assessments, primarily using backward-looking data. While early warning indicators – such as widening credit default swap (CDS) spreads and negative sentiment in financial news – do exist, they are typically considered only on an ad hoc basis, often once conditions have deteriorated, rather than being systematically monitored as part of a proactive risk management approach.
In this environment, the treasury dealer proceeds with a new transaction involving BankUnity Limited, unaware of the seemingly growing exposure. By the time the bank’s liquidity crisis becomes public, it is too late. The firm is overexposed and is forced to liquidate its investments at a loss.
Company B, by contrast, has implemented an AI-enabled counterparty risk management tool. Powered by the research capabilities of a large language model, it looks on a daily basis for key early warning indicators for relevant counterparties and assesses how they would impact the company’s outstanding exposure to the counterparty, based on the latest trade data uploaded on the AI tool. It flags BankUnity Limited based on a combination of negative market signals – widening CDS spreads, equity price volatility and negative sentiment across reliable news sources – and prepares a pointed summary for the risk manager at Company B, outlining how much exposure Company B currently has with BankUnity and providing actionable recommendations to gradually reduce the exposure to this bank.
The treasury manager promptly queries the system to find out more about what’s affecting its credit health and receives a concise summary, along with all traceable data sources, and passes on the summary to the front office trading desk. Before proceeding with a new transaction with BankUnity Limited, the trader runs a scenario analysis using the AI tool, which highlights significant liquidity risk in case more deposits are placed with the bank, and the deal is paused.
Meanwhile, the risk manager prepares for the upcoming risk management committee meeting using AI-generated dashboards, and provides a summary of actions being taken to reduce the company’s exposure to BankUnity and limit the adverse impact. By the time BankUnity’s collapse is confirmed, Company B has already liquidated all its exposure, informed key stakeholders and activated mitigation measures.
While the case study highlights the tangible benefits of AI in action, it also prompts a practical question: how can treasury teams move from concept to implementation? For those seeking a structured and credible path forward, the guide in the box below outlines how to build an effective AI-powered counterparty risk tool.
As AI tools become more common in treasury operations, a natural question arises: could widespread use of AI in treasury functions trigger a bank run? While this is a theoretical possibility, it is highly unlikely. For such a scenario to occur, many companies would need to use nearly identical AI models, trained in the same way and reacting to the same signals at the same time.
In reality, AI systems are highly diverse in how they are built, trained and deployed. Their role is to support data-driven decision-making and enhance resilience, not to create systemic risk. No financial institution fails without warning; there are always indicators. Yet when those signals are missed, decisions are delayed and exposure becomes irreversible.
In one organisation, the treasury team overlooked the early signs, the trader proceeded with the transaction, and liquidity risk remained mismanaged. In another, the AI-powered tool surfaced the risks early, enabling timely action and preventing adverse impact on liquidity. This is not just about adopting a new tool – it’s about rethinking how counterparty risk is managed. By turning early insight into decisive action, AI transforms risk into resilience, and resilience into strategic advantage.
1 Start with the right foundation
Al-based counterparty risk management tools will be powered by the capabilities of large language models (LLMs). To build a prototype, the user can start with off-the-
shelf LLMs – such as OpenAl’s ChatGPT, Microsoft’s Copilot, Claude etc – based on their preference, existing usage or organisational setup.
The basic paid version of these LLMs is sufficient to start building simple prototypes, which can be trained on custom data.
2 Train the Al tool on how to read your data and shape its responses
The key objective of this step is to train the model on your custom data to give it sufficient context on your counterparty risk exposures. Collect sample, or create dummy, internal datasets – including counterparty details (eg, counterparty name, credit ratings etc), historical trade data (eg, cash deposits with various banks), and treasury and cash management policy (eg, cash investment policy extracts, counterparty limits etc) – to train the LLM on what type of counterparties your data is exposed to, and the extent of the exposure. This will help the Al model to generate the answer that reflects your business context.
Next, teach the Al how to respond by providing example questions and ideal answers. This helps it learn the tone, structure and level of detail you expect. You can also use sample templates and clear instructions to ensure responses are consistent and based on the right data. Use techniques such as retrieval-augmented generation to let the Al combine your internal data with trusted external sources, such as Bloomberg or market feeds.
3 Design a seamless user experience
Having done the back-end setup and training of the tool, design the front-end interface using easy-to-use chatbots, where questions can be asked and answered in simple English (eg, “What’s our exposure to bank X?”). The trained Al tool should be able to give clear, actionable answers with links to dashboards, reports or supporting documents. To keep things proactive, set up alerts and scheduled reports so key insights are delivered to the right people at the right time, without them needing to ask.
4 Test, learn and improve
Before rolling out the tool, test it thoroughly; check that it gives accurate answers, retrieves the right data and performs reliably. Once live, gather feedback from users and monitor how it’s being used. Use this insight to fine-tune the system, adjusting data sources, refining prompts or tweaking behaviour to ensure it continues to deliver value over time.
Nish Nagpal is a corporate treasury adviser at PwC, and Nandini Soondram is a manager in the corporate treasury team at PwC
This article first appeared in The Treasurer Issue 3, 2025