Live Bond Portfolio Management: Pricing, Execution & Inventory Management

AlgoQuantHub Weekly Deep Dive

Welcome to The Deep Dive!

This week we explore: what it takes to run quant analytics and broker execution as one live system, from rolling a bond redemption back into a ladder and finding firm prices when the screen only shows indicative quotes, to building bond curves that price smoothly between their pillars.

Each week, one idea from my live algo quant journey, taken from theory to code to market.

▶ Read the paper on bond curve calibration on SSRN → Click-Here

Table of Contents

Feature Article: Live Systematic Trading & Bond Position Management

Most people picture quant work as the model. You build the curve, price the bond, compute the risk, and the trade itself is the easy part that comes afterwards: you click buy. Many firms are organised the same way, with analytics and execution in different teams, different languages and different systems, and the quant hands a number to the trader. Individual portfolio managers often work like this too, with prices in a spreadsheet and the broker's order ticket in another window. A simple case study shows why that split doesn't hold up. Consider a 60/40 portfolio with a gilt ladder. A bond redemption lands as cash and has to be rolled back onto the ladder, and at the same time the rest of the portfolio needs rebalancing back to its target weights, with an eye on tax. On paper it's a simple job. In a live account it's a chain of decisions where each step depends on the one before.

The split breaks down because a price on the screen isn't always a price you can trade. Many bonds at Interactive Brokers show only indicative quotes, which are guide levels rather than firm prices a dealer is committed to. A fair value from the curve tells you what a bond should be worth, but not where you'll actually get filled. A rebalance is also a sequence rather than a single event: cash arrives and settles, orders fill in part or not at all, and positions change halfway through, so analytics computed at the start are out of date as soon as the first order fills. The real mechanism is that execution is a feedback loop, not the last step. Pricing sets the target and the limit, execution discovers the firm price, and each fill updates cash and inventory, which changes the next trade. The system behaves more like a control loop than a pipeline. The fix is to wire the analytics directly into execution. In AlgoQuant, the C++ AlgoQuantLib pricing and risk analytics plug straight into the Python IBKR toolkit, which places orders, tracks their status and monitors positions and cash balances. For bonds with only indicative prices, the toolkit walks the order book: it starts on the passive side, steps towards the other side of the market in small increments, waits between steps, and never goes beyond a worst-acceptable price set from the curve's fair value. The curve doesn't just value the bond; it decides the worst price you're willing to pay. This isn't a simulation either: AlgoQuantLibs’ execution layer runs against the live IBKR API.

Toolkits: C++ AlgoQuantLib Analytics + IBKR Order Exection Functions

IBKR Order Management Tool - Showing Placing Orders using Python/Excel (IBKR Functions)

IBKR Trader Workstation (TWS) - Showing Orders Received

IBKR TWS - Zooming in on Live Order Management Screen

The implication is that for a systematic portfolio manager, the edge isn't in the model or the broker API on its own but in the joins between them. In practice that means one engine, with pricing and risk in C++ and connectivity, orders and inventory in Python, so the same logic serves the rebalance, the monitoring and the execution algo. Cash and inventory are treated as first-class state and reconciled after every fill. The safety rules live in the core rather than the front end: a "confirm every order" switch that starts switched on, a kill switch that cancels only the orders the system itself placed (tracked by order ID), and live trials at the smallest possible size. You move from human approval of every trade, to supervised autonomy, to full automation, one step at a time, which is how manual trading becomes systematic without putting the account at risk.

There's a catch, though. The worst-acceptable price is only as good as the curve behind it, and most bonds you trade aren't curve pillars. If your curve kinks between pillars, your limit is wrong before the first order goes out. That's what the bonus article below is about.

Related Deep Dives

LINK: PRO Training

Keywords: Execution Algorithms, Indicative vs Firm Quotes, Portfolio Rebalancing, Bond Ladders, Fixed Income Trading

Bonus Article: Bond Curves - Bootstrap, Global or Fitted?

Why it matters: most bonds you trade aren't curve pillars, so the curve's shape between its nodes sets your price, your risk and your execution limit.

Here's how you'd build this in AlgoQuantLib, whose bond curves cover the full curve stack: an outright government benchmark curve, plus spread curves for corporate bonds that are marked as a spread to that benchmark, so a corporate curve inherits the benchmark's shape and only the spread is interpolated. Each curve can be calibrated using either zero rates or instantaneous forward rates as its state variable, meaning the quantity the curve actually stores and interpolates. The choice matters more than it looks. The discount factor is DF(t) = exp(−z(t)·t), and the zero rate is the average of the forwards up to t, so the forward is f(t) = z(t) + t·z′(t). The forward is effectively the derivative of the zero curve, which amplifies every wiggle in it: a zero curve that looks smooth can hide sawtooth forwards, and those show up as mispriced off-pillar bonds. To switch cleanly between state variables, every interpolation method in AlgoQuantLib supports exact integration (forwards to zeros and discount factors) and differentiation (zeros to forwards), with no numerical approximation. On top of that sit three calibration modes. Bootstrapping solves one node per bond in maturity order; it's fast and reprices every calibration bond exactly. Global calibration solves all nodes together and still reprices exactly, and it's needed when the interpolation is non-local, as with splines or Hermite schemes whose slopes depend on neighbouring nodes, because moving one node then changes segments a bootstrap thought it had already fixed. Fitted curves use fewer parameters than there are bonds and minimise pricing errors, giving up exact repricing in exchange for smooth forwards. To implement this we need a benchmark curve and spread curves linked to it, a choice of state variable, interpolators with exact integrals and derivatives, and a calibration mode that matches the job.

AlgoQuantLib Bond Analytics in Excel:
Benchmark curves with pricing

AlgoQuantLib Analytics - Bond Curve Calibration

AlgoQuantLib Analytics - Bond Pricing

Caption: AlgoQuant Bond MVP, launching soon.
Deep Dive subscribers get first access

The key insight is to judge a curve by its forwards, not by its zero rates and not by how well it reprices its pillars. Every exact method reprices its own calibration bonds by construction, so the real test is how smooth the forwards are and how accurately the curve prices the bonds that aren't on it. That leads to a practical rule. Bootstrap when you need speed and exact repricing of benchmarks for hedging. Use global calibration when your interpolator is non-local. Use a fitted curve when you're valuing the many bonds that sit between the pillars, especially illiquid corporates, where a smooth forward curve is worth more than repricing a noisy quote exactly. For the execution algo in the feature article, this is what makes the worst-acceptable price trustworthy. The full derivations, including the state variable transformations and how the calibration modes compare, are in the accompanying paper on bond curve calibration on SSRN. If you want to firm up the fundamentals first, the IR & Fixed Income Training Bundle covers bond pricing and curve construction step by step, and the Excel implementation is coming in the AlgoQuant Bond MVP shortly.

Fixed Income Training Bundle

More detailed implementation frameworks and structured trading models are available in my AlgoQuant playbooks and trading toolkits.

Keywords: Bond Curve Calibration, Instantaneous Forward Rates, Bootstrapping vs Global Fitting, Spread Curves, Fixed Income Analytics

AlgoQuant Playbooks & Trading Toolkits

Explore my quantitative trading and financial markets toolkit store, featuring practical implementation frameworks for yield curve construction, derivatives pricing, risk modelling, and live market trading.

Feedback & Requests

I’d love your feedback to help shape future content to best serve your needs. You can reach me at [email protected]

P.S. Follow me on LinkedIn to be first to learn about the AlgoQuantLib launch and more …