Skip to content

Commit 2443759

Browse files
committed
Merge branch 'feature/QPR-13662_clean' into 'master'
QPR-13662 ScriptedTrade ARC Option Closes QPR-13662 See merge request qs/oreplus!3045
2 parents e1d4ecf + d6bd10b commit 2443759

2 files changed

Lines changed: 121 additions & 0 deletions

File tree

Docs/UserGuide/tradedata/scriptedtrades.tex

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,6 +1103,110 @@ \subsubsection{Floating Strike Forward Starting Option}
11031103
Allowable values: See Table \ref{tab:currency} for allowable currency codes.
11041104
\end{itemize}
11051105
1106+
\subsubsection{ACR Option}
1107+
1108+
% we only have a scripted trade representation for this at the moment
1109+
1110+
An ACR Option is represented as {\em acr option}, refer to Section
1111+
\ref{app:scriptedtrade} for an introduction.
1112+
1113+
\begin{minted}[fontsize=\footnotesize]{xml}
1114+
<Trade id="ArcOption">
1115+
<TradeType>ScriptedTrade</TradeType>
1116+
<Envelope>
1117+
<CounterParty>CPTY_A</CounterParty>
1118+
<NettingSetId>CPTY_A</NettingSetId>
1119+
<AdditionalFields/>
1120+
</Envelope>
1121+
<ArcOptionData>
1122+
<LongShort type="longShort">Short</LongShort>
1123+
<SettlementDate type="event">2020-07-20</SettlementDate>
1124+
<Notional type="number">100000000</Notional>
1125+
<StrikeFactor type="number">0.9950</StrikeFactor>
1126+
<BarrierFactor type="number">0.9840</StrikeFactor>
1127+
<CapRate type="number">0.02</CapRate>
1128+
<Offset type="number">0.0628</Offset>
1129+
<ValuationSchedule type="event">
1130+
<ScheduleData>
1131+
<Rules>
1132+
<StartDate>2020-01-15</StartDate>
1133+
<EndDate>2020-07-10</EndDate>
1134+
<Tenor>1M</Tenor>
1135+
<Calendar>US</Calendar>
1136+
<Convention>Following</Convention>
1137+
<TermConvention>Following</TermConvention>
1138+
<Rule>Forward</Rule>
1139+
</Rules>
1140+
</ScheduleData>
1141+
</ValuationSchedule>
1142+
<Underlying type="index">FX-ECB-JPY-USD</Underlying>
1143+
<PayCcy type="currency">JPY</PayCcy>
1144+
<Expiry type="event">2020-07-15</Expiry>
1145+
</ArcOptionData>
1146+
</Trade>
1147+
\end{minted}
1148+
1149+
The script referenced in the trade above is shown in Listing \ref{lst:arc_option}.
1150+
1151+
\begin{listing}[hbt]
1152+
\begin{minted}[fontsize=\footnotesize]{Basic}
1153+
NUMBER d, effectiveExchangeRate, netAccAmount, currPrice, pay;
1154+
NUMBER payoff, strike, sr1, sr2, sr3, itm, K, expectedN, settlementAmount;
1155+
1156+
netAccAmount = 0;
1157+
1158+
FOR d IN (2, SIZE(ValuationSchedule), 1) DO
1159+
sr2 = Underlying(ValuationSchedule[d]);
1160+
sr1 = Underlying(ValuationSchedule[d-1]);
1161+
K = sr1*StrikeFactor;
1162+
IF sr2 < sr1*BarrierFactor THEN
1163+
itm = Notional*((1/sr2)-(1/K));
1164+
ELSE
1165+
itm = 0;
1166+
END;
1167+
netAccAmount = netAccAmount + itm;
1168+
END;
1169+
1170+
expectedN = SIZE(ValuationSchedule) - 1;
1171+
sr3 = Underlying(ValuationSchedule[expectedN]);
1172+
1173+
effectiveExchangeRate = Notional / ((Notional/sr3)-netAccAmount);
1174+
1175+
IF effectiveExchangeRate >= CapRate THEN
1176+
settlementAmount = Notional/(CapRate + Offset);
1177+
ELSE
1178+
settlementAmount = Notional/(effectiveExchangeRate + Offset);
1179+
END;
1180+
1181+
pay = PAY(settlementAmount, Expiry, SettlementDate, PayCcy);
1182+
Option = pay;
1183+
\end{minted}
1184+
\caption{Payoff script for an Arc Option.}
1185+
\label{lst:arc_option}
1186+
\end{listing}
1187+
1188+
The meanings and allowable values in the \lstinline!ArcOptionData! node below.
1189+
1190+
\begin{itemize}
1191+
\item{}[index] \lstinline!Underlying!: Underlying index. \\
1192+
Allowable values: See Section \ref{data_index} for allowable values.
1193+
\item{}[longShort] \lstinline!LongShort!: Own party position in the option. \\
1194+
Allowable values: \emph{Long, Short}.
1195+
\item{}[number] \lstinline!StrikeFactor!: The strike factor used within ITM computation.
1196+
\item{}[number] \lstinline!BarrierFactor!: The barrier factor used within the condition for the ITM computation.
1197+
\item{}[number] \lstinline!Notional!: Notional amount. \\
1198+
Allowable values: Any non-negative number.
1199+
\item{}[number] \lstinline!CapRate!: Rate used to compute the settlement amount.
1200+
\item{}[number] \lstinline!Offset!: Offset used to compute the settlement amount.
1201+
\item{}[event] \lstinline!SettlementDate!: Settlement date. \\
1202+
Allowable values: See \lstinline!Date! in Table \ref{tab:allow_stand_data}.
1203+
\item{}[currency] \lstinline!SettlementCurrency!: The payment currency. For FX, where the underlying is provided
1204+
in the form \lstinline!FX-SOURCE-CCY1-CCY2! (see Table \ref{tab:fxindex_data}) this should
1205+
be \lstinline!CCY2!. If \lstinline!CCY1! or the currency of the underlying (for EQ and
1206+
COMM underlyings), this will result in a quanto payoff. Notice section \ref{sss:payccy_st}. \\
1207+
Allowable values: See Table \ref{tab:currency} for allowable currency codes.
1208+
\end{itemize}
1209+
11061210
\subsubsection{Forward Starting Swaption}
11071211
11081212
% we only have a scripted trade representation for this at the moment

