Skip to content

Commit 980ebc7

Browse files
author
sebastien.bouvard
committed
Merge branch 'master' into feature/QPR-11556
2 parents 83eb0d0 + 352cd1b commit 980ebc7

50 files changed

Lines changed: 2219 additions & 2009 deletions

Some content is hidden

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

Docs/UserGuide/parameterisation/ore.tex

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ \subsubsection*{Setup}
2727
<Parameter name="fixingDataFile">../../Input/fixings_20160205.txt</Parameter>
2828
<Parameter name="dividendDataFile">../../Input/dividends_20160205.txt</Parameter> <!-- Optional -->
2929
<Parameter name="implyTodaysFixings">Y</Parameter>
30+
<Parameter name="useAtParCouponsCurves">Y</Parameter>
31+
<Parameter name="useAtParCouponsTrades">Y</Parameter>
3032
<Parameter name="curveConfigFile">../../Input/curveconfig.xml</Parameter>
3133
<Parameter name="conventionsFile">../../Input/conventions.xml</Parameter>
3234
<Parameter name="marketConfigFile">../../Input/todaysmarket.xml</Parameter>
@@ -73,6 +75,11 @@ \subsubsection*{Setup}
7375
conventions.xml}, the referenceDataFile {\tt referencedata.xml}, the iborFallbackConfig, the marketDataFile and the
7476
fixingDataFile are explained in the sections below.
7577

78+
\medskip The parameters {\tt useAtParCouponsCurves} and {\tt useAtParCouponsTrades} control whether to use par
79+
approximation or indexed ibor coupons when building curves or building ore trades, respectively. This goes back to the
80+
QuantLib flag \verb+QL_USE_INDEXED_COUPON+ and the associated runtime setting. The default is \verb+true+ for both flags
81+
which is also the default setting when building QuantLib.
82+
7683
\medskip Parameter {\tt calendarAdjustment} includes the {\tt calendarAdjustment.xml} which lists out additional holidays and
7784
business days to be added to specified calendars.
7885

Docs/UserGuide/pricing/extendedaccumulator.tex

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
\subsubsection{Extended Accumulator}
2-
\label{pricing:extended_accumulator}
2+
\label{pricing:extendedaccumulator}
33

44
An ExtendedAccumulator requires the party that is long to periodically buy an underlying asset A (FX, Equity, or Commodity) at a pre-determined strike price K.
55
A feature of the ExtendedAccumulator is knock-out, i.e. the contract terminates early if a Barrier observed on a single date (the Extension Decision Date) is hit.
66
$$
7-
PayOff= \sum LongShort \cdot FixingAmount \cdot (K - X_A(T))
7+
PayOff= \sum \omega \cdot FixingAmount \cdot (K - X_A(T))
88
$$
99
Where:
1010
\begin{itemize}
11+
\item $\omega \in \{-1,1\}$ is $1$ for a long and $-1$ for a short position
1112
\item $FixingAmount$: the fixing amount in currency/unit of A
1213
\item $K$: the strike. For Fx, the Fx strike rate is defined as amount in domestic currency (CCY2) for one unit of foreign currency (CCY1). For Equity and Commodity: The strike value for one unit/share/contract of the underlying equity or commodity, expressed in the domestic currency (CCY2).
1314
\item $X_A(T)$: the fixing value of the asset A at each observation date T

Docs/UserGuide/products.tex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ \section{Introduction}
143143
\input{tradedata/basketoption}
144144
\input{tradedata/worstofbasketswap}
145145
\input{tradedata/accumulator}
146+
\input{tradedata/extendedaccumulator}
146147
\input{tradedata/tarf}
147148
\input{tradedata/knockoutswap}
148149
\input{tradedata/strikeresettableoption}
@@ -292,6 +293,7 @@ \subsection{FX / Equity / Commodity / Rates / Inflation Exotics}
292293
\input{pricing/rainbow_option}
293294
\input{pricing/var_and_vol_derivatives}
294295
\input{pricing/accumulator}
296+
\input{pricing/extendedaccumulator}
295297
\input{pricing/tarf}
296298
\input{pricing/knockoutswap}
297299
\input{pricing/strikeresettableoption}

Docs/UserGuide/tradedata/extendedaccumulator.tex

Lines changed: 86 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -1,132 +1,91 @@
11
\subsubsection{Extended Accumulator}
22

3-
Extended Accumulator are represented as scripted trades, refer to appendix A for an introduction. Listing \ref{lst:extendedaccumulator} shows the structure of an example.
3+
Extended Accumulator are represented as scripted trades, refer to appendix A for an introduction. Below shows the structure of an example.
44

55
An Extended Accumulator is like an Accumulator with regular and conditional observation and settlement dates. After the regular observation dates a European barrier is applied on
66
the Extension Decision Date. If the barrier is hit the trade terminates, otherwise the trade continues with cashflows generated on the conditional observation dates.
77

