Home / Interpretation of scenariodump.csv

Home Forums Help Interpretation of scenariodump.csv

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #6164

    Dear All!

    I’m trying to understand the Output of scenariodump.csv (readable Scenario marketdata) and I believe that there is some additional tweaking necessary.
    The Discount Curves (DiscountCurve/CAD/0, DiscountCurve/CAD/1, ….) are in my assumption all discount factors at the given Tenor (0=3M,1=6M,…11=20Y in my case):
    ` <YieldCurves>

    Now, the maximum “discount factor” for the 20Y-CAD Tenor over all Scenarios is 3.36, which would imply a zero-rate of ~ -5.8% (roughly calculated with (1/DF)^(1/T)-1 ), which seems pretty improbable to me.
    The same applies to CHF, GBP, and – not so extreme – to EUR, USD and JPY (but even a negative rate of -2.4% seems strange for a 20Y Tenor in JPY).

    The Indices (IndexCurve/EUR-EURIBOR-3M/0 …) are similarly strange to Interpret, they look also like discount factors to me…

    Is there some additional calculation with the given numeraire column to be done?



    Maybe I should add that all foreign currency (non EUR) curves are set up as “collateral in EUR” curves, i.e. the foreign Ccy cashflows are discounted using the EUR1D (EONIA Swap) curve + the Basis swap spread:

    ` <YieldCurve>
    <CurveDescription>CHF collateralized in EUR discount curve</CurveDescription>
    <Type>Cross Currency Basis Swap</Type>

    Could it be that this leads to These strange simulation results?



    OK, I’ve seen from the test cases that indeed there is a need to divide all scenario data by the numeraire:

    ` // Basic martingale tests
    Size samples = 10000;
    Real eur = 0.0, usd = 0.0, gbp = 0.0, eur2 = 0.0, usd2 = 0.0, gbp2 = 0.0;

    boost::timer timer;
    for (Size i = 0; i < samples; i++) {
    for (Date d : grid->dates()) {
    boost::shared_ptr<Scenario> scenario = scenGen->next(d);

    if (d == grid->dates().back()) { // in 10 years from today
    RiskFactorKey eurKey(RiskFactorKey::KeyType::DiscountCurve, “EUR”, 8);
    RiskFactorKey usdKey(RiskFactorKey::KeyType::DiscountCurve, “USD”, 8);
    RiskFactorKey gbpKey(RiskFactorKey::KeyType::DiscountCurve, “GBP”, 8);
    RiskFactorKey usdeurKey(RiskFactorKey::KeyType::FXSpot, “USDEUR”);
    RiskFactorKey gbpeurKey(RiskFactorKey::KeyType::FXSpot, “GBPEUR”);

    Real usdeurFX = scenario->get(usdeurKey);
    Real gbpeurFX = scenario->get(gbpeurKey);
    Real numeraire = scenario->getNumeraire();
    Real eur10yDiscount = scenario->get(eurKey);
    Real gbp10yDiscount = scenario->get(gbpKey);
    Real usd10yDiscount = scenario->get(usdKey);
    eur += eur10yDiscount / numeraire;
    gbp += gbp10yDiscount * gbpeurFX / numeraire;
    usd += usd10yDiscount * usdeurFX / numeraire;
    eur2 += 1.0 / numeraire;
    gbp2 += gbpeurFX / numeraire;
    usd2 += usdeurFX / numeraire;
    Real elapsed = timer.elapsed();

    eur /= samples;
    gbp /= samples;
    usd /= samples;
    eur2 /= samples;
    gbp2 /= samples;
    usd2 /= samples;

    Real relTolerance = 0.01;
    Real eurExpected = d.market->discountCurve(“EUR”)->discount(20.);
    BOOST_CHECK_MESSAGE(fabs(eur – eurExpected) / eurExpected < relTolerance,
    “EUR 20Y Discount mismatch: ” << eur << ” vs ” << eurExpected);

    Doing this results in a “shock” inverse scenario with very low discount factors at the short end (giving a ~60000% zero rate) and moderately low rates at the long end (~2% zero rate) … well, it’s the highest CAD discount rate in all scenarios …

    Furthermore, I’ve seen that the index curve needs to be interpreted as discount factors, also needing above correction with the numeraire.


    Roland Lichters

    Hi Roland,

    apologies for the delay, but you have answered it already.

    I just want to point you to a configuration option that introduces a change of measure and therefore affects the scenario dump output. Example section 4.13 in the ORE user guide illustrates it- parameter “ShiftHorizon” in the simulation model configuration (when set to a time larger than 0) changes measure from the LGM measure to the Hull-White T-Forward measure which has quite a significant effect in long-term simulations, see figure 20.


Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.