Skip to content

Commit c17e941

Browse files
committed
Merge branch 'master' into 'master'
push ore to github See merge request qs/ore-github!4
2 parents 8a3cfe4 + 11f56c3 commit c17e941

83 files changed

Lines changed: 2775 additions & 2236 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Docs/UserGuide/tradedata/commodityoption.tex

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -118,24 +118,29 @@ \subsubsection{Commodity Spread Option}
118118
Exactly one payer and one receiver leg are required, the leg with \lstinline!isPayer! setto \emph{true} is the long (positive) position in the spread payoff.
119119

120120
Within the two \lstinline!LegData!, the \lstinline!Quantity! node has must be equal.
121-
If the underlying contracts are quoted using different units (e.g. barrels vs liters), the \lstinline!Gearing! node must be used to account for this difference.
121+
If the underlying contracts are quoted using different units (e.g. barrels vs liters), the \lstinline!Gearing! node must be used to account for this difference. The gearing could also be used for the heat rate factor in spark / heat rate options.
122122

123123
Other than the two legs, the following nodes complete the \lstinline!CommoditySpreadOptionData! container:
124124
\begin{itemize}
125125
\item \lstinline!SpreadStrike!: The strike value for the spread. Allowable values: Any real number.
126126
\item \lstinline!OptionData!: This is a trade component sub-node outlined in section \ref{ss:option_data}.
127127
The relevant fields in the \lstinline!OptionData! node for an CommoditySpreadOption are
128-
129-
\begin{itemize}
130-
\item \lstinline!LongShort! The allowable values are \emph{Long} or \emph{Short}.
131-
132-
\item \lstinline!OptionType! The allowable values are \emph{Call} or \emph{Put}.
133-
134-
\item A \lstinline!PaymentData! [Optional] node can be added which defines the settlement date of the option payoff.
135-
136-
\item \lstinline!Premiums! [Optional]: Option premium amounts paid by the option buyer to the option seller. See section \ref{ss:premiums}
137-
138-
\end{itemize}
128+
\begin{itemize}
129+
\item \lstinline!LongShort! The allowable values are \emph{Long} or \emph{Short}.
130+
131+
\item \lstinline!OptionType! The allowable values are \emph{Call} or \emph{Put}.
132+
133+
\item A \lstinline!PaymentData! [Optional] node can be added which defines the settlement date of the option payoff.
134+
135+
\item \lstinline!Premiums! [Optional]: Option premium amounts paid by the option buyer to the option seller. See section \ref{ss:premiums}
136+
\end{itemize}
137+
\item \lstinline!OptionStripPaymentDates! [Optional]: If the number of cashflows per leg is greater than 1, we can group options by their expiry date into strips. All option in a strip will have the same payment date as defined in this node. The payment date will be \emph{lag} business days after the latest expiry date in the strip. The node has following sub-nodes:
138+
\begin{itemize}
139+
\item \lstinline!OptionStripDefinition! A schedule node \ref{ss:schedule_data} defining the option strips. The $n$ dates in the schedule defining $n-1$ strips, each strip include the period's start date and excludes period's end date. All options with expiry within start and end of a period are falling in the same strip. The schedule has to cover all option expiries. The first date in the schedule has to be before or on the first expiry date of the options and the last date in the schedule has to be after last expiry date of the options.
140+
\item \lstinline!PaymentCalendar! Calendar defining valid business days for the payment date.
141+
\item \lstinline!PaymentLag! number of business days.
142+
\item \lstinline!PaymentConvention! business day convention for the option strip payment date.
143+
\end{itemize}
139144
\end{itemize}
140145

141146
\begin{listing}[H]
@@ -164,6 +169,22 @@ \subsubsection{Commodity Spread Option}
164169
</Premiums>
165170
</OptionData>
166171
<SpreadStrike>2.3</SpreadStrike>
172+
<OptionStripPaymentDates>
173+
<OptionStripDefinition>
174+
<Rules>
175+
<StartDate>2023-07-01</StartDate>
176+
<EndDate>2023-10-01</EndDate>
177+
<Tenor>1M</Tenor>
178+
<Calendar>NullCalendar</Calendar>
179+
<Convention>Unadjusted</Convention>
180+
<TermConvention>Unadjusted</TermConvention>
181+
<Rule>Backward</Rule>
182+
</Rules>
183+
</OptionStripDefinition>
184+
<PaymentCalendar>ICE_FuturesUS,US-NERC</PaymentCalendar>
185+
<PaymentLag>5</PaymentLag>
186+
<PaymentConvention>MF</PaymentConvention>
187+
</OptionStripPaymentDates>
167188
</CommoditySpreadOptionData>
168189
\end{minted}
169190
\caption{Commodity Option data}

