Skip to content

Commit aa4e08c

Browse files
committed
Merge remote-tracking branch 'origin/master' into feature/QPR-13646
2 parents d2e919a + c4d006b commit aa4e08c

2 files changed

Lines changed: 134 additions & 0 deletions

File tree

Docs/UserGuide/tradedata/var_and_vol_derivatives.tex

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ \subsubsection{Exotic Variance and Volatility Derivatives}
3434
\hline
3535
Variance Dispersion Swap & \lstinline!VarianceDispersionSwap! \\
3636
\hline
37+
Dual European Binary Option with Volatility and Spot KO Barrier & \lstinline!DualEuroBinaryOptionDoubleKO! \\
38+
\hline
3739
Corridor Variance Dispersion Swap & \lstinline!CorridorVarianceDispersionSwap! \\
3840
\hline
3941
Corridor Variance Dispersion Swap with KO Barrier & \lstinline!KOCorridorVarianceDispersionSwap! \\
@@ -358,6 +360,120 @@ \subsubsection*{Variance Swap with KI/KO Barrier}
358360
Allowable values: See Table \ref{tab:currency} for allowable currency codes.
359361
\end{itemize}
360362

363+
\subsubsection*{Dual European Binary Option with Volatility and Spot KO Barrier}
364+
365+
The traditional trade representation is as follows, using an EQ underlying in this example:
366+
367+
\begin{minted}[fontsize=\scriptsize]{xml}
368+
<Trade id="DualEuroBinaryOptionDoubleKO">
369+
<TradeType>ScriptedTrade</TradeType>
370+
<Envelope>
371+
....
372+
</Envelope>
373+
<DualEuroBinaryOptionDoubleKOData>
374+
<LongShort type="longShort">Long</LongShort>
375+
<SettlementDate type="event">2020-07-20</SettlementDate>
376+
<SettlementAmount type="number">100000000</SettlementAmount>
377+
<ValuationSchedule type="event">
378+
<ScheduleData>
379+
<Rules>
380+
<StartDate>2020-01-15</StartDate>
381+
<EndDate>2020-07-10</EndDate>
382+
<Tenor>1D</Tenor>
383+
<Calendar>US</Calendar>
384+
<Convention>Following</Convention>
385+
<TermConvention>Following</TermConvention>
386+
<Rule>Forward</Rule>
387+
</Rules>
388+
</ScheduleData>
389+
</ValuationSchedule>
390+
<SpotBarrierLevel type="number">0.05</SpotBarrierLevel>
391+
<VolBarrierLevel type="number">6.75</VolBarrierLevel>
392+
<VolBarrierDate type="event">2020-07-18</VolBarrierDate>
393+
<Underlying type="index">FX-ECB-JPY-USD</Underlying>
394+
<PayCcy type="currency">USD</PayCcy>
395+
<Expiry type="event">2020-07-15</Expiry>
396+
<Premium type="number">0</Premium>
397+
<PremiumDate type="event">2020-07-18</PremiumDate>
398+
</DualEuroBinaryOptionDoubleKOData>
399+
</Trade>
400+
\end{minted}
401+
402+
The DualEuroBinaryOptionDoubleKO script referenced in the trade above is shown in listing
403+
\ref{lst:DualEuroBinaryOptionDoubleKO}
404+
405+
\begin{listing}[hbt]
406+
\begin{minted}[fontsize=\scriptsize]{Basic}
407+
NUMBER d, realisedVariance, realisedVolatility, currPrice, pay;
408+
NUMBER prevPrice, payoff, strike, TriggerProbability, premium, expectedN, Alive;
409+
410+
Alive = 1;
411+
412+
FOR d IN (2, SIZE(ValuationSchedule), 1) DO
413+
currPrice = Underlying(ValuationSchedule[d]);
414+
prevPrice = Underlying(ValuationSchedule[d-1]);
415+
IF currPrice >= SpotBarrierLevel THEN
416+
Alive = 0;
417+
END;
418+
realisedVariance = realisedVariance + pow(ln(currPrice/prevPrice), 2);
419+
END;
420+
421+
expectedN = SIZE(ValuationSchedule) - 1;
422+
realisedVolatility = 100 * sqrt((252/expectedN)) * sqrt(realisedVariance);
423+
424+
IF Alive == 1 THEN
425+
FOR d IN (2, SIZE(ValuationSchedule), 1) DO
426+
IF {{VolBarrierDate == ValuationSchedule[d]} AND {realisedVolatility <= VolBarrierLevel}} THEN
427+
Alive = 0;
428+
END;
429+
END;
430+
END;
431+
432+
IF Alive == 1 THEN
433+
TriggerProbability = 1;
434+
payoff = SettlementAmount;
435+
premium = PAY(Premium, Expiry, PremiumDate, PayCcy);
436+
437+
pay = PAY(payoff, Expiry, SettlementDate, PayCcy);
438+
439+
Option = pay - premium;
440+
441+
END;
442+
\end{minted}
443+
\caption{Payoff script for a DualEuroBinaryOptionDoubleKO.}
444+
\label{lst:DualEuroBinaryOptionDoubleKO}
445+
\end{listing}
446+
447+
The meanings and allowable values for the \lstinline!DualEuroBinaryOptionDoubleKO! node below.
448+
449+
\begin{itemize}
450+
\item{}[longShort] \lstinline!LongShort!: Own party position in the option. \emph{Long} corresponds to receiving the settlement amount at expiry. \\
451+
Allowable values: \emph{Long, Short}.
452+
\item{}[index] \lstinline!Underlying!: Underlying index. \\
453+
Allowable values: See Section \ref{data_index} for allowable values.
454+
\item{}[event] \lstinline!ValuationSchedule!: The schedule defining the (daily) observation period for the variance accrual. \\
455+
Allowable values: See Section \ref{ss:schedule_data}.
456+
\item{}[number] \lstinline!SpotBarrierLevel!: The agreed Spot barrier level. \\
457+
Allowable values: Any non-negative real number.
458+
\item{}[number] \lstinline!VolBarrierLevel!: The agreed volatility barrier level. \\
459+
Allowable values: Any non-negative real number.
460+
\item{}[event] \lstinline!VolBarrierDate!: The date on which the realised volatility event is determined. \\
461+
Allowable values: See \lstinline!Date! in Table \ref{tab:allow_stand_data}.
462+
\item{}[number] \lstinline!SettlementAmount!: The settlement amount. \\
463+
Allowable values: Any non-negative real number.
464+
\item{}[event] \lstinline!SettlementDate!: The date on which the option payoff is settled. \\
465+
Allowable values: See \lstinline!Date! in Table \ref{tab:allow_stand_data}.
466+
\item{}[event] \lstinline!PremiumDate!: The date on which the option premium is paid. \\
467+
Allowable values: See \lstinline!Date! in Table \ref{tab:allow_stand_data}.
468+
\item{}[number] \lstinline!Premium!: The option premium. \\
469+
Allowable values: Any non-negative real number.
470+
\item{}[currency] \lstinline!PayCcy!: The payment currency. For FX, where the underlying is provided
471+
in the form \lstinline!FX-SOURCE-CCY1-CCY2! (see Table \ref{tab:fxindex_data}) this should
472+
be \lstinline!CCY2!. If \lstinline!CCY1! or the currency of the underlying (for EQ and
473+
COMM underlyings), this will result in a quanto payoff. Notice section \ref{sss:payccy_st}. \\
474+
Allowable values: See Table \ref{tab:currency} for allowable currency codes.
475+
\end{itemize}
476+
361477
\subsubsection*{Corridor Variance Swap}
362478

