Ho-Lee short rate model under the Heath-Jarrow-Morton framework

Under the Heath-Jarrow-Morton (HJM) framework the dynamics of the Ho-Lee short rate model are defined as following: $$dr(t)=\theta(t)dt+\sigma dW^{\mathbb{Q}}(t)$$ with $$\mathbb{Q}$$ the risk-neutral measure (not real world). Assuming a volatility in the instantaneous forward rate (and thus short rate) the drift of the model $$\theta(t)$$ is defined as following: $$\theta(t)=\frac{\partial}{\partial t}f(0,t)+\sigma t^2$$ with $$f(0,t)$$ the instantaneous forward rate based on market data, such that: $$f(0,t)=-\frac{\partial}{\partial t}\log P(0,t)$$ with $$P(0,t)$$ the market data in the form of zero-coupon bonds. This set up is in agreement with all literature I found. The market data is given by $$P_{market}=e^{-0.03t^{2}-0.15t}$$ and for all $$0\leq t\leq T$$ the following equation should be satisfied using Monte Carlo simulation for $$P_{model}$$: $$P_{model}(0,t)=\mathbb{E^{Q}}[e^{-\int^{t}_{0}r(s)ds}|\mathcal{F}_{0}]=P_{market}(0,t)$$ After implementing I found that this equation does not hold for this particular market data. However, neglecting the $$0.15t$$ term does let $$P_{model}$$ converge to $$P_{market}$$ for small enough $$\sigma$$. Reason for this I thought is that for calculating the parameter: $$\theta(t)=\frac{\partial}{\partial t}(-\frac{\partial}{\partial t}\log P_{market}(0,t))+\sigma^{2}t=0.06+\sigma^{2}t$$ we throw away the $$0.15t$$ term and this information about the market data is lost.

Is the setup for the Ho Lee short rate model useful for this kind of market data $$P_{market}=e^{-0.03t^{2}-0.15t}$$? Is my setup wrong (keeping in mind that when neglecting the $$0.15t$$ term the equation holds)?

The problem should go away if you simulate $$r_t$$. Ho Lee should work for the function of the form you assumed:

$$P(0,T)=e^{-aT^2-bT}=e^{-(aT+b)T}$$

The problem with your simulation is that the forward rate, as you correctly derived, is as follows:

$$f(0,T)=2aT+b$$

So when you take the derivative to calculate $$\theta$$, you lose b. But remember the short rate dynamics under the Ho Lee involves integral of $$\theta_t$$

$$r_{t}=r_{0} + \int_{0}^{t}{\theta_{u} du} + \sigma\int_{0}^{t}{d w_{u}}$$

And when you evaluate the integral you will need to determine the integration constant. Which if you set the conditions correctly will be b (0.15).

But if you model the short rate directly, this problem goes away. You will avoid this problem of losing the b and then recovering it via integration constant.