Docs/UserGuide/tradedata/swaption.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ \subsubsection{Swaption}
9393

9494
\item \lstinline!OptionType![Optional]: This flag is optional for swaptions, and even if set, has no impact. Whether a swaption is a payer or receiver swaption is determined by the Payer flags on the legs of the underlying swap.
9595

96-
\item \lstinline!Style!: The exercise style of the Swaption. The allowable values are \emph{European} or \emph{Bermudan}.
96+
\item \lstinline!Style!: The exercise style of the Swaption. The allowable values are \emph{European}, \emph{Bermudan} or \emph{American}. Note that \emph{American} exercise style isn't supported, and if set to \emph{American}, it will behave as \emph{Bermudan} exercise style.
9797

9898
\item \lstinline!NoticePeriod![Optional]: The notice period defining the date (relative to the exercise date) on which the exercise
9999
decision has to be taken. If not given the notice period defaults to \emph{0D}, i.e. the notice date is identical to the

Examples/Example_23/ExpectedOutput/flows.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,4 @@ averageOIS2,Swap,7,0,2019-08-09,Interest,-613308.8889,USD,0.0124040000,0.4944444
5959
averageOIS2,Swap,8,0,2020-02-10,Interest,-623645.5556,USD,0.0124040000,0.5027777778,2019-08-09,2020-02-10,0.0000,#N/A,#N/A,100000000.0000,0.9562859655,-596383.4921941592,0.8831293157,-526683.7453815951,EUR,#N/A,#N/A,#N/A,#N/A
6060
averageOIS2,Swap,9,0,2020-08-10,Interest,-620200.0000,USD,0.0124040000,0.5000000000,2020-02-10,2020-08-10,0.0000,#N/A,#N/A,100000000.0000,0.9483563111,-588170.5841673282,0.8831293157,-519430.6855356031,EUR,#N/A,#N/A,#N/A,#N/A
6161
averageOIS2,Swap,10,0,2021-02-09,Interest,-616754.4444,USD,0.0124040000,0.4972222222,2020-08-10,2021-02-09,0.0000,#N/A,#N/A,100000000.0000,0.9404493830,-580026.3367307166,0.8831293157,-512238.2618696701,EUR,#N/A,#N/A,#N/A,#N/A
62+
fra1,ForwardRateAgreement,1,0,2016-10-28,InterestProjected,-1372871.5757,EUR,-0.0007026433,19.2777777778,2016-10-28,2035-10-29,0.0000,2016-10-26,-0.0006926433,100000000.0000,1.0021811279,-1375865.9841961791,1.0000000000,-1375865.9841961791,EUR,#N/A,#N/A,#N/A,#N/A

