I will not attach the whole code 'cause it would be just a huge waste of space and it would be not useful for this question's purpose.
What I am going to attach here is a snippet code and its output, which shows what I'm not able to understand.
The output
Today is November 29th, 2013
Settlement date is December 4th, 2013
Evaluation date is November 29th, 2013
Actual and implied curve evaluated at November 29th, 2013
The reference date is December 4th, 2013 for the Actual curve
The reference date is June 3rd, 2014 for the Implied curve
---- Actual ----- Implied
1 - 0.995917 --- 0.995485
2 - 0.990663 --- 0.987753
3 - 0.981329 --- 0.975887
4 - 0.966947 --- 0.959062
5 - 0.947756 --- 0.938374
6 - 0.925654 --- 0.914803
7 - 0.900713 --- 0.889055
8 - 0.874264 --- 0.862391
9 - 0.847481 --- 0.835015
10 - 0.819623 --- 0.806789
We've just amended the evaluation date from November 29th, 2013 to May 29th, 2014
Actual and implied curve evaluated at May 29th, 2014
The reference date is June 3rd, 2014 for the Actual curve
The reference date is June 3rd, 2014 for the Implied curve
---- Actual ----- Implied
1 - 0.995917 --- 0.995917
2 - 0.990673 --- 0.990673
3 - 0.981353 --- 0.981353
4 - 0.966986 --- 0.966986
5 - 0.947756 --- 0.947756
6 - 0.925689 --- 0.925689
7 - 0.900707 --- 0.900707
8 - 0.874121 --- 0.874121
9 - 0.847552 --- 0.847552
10 - 0.819667 --- 0.819667
This output shows that, if your evaluation date is equal to November 29th, 2013 and you ask for an implied term structure whose reference date is on June 3rd, 2014, you get two curves that are different, as you would expect.
But, if you amend the evaluation date setting it to June 3rd, 2014 and ask for the implied term structure, the latter changes its shape.
The snippet code
...
// +---------------------------------
// | Dates at which to forecast term structures
// +---------------------------------
Period forwardPeriod = 6 * Months;
Date forwardDate = calendar.advance(todaysDate, forwardPeriod);
Date forwardSettlementDate = calendar.advance(forwardDate, settlementDays, Days);
// +---------------------------------
// | Implied term structure
// +---------------------------------
RelinkableHandle<YieldTermStructure> actualDiscountCurve;
actualDiscountCurve.linkTo(depoSwapTermStructure);
boost::shared_ptr<YieldTermStructure> impliedDiscountCurve(new ImpliedTermStructure( actualDiscountCurve, // Handle<YieldTermStructure>
forwardSettlementDate // Date referenceDate
));
// +---------------------------------
// | Printing today's discount factors
// +---------------------------------
std::cout << std::endl;
std::cout << "Actual and implied curve evaluated at " << todaysDate << std::endl;
std::cout << "The reference date is " << actualDiscountCurve->referenceDate() << " for the Actual curve" << std::endl;
std::cout << "The reference date is " << impliedDiscountCurve->referenceDate() << " for the Implied curve" << std::endl;
std::cout << std::endl;
std::cout << "---- Actual ----- Implied" << std::endl;
std::cout << std::endl;
for(Time d = 1; d <= 10.0; d+= 1.0)
{
std::cout << d << " - " << depoSwapTermStructure->discount(d) << " --- " << impliedDiscountCurve->discount(d) << std::endl;
}
// +---------------------------------
// | Evaluate the bond with the implied curve at forward date
// +---------------------------------
discountingTermStructure.linkTo(impliedDiscountCurve);
Settings::instance().evaluationDate() = forwardDate;
std::cout << std::endl;
std::cout << "We've just amended the evaluation date from " << todaysDate << " to " << forwardDate << std::endl;
// +---------------------------------
// | Printing discount factors at forward date
// +---------------------------------
std::cout << std::endl;
std::cout << "Actual and implied curve evaluated at " << forwardDate << std::endl;
std::cout << "The reference date is " << actualDiscountCurve->referenceDate() << " for the Actual curve" << std::endl;
std::cout << "The reference date is " << impliedDiscountCurve->referenceDate() << " for the Implied curve" << std::endl;
std::cout << std::endl;
std::cout << "---- Actual ----- Implied" << std::endl;
std::cout << std::endl;
for(Time d = 1; d <= 10.0; d+= 1.0)
{
std::cout << d << " - " << depoSwapTermStructure->discount(d) << " --- " << impliedDiscountCurve->discount(d) << std::endl;
...
My question is related to my goal, which I briefly describe in the following points:
- with the evaluation date equal to today, I want to get the implied term structure with reference date equal to today + 6M;
- with the evaluation date equal to today + 6M, I want to price a bond whose
DiscountingBondEngine()
uses the implied term structure above; - this would allow me to estimate a kind of "Theta" for the bond according to a forecast (*) of the discount curve and not of a constant curve.
Anyone could clarify how to do such a thing without having a completely changed implied term structure after the evaluation date amending?
(*) Actually, the forecast coming from the forward rates curve.