xsd/instruments.xsd

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<xs:element type="swapData" name="SwapData"/>
1111
<xs:element type="swapData" name="EquitySwapData"/>
1212
<xs:element type="callableSwapData" name="CallableSwapData"/>
13+
<xs:element type="arcOptionData" name="ArcOptionData"/>
1314
<xs:element type="swaptionData" name="SwaptionData"/>
1415
<xs:element type="varianceSwapData" name="VarianceSwapData"/>
1516
<xs:element type="varianceSwapData" name="EquityVarianceSwapData"/>
@@ -3106,6 +3107,22 @@
31063107
</xs:all>
31073108
</xs:complexType>
31083109

3110+
<xs:complexType name="arcOptionData">
3111+
<xs:all>
3112+
<xs:element type="stFreeStyleLongShort" name="LongShort"/>
3113+
<xs:element type="stFreeStyleIndex" name="Underlying"/>
3114+
<xs:element type="stFreeStyleEventSchedule" name="ValuationSchedule"/>
3115+
<xs:element type="stFreeStyleNumber" name="StrikeFactor"/>
3116+
<xs:element type="stFreeStyleNumber" name="BarrierFactor"/>
3117+
<xs:element type="stFreeStyleNumber" name="CapRate"/>
3118+
<xs:element type="stFreeStyleNumber" name="Offset"/>
3119+
<xs:element type="stFreeStyleNumber" name="Notional"/>
3120+
<xs:element type="stFreeStyleEvent" name="Expiry"/>
3121+
<xs:element type="stFreeStyleCurrency" name="PayCcy"/>
3122+
<xs:element type="stFreeStyleEvent" name="SettlementDate"/>
3123+
</xs:all>
3124+
</xs:complexType>
3125+
31093126
<xs:complexType name="extendedFxForwardSwapData">
31103127
<xs:all>
31113128
<xs:element type="stFreeStyleCurrency" name="Currency"/>

0 commit comments

Comments
 (0)