[PLAT-4914] Fixing theta calculation in the case where the valuation time is in the past