Skip to content

Commit 0bbfd60

Browse files
Roland Lichtersjenkins
authored andcommitted
QPR-12370 add im schedule example to ex44
1 parent 1b6f398 commit 0bbfd60

8 files changed

Lines changed: 78 additions & 0 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#Portfolio,ProductClass,GrossIM,GrossCurrentRC,NetCurrentRC,NetToGrossRatio,Side,Regulation,ScheduleIM,Currency
2+
nettingSetId_1,Rates,989.66,#N/A,#N/A,#N/A,Call,Unspecified,989.66,USD
3+
nettingSetId_1,All,989.66,4804.86,501.06,0.104282,Call,Unspecified,457.79,USD
4+
All,All,#N/A,#N/A,#N/A,#N/A,Call,Unspecified,457.79,USD
5+
nettingSetId_1,Rates,989.66,#N/A,#N/A,#N/A,Post,Unspecified,989.66,USD
6+
nettingSetId_1,All,989.66,-4303.80,0.00,0.000000,Post,Unspecified,395.86,USD
7+
All,All,#N/A,#N/A,#N/A,#N/A,Post,Unspecified,395.86,USD
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#TradeId,Portfolio,ProductClass,EndDate,Maturity,Label,Multiplier,Notional,NotionalCurrency,PV,PVCurrency,Notional(Base),PV(Base),BaseCurrency,GrossIM(Base),CollectRegulations,PostRegulations
2+
IM_Schedule_1,nettingSetId_1,Rates,2021-08-24,1.64932,Interest Rate 0-2 years,0.01,6027.63,EUR,1014.05,EUR,7074.63,1190.19,USD,70.75,Unspecified,Unspecified
3+
IM_Schedule_2,nettingSetId_1,Rates,2021-08-24,1.64932,Interest Rate 0-2 years,0.01,1.14,GBP,874.35,GBP,1.51,1154.14,USD,0.02,Unspecified,Unspecified
4+
IM_Schedule_3,nettingSetId_1,Rates,2021-08-24,1.64932,Interest Rate 0-2 years,0.01,5496.62,USD,-1166.76,USD,5496.62,-1166.76,USD,54.97,Unspecified,Unspecified
5+
IM_Schedule_4,nettingSetId_1,Rates,2022-08-24,2.64932,Interest Rate 2-5 years,0.02,2909.05,EUR,1038.63,EUR,3414.35,1219.04,USD,68.29,Unspecified,Unspecified
6+
IM_Schedule_5,nettingSetId_1,Rates,2022-08-24,2.64932,Interest Rate 2-5 years,0.02,9726.84,GBP,-699.44,GBP,12839.43,-923.26,USD,256.79,Unspecified,Unspecified
7+
IM_Schedule_6,nettingSetId_1,Rates,2022-08-24,2.64932,Interest Rate 2-5 years,0.02,2067.19,USD,-308.77,USD,2067.19,-308.77,USD,41.34,Unspecified,Unspecified
8+
IM_Schedule_7,nettingSetId_1,Rates,2023-08-24,3.64932,Interest Rate 2-5 years,0.02,8212.29,EUR,-1061.78,EUR,9638.77,-1246.22,USD,192.78,Unspecified,Unspecified
9+
IM_Schedule_8,nettingSetId_1,Rates,2023-08-24,3.64932,Interest Rate 2-5 years,0.02,9779.90,GBP,940.53,GBP,12909.46,1241.49,USD,258.19,Unspecified,Unspecified
10+
IM_Schedule_9,nettingSetId_1,Rates,2023-08-24,3.64932,Interest Rate 2-5 years,0.02,2327.28,USD,-658.80,USD,2327.28,-658.80,USD,46.55,Unspecified,Unspecified
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#Portfolio,ProductClass,RiskClass,MarginType,Bucket,SimmSide,Regulation,InitialMargin,Currency,CalculationCurrency
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#Portfolio,ProductClass,RiskClass,MarginType,Bucket,SimmSide,Regulation,InitialMargin,Currency,CalculationCurrency
2+
All,All,All,All,All,Call,,0.00,USD,USD
3+
All,All,All,All,All,Post,,0.00,USD,USD
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
TradeID,PortfolioID,ProductClass,RiskType,Qualifier,Bucket,Label1,Label2,AmountCurrency,Amount,AmountUSD,end_date,im_model
2+
IM_Schedule_1,nettingSetId_1,Rates,PV,,,,,EUR,1014.052346,1190.193238,24/08/2021,Schedule
3+
IM_Schedule_1,nettingSetId_1,Rates,Notional,,,,,EUR,6027.633761,7074.633745,24/08/2021,Schedule
4+
IM_Schedule_2,nettingSetId_1,Rates,PV,,,,,GBP,874.3453637,1154.13588,24/08/2021,Schedule
5+
IM_Schedule_2,nettingSetId_1,Rates,Notional,,,,,GBP,1.143748173,1.509747589,24/08/2021,Schedule
6+
IM_Schedule_3,nettingSetId_1,Rates,PV,,,,,USD,-1166.757847,-1166.757847,24/08/2021,Schedule
7+
IM_Schedule_3,nettingSetId_1,Rates,Notional,,,,,USD,5496.624779,5496.624779,24/08/2021,Schedule
8+
IM_Schedule_4,nettingSetId_1,Rates,PV,,,,,EUR,1038.628473,1219.038239,24/08/2022,Schedule
9+
IM_Schedule_4,nettingSetId_1,Rates,Notional,,,,,EUR,2909.047389,3414.348921,24/08/2022,Schedule
10+
IM_Schedule_5,nettingSetId_1,Rates,PV,,,,,GBP,-699.4382929,-923.2585466,24/08/2022,Schedule
11+
IM_Schedule_5,nettingSetId_1,Rates,Notional,,,,,GBP,9726.8436,12839.43355,24/08/2022,Schedule
12+
IM_Schedule_6,nettingSetId_1,Rates,PV,,,,,USD,-308.7725131,-308.7725131,24/08/2022,Schedule
13+
IM_Schedule_6,nettingSetId_1,Rates,Notional,,,,,USD,2067.191553,2067.191553,24/08/2022,Schedule
14+
IM_Schedule_7,nettingSetId_1,Rates,PV,,,,,EUR,-1061.783673,-1246.215498,24/08/2023,Schedule
15+
IM_Schedule_7,nettingSetId_1,Rates,Notional,,,,,EUR,8212.291231,9638.766217,24/08/2023,Schedule
16+
IM_Schedule_8,nettingSetId_1,Rates,PV,,,,,GBP,940.5257038,1241.493929,24/08/2023,Schedule
17+
IM_Schedule_8,nettingSetId_1,Rates,Notional,,,,,GBP,9779.89512,12909.46156,24/08/2023,Schedule
18+
IM_Schedule_9,nettingSetId_1,Rates,PV,,,,,USD,-658.7952834,-658.7952834,24/08/2023,Schedule
19+
IM_Schedule_9,nettingSetId_1,Rates,Notional,,,,,USD,2327.28328,2327.28328,24/08/2023,Schedule
20+
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0"?>
2+
<ORE>
3+
<Setup>
4+
<Parameter name="asofDate">2019-12-30</Parameter>
5+
<Parameter name="inputPath">Input</Parameter>
6+
<Parameter name="outputPath">Output/IM_SCHEDULE</Parameter>
7+
<Parameter name="logFile">log.txt</Parameter>
8+
<Parameter name="logMask">255</Parameter>
9+
<Parameter name="marketDataFile">market.txt</Parameter>
10+
<Parameter name="fixingDataFile"></Parameter>
11+
<Parameter name="implyTodaysFixings">N</Parameter>
12+
<Parameter name="curveConfigFile">../../Input/curveconfig.xml</Parameter>
13+
<Parameter name="conventionsFile">../../Input/conventions.xml</Parameter>
14+
<Parameter name="marketConfigFile">todaysmarket.xml</Parameter>
15+
<Parameter name="pricingEnginesFile">../../Input/pricingengine.xml</Parameter>
16+
<Parameter name="portfolioFile"></Parameter>
17+
<Parameter name="observationModel">None</Parameter>
18+
</Setup>
19+
<Markets>
20+
<Parameter name="lgmcalibration">default</Parameter>
21+
<Parameter name="fxcalibration">default</Parameter>
22+
<Parameter name="pricing">default</Parameter>
23+
<Parameter name="simulation">default</Parameter>
24+
</Markets>
25+
<Analytics>
26+
<Analytic type="imschedule">
27+
<Parameter name="active">Y</Parameter>
28+
<Parameter name="version">2.6</Parameter>
29+
<Parameter name="crif">crif_schedule.csv</Parameter>
30+
<Parameter name="calculationCurrency">USD</Parameter>
31+
</Analytic>
32+
</Analytics>
33+
</ORE>