8-
\begin{listing}[H]
9-
\begin{minted}[fontsize=\footnotesize]{xml}
10-
<Trade id="ExtendedAccumulator">
11-
<TradeType>ScriptedTrade</TradeType>
12-
<Envelope>
13-
<CounterParty>CPTY_A</CounterParty>
14-
<NettingSetId>CRIF_20191230</NettingSetId>
15-
<PortfolioIds/>
16-
<AdditionalFields/>
17-
</Envelope>
18-
<ScriptedTradeData>
19-
<ScriptName>ExtendedAccumulator</ScriptName>
20-
<Data>
21-
<Event>
22-
<Name>ObservationDates</Name>
23-
<ScheduleData>
24-
<Dates>
25-
<Calendar/>
26-
<Tenor/>
27-
<Dates>
28-
<Date>2019-09-30</Date>
29-
<Date>2019-10-31</Date>
30-
<Date>2019-11-28</Date>
31-
<Date>2019-12-31</Date>
32-
<Date>2020-01-30</Date>
33-
<Date>2020-02-27</Date>
34-
</Dates>
35-
</Dates>
36-
</ScheduleData>
37-
</Event>
38-
<Event>
39-
<Name>ObservationSettlementDates</Name>
40-
<ScheduleData>
41-
<Dates>
42-
<Calendar/>
43-
<Tenor/>
44-
<Dates>
45-
<Date>2019-10-02</Date>
46-
<Date>2019-11-02</Date>
47-
<Date>2019-12-30</Date>
48-
<Date>2020-01-02</Date>
49-
<Date>2020-02-03</Date>
50-
<Date>2020-03-30</Date>
51-
</Dates>
52-
</Dates>
53-
</ScheduleData>
54-
</Event>
55-
<Event>
56-
<Name>ExtensionDecisionDate</Name>
57-
<Value>2020-02-25</Value>
58-
</Event>
59-
<Event>
60-
<Name>ConditionalObservationDates</Name>
61-
<ScheduleData>
62-
<Dates>
63-
<Calendar/>
64-
<Tenor/>
65-
<Dates>
66-
<Date>2020-03-31</Date>
67-
<Date>2020-04-30</Date>
68-
<Date>2020-05-29</Date>
69-
<Date>2020-06-30</Date>
70-
<Date>2020-07-31</Date>
71-
<Date>2020-08-31</Date>
72-
</Dates>
73-
</Dates>
74-
</ScheduleData>
75-
</Event>
76-
<Event>
77-
<Name>ConditionalSettlementDates</Name>
78-
<ScheduleData>
79-
<Dates>
80-
<Calendar/>
81-
<Tenor/>
82-
<Dates>
83-
<Date>2020-03-31</Date>
84-
<Date>2020-04-30</Date>
85-
<Date>2020-05-29</Date>
86-
<Date>2020-06-30</Date>
87-
<Date>2020-07-31</Date>
88-
<Date>2020-08-31</Date>
89-
</Dates>
90-
</Dates>
91-
</ScheduleData>
92-
</Event>
93-
<Number>
94-
<Name>LongShort</Name>
95-
<Value>1</Value>
96-
</Number>
97-
<Number>
98-
<Name>FixingAmount</Name>
99-
<Value>840336</Value>
100-
</Number>
101-
<Number>
102-
<Name>Strike</Name>
103-
<Value>1.19</Value>
104-
</Number>
105-
<Number>
106-
<Name>ExtensionTrigger</Name>
107-
<Value>1.19</Value>
108-
</Number>
109-
<Index>
110-
<Name>Underlying</Name>
111-
<Value>FX-ECB-EUR-USD</Value>
112-
</Index>
113-
<Currency>
114-
<Name>PayCurrency</Name>
115-
<Value>USD</Value>
116-
</Currency>
117-
</Data>
118-
</ScriptedTradeData>
8+
\begin{minted}[fontsize=\scriptsize]{xml}
9+
<Trade id="FxExtendedAccumulatorLong">
10+
<TradeType>ScriptedTrade</TradeType>
11+
<Envelope>
12+
<CounterParty>CPTY_A</CounterParty>
13+
<NettingSetId>CRIF_20191230</NettingSetId>
14+
<AdditionalFields/>
15+
</Envelope>
16+
<ExtendedAccumulatorData>
17+
<LongShort type="longShort">Long</LongShort>
18+
<FixingAmount type="number">840336</FixingAmount>
19+
<Strike type="number">1.19</Strike>
20+
<PayCurrency type="currency">USD</PayCurrency>
21+
<Underlying type="index">FX-ECB-EUR-USD</Underlying>
22+
<ObservationDates type="event">
23+
<ScheduleData>
24+
<Dates>
25+
<Dates>
26+
<Date>2019-09-30</Date>
27+
<Date>2019-10-31</Date>
28+
<Date>2019-11-28</Date>
29+
<Date>2019-12-31</Date>
30+
<Date>2020-01-30</Date>
31+
<Date>2020-02-27</Date>
32+
</Dates>
33+
</Dates>
34+
</ScheduleData>
35+
</ObservationDates>
36+
<ObservationSettlementDates type="event">
37+
<ScheduleData>
38+
<Dates>
39+
<Dates>
40+
<Date>2019-10-02</Date>
41+
<Date>2019-11-02</Date>
42+
<Date>2019-12-30</Date>
43+
<Date>2020-01-02</Date>
44+
<Date>2020-02-03</Date>
45+
<Date>2020-03-30</Date>
46+
</Dates>
47+
</Dates>
48+
</ScheduleData>
49+
</ObservationSettlementDates>
50+
<ExtensionDecisionDate type="event">2020-02-25</ExtensionDecisionDate>
51+
<ExtensionTrigger type="number">1.19</ExtensionTrigger>
52+
<ConditionalObservationDates type="event">
53+
<ScheduleData>
54+
<Dates>
55+
<Dates>
56+
<Date>2020-03-31</Date>
57+
<Date>2020-04-30</Date>
58+
<Date>2020-05-29</Date>
59+
<Date>2020-06-30</Date>
60+
<Date>2020-07-31</Date>
61+
<Date>2020-08-31</Date>
62+
</Dates>
63+
</Dates>
64+
</ScheduleData>
65+
</ConditionalObservationDates>
66+
<ConditionalSettlementDates type="event">
67+
<ScheduleData>
68+
<Dates>
69+
<Dates>
70+
<Date>2020-03-31</Date>
71+
<Date>2020-04-30</Date>
72+
<Date>2020-05-29</Date>
73+
<Date>2020-06-30</Date>
74+
<Date>2020-07-31</Date>
75+
<Date>2020-08-31</Date>
76+
</Dates>
77+
</Dates>
78+
</ScheduleData>
79+
</ConditionalSettlementDates>
80+
</ExtendedAccumulatorData>
11981
</Trade>
12082
\end{minted}
121-
\caption{Extended Accumulator Representation}
122-
\label{lst:extendedaccumulator}
123-
\end{listing}
12483
12584
The meanings and allowable values of the elements in the \verb+Extended Accumulator+ representation follow below.
12685
12786
\begin{itemize}
12887
\item LongShort: Defines whether the trade is long or short, i.e long means one buys the underlying asset and short sells the underlying asset at each observation date. \\
129-
Allowable values: \emph{Long, Short}
88+
Allowable values: \emph{Long, Short}
13089
\item Strike: For Fx, the Fx strike rate is defined as amount in domestic currency (CCY2) for one unit of foreign currency (CCY1). For Equity and Commodity: The strike value for one unit/share/contract of the underlying equity or commodity, expressed in the domestic currency (CCY2).
13190
\item Underlying: Underlying index. For Fx: Value is a string of the form FX-SOURCE-CCY1-CCY2 where CCY1 is the foreign currency, CCY2 is the domestic currency, and SOURCE is the fixing source.\\
13291
Allowable values: See Section \ref{data_index} for allowable values.
@@ -143,15 +102,22 @@ \subsubsection{Extended Accumulator}
143102
\end{itemize}
144103
145104
The script `ExtendedAccumulator' referenced in the trade above is shown in Listing \ref{lst:extendedaccumulator_script}.\\
146-
PayOff Formula \ref{pricing:extended_accumulator}:
105+
PayOff Formula:
147106
148107
$$
149-
PayOff = \sum LongShort \cdot N \cdot (K - X_A(T))
108+
PayOff = \sum \omega \cdot FixingAmount \cdot (K - X_A(T))
150109
$$
151110
152-
\begin{listing}[H]
153-
\begin{minted}[fontsize=\footnotesize]{xml}
111+
Where:
112+
\begin{itemize}
113+
\item $\omega \in \{-1,1\}$ is $1$ for a long and $-1$ for a short position
114+
\item $FixingAmount$: the fixing amount in currency/unit of A
115+
\item $K$: the strike. For Fx, the Fx strike rate is defined as amount in domestic currency (CCY2) for one unit of foreign currency (CCY1). For Equity and Commodity: The strike value for one unit/share/contract of the underlying equity or commodity, expressed in the domestic currency (CCY2).
116+
\item $X_A(T)$: the fixing value of the asset A at each observation date T
117+
\end{itemize}
154118
119+
\begin{listing}[hbt]
120+
\begin{minted}[fontsize=\scriptsize]{Basic}
155121
REQUIRE {FixingAmount >= 0} AND {Strike >= 0};
156122
REQUIRE {SIZE(ConditionalObservationDates) == SIZE(ConditionalSettlementDates)};
157123
NUMBER d, Fixing;

0 commit comments

Comments
 (0)