Skip to content

CapFloor Volatilities Simulation #300

@UnknownUserGit

Description

@UnknownUserGit

Good morning,

I am trying to obtain XVA values for a CapFloor trade. If I set CapFloor volatilities simulation to False there is no problem and I can get the values.

However if I want to do it by simulating the CapFloor volatilities and I set it to True I am getting the following errors:

ore.xml:

<Parameter name="asofDate">2022-12-30</Parameter>
<Parameter name="inputPath">Input</Parameter>
<Parameter name="outputPath">Output</Parameter>
<Parameter name="logFile">log.txt</Parameter>
<Parameter name="logMask">255</Parameter>
<Parameter name="marketDataFile">market_20221230_EUR_USD.txt</Parameter>
<Parameter name="fixingDataFile">fixings.txt</Parameter>
<Parameter name="implyTodaysFixings">Y</Parameter>
<Parameter name="curveConfigFile">curveconfig_directEUR.xml</Parameter>
<Parameter name="conventionsFile">conventions.xml</Parameter>
<Parameter name="marketConfigFile">todaysmarket.xml</Parameter>
<Parameter name="pricingEnginesFile">pricingengine.xml</Parameter>
<Parameter name="portfolioFile">portfolio_swap.xml</Parameter>
<Parameter name="observationModel">None</Parameter>
simulation.xml:

  <AsOf>2022-12-30</AsOf>
  <Parameters>
    <Discretization>Exact</Discretization>
    <Grid>500,1D</Grid>
    <Calendar>EUR,USD</Calendar>
    <Sequence>SobolBrownianBridge</Sequence>
    <Scenario>Simple</Scenario>
    <Seed>42</Seed>
    <!--<Samples>5000</Samples>-->
    <Samples>2</Samples>
    <CloseOutLag>2W</CloseOutLag>
    <MporMode>StickyDate</MporMode>
    <DayCounter>A365F</DayCounter>	
  </Parameters>
<CapFloorVolatilities>
  <Simulate>True</Simulate>
  <ReactionToTimeDecay>ConstantVariance</ReactionToTimeDecay>
  <Currencies>
    <Currency>EUR</Currency>
  </Currencies>
  <Strikes>ATM</Strikes>
  <Expiries>1Y,3Y</Expiries>
</CapFloorVolatilities>
log_structured.json: { "category": "Error", "group": "Curve", "message": "first option date (January 2nd, 2024) is in the past", "sub_fields": [ { "name": "curveId", "value": "OptionletVolatility/EUR" }, { "name": "exceptionType", "value": "skipping this object in scenario sim market (scenario data was written for this object.)" } ] } { "category": "Error", "group": "Trade", "message": "did not find capfloor curve for key 'EUR-EURIBOR-6M'", "sub_fields": [ { "name": "exceptionType", "value": "Error building trade for context 'analytic/XVA'" }, { "name": "tradeId", "value": "Cap_Euribor" }, { "name": "tradeType", "value": "CapFloor" } ] } { "category": "Error", "group": "Analytics", "message": "mismatch between scenario and sim data size, exit.", "sub_fields": [ { "name": "analyticType", "value": "XVA" }, { "name": "exceptionType", "value": "Failed Analytic" } ] } { "category": "Warning", "group": "Analytics", "message": "Error in ORE analytics: Failed to run analytics XVA", "sub_fields": [ { "name": "analyticType", "value": "OREApp::run()" }, { "name": "warningType", "value": "Error" } ] }

And if I change the expiries in order to avoid that error to: 3Y,5Y, I get the following error.

log_structured.json:
{ "category": "Error", "group": "Analytics", "message": "mismatch between scenario and sim data size, exit.", "sub_fields": [ { "name": "analyticType", "value": "XVA" }, { "name": "exceptionType", "value": "Failed Analytic" } ] }
{ "category": "Warning", "group": "Analytics", "message": "Error in ORE analytics: Failed to run analytics XVA", "sub_fields": [ { "name": "analyticType", "value": "OREApp::run()" }, { "name": "warningType", "value": "Error" } ] }

Why is ORE understanding that the as of date is not 2022-12-30? The ScenarioMarketData.txt also has a dates for the market data 2022-12-30.
In addition, how could I match the scenario and sim data size?

Thank you in advance!.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions