File size: 1,129 Bytes
5cf7ad9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d07ef73
526db57
d07ef73
5cf7ad9
 
 
 
 
777dcd9
 
 
 
 
 
 
f2b4092
0012356
 
 
4098e3a
0012356
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
---
license: apache-2.0
tags:
  - tabular-regression
  - finance
  - settlement-fails
---

# Fails-Forecasting v1 (XGBoost + LightGBM)

Predicts next-day settlement-fail notional for US Treasuries & corporates.

| metric | value |
|--------|-------|
| MAE    | **4.2 bn** |
| RMSE   | 5.8 bn |

## Files
* `xgb_next_day_fails_model.joblib` – point prediction  
* `lgb_quantile90_next_day_fails.joblib` – 90-percentile upper-bound


<img src="streaming forecaster.PNG" alt="Streaming Fail-Forecaster: training & inference flow" width="80%">

Trained on FINRA FTD + TRACE (2009-2025).

**Usage**

```python
import joblib, lightgbm as lgb, pandas as pd
xgb = joblib.load("xgb_next_day_fails_model.joblib")
lgbm = lgb.Booster(model_file="lgb_quantile90_next_day_fails.txt")

y_hat  = xgb.predict(X_new)
y_q90  = lgbm.predict(X_new)
alert  = y_hat > y_q90
```

## Citation

> Musodza, K. (2025). Bond Settlement Automated Exception Handling and Reconciliation. Zenodo. https://doi.org/10.5281/zenodo.16828730
> 
> ➡️  Technical white-paper & notebooks: https://github.com/Coreledger-tech/Exception-handling-reconciliation.git