# Delta hedge call option on short rate

Usually delta hedging an european call option in the black-scholes model is constructed of three assets; a call option, the underlying stock and the risk-free asset often assumed to have constant interest rate. The algorithm usually runs as follows:

At time $$t=0$$:
Sell the european call option that expires at time T, and has time-0 price V, and take a position of delta in the underlying stock, $$\Delta S_0$$. The difference will be deposit in the risk-free asset as $$b = V - \Delta S_0$$.

For every discrete time step, M, of size $$\Delta t = \frac{T}{M}$$ until the option expires, $$t_1, \dots, T_M$$ we proceed as follows:
Simulate a step in the underlying stock price; $$S_{t_j} = S_{t_{j-1}} \cdot \exp\{(r- \frac{\sigma^2}{2}) \Delta t + \sigma W^Q_{\Delta t}\}.$$

Update the value of the hedge position; $$V_{t_j}^h = \Delta_{t_{j-1}} S_{t_j} + b_{t_{j-1}} \exp\{r \cdot \Delta t\}.$$

Update delta kept in the underlying and finance/invest the residual using the risk-free asset; $$b_{t_j} = V_{t_j}^h - \Delta_{t_j} S_{t_j}.$$

Finally one can evaluate the PnL as $$V^h_{T} - (S_T - K)^+$$. The difference should be somewhat similar to the one on the attached image.

My question is whether it is possible to conduct a similar delta hedge experiment on a european call option on the short rate instead? And how such would be done explained in similar steps as above? Meaning the underlying stock is then replaced by some short rate process, r(t), where the payoff is; $$(r(T) - K)^+.$$ My uncertainty occurs as there is risk from the underlying, but also the discounting.

Thanks