forked from actusfrf/actus-techspecs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathactus-techspecs.tex
3021 lines (2575 loc) · 127 KB
/
actus-techspecs.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%% THIS IS THE %%%%%%%%%%%%%%
%%%%%%%%%%%% ACTUS TECHNICAL SPECIFICATION DOCUMENT %%%%%%%%%%%%%%
%%%%%%%%%%%% %%%%%%%%%%%%%%
%%%%%%%%%%%% ---------------- %%%%%%%%%%%%%%
%%%%%%%%%%%% Copyright (C) 2016 - present by %%%%%%%%%%%%%%
%%%%%%%%%%%% ACTUS Financial Research Foundation %%%%%%%%%%%%%%
%%%%%%%%%%%% ----------------- %%%%%%%%%%%%%%
%%%%%%%%%%%% Please see distribution for license %%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%% settings %%%%%%%%%%%%%%%%%%%%%%
% ---------------------- general ----------------------
\documentclass[9pt,oneside]{amsart}
\usepackage{multicol}
\usepackage[a4paper,
width=170mm,
top=18mm,
bottom=22mm,
includeheadfoot]{geometry}
\usepackage[bookmarks=true,
unicode=true,
pdftitle={ACTUS Technical Specification},
pdfauthor={ACTUS Financial Research Foundation},
pdfkeywords={ACTUS, Financial Contracts, Algorithmic Contracts, Technical Specification},
pdfborder={0 0 0.5 [1 3]}]{hyperref}
% ---------------------- language ----------------------
\usepackage[english]{babel}
% ---------------------- floats ----------------------
\usepackage{graphicx}
\usepackage{float}
\usepackage{longtable}
% ---------------------- math ----------------------
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\newtheorem{example}{Example}
% ---------------------- custom tables ----------------------
\newenvironment{states}[1]{
\hfill % force subsection before longtable
\begin{longtable}{| p{0.05\textwidth} | p{0.48\textwidth} | p{0.43\textwidth} |}
\multicolumn{3}{c}{\textbf{#1: State Variables Initialization}}\\
\hline
\textbf{State} & \textbf{Initialization per $t_0$} & \textbf{Comments} \\
\hline
\endfirsthead
\multicolumn{3}{c}{\textit{Continued from previous page}} \\
\hline
\textbf{State} & \textbf{Initialization per $t_0$} & \textbf{Comments} \\
\hline
\endhead
\hline \multicolumn{3}{r}{\textit{Continued on next page}} \\
\endfoot
\endlastfoot
}{%
\hline
\end{longtable}
}
\newenvironment{schedule}[1]{
\hfill % force subsection before longtable
\begin{longtable}{| p{0.05\textwidth} | p{0.5\textwidth} | p{0.4\textwidth} |}
\multicolumn{3}{c}{\textbf{#1: Contract Schedule}}\\
\hline
\textbf{Event} & \textbf{Schedule} & \textbf{Comments} \\
\hline
\endfirsthead
\multicolumn{2}{c}{\textit{Continued from previous page}} \\
\hline
\textbf{Event} & \textbf{Schedule} & \textbf{Comments} \\
\hline
\endhead
\hline \multicolumn{2}{r}{\textit{Continued on next page}} \\
\endfoot
\endlastfoot
}{%
\hline
\end{longtable}
}
\newenvironment{functions}[1]{
\hfill % force subsection before longtable
\begin{longtable}{| p{0.05\textwidth} | p{0.42\textwidth} | p{0.48\textwidth} |}
\multicolumn{3}{c}{\textbf{#1: State Transition Functions and Payoff Functions}}\\
\hline
\textbf{Event} & \textbf{Payoff Function} & \textbf{State Transition Function}\\
\hline
\endfirsthead
\multicolumn{2}{c}{\textit{Continued from previous page}} \\
\hline
\textbf{Event} & \textbf{Payoff Function} & \textbf{State Transition Function}\\
\hline
\endhead
\hline \multicolumn{2}{r}{\textit{Continued on next page}} \\
\endfoot
\endlastfoot
}{%
\hline
\end{longtable}
}
% ---------------------- custom notation ----------------------
\newcommand{\Real}{\mathbb{R}}
\newcommand{\Nat}{\mathbb{N}}
\newcommand{\svar}[2]{\textbf{#1}_{#2}}
\newcommand{\attr}[1]{\texttt{#1}}
\newcommand{\stf}[2]{STF\_#1\_#2()}
\newcommand{\pof}[2]{POF\_#1\_#2()}
\newcommand{\dfl}[1]{D(\textbf{Prf}_{#1})}
\newcommand{\sgn}{R(\attr{CNTRL})}
\newcommand{\sdl}[3]{S(#1,#2,#3)}
\newcommand{\sdll}[4]{S(#1,#2,#3,#4)}
\newcommand{\vsdl}[3]{\vec{S}(#1,#2,#3)}
\newcommand{\yfr}[2]{Y(#1,#2)}
\newcommand{\yfrfunc}{Y}
\newcommand{\ann}[5]{A(#1,#2,#3,#4,#5)}
\newcommand{\annfunc}{A}
\newcommand{\obs}[3]{O^{#1}(#2,#3)}
\newcommand{\obsfull}[5]{O^{#1}(#2,#3,#4,#5)}
\newcommand{\obsfunc}[1]{O^{#1}}
\newcommand{\cldev}[3]{U^{ev}(#1,#2 \mid\{#3\})}
\newcommand{\cldsv}[4]{U^{sv}(#1,#2,\svar{#3}{} \mid\{#4\})}
\newcommand{\cldsvs}[3]{U^{sv}(#1,#2,\svar{#3}{})}
\newcommand{\cldca}[2]{U^{ca}(#1,#2)}
\newcommand{\cldfunc}[1]{U^{#1}}
\newcommand{\undef}{\varnothing}
\newcommand{\tmax}{t^{max}}
\newcommand{\tev}[1]{\tau(#1)}
\newcommand{\fev}[1]{f(#1)}
\newcommand{\payoff}[2]{F(#1,#2)}
% ---------------------- misc ----------------------
\usepackage{verbatim}
\usepackage{natbib}
\setlength\parindent{0pt}
% ---------------------- versioning ----------------------
\newcommand{\VersionNumber}{v1.0}
\newcommand{\RevisionNumber}{unknown revision}
\IfFileExists{build_options.tex}{\input{build_options.tex}}
%%%%%%%%%%%%%%%%%%%%%%% titlepage %%%%%%%%%%%%%%%%%%%%%%
\def\doctitle{ACTUS: The algorithmic representation of financial contracts}
\title{\doctitle \\
{\smaller \textbf{Version \VersionNumber-\RevisionNumber}}}
\author{
Nils Bundi\\
ACTUS Financial Research Foundation\\
}
%%%%%%%%%%%%%%%%%%%%%%% headers and footers %%%%%%%%%%%%%%%%%%%%%%
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{} % clear header
\fancyfoot{} % clear footer
\renewcommand{\headrulewidth}{0pt} % no header rule
\addtolength\footskip{3mm} % add space between main text and footer text
\lhead{\doctitle}
\rhead{\thepage}
\lfoot{Copyright \copyright\space 2018--present by ACTUS Financial Research Foundation}
\rfoot{\VersionNumber}
%%%%%%%%%%%%%%%%%%%%%%% front matter %%%%%%%%%%%%%%%%%%%%%%
\begin{document}
%\begin{abstract}
%
%\end{abstract}
\maketitle
% ---------------------- about ----------------------
\section*{About this document}\label{sec:about}
This document provides the technical specifications of the Algorithmic Contract Types Unified Standards (ACTUS). It is developed, maintained, and released by the ACTUS Financial Research Foundation and provided by the same to the ACTUS Users Association under the terms of the open source license with which the document is published from time to time.
% ---------------------- versions ----------------------
\section*{Versions}\label{sec:version}
This document is versioned according to the following pattern: [major].[minor]-[revision]-[date] where [major] and [minor] are integers marking major and minor release, [revision] indicates the current revision in form of the respective git commit hash (short form), and [date] gives the respective date of the revision. Releases are recorded in the following table.
\begin{table}[H]
\centering
\begin{tabular}{| p{0.1\textwidth} | p{0.1\textwidth} | p{0.75\textwidth} |}
\hline
Date & Version & Description \\
\hline
2018-11-01 & 1.0-RC & First draft version of the technical specifications covering the "initial" 18 contracts.\\
\hline
2019-10-23 & 1.0 & Stable release streamlined with dictionary. Specifically, this release includes following improvements to the draft version:
\begin{itemize}
\item Fixed various naming conventions
\item Aligned state variable names with dictionary
\item Added \attr{ContractStructure} and "Composition"-section
\item Added \attr{settlementCurrency} attribute and updated \attr{POF} accordingly
\item Added \attr{exerciseDate} and \attr{exerciseAmount} terms and states for contracts with contingent payments
\item Removed default convention and updated \attr{POF} accordingly
\item Moved Taxonomy, Event, State, Contract Role definitions to dictionary
\item Fixed various bugs and inconsistencies
\end{itemize} \\
\hline
\end{tabular}
\end{table}
% ---------------------- acknowledgments ----------------------
\section*{Acknowledgements}\label{sec:ack}
We would like to acknowledge all members of the \textit{ACTUS Users Association} who contribute a lot of their time and expertise to the development, review, and testing of the ACTUS standards, in general, and this document, in particular. Without their valuable contributions the ACTUS standards would not exist in the form as they currently do.
%%%%%%%%%%%%%%%%%%%%%%% table of contents %%%%%%%%%%%%%%%%%%%%%%
% ---------------------- new page ----------------------
\newpage
\tableofcontents
%%%%%%%%%%%%%%%%%%%% main body %%%%%%%%%%%%%%%%%%%%
% ---------------------- new page ----------------------
\newpage
% ---------------------- 2-columns ----------------------
\setlength{\columnsep}{20pt}
\begin{multicols}{2}
%%%%%%%%%%%%%%%%%%%% section: introduction %%%%%%%%%%%%%%%%%%%%
\section{Introduction}\label{sec:intro}
Financial contracts are legal agreements between two (or more) counterparties on the exchange of future cash flows. Such legal agreements are defined unambiguously by means of a set of contractual terms and logic. As a result, financial contracts can be described mathematically and represented digitally as machine readable algorithms.
The benefits of representing financial contracts digitally are manifold; Traditionally, transaction processing has been a field in which tremendous efficiency gains could be realized by the introduction of \textit{machines} and machine readable contracts. Or, financial analytics by nature of the domain builds on the availability of computable representations of these agreements where for reasons of tractability often times analytical approximations are used. Recently, the rise of distributed ledger and blockchain technologies and the various use cases for \textit{smart contracts} has opened up new possibilities for \textit{natively digital} financial contracts.
In general, the exchange of cash flows between counterparties follows certain patterns. A typical cash flow exchange pattern is a \textit{bullet loan} contract where principal is exchanged initially followed by cyclical interest payments and the principal is paid back (in a lump sum) at maturity of the contract. While the principal payments are fixed a variety of flavours exist for how the cyclical interest payments are determined and/or paid. As an example, interest payments may be due monthly, annually or according to arbitrary periods, they may be determined based on fixed or variable rates, different year fraction calculation methods may be used or there might be no interest due at all. Another popular pattern is that of \textit{amortizing loans} for which, as opposed to bullet loans, principal may be paid out and paid back in portions of fixed or variable amounts and according to cyclical or custom schedules. Other types of financial contracts include but are not limited to \textit{shares}, \textit{forwards}, \textit{options}, \textit{swaps}, \textit{credit enhancements}, \textit{repurchase agreements}, \textit{securitization}, etc. By focusing on the main distinguishing features, ACTUS describes the vast majority of all financial contracts with a set of about 32 generalized cash flow exchange patterns or Contract Types (CTs), respectively.
The ACTUS taxonomy (\url{https://github.com/actusfrf/actus-dictionary/blob/master/actus-dictionary-taxonomy.json}) provides a classification system organizing financial contracts according to their distinguishing cash flow patterns. Apart from this classification system the taxonomy also includes a description of and real-world instruments covered for each contract.
On the other hand, the legal agreements in financial contracts represent purely deterministic logic or the \textit{mechanics of finance}, in other words. That is, a financial contract defines a fixed set of rules and conditions under which, given any external variables, the cash flow obligations can be determined unambiguously. For instance, in a \textit{fixed rate loan} the cash flow obligations are defined explicitly. At the same time, a \textit{variable rate loan} defines explicitly the rules under which the variable rate is fixed going forward such that the cash flow obligations can be derived unambiguously going forward. The same holds true for \textit{derivative contracts} where the cash flow obligations arise given some underlying \textit{reference instrument}. Similarly, for analytical purposes, given some assumption of the evolution of this reference instrument the cash flow obligations \textit{conditioned on} this assumption can be derived unabiguously.
The properties of financial contracts described above build the foundation for a standardized, deterministic algorithmic description of the cash flow obligations arising from such agreements. Thereby, this description is technology agnostic and supports all use cases necessary for this very standard to be used throughout all finance functions from front office to back office and covering pricing, deal origination, transaction processing, as well as analytics, in general, and liquidity projections, valuation, P\&L calculations and projections, and risk measurement and aggregation, in particular. Furthermore, this standard builds a formidable basis for distributed ledger-powered, natively digital \textit{financial state machines} or \textit{smart contracts}, in other words.
In this document, we provide the technical specification of the ACTUS standards or the mathematical description of financial contracts, in other words. We start by providing some basic notations used throughout the document followed by an introduction of the generic functions upon which financial contracts build. We continue in the following sections with an introduction of some additional foundational concepts \textit{Composition}, and \textit{Risk Factor Observer} and \textit{Child Contract Observer}. Finally, we define the various ACTUS contracts in the last section.
%%%%%%%%%%%%%%%%%%%% section: notations %%%%%%%%%%%%%%%%%%%%
\section{Notations}\label{sec:notations}
\subsection{Contract Attributes}\label{sec:attributes}
Contract Attributes (attributes) represent the legal contractual terms that define the exchange of cash-flows of a financial contract. These attributes are defined and described in the ACTUS dictionary (\url{https://github.com/actusfrf/actus-dictionary/blob/master/actus-dictionary-terms.json}). Throughout this document attributes are referenced by their short name according to the dictionary. Further, vector-type attributes may be indexed with a subscript indicating that a specific vector-element is referenced.
\begin{example}[Contract Attribute]
The ACTUS attribute \textit{Initial Exchange Date} is referenced in short form \attr{IED}.
\end{example}
\begin{example}[Element of Vector-Type Attribute]
The ACTUS attribute \textit{Array Cycle Anchor Date of Principal Redemption} is a vector-type attribute and referenced as \attr{ARPRANX}. The $i$-th element of the vector is represented by $\attr{ARPRANX}_i$.
\end{example}
\subsection{$\undef$-Operator}\label{sec:undef}
The $\undef$-operator is used to indicate that a certain property is undefined or, in other words, that no value has been assigned to the respective property. In particular, for optional contract attributes it means that the attribute is not defined and for schedule times (see section \ref{sec:schedule}) it means that the respective schedule is empty, i.e. no schedule time defined.
\begin{example}[Undefined Attribute]
$\attr{IPANX}=\undef$ indicates that attribute \attr{IPANX} is undefined.
\end{example}
\begin{example}[Empty Schedule]
$\vec{t}^{IP}=\undef$ means the same as $\vec{t}^{IP}=\{\}$, with $\{\}$ the empty set, and states that the IP schedule $\vec{t}^{IP}$ does not contain a schedule time.
\end{example}
\subsection{$t_0$-Time}\label{sec:t0time}
$t_0$ represents \attr{SD} of a contract and marks the time as per which the terms and implied state of a contract is represented. In general, from the contractual logic we are able to derive any contractual events and resulting states for any time $t>t_0$ but not for times $s<t_0$.
\subsection{State Variables}\label{sec:statevarsnotat}
State Variables (states) describe the state of a contract at a certain point in time $t$ during its lifetime. Examples of such states are the (outstanding) Notional Principal, the applicable Nominal Interest Rate, or the current Contract Performance. The ACTUS dictionary (\url{https://github.com/actusfrf/actus-dictionary/blob/master/actus-dictionary-states.json}) defines all states and provides further information on their data type, format, etc.
In general, states represent certain terms of a contract that change along the contract lifetime according to either scheduled events or unscheduled events. Therefore, states representing a contractual term carry the exact same names as their term-counterpart.
States are written in their short form representation with first letter capitalized, printed in bold, and indexed with time.
\begin{example}[State Variables]
$\svar{Nt}{t}$ refers to the state \textit{Notional Principal} observed at time $t$.
\end{example}
\subsection{Contract Events}\label{sec:events}
A Contract Event (event) $e_t^k$ refers to any contractually scheduled or unscheduled event at a certain time $t$ and of a certain type $k$. Contract events mark specific points in time during the lifetime of a contract at which a cash flow is being exchanged (see section \ref{sec:pof}) or the states of the contract are being updated (see section \ref{sec:stf}). The dictionary lists and describes all the event types $k$ defined by the ACTUS standards (\url{https://github.com/actusfrf/actus-dictionary/blob/master/actus-dictionary-event-types.json}). Throughout this document event types $k$ are written in the short form as defined in the dictionary.
As an event always has an associated event time $t$ and payoff $c\in\Real$ we define two operators allowing to retrieve these quantities for any single event $e_t^k$ or set of events $\{e_t^k,e_s^j, ...\}$ as follows;
{$\begin{aligned}
\tev{x} &= \begin{cases} t & \text{if}\quad x=e_t^k \\
\{t,s,...\} & \text{else if}\quad x=\{e_t^k,e_s^j,...\} \end{cases} \\
\fev{x} &= \begin{cases} c & \text{if}\quad x=e_t^k \\
\{c_1, c_2, ...\} & \text{else if}\quad x=\{e_t^k,e_s^j,...\} \end{cases}
\end{aligned}$}
with $c_1=\fev{e_t^k}, c_2=\fev{e_s^j}, ...$.
\begin{example}[Contract Events]
The \textit{Initial Exchange Date} event with event time $s$ is written as $e_s^{IED}$ with $\tev{e_s^{IED}}=s$ and $\fev{e_s^{IED}}=c$ where for any contract \attr{CT} $c=\pof{IED}{\attr{CT}}$.
\end{example}
\subsection{State Transition Functions}\label{sec:stf}
State Transition Functions (STF) define the transition of states from a pre-event to a post-event state when a certain event $e_t^{k}$ applies. Thereby, the pre-event and post-event times are indexed with $t^-$ and $t^+$, respectively.
These functions are specific to a certain event and contract. STFs are written according to the following pattern \stf{[event type]}{[contract type]} where [event type] and [contract type] refer to the respective event type and contract to which the STF belongs.
\begin{example}[State Transition Functions]
The STF for an IP event and PAM contract is written as \stf{IP}{PAM} and maps e.g. state \textit{Accrued Interest} from a pre-event state $\svar{Ipac}{t^-}$ to post-event state $\svar{Ipac}{t^+}$.
\end{example}
\subsection{Payoff Functions}\label{sec:pof}
Payoff Functions (POF) define how the cash flow $c\in\Real$ for a certain event $e_t^k$ is being derived from current states and from the contract terms. If necessary, the resulting cash flow can be indexed with the event time $c_t$. These functions are specific to a certain event and contract. POFs are written according to the following pattern \pof{[event type]}{[contract type]} where [event type] and [contract type] refer to the respective event and contract to which the STF belongs.
\begin{example}[Payoff Functions]
The POF for an IP event $e_t^{IP}$ and PAM contract is written as \pof{IP}{PAM} with $\fev{e_t^{IP}}=\pof{IP}{PAM}$.
\end{example}
\subsection{Date/Time}\label{sec:time}
ACTUS builds on the ISO 8601 date/time format. Hence, dates are generally expressed in the following format: [YYYY]-[MM]-[DD]T[hh]:[mm]:[ss].
Time zone information is currently not supported.
A special case is \textit{midnight}. ISO 8601 recognizes both times 00:00:00 and 24:00:00 each referring to midnight. Yet, while 24:00:00 refers to the end of one day, 00:00:00 refers to the beginning of the following day. In ACTUS the interpretation is the same why the time period (measured in any time unit) between the two points in time will always be zero.
For brevity, we use the term \textit{time} for a specific date-time variable.
\textbf{A note on implementation:} As many implementations of the ISO 8601 format do not support the 24:00:00 format we interpret the timestamp \verb'23:59:59' as midnight.
\subsection{Event Sequence}\label{sec:eventseq}
Contract Events of different types may occur at the same time, i.e. exactly the same point in time. In this case, the sequence of evaluating their STF and POF is decisive for the resulting cash flows and state transitions. Hence, we use an event sequence indicator that can be found for each event in the event-dictionary and implies the order of executing different events at the exact same time.
\subsection{Contract Lifetime}\label{sec:lifetime}
The lifetime of an ACTUS contract is the time period of its existence from the perspective of the analyzing user. For every point in time during its lifetime, an ACTUS contract can be analyzed in terms of current state and future cash flows.\\
The lifetime of a contract starts with its \attr{SD} and ends with $\min(MD, AMD, PR^*, STD, TD,\tmax)$.\\
Note that $PR^*$ refers to the PR event of a maturity contract after which \textbf{Nt}=0.0 (i.e. at which the remaining outstanding principal is redeemed). Further, \attr{MD}, \attr{AMD}, and PR(\textbf{Nt}=0.0) in the definition above do only apply for maturity contracts but have to be considered infinity in all other cases. Similarly, \attr{STD} only applies for certain contracts and is considered infinity for all others. Finally, $\tmax$ is a parameter that may be used to restrict the considered lifetime in an analysis. In particular, this parameter is used for contracts that do not have a \textit{natural} end to their lifetime such as STK.
%%%%%%%%%%%%%%%%%%%% section: utility functions %%%%%%%%%%%%%%%%%%%%
\section{Utility Functions}\label{sec:utils}
\subsection{Schedule}\label{sec:schedule}
A schedule is a function $S$ mapping times $s,T$ with $s<T$ and cycle $c$ onto a sequence $\vec{t}$ of cyclic times
\[
\sdl{s}{c}{T}=\vec{t}=\begin{cases} \{\} & \text{if}\quad s=\undef\land T=\undef\\
s & \text{else if}\quad T=\undef\\
(s,T) & \text{else if}\quad c=\undef\\
(s=t_1,...,t_n=T) & \text{else} \end{cases}
\]
with $t_i<t_{i+1}, i=1,2,...$. While the schedule function can be used to create arbitrary sequences of times, it is usually used to generate sequences of cyclic events $\vec{t}^k$ of a certain type $k$, e.g. $k=IP$ for interest payment events (see dictionary for a list of all events https://github.com/actusfrf/actus-dictionary/blob/master/actus-dictionary-event.json) and the following build inputs to the function
\begin{itemize}
\item[$s$] $=k\attr{ANX}$ with $k\attr{ANX}$ attribute cycle anchor date of event type $k$
\item[$c$] $=k\attr{CL}$ with $k\attr{CL}$ event type $k$'s schedule cycle
\item[$T$] is the schedule end date (in many cases the contract's maturity date)
\end{itemize}
Thereby, cycles $k\attr{CL}$ have format $NPS$ where
\begin{itemize}
\item[$N$] is an integer
\item[$P$] is a time period unit (D=Day, W=Week, M=Month, Q=Quarter, H=Half Year, Y=Year)
\item[$S$] is a \textit{stub} information ($+$=long last stub, $-$=short last stub)
\end{itemize}
and with the stub defined as follows
\begin{itemize}
\item[if] $t_{n-1}+c=T \lor S=$'-' then no stub correction applies
\item[else] $t_n$ is removed from the schedule
\end{itemize}
Further, the schedule function takes a fourth, optional boolean argument $B$, i.e. $\sdll{s}{c}{T}{B}$ indicating whether the schedule end date $T$ belongs to the schedule or not. More specifically:
\begin{itemize}
\item[$B=T$] indicates that $T$ is part of the schedule
\item[$B=F$] means that $T$ is not part of the schedule
\end{itemize}
The sequence of schedule times $\vec{t}^k$ may also be influenced by the \attr{EOF} and \attr{BDC} conventions and the full function syntax becomes $\sdl{s}{c}{T, \attr{EOMC}, \attr{BDC}}$. Due to such effects the sequence of schedule times can be non-equidistant or, in other words, $t_i^k-t_{i-1}^k\neq t_j^k-t_{j-1}^k, i\neq j$.\\
Note that for brevity we will omit the \attr{EOMC} and \attr{BDC} function arguments throughout this document.
\subsection{Array Schedule}\label{sec:arrayschedule}
Array Schedules are defined by vector-valued inputs $\vec{s}=(s_0,s_1,...,s_m)$ and $\vec{c}=(c_0,c_1,...,c_m)$ to the array schedule function
\begin{multline*}
\vsdl{\vec{s}}{\vec{c}}{T} = (\sdl{s_0}{c_0}{s_1-c_0},\\
\sdl{s_1}{c_1}{s_2-c_1},...,\sdl{s_m}{c_m}{T})
\end{multline*}
Hence, array schedules are a generalization for regular schedules which coincide for $m=1$. In accordance with regular schedules \attr{EOMC} and \attr{BDC} conventions also apply here.
\subsection{End Of Month Shift Convention}\label{sec:eomc}
For schedules $\vec{t}^k$ starting at time $s$ which marks the end of a month with 30 or less days, e.g. April 30, and with a cycle $c$ being a multiple of 1M- attribute \attr{EOM} defines whether the schedule times are to fall on the 30th of all months (same day) or the 31st (end of month).\\
More specifically, \attr{EOM} has an effect on a schedule $\vec{t}^k$ only if:
\begin{itemize}
\item[$s$] is the last day of a month with less than 31 days (Feb, April etc.)
\item[$c$] $=NPS$ with $P\in(M, Q, H or Y)$
\end{itemize}
As per the DD \attr{EOM} can take one of the following values:
\begin{itemize}
\item[EOM] (EndOfMonth): times $t_i,i=1,2,...,n-1$ are moved to the end of the respective months
\item[SD] (SameDay): times $t_i,i=1,2,...,n-1$ remain unchanged except in February, where it will go to the last day if the day of month of time $s$ is higher than the number of days of February
\end{itemize}
\subsection{Business Day Shift Convention}\label{sec:bdc}
In general, contract events are scheduled for business days only. Therefore, the \attr{BDC} convention defines how scheduled times $t_i,i=1,2,...,n-1$ are shifted in case they fall on a non-business day:
\begin{itemize}
\item[NULL:] No shift
\item[SCF:] Shift/Calculate following: The event is shifted to the following non working day. Calculation of the event happens after the shift
\item[SCMF:] Shift/Calculate modified following: The event is shifted to the following non working day. However, if the following day happens to fall into the next month, then take preceeding non-working day. Calculation of the event happens after the shift
\item[CSF:] Calculate/Shift following: Same like SCF however calculation of the event happens before the shift
\item[CSMF:] Calculate/Shift modified following: Same like SCMF however calculation of the event happens before the shift
\item[SCP:] Shift/Calculate preceding: The event is shifted to the last preceding non working day. Calculation of the event happens after the shift
\item[SCMP:] Shift/Calculate modified preceding: The event is shifted to the last preceding non working day. However, if the preceding day happens to fall into the previous month, then take next non-working day. Calculation of the event happens after the shift
\item[CSP:] Calculate/Shift preceding: Same like SCP however calculation of the event happens before the shift
\item[CSMP:] Calculate/Shift modified preceding: Same like SCMP however calculation of the event happens before the shift
\end{itemize}
\subsection{Business Day Calendar}\label{sec:bdcal}
Whether a specific day is a business day (cf. previous section) is defined by attribute \attr{CLDR}. Such conventions generally depend on regional official holiday calendars. The Business Day Function interface allows determining for some \attr{CLDR} whether any time $t$ is a business day or not
\[
B: t \mapsto \{true, false\}
\]
where $true$ indicates that $t$ is a business day and $false$ that it is a holiday.
\begin{example}
Two standard \attr{CLDR} implementations are the following
\begin{itemize}
\item NoHoliday (default): every calendar day is a business day
\item MondayToFriday: all weekdays Monday, Tuesday, Wednesday, Thursday, and Friday are business days
\end{itemize}
\end{example}
\subsection{Year Fraction Convention}\label{sec:yearfrac}
Interest income and other calculations are based on \textit{per annum} interest rates. Therefore, the year-fraction function interface $Y$ is used to calculate the \textit{fraction of a year} between any two times $s$ and $t$ with $t>s$ for which e.g. an (per annum) interest rate applies according to some day count convention \attr{DCC}
\[
\yfrfunc: s,t,\attr{DCC} \mapsto \Real
\]
Note, the year fraction function interface only defines the structure of year fraction functions but not an actual implementation thereof, or the respective \attr{DCC}, respectively. Therefore, any \attr{DCC} can be implemented according to the interface above supporting user-defined year fraction functions.\\
For brevity we will omit the \attr{DCC} function argument wherever this does not lead to confusion.
\subsection{Contract Role Sign Convention}\label{sec:cntrl}
The two parties to a contract are defined through attributes \attr{CRID} and \attr{CPID}. The first is the party initially \textit{creating} the contract and the second is the counterparty, respectively. Thereby, both \attr{CRID}/\attr{CPID} can take any \textit{role} in the contract or, more specifically, they can be the lender or borrower in a loan (PAM), fixed receiver or payer in an interest rate swap (SWAPS), etc.\\
The \textit{role} of the \attr{CRID} is defined through attribute \attr{CNTRL}. The \textit{role} of \attr{CPID} is derived as the \textit{opposite} side to the contract. Apart from \attr{CNTRL} the attributes are \textit{neutral} to the \textit{role} of \attr{CRID} (or \attr{CPID}).\\
On the other hand, contractual cash flows generated by the POFs and certain states are \textit{role-sensitive}. That is, from the perspective of the \attr{CRID} these quantities represent either claims or obligations. Contract Role Sign function $R$ maps the \attr{CNTRL} attribute into $+1$ indicating a claim or $-1$ indicating an obligation
\[
R : \attr{CNTRL} \rightarrow \{-1, +1 \}
\]
When multiplying with a cash flow $x$ the Contract Role Sign function thereby defines the direction of that flow:
\begin{itemize}
\item[$x>0$:] $x$ flows from \attr{CPID} to \attr{CRID}
\item[$x<0$:] $x$ flows from \attr{CRID} to \attr{CPID}
\end{itemize}
Table \ref{tbl:cntrl} defines the domain of the Contract Role Sign function, i.e. the range of attribute \attr{CNTRL}, with meaning and Contract Role Sign to which the function maps.
% ---------------------- table: contract roles ----------------------
\begin{table}[H]
\centering
\begin{tabular}{| p{0.5in}p{1.5in}p{0.2in} |}
\hline
\textbf{Value} & \textbf{Meaning} & $\textbf{R}$ \\
\hline
RPA & Real position asset & +1 \\
\hline
RPL & Real position liability & -1 \\
\hline
LG & Long position & +1 \\
\hline
ST & Short position & -1 \\
\hline
BUY & Protection buyer & +1 \\
\hline
SEL & Protection seller & -1 \\
\hline
RFL & Receive first (or fixed) leg & +1 \\
\hline
PFL & Pay first (or fixed) leg & -1 \\
\hline
COL & Collateral instrument & +1 \\
\hline
CNO & Close-out netting instrument & +1 \\
\hline
GUA & The guarantor in a Guarantee & -1 \\
\hline
OBL & The obligee in a Guarantee & +1 \\
\hline
UDL & The underlying to a composed contract & +1 \\
\hline
UDLP & The underlying to a composed contract with positive sign & +1 \\
\hline
UDLM & The underlying to a composed contract with negative sign & -1 \\
\hline
\end{tabular}
\caption{Contract Role definitions.}
\label{tbl:cntrl}
\end{table}
\subsection{Annuity Amount Function}\label{sec:annamount}
In an \textit{Annuity} contract (ANN) the annuity amount is paid regularly from the \textit{borrower} to the \textit{lender}. Thereby, the annuity amount is comprised of a principal repayment portion and an interest portion and and dimensioned such that the total nominal amount $n$ at time $t$ is fully repaid at maturity $T$ of the annuity. The Annuity Amount function $\annfunc$ computes the annuity amount as follows
\[
\ann{s}{T}{n}{a}{r}=(n+a)\frac{\prod_{i=1}^{m-1}1+r\yfr{t_i,t_{i+1}}}{1+\sum_{i=1}^{m-1}\prod_{j=i}^{m-1}1+r\yfr{t_j}{t_{j+1}}}
\]
with $a$ the accrued interest as per time $s$, $r$ the actual interest rate, $t_i, i=1,2,...,m$ the schedule times $\inf t, t\in\vec{t}^{PR}\land t>s$, $m$ the number of times $t_i$, and $\vec{t}^{PR}$ the PR-event schedule times of the Annuity contract as described in section \ref{sec:ann}.
\subsection{Canonical Contract Payoff Function}
The canonical payoff of a contract $x$ is defined as the sum of all future event payoffs evaluated under current risk factor conditions, or
\[
\payoff{x}{t} = \sum_{c\in C} c
\]
with $C=\fev{\cldev{x}{t}{\obs{rf}{\attr{i}}{s}=\obs{rf}{\attr{i}}{t}\forall i \wedge s>t}}$.
\subsection{Settlement Currency FX Rate}\label{sec:settlement-cur}
Sometimes financial contracts are settled in a different currency (i.e. the \textit{settlement currency}) \attr{CURS} than the denomination currency \attr{CUR}. Hence, payoffs are multiplied by the respective fx-rate which is derived by the following
\[
X_{\attr{CUR}}^{\attr{CURS}}(t) = \begin{cases} 1 &\text{if}\quad \attr{CURS} == \undef \vee \attr{CURS} == \attr{CUR} \\
f(t) &\text{else} \end{cases}
\]
with $f(t)=\obs{rf}{\attr{concat(CUR,'/',CURS)}}{t}$.
%%%%%%%%%%%%%%%%%%%% section: contract composition %%%%%%%%%%%%%%%%%%%%
\section{Contract Composition}\label{sec:composition}
The payoff of \textit{Combined Contracts}, see the taxonomy, is derived from certain quantities of child contracts (also called \textit{underlying instruments} or simply \textit{underlyers}). In general, such child contracts can be any ACTUS contract - Basic or Combined - as well as any number of contracts - a single contract or a set of contracts. Indeed, in reality this is what Option, Swap, Swaption, but also any kind of Asset/Mortgage/etc. backed securities represent; \textit{a hierarchical composition of different contracts linked by means of functional reationships}. This compositional approach provides maximum flexibility and, hence, allows capturing any real world use case. We here refer to a \textit{referenced} (i.e. of lower hierarchical level) contract as a \textit{child contract} and to a referencing (i.e. of higher hierarchical level) contract as a \textit{parent contract}.\\
The ACTUS dictionary defines attribute $\attr{CTST}$ which captures the child contract(s) as part of the parent contract's set of attributes. Thereby, attribute $\attr{CTST}$ is of type \verb'ContractReference[]' with \verb'ContractReference' a reference to a child contract (in JSON notation)
\begin{verbatim}
{
"object": ,
"type": ,
"role":
}
\end{verbatim}
Consult the dictionary for more information (cf. \url{https://github.com/actusfrf/actus-dictionary/blob/6e84435c70e1325e114c931badaa7e80b01a9a0d/actus-dictionary.json#L776}.
We will use the following notation to query reference objects from the $\attr{CTST}$ attribute
\[
\attr{CTST}_{role}^{type}(i)
\]
where $role$ and $type$ filter the reference objects in $\attr{CTST}$ according to the respective values of fields \verb'type' and \verb'role'. For brevity, we will omit the index parameter $i$ which indicates that we address the first (and usually only) reference object queried.
\begin{example}[Underlying MarketObject-reference] The MarketObject reference of a simple Underlying e.g. to an Option contract is referenced as $\attr{CTST}_{Underlying}^{MarketObjectIdentifier}(1)$ or, in short form, as $\attr{CTST}_{Underlying}^{MarketObjectIdentifier}$.
\end{example}
\begin{example}[FirstLeg Contract-reference] The Contract object representing the first leg e.g. to a Swaps contract is referenced as $\attr{CTST}_{FirstLeg}^{Contract}(1)$ or, in short form, as $\attr{CTST}_{FirstLeg}^{Contract}$.
\end{example}
%%%%%%%%%%%%%%%%%%%% section: risk factor observer %%%%%%%%%%%%%%%%%%%%
\section{Risk Factor Observer}\label{sec:rfobserver}
The payoff of financial contracts always depends on the context in which it is evaluated and which is comprised of the following dimensions; counterparties, markets, and behavioral factors. We refer to these as the \textit{risk factors} to which financial contracts are exposed to. This indicates that these factors are source of uncertainty because financial contracts only reference the factors but their dynamics is outside the control of any contractual agreement. Thus, such factors have to be \textit{observed} and their changing states accounted for when evaluating the payoff of financial contracts. Therefore, we consider a standardized interface $\obsfull{o}{i}{t}{S}{M}$ that allows for \textit{observing}; (1) the state of a certain risk factor $i$ at any time $t$ if $o=$'rf'
\[
\obsfunc{rf}: i,t,S,M \mapsto \Real
\]
and (2) contractual but non-scheduled events if $o=$'ev'
\[
\obsfunc{ev}: i,k,t,S,M \mapsto \{e_t^{k},e_s^{k},...\}
\]
The parameters to the Risk Factor Observer interface are as follows:
\begin{itemize}
\item[$i$]: the identifier of the risk factor observed
\item[$k$]: the type of events observed
\item[$t$]: the time (post) which to observe the risk factor
\item [$S$]: the inner states of the contract at time $t$
\item [$M$]: the contract terms of the contract as per time $t$
\end{itemize}
Note that the observer interface only defines the structure of an actual observer function but not the actual implementation. Thus, the interface allows for user-defined implementations of observer functions allowing e.g. for representing arbitrary assumptions on the evolution of future risk factor states which is key for any type of forward-looking analysis.
\begin{example}['rf'-Observer] The market-driven 3-month USD-Libor reference rate used as the variable rate in a variable rate loan contract is observed at any time $t$ through $\obs{rf}{\attr{MarketObjectCodeRateReset}}{t}$.
\end{example}
\begin{example}['rf'-Observer] Unscheduled (pre-) repayments of outstanding notional in a mortgage contract is observed at any time $t$ through $\obs{ev}{\attr{CID},\attr{PR}}{t}$.
\end{example}
For brevity we will omit the $S$ and $M$ function arguments wherever this does not lead to confusion.
%%%%%%%%%%%%%%%%%%%% section: child observer %%%%%%%%%%%%%%%%%%%%
\section{Child Contract Observer}\label{sec:cldobserver}
In order to evaluate the derived payoff of combined contracts, we consider a standardized interface $\cldfunc{o}$ that allows for \textit{observing} on the parent level; (1) all future events, w.r.t. time $t$, if $o=$'ev'
\[
\cldfunc{ev}: i,t,a \mapsto \{e_v^{k},e_w^{l},...\}
\]
with $v,w>t$ and event types $k,l$ according to the schedule of the child contract, (2) a certain state variable $x$ if $o=$'sv'
\[
\cldfunc{sv}: i,t,x,a \mapsto \Real,
\]
or (3) a particular contract attribute $x$ of the child contract if $o=$'ca'
\[
\cldfunc{ca}: i,x \mapsto y
\]
with $y$ a variable of value type of the respective attribute as per DD.\\
The parameters to the Child Contract Observer interface are as follows:
\begin{itemize}
\item[$i$]: the identifier of the child contract \textit{observed}
\item[$t$]: for $o\in\{\textit{ev,sv}\}$ the time for which the respective quantity should be evaluated
\item [$x$]: for $o\in\{\textit{sv,ca}\}$ the quantity to be evaluated
\item [$a$]: for $o\in\{\textit{ev,sv}\}$ a set of contract attributes to which the evaluated quantity should be conditioned
\end{itemize}
Note that the observer interface only defines the structure of an actual observer function but not the actual implementation. Thus, the interface allows for user-defined implementations of observer functions allowing e.g. for using arbitrary data structures.
\begin{example}['ev'-Observer] The future events, w.r.t. time $t$, of the \textit{first leg} (i.e. child contract with \verb'Role'=$\texttt{FirstLeg}$) of a SWAPS contract with $\attr{CNTRL}=PFL$ (i.e. \textit{pay first leg}) can be evaluated as $\cldev{\attr{CTST}_{FirstLeg}^{Contract}}{t}{\attr{CNTRL}=RPL}$.
\end{example}
\begin{example}['sv'-Observer] The current state, w.r.t. time $t$, of state variable $\svar{Nt}{}$ of the \textit{first leg} (i.e. child contract with \verb'Role'=$\texttt{FirstLeg}$) of a SWAPS contract with \attr{CNTRL}=RFL (i.e. \textit{receive first leg}) can be evaluated as $\cldsv{\attr{CTST}_{FirstLeg}^{Contract}}{t}{Nt}{\attr{CNTRL}=RPA}$.
\end{example}
\begin{example}['ca'-Observer] The contract attribute \attr{MOC} of the child contract \textit{Child} (i.e. child contract with \verb'Role'=$\texttt{Underlying}$) of an OPTNS contract can be evaluated as $\cldca{\attr{CTST}_{Underlying}^{Contract}}{\attr{MOC}}$.
\end{example}
For brevity we will omit the $x$ and $a$ function arguments wherever this does not lead to confusion.
%%%%%%%%%%%%%%%%%%%% section: contract types %%%%%%%%%%%%%%%%%%%%
% ---------------------- 1-column ----------------------
\end{multicols}
% ---------------------- newpage ----------------------
\newpage
\section{Contract Types}\label{sec:contracts}
%%%%%%%%%%%%%%%%%%%% subsection: pam %%%%%%%%%%%%%%%%%%%%
\subsection{PAM: Principal At Maturity}\label{sec:pam}
% ---------------------- table: pam schedule ----------------------
\begin{schedule}{PAM}
AD & $\vec{t}^{AD} = \left(t_0,t_1,...,t_n\right)$ & With $t_i,i=1,2,...$ a custom input \\
\hline
ISS & $t^{ISS} = \attr{ISS}$ & \\
\hline
IED & $t^{IED} = \begin{cases} \undef & \text{if} \quad \attr{IED}=\undef \\
\attr{IED} & \text{else} \end{cases}$ & \\
\hline
MD & $t^{MD} = \svar{Md}{t_0}$ & \\
\hline
PP & $\vec{t}^{PP} = \begin{cases} \undef & \text{if} \quad \attr{PPEF}=\text{'N'} \\
(\vec{u},\vec{v}) & \text{else} \end{cases}$
\par where \par
{$\begin{aligned} \vec{u} &= \sdl{s}{\attr{OPCL}}{T^{MD}} \\
\vec{v} &= \obs{ev}{\attr{CID},\attr{PP}}{t} \end{aligned}$}
& with\par $s = \begin{cases} \undef & \text{if} \quad \attr{OPANX}=\undef \land \attr{OPCL}=\undef\\
\attr{IED}+\attr{OPCL} & \text{else if} \quad \attr{OPANX} = \undef \\
\attr{OPANX} & \text{else} \end{cases}$ \\
\hline
PY & $\vec{t}^{PY} = \begin{cases} \undef & \text{if} \quad \attr{PYTP}=\text{'O'} \\
\vec{t}^{PP} & \text{else} \end{cases}$ & \\
\hline
FP & $\vec{t}^{FP} = \begin{cases} \undef & \text{if} \quad \attr{FER}=\undef \lor \attr{FER}=0 \\
\sdl{s}{\attr{FECL}}{T^{MD}} & \text{else} \end{cases}$
& with\par $s = \begin{cases} \undef & \text{if} \quad \attr{FEANX}=\undef \land \attr{FECL}=\undef\\
\attr{IED}+\attr{FECL} & \text{else if} \quad \attr{FEANX} = \undef \\
\attr{FEANX} & \text{else} \end{cases}$ \\
\hline
PRD & $t^{PRD}= \attr{PRD}$ & \\
\hline
TD & $t^{TD}= \attr{TD}$ & \\
\hline
IP & $\vec{t}^{IP} = \begin{cases} \undef & \text{if} \quad \attr{IPNR}=\undef \\
\sdl{s}{\attr{IPCL}}{T^{MD}} & \text{else} \end{cases}$
& with\par $s = \begin{cases} \undef & \text{if} \quad \attr{IPANX}=\undef \land \attr{IPCL}=\undef\\
\attr{IPCED} & \text{else if}\quad \attr{IPCED}\neq\undef \\
\attr{IED}+\attr{IPCL} & \text{else if} \quad \attr{IPANX} = \undef \\
\attr{IPANX} & \text{else} \end{cases}$ \\
\hline
IPCI & $\vec{t}^{IPCI} = \begin{cases} \undef & \text{if} \quad \attr{IPCED}=\undef \\
\sdl{s}{\attr{IPCL}}{\attr{IPCED}} & \text{else} \end{cases}$
& with\par $s = \begin{cases} \undef & \text{if} \quad \attr{IPANX}=\undef \land \attr{IPCL}=\undef\\
\attr{IED}+\attr{IPCL} & \text{else if} \quad \attr{IPANX} = \undef \\
\attr{IPANX} & \text{else} \end{cases}$ \\
\hline
RR & $\vec{t}^{RR} = \begin{cases} \undef & \text{if} \quad \attr{RRANX}=\undef \land \attr{RRCL}=\undef \\
\vec{t} \setminus t^{RRY} & \text{else if} \attr{RRNXT} \neq \undef \\
\vec{t} & \text{else} \end{cases}$ \par
where $\vec{t}=\sdl{s}{\attr{RRCL}}{T^{MD}}$
& with\par {$\begin{aligned} s &= \begin{cases} \attr{IED}+\attr{RRCL} & \text{if} \quad \attr{RRANX} = \undef \\
\attr{RRANX} & \text{else} \end{cases} \\
t^{RRY} &= \inf t \in \vec{t}\mid t>\attr{SD} \end{aligned}$} \\
\hline
RRF & $t^{RRF} = \begin{cases} \undef & \text{if} \quad \attr{RRANX}=\undef \land \attr{RRCL}=\undef \\
\inf t \in \vec{t}\mid t>\attr{SD} & \text{else} \end{cases}$ \par
where $\vec{t}=\sdl{s}{\attr{RRCL}}{T^{MD}}$
& with\par $s = \begin{cases} \attr{IED}+\attr{RRCL} & \text{if} \quad \attr{RRANX} = \undef \\
\attr{RRANX} & \text{else} \end{cases}$ \\
\hline
SC & $\vec{t}^{SC} = \begin{cases} \undef & \text{if} \quad \attr{SCEF}=\text{'000'} \\
\sdl{s}{\attr{SCCL}}{T^{MD}} & \text{else} \end{cases}$
& with\par $s = \begin{cases} \undef & \text{if} \quad \attr{SCANX}=\undef \land \attr{SCCL}=\undef\\
\attr{IED}+\attr{SCCL} & \text{else if} \quad \attr{SCANX} = \undef \\
\attr{SCANX} & \text{else} \end{cases}$ \\
\hline
CE & $\vec{t}^{CE} = t(e^{k}) | \svar{Prf}{t^-} \neq \svar{Prf}{t^+}, \forall k$ & \\
\end{schedule}
% ---------------------- table: pam states ----------------------
\begin{states}{PAM}
$\svar{Md}{}$ & $\svar{Md}{t_0} = \attr{MD}$ & \\
\hline
$\svar{Nt}{}$ & $\svar{Nt}{t_0} = \begin{cases} 0.0 & \text{if} \quad \attr{ISS} > t_0 \\
\sgn\times\attr{NT} & \text{else} \end{cases}$ & \\
\hline
$\svar{Ipnr}{}$ & $\svar{Ipnr}{t_0} = \begin{cases} 0.0 & \text{if} \quad \attr{ISS} > t_0 \\
\attr{IPNR} & \text{else} \end{cases}$ & \\
\hline
$\svar{Ipac}{}$ & $\svar{Ipac}{t_0} = \begin{cases} 0.0 & \text{if} \quad \attr{IPNR}=\undef \\
\attr{IPAC} & \text{else if} \quad \attr{IPAC} \neq \undef \\
\yfr{t^-}{t_0}\times\svar{Nt}{t_0}\times\svar{Ipnr}{t_0} & \text{else} \end{cases}$ &
with $t^- = \sup t \in \vec{t}^{IP}\mid t<t_0$ \\
\hline
$\svar{Feac}{}$ & $\svar{Feac}{t_0} = \begin{cases} 0.0 & \text{if} \quad \attr{FER}=\undef \\
\attr{FEAC} & \text{else if} \quad \attr{FEAC} \neq \undef \\
\yfr{t^{FP-}}{t_0}\times\svar{Nt}{t_0}\times\attr{FER} & \text{else if} \quad \attr{FEB}=\text{'N'} \\
\frac{\yfr{t^{FP-}}{t_0}}{\yfr{t^{FP-}}{t^{FP+}}}\times\attr{FER} & \text{else} \end{cases}$ &
with {$\begin{aligned} t^{FP-} &= \sup t \in \vec{t}^{FP}\mid t<t_0 \\
t^{FP+} &= \inf t \in \vec{t}^{FP}\mid t>t_0 \end{aligned}$} \\
\hline
$\svar{Nsc}{}$ & $\svar{Nsc}{t_0} = \begin{cases} \attr{SCIXSD} & \text{if} \quad \attr{SCEF}=\text{'[x]N[x]'} \\
1.0 & \text{else} \end{cases}$ & \\
\hline
$\svar{Isc}{}$ & $\svar{Isc}{t_0} = \begin{cases} \attr{SCIXSD} & \text{if} \quad \attr{SCEF}=\text{'I[x][x]'} \\
1.0 & \text{else} \end{cases}$ & \\
\hline
$\svar{Prf}{}$ & $\svar{Prf}{t_0} = \attr{PRF}$ & \\
\hline
$\svar{Sd}{}$ & $\svar{Sd}{t_0} = t_0$ & \\
\end{states}
% ---------------------- table: pam functions ----------------------
\begin{functions}{PAM}
AD & 0.0 & {$\begin{aligned}
\svar{Ipac}{t^+} &= \svar{Ipac}{t^-} + \yfr{\svar{Sd}{t^-1}}{t}\svar{Ipnr}{t^-}\svar{Nt}{t^-}\\
\svar{Sd}{t^+} &= t
\end{aligned}$} \\
\hline
ISS & 0.0
& {$\begin{aligned}
\svar{Nt}{t^+} &=\sgn\attr{NT} \\
\svar{Ipnr}{t^+} &= \begin{cases} 0.0 & \text{if} \quad \attr{IPNR}=\undef \\
\attr{IPNR} & \text{else} \end{cases} \\
\svar{Ipac}{t^+} &= \begin{cases} \attr{IPAC} & \text{if} \quad \attr{IPAC} \neq \undef \\
y\svar{Nt}{t^+}\svar{Ipnr}{t^+} & \text{if} \quad \attr{IPANX} \neq \undef \land \attr{IPANX}<t \\
0.0 & \text{else} \end{cases} \\
\svar{Sd}{t^+} &= t \end{aligned}$}\par
with\par
$y=\yfr{\attr{IPANX}}{t}$ \\
\hline
IED & $X_{\attr{CUR}}^{\attr{CURS}}(t)\sgn(-1)(\attr{NT}+\attr{PDIED})$
& {$\begin{aligned}
\svar{Ipac}{t^+} &= \svar{Ipac}{t^-} + \yfr{\svar{Sd}{t^-}}{t}\svar{Ipnr}{t^-}\svar{Nt}{t^-} \\
\svar{Sd}{t^+} &= t \end{aligned}$}\par
with\par
$y=\yfr{\attr{IPANX}}{t}$ \\
\hline
MD & $X_{\attr{CUR}}^{\attr{CURS}}(t)(\svar{Nsc}{t^-}\svar{Nt}{t^-}+\svar{Isc}{t^-}\svar{Ipac}{t^-}+\svar{Feac}{t^-})$
& {$\begin{aligned}
\svar{Nt}{t^+} &= 0.0 \\
\svar{Ipac}{t^+} &= 0.0 \\
\svar{Feac}{t^+} &= 0.0 \\
\svar{Sd}{t^+} &= t \end{aligned}$} \\
\hline
PP & $X_{\attr{CUR}}^{\attr{CURS}}(t)\fev{\obs{ev}{\attr{CID},\attr{PP}}{t}}$
& {$\begin{aligned}
\svar{Ipac}{t^+} &= \svar{Ipac}{t^-} + \yfr{\svar{Sd}{t^-}}{t}\svar{Ipnr}{t^-}\svar{Nt}{t^-} \\
\svar{Feac}{t^+} &= \begin{cases} \svar{Feac}{t^-} + \yfr{\svar{Sd}{t^-}}{t}\svar{Nt}{t^-}\attr{FER} & \text{if} \quad \attr{FEB}=\text{'N'} \\
\frac{\yfr{t^{FP-}}{t}}{\yfr{t^{FP-}}{t^{FP+}}}\sgn\attr{FER} & \text{else} \end{cases} \\
\svar{Nt}{t^+} &= \svar{Nt}{t^-} - \fev{\obs{ev}{\attr{CID},\attr{PP}}{t}} \\
\svar{Sd}{t^+} &= t \end{aligned}$} \par
with\par
{$\begin{aligned}
t^{FP-} &= \sup t \in \vec{t}^{FP}\mid t<t_0 \\
t^{FP+} &= \inf t \in \vec{t}^{FP}\mid t>t_0 \end{aligned}$} \\
\hline
PY & {$\begin{aligned}
&X_{\attr{CUR}}^{\attr{CURS}}(t)\sgn\attr{PYRT} &\text{if} \quad \attr{PYTP}=\text{'A'}\\
&c\attr{PYRT} &\text{if} \quad \attr{PYTP}=\text{'N'}\\
&c\max(0,\svar{Ipnr}{t^-}-\obs{rf}{\attr{RRMO}}{t}) &\text{if} \quad \attr{PYTP}=\text{'I'} \end{aligned}$}\par
with\par
$c=X_{\attr{CUR}}^{\attr{CURS}}(t)\sgn\yfr{\svar{Sd}{t^-}}{t}\svar{Nt}{t^-}$
& {$\begin{aligned}
\svar{Ipac}{t^+} &= \svar{Ipac}{t^-} + \yfr{\svar{Sd}{t^-}}{t}\svar{Ipnr}{t^-}\svar{Nt}{t^-} \\
\svar{Feac}{t^+} &= \begin{cases} \svar{Feac}{t^-} + \yfr{\svar{Sd}{t^-}}{t}\svar{Nt}{t^-}\attr{FER} & \text{if} \quad \attr{FEB}=\text{'N'} \\
\frac{\yfr{t^{FP-}}{t}}{\yfr{t^{FP-}}{t^{FP+}}}\sgn\attr{FER} & \text{else} \end{cases} \\
\svar{Sd}{t^+} &= t \end{aligned}$} \par
with\par
{$\begin{aligned}
t^{FP-} &= \sup t \in \vec{t}^{FP}\mid t<t_0 \\
t^{FP+} &= \inf t \in \vec{t}^{FP}\mid t>t_0 \end{aligned}$} \\
\hline
FP & {$\begin{aligned}
&\sgn c &\text{if} \quad \attr{FEB}=\text{'A'}\\
&c\yfr{\svar{Sd}{t^-}}{t}\svar{Nt}{t^-}+\svar{Feac}{t^-} &\text{if} \quad \attr{FEB}=\text{'N'} \end{aligned}$}\par
with\par
$c=X_{\attr{CUR}}^{\attr{CURS}}(t)\attr{FER}$
& {$\begin{aligned}
\svar{Ipac}{t^+} &= \svar{Ipac}{t^-} + \yfr{\svar{Sd}{t^-}}{t}\svar{Ipnr}{t^-}\svar{Nt}{t^-} \\
\svar{Feac}{t^+} &= 0.0 \\
\svar{Sd}{t^+} &= t \end{aligned}$} \\
\hline
PRD & $X_{\attr{CUR}}^{\attr{CURS}}(t)\sgn (-1)(\attr{PPRD} + \svar{Ipac}{t^-} +$ \par
$\qquad\qquad \yfr{\svar{Sd}{t^-}}{t}\svar{Ipnr}{t^-}\svar{Nt}{t^-})$
& {$\begin{aligned}
\svar{Ipac}{t^+} &= \svar{Ipac}{t^-} + \yfr{\svar{Sd}{t^-}}{t}\svar{Ipnr}{t^-}\svar{Nt}{t^-} \\
\svar{Feac}{t^+} &= \begin{cases} \svar{Feac}{t^-} + \yfr{\svar{Sd}{t^-}}{t}\svar{Nt}{t^-}\attr{FER} & \text{if} \quad \attr{FEB}=\text{'N'} \\
\frac{\yfr{t^{FP-}}{t}}{\yfr{t^{FP-}}{t^{FP+}}}\sgn\attr{FER} & \text{else} \end{cases} \\
\svar{Sd}{t^+} &= t \end{aligned}$} \par
with\par
{$\begin{aligned}
t^{FP-} &= \sup t \in \vec{t}^{FP}\mid t<t_0 \\
t^{FP+} &= \inf t \in \vec{t}^{FP}\mid t>t_0 \end{aligned}$} \\
\hline
TD & $X_{\attr{CUR}}^{\attr{CURS}}(t)\sgn (\attr{PTD} + \svar{Ipac}{t^-} +$ \par
$\qquad\qquad \yfr{\svar{Sd}{t^-}}{t}\svar{Ipnr}{t^-}\svar{Nt}{t^-})$
& {$\begin{aligned}
\svar{Nt}{t^+} &= 0.0 \\
\svar{Ipac}{t^+} &= 0.0 \\
\svar{Feac}{t^+} &= 0.0 \\
\svar{Sd}{t^+} &= t \end{aligned}$} \\
\hline
IP & $X_{\attr{CUR}}^{\attr{CURS}}(t)\svar{Isc}{t^-}(\svar{Ipac}{t^-} +$\par
$\qquad\qquad \yfr{\svar{Sd}{t^-}}{t}\svar{Ipnr}{t^-}\svar{Nt}{t^-})$
& {$\begin{aligned}
\svar{Ipac}{t^+} &= 0.0 \\
\svar{Feac}{t^+} &= \begin{cases} \svar{Feac}{t^-} + \yfr{\svar{Sd}{t^-}}{t}\svar{Nt}{t^-}\attr{FER} & \text{if} \quad \attr{FEB}=\text{'N'} \\
\frac{\yfr{t^{FP-}}{t}}{\yfr{t^{FP-}}{t^{FP+}}}\sgn\attr{FER} & \text{else} \end{cases} \\
\svar{Sd}{t^+} &= t \end{aligned}$} \par
with\par
{$\begin{aligned}
t^{FP-} &= \sup t \in \vec{t}^{FP}\mid t<t_0 \\
t^{FP+} &= \inf t \in \vec{t}^{FP}\mid t>t_0 \end{aligned}$} \\
\hline
IPCI & 0.0
& {$\begin{aligned}
\svar{Nt}{t^+} &= \svar{Nt}{t^-} + \svar{Ipac}{t^-} + \yfr{\svar{Sd}{t^-}}{t}\svar{Nt}{t^-}\svar{Ipnr}{t^-}\\
\svar{Ipac}{t^+} &= 0.0 \\
\svar{Feac}{t^+} &= \begin{cases} \svar{Feac}{t^-} + \yfr{\svar{Sd}{t^-}}{t}\svar{Nt}{t^-}\attr{FER} & \text{if} \quad \attr{FEB}=\text{'N'} \\
\frac{\yfr{t^{FP-}}{t}}{\yfr{t^{FP-}}{t^{FP+}}}\sgn\attr{FER} & \text{else} \end{cases} \\
\svar{Sd}{t^+} &= t \end{aligned}$} \par
with\par
{$\begin{aligned}
t^{FP-} &= \sup t \in \vec{t}^{FP}\mid t<t_0 \\
t^{FP+} &= \inf t \in \vec{t}^{FP}\mid t>t_0 \end{aligned}$} \\
\hline
RR & 0.0
& {$\begin{aligned}
\svar{Ipac}{t^+} &= \svar{Ipac}{t^-} + \yfr{\svar{Sd}{t^-}}{t}\svar{Ipnr}{t^-}\svar{Nt}{t^-} \\
\svar{Feac}{t^+} &= \begin{cases} \svar{Feac}{t^-} + \yfr{\svar{Sd}{t^-}}{t}\svar{Nt}{t^-}\attr{FER} & \text{if} \quad \attr{FEB}=\text{'N'} \\
\frac{\yfr{t^{FP-}}{t}}{\yfr{t^{FP-}}{t^{FP+}}}\sgn\attr{FER} & \text{else} \end{cases} \\
\svar{Ipnr}{t^+} &= \min(\max(\svar{Ipnr}{t^-}+\Delta r,\attr{RRLF}),\attr{RRLC}) \\
\svar{Sd}{t^+} &= t \end{aligned}$} \par
with\par