Examples/Example_26/ExpectedOutput/flows.csv

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2003,6 +2003,33 @@ BasisSwap_6M_3M_GBP_7Y,Swap,13,1,2022-08-05,InterestProjected,7249.9496,GBP,0.01
20032003
BasisSwap_6M_3M_GBP_7Y,Swap,14,1,2023-02-06,InterestProjected,7494.0828,GBP,0.0182102856,0.5068493151,2022-08-05,2023-02-06,0.0000,2022-08-05,0.0182102856,811938.0000,0.9452227321,7083.5774425438,1.2316211336,8724.2836799655,EUR,#N/A,#N/A,#N/A,#N/A
20042004
BasisSwap_6M_3M_GBP_7Y,Swap,2,2,2023-02-06,Notional,-811938.0000,GBP,#N/A,#N/A,#N/A,#N/A,#N/A,#N/A,#N/A,#N/A,0.9452227321,-767462.2546846707,1.2316211336,-945222.7321355456,EUR,#N/A,#N/A,#N/A,#N/A
20052005
BasisSwap_6M_3M_GBP_7Y,Swap,2,3,2023-02-06,Notional,811938.0000,GBP,#N/A,#N/A,#N/A,#N/A,#N/A,#N/A,#N/A,#N/A,0.9452227321,767462.2546846707,1.2316211336,945222.7321355456,EUR,#N/A,#N/A,#N/A,#N/A
2006+
FRA_CHF_1M_6M,ForwardRateAgreement,1,0,2016-03-09,InterestProjected,0.0000,CHF,0.0000000000,0.5111111111,2016-03-09,2016-09-09,0.0000,2016-03-07,-0.0080730000,1125046.0000,1.0007053936,0.0000000000,0.8888525447,0.0000000000,EUR,#N/A,#N/A,#N/A,#N/A
2007+
FRA_CHF_2M_6M,ForwardRateAgreement,1,0,2016-04-09,InterestProjected,0.0000,CHF,0.0000000000,0.5138888889,2016-04-09,2016-10-11,0.0000,2016-04-07,-0.0084080000,1125046.0000,1.0014534246,0.0000000002,0.8888525447,0.0000000001,EUR,#N/A,#N/A,#N/A,#N/A
2008+
FRA_CHF_3M_6M,ForwardRateAgreement,1,0,2016-05-09,InterestProjected,0.0000,CHF,0.0000000000,0.5111111111,2016-05-09,2016-11-09,0.0000,2016-05-05,-0.0086320000,1125046.0000,1.0021977720,-0.0000000001,0.8888525447,-0.0000000001,EUR,#N/A,#N/A,#N/A,#N/A
2009+
FRA_CHF_4M_6M,ForwardRateAgreement,1,0,2016-06-09,InterestProjected,0.0000,CHF,0.0000000000,0.5083333333,2016-06-09,2016-12-09,0.0000,2016-06-07,-0.0086090000,1125046.0000,1.0029701397,-0.0000000003,0.8888525447,-0.0000000003,EUR,#N/A,#N/A,#N/A,#N/A
2010+
FRA_CHF_5M_6M,ForwardRateAgreement,1,0,2016-07-09,InterestProjected,0.0000,CHF,0.0000000000,0.5166666667,2016-07-09,2017-01-11,0.0000,2016-07-07,-0.0088290000,1125046.0000,1.0041007488,0.0000000000,0.8888525447,0.0000000000,EUR,#N/A,#N/A,#N/A,#N/A
2011+
FRA_CHF_6M_6M,ForwardRateAgreement,1,0,2016-08-09,InterestProjected,0.0000,CHF,0.0000000000,0.5111111111,2016-08-09,2017-02-09,0.0000,2016-08-05,-0.0088610000,1125046.0000,1.0045903877,-0.0000000001,0.8888525447,-0.0000000001,EUR,#N/A,#N/A,#N/A,#N/A
2012+
FRA_EUR_1M_3M,ForwardRateAgreement,1,0,2016-03-09,InterestProjected,0.0000,EUR,0.0000000000,0.2555555556,2016-03-09,2016-06-09,0.0000,2016-03-07,-0.0012430000,1000000.0000,1.0001584288,0.0000000000,1.0000000000,0.0000000000,EUR,#N/A,#N/A,#N/A,#N/A
2013+
FRA_EUR_1Y_3M,ForwardRateAgreement,1,0,2017-02-09,InterestProjected,0.0000,EUR,0.0000000000,0.2472222222,2017-02-09,2017-05-09,0.0000,2017-02-07,-0.0021020000,1000000.0000,1.0032090583,0.0000000001,1.0000000000,0.0000000001,EUR,#N/A,#N/A,#N/A,#N/A
2014+
FRA_EUR_2M_3M,ForwardRateAgreement,1,0,2016-04-09,InterestProjected,0.0000,EUR,0.0000000000,0.2583333333,2016-04-09,2016-07-11,0.0000,2016-04-07,-0.0015810000,1000000.0000,1.0003590582,0.0000002310,1.0000000000,0.0000002310,EUR,#N/A,#N/A,#N/A,#N/A
2015+
FRA_EUR_3M_3M,ForwardRateAgreement,1,0,2016-05-09,InterestProjected,0.0000,EUR,0.0000000000,0.2555555556,2016-05-09,2016-08-09,0.0000,2016-05-05,-0.0017470000,1000000.0000,1.0005987008,0.0000000000,1.0000000000,0.0000000000,EUR,#N/A,#N/A,#N/A,#N/A
2016+
FRA_EUR_4M_3M,ForwardRateAgreement,1,0,2016-06-09,InterestProjected,0.0000,EUR,0.0000000000,0.2555555556,2016-06-09,2016-09-09,0.0000,2016-06-07,-0.0019310000,1000000.0000,1.0008387815,0.0000000000,1.0000000000,0.0000000000,EUR,#N/A,#N/A,#N/A,#N/A
2017+
FRA_EUR_5M_3M,ForwardRateAgreement,1,0,2016-07-09,InterestProjected,0.0000,EUR,0.0000000000,0.2611111111,2016-07-09,2016-10-11,0.0000,2016-07-07,-0.0020170000,1000000.0000,1.0011383231,-0.0000000001,1.0000000000,-0.0000000001,EUR,#N/A,#N/A,#N/A,#N/A
2018+
FRA_EUR_6M_3M,ForwardRateAgreement,1,0,2016-08-09,InterestProjected,0.0000,EUR,0.0000000000,0.2555555556,2016-08-09,2016-11-09,0.0000,2016-08-05,-0.0019320000,1000000.0000,1.0013181466,-0.0000000004,1.0000000000,-0.0000000004,EUR,#N/A,#N/A,#N/A,#N/A
2019+
FRA_EUR_9M_3M,ForwardRateAgreement,1,0,2016-11-09,InterestProjected,0.0000,EUR,0.0000000000,0.2555555556,2016-11-09,2017-02-09,0.0000,2016-11-07,-0.0022370000,1000000.0000,1.0023470665,0.0000000003,1.0000000000,0.0000000003,EUR,#N/A,#N/A,#N/A,#N/A
2020+
FRA_GBP_1M_6M,ForwardRateAgreement,1,0,2016-03-05,InterestProjected,0.0000,GBP,0.0000000000,0.5095890411,2016-03-05,2016-09-07,0.0000,2016-03-07,0.0083540000,811938.0000,0.9995452690,0.0000000007,1.2316211336,0.0000000008,EUR,#N/A,#N/A,#N/A,#N/A
2021+
FRA_GBP_1Y_6M,ForwardRateAgreement,1,0,2017-02-05,InterestProjected,0.0000,GBP,0.0000000000,0.5013698630,2017-02-05,2017-08-07,0.0000,2017-02-06,0.0081130000,811938.0000,0.9950768029,0.0000000009,1.2316211336,0.0000000011,EUR,#N/A,#N/A,#N/A,#N/A
2022+
FRA_GBP_2M_6M,ForwardRateAgreement,1,0,2016-04-05,InterestProjected,0.0000,GBP,0.0000000000,0.5013698630,2016-04-05,2016-10-05,0.0000,2016-04-05,0.0083750000,811938.0000,0.9990758685,-0.0000000001,1.2316211336,-0.0000000001,EUR,#N/A,#N/A,#N/A,#N/A
2023+
FRA_GBP_3M_6M,ForwardRateAgreement,1,0,2016-05-05,InterestProjected,0.0000,GBP,0.0000000000,0.5095890411,2016-05-05,2016-11-07,0.0000,2016-05-05,0.0083270000,811938.0000,0.9986055909,0.0000000000,1.2316211336,0.0000000001,EUR,#N/A,#N/A,#N/A,#N/A
2024+
FRA_GBP_4M_6M,ForwardRateAgreement,1,0,2016-06-05,InterestProjected,0.0000,GBP,0.0000000000,0.5041095890,2016-06-05,2016-12-06,0.0000,2016-06-06,0.0081920000,811938.0000,0.9981710394,-0.0000000036,1.2316211336,-0.0000000044,EUR,#N/A,#N/A,#N/A,#N/A
2025+
FRA_GBP_5M_6M,ForwardRateAgreement,1,0,2016-07-05,InterestProjected,0.0000,GBP,0.0000000000,0.5041095890,2016-07-05,2017-01-05,0.0000,2016-07-05,0.0081390000,811938.0000,0.9977195275,-0.0000000039,1.2316211336,-0.0000000048,EUR,#N/A,#N/A,#N/A,#N/A
2026+
FRA_GBP_6M_6M,ForwardRateAgreement,1,0,2016-08-05,InterestProjected,0.0000,GBP,0.0000000000,0.5068493151,2016-08-05,2017-02-06,0.0000,2016-08-05,0.0081970000,811938.0000,0.9972893348,-0.0000000088,1.2316211336,-0.0000000109,EUR,#N/A,#N/A,#N/A,#N/A
2027+
FRA_USD_1Y_3M,ForwardRateAgreement,1,0,2017-02-09,InterestProjected,0.0000,USD,0.0000000000,0.2472222222,2017-02-09,2017-05-09,0.0000,2017-02-07,0.0095940000,1132337.0000,0.9942753944,-0.0000002650,0.8831293157,-0.0000002341,EUR,#N/A,#N/A,#N/A,#N/A
2028+
FRA_USD_1Y_6M,ForwardRateAgreement,1,0,2017-02-09,InterestProjected,0.0000,USD,0.0000000000,0.5027777778,2017-02-09,2017-08-09,0.0000,2017-02-07,0.0097810000,1132337.0000,0.9942753944,-0.0000000001,0.8831293157,-0.0000000001,EUR,#N/A,#N/A,#N/A,#N/A
2029+
FRA_USD_3M_3M,ForwardRateAgreement,1,0,2016-05-09,InterestProjected,0.0000,USD,0.0000000000,0.2555555556,2016-05-09,2016-08-09,0.0000,2016-05-05,0.0081320000,1132337.0000,0.9987390667,-0.0000000039,0.8831293157,-0.0000000035,EUR,#N/A,#N/A,#N/A,#N/A
2030+
FRA_USD_6M_3M,ForwardRateAgreement,1,0,2016-08-09,InterestProjected,0.0000,USD,0.0000000000,0.2555555556,2016-08-09,2016-11-09,0.0000,2016-08-05,0.0085800000,1132337.0000,0.9973098156,-0.0000000397,0.8831293157,-0.0000000351,EUR,#N/A,#N/A,#N/A,#N/A
2031+
FRA_USD_6M_6M,ForwardRateAgreement,1,0,2016-08-09,InterestProjected,0.0000,USD,0.0000000000,0.5111111111,2016-08-09,2017-02-09,0.0000,2016-08-05,0.0096300000,1132337.0000,0.9973098156,-0.0000000001,0.8831293157,-0.0000000001,EUR,#N/A,#N/A,#N/A,#N/A
2032+
FRA_USD_9M_3M,ForwardRateAgreement,1,0,2016-11-09,InterestProjected,0.0000,USD,0.0000000000,0.2555555556,2016-11-09,2017-02-09,0.0000,2016-11-07,0.0091410000,1132337.0000,0.9958037221,-0.0000001729,0.8831293157,-0.0000001527,EUR,#N/A,#N/A,#N/A,#N/A
20062033
Swap_CHF_3M_10Y,Swap,1,0,2017-02-09,Interest,-2973.4966,CHF,-0.0026430000,1.0000000000,2016-02-09,2017-02-09,0.0000,#N/A,#N/A,1125046.0000,1.0097080582,-3002.3634559637,0.8888525447,-2668.6583979355,EUR,#N/A,#N/A,#N/A,#N/A
20072034
Swap_CHF_3M_10Y,Swap,2,0,2018-02-09,Interest,-2973.4966,CHF,-0.0026430000,1.0000000000,2017-02-09,2018-02-09,0.0000,#N/A,#N/A,1125046.0000,1.0204170438,-3034.2065877510,0.8888525447,-2696.9622466557,EUR,#N/A,#N/A,#N/A,#N/A
20082035
Swap_CHF_3M_10Y,Swap,3,0,2019-02-11,Interest,-2990.0160,CHF,-0.0026430000,1.0055555556,2018-02-09,2019-02-11,0.0000,#N/A,#N/A,1125046.0000,1.0308816166,-3082.3525313126,0.8888525447,-2739.7568911072,EUR,#N/A,#N/A,#N/A,#N/A

0 commit comments

Comments
 (0)