Upload Risk Params: example inputs

This is the set of inputs around the nature of the analytics to be performed and the portfolio. 

To keep it simple, let's assume the following case:


vannarho.xml
The master input file contains general setup information (paths to configuration, trade data and market data), as well as the selection and configuration of analytics. The file has with three sections:

For our simple example, the file looks like this:

<?xml version="1.0"?>

<VANNARHO>

 <Setup>

   <Parameter name="asofDate">2021-02-25</Parameter>

   <Parameter name="logMask">31</Parameter>

   <Parameter name="marketDataFile">market.txt</Parameter>

   <Parameter name="fixingDataFile">fixings.txt</Parameter>

   <Parameter name="implyTodaysFixings">N</Parameter>

   <Parameter name="observationModel">None</Parameter>

 </Setup>

 <Markets>

   <Parameter name="lgmcalibration">default</Parameter>

   <Parameter name="fxcalibration">default</Parameter>

   <Parameter name="pricing">default</Parameter>

   <Parameter name="simulation">default</Parameter>

 </Markets>

 <Analytics>

   <Analytic type="npv">

     <Parameter name="active">Y</Parameter>

     <Parameter name="baseCurrency">USD</Parameter>

   </Analytic>

 </Analytics>

</ORE>

todaysmarket.xml

This configuration file determines the subset of the ’market’ universe which is going to be built. It contains configuration blocks for discounting curves, Index curves (to project index fixings), Yield curves (for other purposes, e.g. as benchmark curve for bond pricing) , Swap index curves (to project Swap rates), FX spot rates, Inflation index curves (to project zero or yoy inflation fixings), Equity curves (to project forward prices), Default curves, Swaption volatility structures, Cap/Floor volatility structures, FX volatility structures, Inflation Cap/Floor volatility surfaces, Equity volatility structures, CDS volatility structures, Base correlation structures, Correlation structures, Securities.

For our simple example, the file looks like this:


<TodaysMarket>

 <Configuration id="inccy">

   <YieldCurvesId>default</YieldCurvesId>

   <DiscountingCurvesId>inccy</DiscountingCurvesId>

   <IndexForwardingCurvesId>default</IndexForwardingCurvesId>

   <SwapIndexCurvesId>default</SwapIndexCurvesId>

   <ZeroInflationIndexCurvesId>default</ZeroInflationIndexCurvesId>

   <YYInflationIndexCurvesId>default</YYInflationIndexCurvesId>

   <FxSpotsId>default</FxSpotsId>

   <FxVolatilitiesId>default</FxVolatilitiesId>

   <SwaptionVolatilitiesId>default</SwaptionVolatilitiesId>

   <YieldVolatilitiesId>default</YieldVolatilitiesId>

   <CapFloorVolatilitiesId>default</CapFloorVolatilitiesId>

   <CDSVolatilitiesId>default</CDSVolatilitiesId>

   <DefaultCurvesId>default</DefaultCurvesId>

   <YYInflationCapFloorVolatilitiesId>default</YYInflationCapFloorVolatilitiesId>

   <ZeroInflationCapFloorVolatilitiesId>default</ZeroInflationCapFloorVolatilitiesId>

   <EquityCurvesId>default</EquityCurvesId>

   <EquityVolatilitiesId>default</EquityVolatilitiesId>

   <SecuritiesId>default</SecuritiesId>

   <BaseCorrelationsId>default</BaseCorrelationsId>

   <CommodityCurvesId>default</CommodityCurvesId>

   <CommodityVolatilitiesId>default</CommodityVolatilitiesId>

   <CorrelationsId>default</CorrelationsId>

 </Configuration>

 <Configuration id="default">

   <YieldCurvesId>default</YieldCurvesId>

   <DiscountingCurvesId>default</DiscountingCurvesId>

   <IndexForwardingCurvesId>default</IndexForwardingCurvesId>

   <SwapIndexCurvesId>default</SwapIndexCurvesId>

   <ZeroInflationIndexCurvesId>default</ZeroInflationIndexCurvesId>

   <YYInflationIndexCurvesId>default</YYInflationIndexCurvesId>

   <FxSpotsId>default</FxSpotsId>

   <FxVolatilitiesId>default</FxVolatilitiesId>

   <SwaptionVolatilitiesId>default</SwaptionVolatilitiesId>

   <YieldVolatilitiesId>default</YieldVolatilitiesId>

   <CapFloorVolatilitiesId>default</CapFloorVolatilitiesId>

   <CDSVolatilitiesId>default</CDSVolatilitiesId>

   <DefaultCurvesId>default</DefaultCurvesId>

   <YYInflationCapFloorVolatilitiesId>default</YYInflationCapFloorVolatilitiesId>

   <ZeroInflationCapFloorVolatilitiesId>default</ZeroInflationCapFloorVolatilitiesId>

   <EquityCurvesId>default</EquityCurvesId>

   <EquityVolatilitiesId>default</EquityVolatilitiesId>

   <SecuritiesId>default</SecuritiesId>

   <BaseCorrelationsId>default</BaseCorrelationsId>

   <CommodityCurvesId>default</CommodityCurvesId>

   <CommodityVolatilitiesId>default</CommodityVolatilitiesId>

   <CorrelationsId>default</CorrelationsId>

 </Configuration>

 <YieldCurves id="default"/>

 <DiscountingCurves id="default">

   <DiscountingCurve currency="USD">Yield/USD/USD-FedFunds</DiscountingCurve>

 </DiscountingCurves>

 <DiscountingCurves id="inccy">

   <DiscountingCurve currency="USD">Yield/USD/USD-FedFunds</DiscountingCurve>

 </DiscountingCurves>

 <IndexForwardingCurves id="default">

   <Index name="USD-FedFunds">Yield/USD/USD-FedFunds</Index>

   <Index name="USD-LIBOR-3M">Yield/USD/USD-LIBOR-3M</Index>

 </IndexForwardingCurves>

 <FxSpots id="default"/>

 <EquityCurves id="default">

   <EquityCurve name="RIC:.SPX">Equity/USD/RIC:.SPX</EquityCurve>

 </EquityCurves>