363479
The traditional trade representation is as follows, using an FX underlying in this example:

xsd/instruments.xsd

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
<xs:element type="gammaSwapData" name="GammaSwapData"/>
106106
<xs:element type="bestEntryOptionData" name="BestEntryOptionData"/>
107107
<xs:element type="dualEuroBinaryOptionData" name="DualEuroBinaryOptionData"/>
108+
<xs:element type="dualEuroBinaryOptionDoubleKOData" name="DualEuroBinaryOptionDoubleKOData"/>
108109
<xs:element type="volBarrierOptionData" name="VolatilityBarrierOptionData"/>
109110
<xs:element type="tarfData2" name="FxTaRFData"/>
110111
<xs:element type="tarfData2" name="EquityTaRFData"/>
@@ -3107,6 +3108,23 @@
31073108
</xs:all>
31083109
</xs:complexType>
31093110

3111+
<xs:complexType name="dualEuroBinaryOptionDoubleKOData">
3112+
<xs:all>
3113+
<xs:element type="stFreeStyleLongShort" name="LongShort"/>
3114+
<xs:element type="stFreeStyleIndex" name="Underlying"/>
3115+
<xs:element type="stFreeStyleEventSchedule" name="ValuationSchedule"/>
3116+
<xs:element type="stFreeStyleNumber" name="VolBarrierLevel"/>
3117+
<xs:element type="stFreeStyleEvent" name="VolBarrierDate"/>
3118+
<xs:element type="stFreeStyleNumber" name="SpotBarrierLevel"/>
3119+
<xs:element type="stFreeStyleEvent" name="SettlementDate"/>
3120+
<xs:element type="stFreeStyleNumber" name="SettlementAmount"/>
3121+
<xs:element type="stFreeStyleEvent" name="Expiry"/>
3122+
<xs:element type="stFreeStyleNumber" name="Premium"/>
3123+
<xs:element type="stFreeStyleEvent" name="PremiumDate"/>
3124+
<xs:element type="stFreeStyleCurrency" name="PayCcy"/>
3125+
</xs:all>
3126+
</xs:complexType>
3127+
31103128
<xs:complexType name="arcOptionData">
31113129
<xs:all>
31123130
<xs:element type="stFreeStyleLongShort" name="LongShort"/>

0 commit comments

Comments
 (0)