-
Notifications
You must be signed in to change notification settings - Fork 265
Open
Description
Hi,
Here are issues found on PNL analytic when using OREApp from inputs:
mporConventionsis set when loading from parameters inOREAppInputParameters::loadParameters()but when loading from inputs they need to be restored in the singleton. A trivial patch is here 2ec67e1#diff-fc7fe4cb9eb88b19791d900766cf3d2572bb75d34e9f2af231d328fbb48f5b12, to make room for aConventionsand then set it fromOREApp::initFromInputs();- on fixings, this parameter
fixingCutoffwas introduced and is used inOREApp::buildCsvLoader, but is used only when having parameters. When using inputs, is usingMarketDataInMemoryLoaderImplwhich callsloadDataFromBuffersand eventually loads fixings up to today(date < today || (date == today && !implyTodaysFixings))in contrast toCSVLoader::loadFilewhere we have this extra|| (fixingCutOffDate_ != Date() && date <= fixingCutOffDate_). This is pretty relevant because we need fixings of the PNL period otherwise alert of missing fixing is emitted.
For PNL_EXPLAIN with PAR sensitivity. Using example in MarketRisk\Input\ore_pnlexplain_par.xml:
- The
SensitivityAnalysisflagUseSpreadedTermStructureshas to be enabled (inMarketRisk\Input\Pnl\sensitivity.xml). Otherwise we get alertaddDifferenceToScenario(): second argument must be difference scenariowhich comes from thiszeroScenarios->setGenerateDifferenceScenarios(t0SimMarket->useSpreadedTermStructures()); - The list of
ShiftTenors(insensitivity.xml) has to be identical toYieldCurves\Configuration\Tenors(insimulation.xml). For example, if we remove 30Y from simulation we get alertgetDifferenceScenario(): scenario key sets are not compatible.. A workaround for this is to set in the simulation a separate list of tenors for each curve, e.g.<Configuration curve="USD-FedFunds"> <Tenors>2W, 1M, 3M, 6M, 1Y, 2Y, 3Y, 5Y, 10Y, 15Y, 20Y, 30Y</Tenors> </Configuration> - A similar issue would be when in sensitivity we have a scenario to which there is no computed sensitivity, e.g. a warning emitted like this
Setting Diagonal Sensi DiscountCurve/EUR/2 w.r.t. DiscountCurve/EUR/2 to 0.01 (got 0)which will lead to the same alertgetDifferenceScenario(): scenario key sets are not compatible.. There is no sensible workaround for this because you don't know in advance to which market factors you'll be sensitive.
Thank you,
Laurentiu.
Metadata
Metadata
Assignees
Labels
No labels