Examples/Example_44/run.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@
1717
for orexml in orexmls:
1818
oreex.print_headline(f"Run ORE SIMM; version={orexml[1]}; MPOR days={orexml[2]}")
1919
oreex.run(orexml[0])
20+
21+
oreex.run("Input/ore_schedule.xml")

OREAnalytics/orea/app/analyticsmanager.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <orea/app/analytics/scenarioanalytic.hpp>
2222
#include <orea/app/analytics/scenariostatisticsanalytic.hpp>
2323
#include <orea/app/analytics/simmanalytic.hpp>
24+
#include <orea/app/analytics/imscheduleanalytic.hpp>
2425
#include <orea/app/analytics/varanalytic.hpp>
2526
#include <orea/app/analytics/xvaanalytic.hpp>
2627
#include <orea/app/analyticsmanager.hpp>
@@ -58,6 +59,7 @@ AnalyticsManager::AnalyticsManager(const boost::shared_ptr<InputParameters>& inp
5859
addAnalytic("HISTSIM_VAR", boost::make_shared<HistoricalSimulationVarAnalytic>(inputs_));
5960
addAnalytic("XVA", boost::make_shared<XvaAnalytic>(inputs_));
6061
addAnalytic("SIMM", boost::make_shared<SimmAnalytic>(inputs_));
62+
addAnalytic("IM_SCHEDULE", boost::make_shared<IMScheduleAnalytic>(inputs_));
6163
addAnalytic("PARCONVERSION", boost::make_shared<ParConversionAnalytic>(inputs_));
6264
addAnalytic("SCENARIO_STATISTICS", boost::make_shared<ScenarioStatisticsAnalytic>(inputs_));
6365
addAnalytic("SCENARIO", boost::make_shared<ScenarioAnalytic>(inputs_));

0 commit comments

Comments
 (0)