AT1 Bond Valuation¶
© 2025 Marek Ozana
This notebook is a small, opinionated workflow for relative value screening in the AT1 universe using polars-bloomberg and interactive Altair charts.
We pull a bond universe (IDs, tickers, ratings, duration, back-end spread, z-spread) and then visualize how z-spread behaves as a function of:
- Back-end spread (BE) and
- Duration (Dur)
Both views include a simple fit. Bonds above the trend line are “cheap” on that axis (wider than the model would suggest), and bonds below the line are “rich”.
The two scatter plots are linked: clicking a point in one chart highlights the same bond in the other view, making it easy to spot names that look cheap (or rich) in both dimensions.
Out[1]:
In [2]:
Copied!
# Gett bond data from BQL
from polars_bloomberg import BQuery
query = """
let(
#dur = duration(duration_type=MODIFIED).value;
#rtg_bb = bb_composite().value;
#zspread = spread(spread_type=Z).value;
#be = flt_spread().value;
)
get(ticker, #dur, #rtg_bb, #zspread, #be)
for(
filter(
bondsUniv(types='active', consolidateDuplicates=true),
ticker() in ['SHBASS', 'SEB', 'SWEDA', 'DANBNK', 'NDAFH', 'DNBNO']
and crncy() == 'USD'
and basel_iii_designation() == 'Additional Tier 1'
)
)
"""
with BQuery() as bq:
df = bq.bql(query).combine()
df.head(3)
# Gett bond data from BQL
from polars_bloomberg import BQuery
query = """
let(
#dur = duration(duration_type=MODIFIED).value;
#rtg_bb = bb_composite().value;
#zspread = spread(spread_type=Z).value;
#be = flt_spread().value;
)
get(ticker, #dur, #rtg_bb, #zspread, #be)
for(
filter(
bondsUniv(types='active', consolidateDuplicates=true),
ticker() in ['SHBASS', 'SEB', 'SWEDA', 'DANBNK', 'NDAFH', 'DNBNO']
and crncy() == 'USD'
and basel_iii_designation() == 'Additional Tier 1'
)
)
"""
with BQuery() as bq:
df = bq.bql(query).combine()
df.head(3)
Out[2]:
shape: (3, 6)
| ID | ticker | #dur | #rtg_bb | #zspread | #be |
|---|---|---|---|---|---|
| str | str | f64 | str | f64 | f64 |
| "YR472577 Corp" | "DANBNK" | 3.509404 | "BBB-" | 231.091119 | 259.9 |
| "BR069680 Corp" | "SWEDA" | 2.937217 | "BBB" | 270.448417 | 286.4 |
| "BP504077 Corp" | "DANBNK" | 0.394512 | "BBB-" | 154.481971 | 338.7 |