Skip to content

Transfer pricing

ID MOD-161
System SD01
Repo bank-core
Build status Deployed
Deployed Yes
Last commit 35402a8a7d9c6f1e2b5c8d0e4f7a3b6c9d2e5f8a

Owns the treasury schema in the bank_core Neon database (SD01) and provides the bank-core side of the transfer pricing (TP) system: the rate store, the cost-of-funds read service, and the instrument-to-tenor matching logic.

Transfer pricing is a management accounting technique that assigns an internal cost (loans) or benefit (deposits) to each facility based on the prevailing market rate for matching-tenor funding. Without it, all product lines appear equally profitable regardless of how they consume or provide the bank's liquidity — long-tenor mortgages look the same as overnight call accounts. This module grounds those cost allocations in bank-core.

What this module provides

TP rate store — treasury.tp_rates Holds the daily rate grid across nine tenor buckets (ON, 1M, 3M, 6M, 1Y, 2Y, 3Y, 5Y, 10Y) for NZ and AU jurisdictions. Written daily by MOD-086's write-back Lambda via the tp_writeback_user Postgres role. Each row carries the effective date, curve source version identifier, and the liquidity premium overlay applied by Treasury — enabling the seven-year version history required for product P&L audit and regulatory review.

TP read service GET /internal/v1/treasury/tp-rates/latest?jurisdiction=NZ|AU — serves the current rate grid to bank-core consumers (daily accrual in MOD-005, product pricing, ROTE inputs in MOD-106). No SD06 dependency on the read path; latency target sub-100 ms P99.

Cost-of-funds application The applicable TP rate for any bank-core instrument is derived by matching its repricing tenor to the nearest tenor bucket in treasury.tp_rates. This matching logic lives in bank-core. Loan facilities carry a TP cost equal to the rate for their matched tenor; deposit facilities receive a TP benefit. The result is the daily cost-of-funds figure fed into accrual and NIM attribution.

Relationship with MOD-086

MOD-086 (bank-risk-platform, SD06) performs the curve computation: reads market.swap_curve and market.ois_curve from Snowflake, applies the Treasury-configured liquidity premium overlay, and writes the resulting rate grid to both ftp.transfer_prices (Snowflake Dynamic Table) and treasury.tp_rates (this module's table) via the write-back Lambda. MOD-086 also produces ftp.nim_attribution in Snowflake by matching CDC-sourced balances against the rate grid for management accounts.

The split: MOD-086 owns the computation and the Snowflake analytics. MOD-161 owns the Postgres rate store, the bank-core read service, and the instrument-level cost-of-funds application.

Known degraded state on first deploy

The V001 migration GRANT to tp_writeback_user is wrapped in a conditional block that skips if the role does not yet exist in the target environment. MOD-086 write-backs continue recording status='FAILED' in ftp.writeback_runs until MOD-104 provisions the tp_writeback_user Postgres role and a V002 GRANT migration is applied. See bank-core/docs/design/treasury-bootstrap.md §7.


Module dependencies

Depends on

Module Title Required? Contract Reason
MOD-103 Neon database platform bootstrap Required Neon database must exist before this module can create the treasury schema in bank_core.
MOD-104 AWS shared infrastructure bootstrap Required AWS shared infrastructure (Lambda execution role, SSM) provisioned by MOD-104 is required before this module can be deployed.

Required by

Module Title As Contract
MOD-086 Funds transfer pricing engine Hard dependency
MOD-165 Synthetic swap book aggregator Hard dependency

Policies satisfied

Policy Title Mode How
CLQ-002 Liquidity Risk Management Policy CALC treasury.tp_rates stores the cost-of-funds rate for each repricing tenor bucket — bank-core consumers (accrual, pricing) read TP rates directly from Postgres, ensuring every interest rate risk measurement uses liquidity-adjusted cost allocations without an SD06 round-trip.
CLQ-003 Capital Planning & Stress Testing Policy CALC treasury.tp_rates retains a full version history with effective date, curve source version, and liquidity premium basis points — providing the immutable Postgres audit trail required for capital stress scenario reconstruction under RBNZ and APRA review.

Capabilities satisfied

(No capabilities mapped)


Part of SD01 — Core Banking Platform Compiled 2026-05-22 from source/entities/modules/MOD-161.yaml