</TodaysMarket>



pricingengine.xml

The pricing engine configuration file is provided to select pricing models and pricing engines by product type. For example:

<PricingEngines>

 <Product type="Swap">

   <Model>DiscountedCashflows</Model>

   <ModelParameters />

   <Engine>DiscountingSwapEngine</Engine>

   <EngineParameters />

 </Product>

</PricingEngines>


portfolio.xml

The portfolio data for a counterparty is specified in a hierarchy of nodes and sub-nodes. For our simple example, using our recentlt released Scripted Trade Framework, the file looks like this:

<?xml version="1.0"?>

<Portfolio>

 <Trade id="Composite_Equity_Swap">

   <TradeType>CompositeTrade</TradeType>

   <Envelope>

     <CounterParty>CPTY</CounterParty>

     <NettingSetId>CPTY</NettingSetId>

   </Envelope>

   <CompositeTradeData>

     <Currency>USD</Currency>

     <NotionalCalculation>Sum</NotionalCalculation>

     <Components>

       <Trade>

         <TradeType>EquitySwap</TradeType>

         <EquitySwapData>

           <LegData>

             <Payer>true</Payer>

             <LegType>Floating</LegType>

             <Currency>USD</Currency>

             <PaymentConvention>Modified Following</PaymentConvention>

             <DayCounter>Act/360</DayCounter>

             <Indexings>

               <FromAssetLeg>true</FromAssetLeg>

             </Indexings>

             <FloatingLegData>

               <Index>USD-LIBOR-3M</Index>

               <Spreads>

                 <Spread>-0.0005</Spread>

               </Spreads>

               <FixingDays>2</FixingDays>

             </FloatingLegData>

             <ScheduleData>

               <Dates>

                 <Dates>

                   <Date>2021-02-22</Date>

                   <Date>2021-03-22</Date>

                   <Date>2021-04-20</Date>

                 </Dates>

               </Dates>

             </ScheduleData>

           </LegData>

           <LegData>

             <Payer>false</Payer>

             <LegType>Equity</LegType>

             <Currency>USD</Currency>

             <PaymentConvention>Modified Following</PaymentConvention>

             <DayCounter>Act/360</DayCounter>

             <EquityLegData>

               <Quantity>70800</Quantity>

               <ReturnType>Total</ReturnType>

               <Underlying>

                 <Type>Equity</Type>

                 <Name>.SPX</Name>

                 <IdentifierType>RIC</IdentifierType>

               </Underlying>

               <InitialPrice>3800</InitialPrice>

               <FixingDays>2</FixingDays>

             </EquityLegData>

             <ScheduleData>

               <Dates>

                 <Dates>

                   <Date>2021-02-22</Date>

                   <Date>2021-03-22</Date>

                   <Date>2021-04-20</Date>

                 </Dates>

               </Dates>

             </ScheduleData>

           </LegData>

         </EquitySwapData>

       </Trade>

       <Trade>

         <TradeType>EquitySwap</TradeType>

         <EquitySwapData>

           <LegData>

             <Payer>true</Payer>

             <LegType>Floating</LegType>

             <Currency>USD</Currency>

             <PaymentConvention>Modified Following</PaymentConvention>

             <DayCounter>Act/360</DayCounter>

             <Indexings>

               <FromAssetLeg>true</FromAssetLeg>

             </Indexings>

             <FloatingLegData>

               <Index>USD-LIBOR-3M</Index>

               <Spreads>

                 <Spread>-0.0005</Spread>

               </Spreads>

               <FixingDays>2</FixingDays>

             </FloatingLegData>

             <ScheduleData>

               <Dates>

                 <Dates>

                   <Date>2021-02-22</Date>

                   <Date>2021-03-22</Date>

                   <Date>2021-04-20</Date>

                 </Dates>

               </Dates>

             </ScheduleData>

           </LegData>

           <LegData>

             <Payer>false</Payer>

             <LegType>Equity</LegType>

             <Currency>USD</Currency>

             <PaymentConvention>Modified Following</PaymentConvention>

             <DayCounter>Act/360</DayCounter>

             <EquityLegData>

               <Quantity>70800</Quantity>

               <ReturnType>Total</ReturnType>

               <Underlying>

                 <Type>Equity</Type>

                 <Name>.SPX</Name>

                 <IdentifierType>RIC</IdentifierType>

               </Underlying>

               <InitialPrice>3800</InitialPrice>

               <FixingDays>2</FixingDays>

             </EquityLegData>

             <ScheduleData>

               <Dates>

                 <Dates>

                   <Date>2021-02-22</Date>

                   <Date>2021-03-22</Date>

                   <Date>2021-04-20</Date>

                 </Dates>

               </Dates>

             </ScheduleData>

           </LegData>

         </EquitySwapData>

       </Trade>

     </Components>

   </CompositeTradeData>

 </Trade>

</Portfolio>