Data Model 521
Data Model 521
2
Infinity Data Model
Developer’s Guide
CONFIDENTIAL
Notice
Infinity Financial Technology, Inc. (Infinity) reserves the right to make changes to this publication at any time
and without notice. Infinity makes no warranties, expressed or implied, in this publication. In no event shall
Infinity be liable for any indirect, special, incidental or consequential damages arising out of purchase or use
of this publication or the information contained herein.
Copyright
Unpublished work, Copyright Infinity Financial Technology, Inc. ("Infinity"). This publication and the soft-
ware described within it ("Materials"), constitute proprietary and confidential information of Infinity and its
suppliers. The Materials (and any information or material derived therefrom) may not be reproduced or used,
and may not be disclosed or otherwise made available to any person, in whole or in part, except in accordance
with a written agreement with Infinity or as otherwise expressly authorized in writing by Infinity.
Overview 14-1
Purpose 14-1
Sybase / isql 14-1
Further documentation 14-1
A note on Data Model versions 14-1
Running Scenario Builder from the command line 14-2
Purpose 14-2
Command line mode 14-2
Output 14-4
Basic queries 14-5
The risk_batch_run_id number 14-5
Looking for a risk report 14-5
Looking for the parameters used in report generation 14-8
Looking for the curves used in report generation 14-8
Scenario definitions 14-8
risk_batch_def 14-8
Custom development 14-9
Changing portfolio names in a scenario 14-9
Changing base counterparties 14-10
Changing risk parameters 14-11
Chapter 15: Access Permission Tables
Index
Chapter 1
Infinity Data Model Overview
The Infinity Data Model is the foundation of Infinity’s family of products for
derivatives trading. The Infinity product family is based on a client-server architecture
that combines object-oriented programming techniques and relational database
technology.
The extensibility of the Infinity Data Model gives clients the ability to expand the
scope of their trading system as new financial instruments are created and as business
moves into new areas.
Infinity’s applications use the Fin++ Class Library to interact with the Data Model.
Custom application development can be done using Fin++ or any other development
tools encapsulating methods of database interaction. The Data Model can also store
data from existing systems for use in Infinity applications and custom applications.
1-2 Infinity Data Model Overview Infinity Data Model Developer’s Guide
About This Manual
The Infinity Data Model Developer’s Guide describes the use and design of the tables
and relationships in the Infinity Data Model. It does not provide step-by-step
instructions for building applications.
We strongly recommended that every developer read, at a bare minimum, the chapters
concerned with the database organization and the foundation tables before delving
into the modeling of securities. It would be difficult for anyone to simply start
populating or altering tables without understanding the conventions used in the
database and the accompanying documentation.
• Chapter 9, Flow Tables, shows how securities are broken down and
modeled as collections of cash flows.
• Chapter 11, Curve Tables, shows how curves of all types — discount
factor, yield, forward, zero, volatility, and basis — are modeled in the
database.
• Chapter 12, Volatility Surface Tables, explains the use of the vs_
tables to model simple volatility surfaces and tenor spread surfaces.
• Chapter 14, Risk Report Tables, explains how to retrieve risk reports
from the Data Model after you have generated and stored the reports
using the Infinity Risk Manager application or the Infinity Scenario
Builder application.
1-4 Infinity Data Model Overview Infinity Data Model Developer’s Guide
Chapter 2
Understanding Relational Data Models
This chapter introduces you to relational database technology and data modeling. It
explains relational syntax, the construction of entity-relationship diagrams, and the
representation of information in the Infinity Data Model.
Relational Models
Relational models are characterized by their simplicity, their high-level language
interfaces, and their ease of modification. Relational models are suited for the
development of neutral conceptual views of information. Many different users,
regardless of their organizational perspective, can make use of the stored data.
Relational models allow efficient access to data. The relational model encodes
relationships implicitly by using what are called shared keys in tables. While other
systems must navigate through pointer structures to find data, relational systems use
more efficient algebraic operations to make database queries.
By implicitly storing relationships between data tables, the relational model gains
data independence — the data model does not need to be altered to suit different
applications.
The columns of these tables are called the attributes of the entity. For an entity called
“employee,” typical attributes might be “last_name,” “first_name,” “SSN,”
“street_address,” “city,” “state,” “zip,” and “home_phone.” For an entity called
“security,” typical attributes might be “sec_id,” “description,” “sec_name,” and
“currency_code.” Attributes are thought of as adjectives.
The team table (Figure 2-1) has three columns of attributes, and there are four rows of
instances of the team entity. For the remainder of this manual, entity and attribute
names will be identified in helvetica font.
The attributes in this table are team_name, year, and team_city. There are four rows:
one for the instance of the 1989 New York Mets, one for the instance of the 1989 New
York Yankees, one for the instance of the 1989 LA Dodgers, and one for the 1989
Boston Red Sox instance.
All the data values in a table must be atomic; you cannot store lists of values in a
single row. If you wanted to add the fact that the Mets played in New York in 1990,
you could not simply append “1990” to “1989” in the existing row for the Mets. You
2-2 Understanding Relational Data Models Infinity Data Model Developer’s Guide
would have to create another separate row with the information Mets, 1990, New
York, adding that information as a separate instance:
Suppose we wanted to extend this sample model to include two entities, team and
player. Information you would want to store about a player might include a team, a
year, a name, a uniform number, and a batting average. The entity-relationship model
below depicts these two entities, with boxes summarizing their structure, and a
relationship, “has,” between them. It is read as “A TEAM <has> many PLAYERs.”
The box shapes, black circles, and horizontal lines are all significant; they will be
explained shortly.
Entity names should always be singular. This reminds you that each entity is a single
set of information. It also facilitates “reading” a diagram.
PLAYER
Figure 2-3. A simple relationship between two entities: a TEAM <has> many PLAYERs.
Within the Infinity Data Model, entity relationships are not specifically labeled with
verbs. In conceptualizing data models, the verbs are important features. In actual
implementation, the exact verbs are much less important. Most of the time, the verb
“has” would be appropriate.
Keys are attributes which, either by themselves or in combination with other key
attributes, can uniquely identify an instance of an entity. For an entity like employee, a
single attribute, employee_number, would uniquely identify each employee (assuming
all employees have employee numbers). A last_name attribute might not be a good
key, because many employees could share a last name.
In our previous example, in the team entity, team_name and year are key attributes;
team_city is a non-key attribute. Why is this? Together, each combination of
team_name and year uniquely identifies one baseball team; there was only one 1969
Mets team, only one 1980 Astros team, etc. The team_city is not needed as a key
attribute; once 1969 Mets or 1987 Giants are specified, the respective team_city values
are already known.
In the case of a derivatives-related entity like security, there might not be a ready-
made unique attribute. Creating a unique key is up to the data modeler. Infinity uses
the sec_id attribute as a key attribute in its security table. The sec_id is an integer code
created specifically to uniquely identify each instance of a security.
Primary Keys
Several types of keys are used in relational modeling. Instances are usually identified
by a primary key, abbreviated (PK). An employee row could be identified uniquely by
an attribute called employee_number (or social_security_number). The attribute
employee_number would be a primary key, and it goes in the entity’s key area, with
the (PK) abbreviation.
If an attribute is not marked with any abbreviation, but shown in the key area, it is a
primary key.
2-4 Understanding Relational Data Models Infinity Data Model Developer’s Guide
Foreign Keys
Whenever entities are connected by a relationship, one entity contributes a key (or set
of keys) to another entity. These are called foreign key attributes (explained below) in
the child table. These keys are said to migrate. They are designated by an (FK)
following the attribute name in the child entity. In Figure 2-3, team_name and
team_year both migrated to the player entity, where they are both foreign keys.
Parent-Child Relationships
Entities are further defined as parent entities and child entities. Parent entities
contribute keys to their child entities. In the preceding example, the team entity would
be the parent entity, and player would be the child entity.
Child entities are also known as dependent entities. Entities that do not get foreign key
data from anywhere else are known as independent entities. Dependent entities are
drawn with rounded corners, and independent entities are drawn with square corners.
Cardinality
The black dot in Figure 2-3 indicates a one-to-many cardinality. A relationship’s
cardinality tells how many instances of the parent entity contribute to how many
instances of the child entity. Sometimes a letter or number may appear next to that dot.
‘Z’ stands for one-to-zero-or-one, ‘P’ means one-to-one-or-more, and a number N
means one-to-exactly-N. The term “many” always means zero or more.
In the example below (Figure 2-4), employee is a dependent entity (with round
corners), because it took the value of its primary key, employee_number, from a
parent entity. The attribute employee_number would then be a foreign key in the
employee table. The employee number key of the employee entity migrates from a
separate entity, job_applicant.
Note in Figure 2-4 that there are two attributes called employee_number; this
redundancy could be eliminated with the use of role names, as shown later.
Identifying relationships are those in which a part of the parent entity becomes part of
the primary key of the child entity. Non-identifying relationships (drawn with dashed
resume_number
employee_name
when_received_resume Z employee_gender
becomes
hired_or_not_hired employee_hire_date
employee_number employee_birth_date
employee_bonus_amount
lines and a hollow diamond at the parent end) exist when a key from a parent migrates
to the data area of the child. There, it is still labeled as a foreign key to indicate that the
data migrates from elsewhere, but that attribute is shown in the non-key area. The
child is not identified by the parent, but it gets non-key data from it.
Sometimes this foreign key data can be NULL in the child entity. This NULL
characteristic is important when maintaining referential integrity. If a foreign key can
be NULL, and if the parent in that non-identifying relationship is deleted, then the
child can still exist. The child does not need the parent for existence or identification.
Suppose, for example, that employee in the example above got its value for
employee_gender from another table, gender_domain, which listed valid options for
gender (‘MALE’, ‘FEMALE’). The relationship between these two tables would be
non-identifying, because the foreign key, employee_gender, is not a primary key.
Instances of employee would still be uniquely identifiable, even if the values of
employee_gender had not yet been entered and were NULL.
PASSENGER SEAT
PASSENGER_NAME SEAT_NUMBER
1
FLIGHT_NUMBER (FK)
is
FARE_PAID assigned
PASSENGER_NAME (FK)
2-6 Understanding Relational Data Models Infinity Data Model Developer’s Guide
Associative Entities
We have seen one-to-many, one-to-zero-or-one, and one-to-one relationships. You can
also model many-to-many relationships, as depicted in Figure 2-6. They are drawn
with dots on both ends of the relationship line. They can be ambiguous, and they often
don’t actually tell you what you want to know. Many-to-many relationships have been
eliminated in the Infinity Data Model.
enrolls in / is taken by
STUDENT COURSE
From this model, you know that a student enrolls in many courses and that a course is
taken by many students. But even with attributes added to these simplified entities,
there still is no way to know exactly which students are taking which courses and
which courses are taken by which students. This is a non-specific relationship.
PERSON ADDRESS
person_id address_id
person_name street_address_detail
ADDRESS_USAGE
address_id (FK)
person_id (FK)
usage_type
use_start_date
Choosing proper associative entity names can be very important. Why is the entity
called address_usage? One might be inclined to call it person_address. But this
entity is not a person, nor is it an address — what it really represents is the use of an
address by a person and information about that usage. An even clearer name might be
person_address_usage.
Role Names
Role names are new names for foreign key attributes. They simply give new names to
foreign keys; they define the role that the attribute plays in the entity. Role names are
useful for keeping track of the specific role of a piece of data in a given entity, and
they are also needed to organize recursive data structures. They are defined in the
schema with the form: role-name.base-name.
In the example in Figure 2-8, the relationship between team and player is an
identifying one-to-many relationship. The attribute team_id migrates to the key area
of the player entity, where it is a foreign key. There it is given the role name
player_team_id. This role name clarifies the purpose of that attribute; the data in that
field is not the name of just any team, it is the name of that player’s team.
PLAYER
Figure 2-8. A model of a dependent entity, player, using a role name, player_team_id.
2-8 Understanding Relational Data Models Infinity Data Model Developer’s Guide
Recursive Relationships
An entity can have a recursive relationship with itself. For example, a company could
be an entity with subsidiaries of more companys. Recursive relationships must be non-
identifying; otherwise, the top company, lacking a parent company, could never exist.
COMPANY
company_id
company_name
parent_id.company_id (FK)
Note that you must use role names when defining recursive relationships. Without the
role name parent_id in the example in Figure 2-9, the attribute company_id would be
difficult to track from subsidiary to subsidiary.
In the Infinity Data Model, there are a few recursive relationships. For example, the
cash flow entity, flow, is the parent to other underlying flow entities. In the flow table,
the flow is identified with a flow_id number, and the underlying flow identification
numbers are given the role name underlying_flow_id.
The sec_quote table, used to model the exchange of one security for another, also
contains a recursive relationship. The sec_id identifies the security being traded, and
the settlement_sec_id identifies the security for which it is being exchanged.
Normalization
Normalization guarantees that there is no redundant information in the model. This
characteristic is very important to those who will be using the model to build an
application.
An entity additionally follows second normal form if non-key facts can only be
determined by knowing the whole key of the entity. If you only need to know part of
an entity’s key to determine one of the non-key attributes, there is too much
information — a second normal form violation.
If a non-key fact can be known only by looking at another one of an entity’s non-key
facts, there is a third normal form violation. If birthday and age were both non-key
attributes of a person entity, there would be a third normal form violation because you
could know a person’s age by simply knowing their birthday. This case amounts to
indirectly storing the same information twice.
In short, every non-key attribute of an entity should depend on the key, the whole key,
and nothing but the key.
Denormalization
Formal normalization is important, but verifying that the model actually means
something is probably more important. There are other normal forms (fourth, fifth,
etc.) but these are often violated in favor of performance in particular cases. These
violations cause redundancy in the structure, but it can be worth it. Intentionally
violating normal forms in favor of performance is called denormalization.
2-10 Understanding Relational Data Models Infinity Data Model Developer’s Guide
Chapter 3
Data Model Organization
This chapter explains how the Infinity Data Model is structured to accommodate the
different types of data used to model trades and groups of trades in a derivatives
trading operation. You will see how portfolios, transactions, trades, and securities fit
together, and you will learn more about Infinity Data Model conventions.
Holiday tables list the rules and actual holiday dates for
cities worldwide
Transaction and trade tables record trades of securities, i.e., “who trades
what with whom”
money_market_header curve
SQL portfolio definition
trade otc_option_header curve_id
swap_leg_header
trade_id
etc...
trade_leg sec
trade_leg_id curve_datetime
sec_id
trade_id curve_id
curve_datetime
trade_leg_org_partic infsys_seed_base_buckets
sec_seed
trade_id sec_id
trade_leg_id
curve_data
partic_type_code curve_id
curve_datetime
curve_offset_day
org
org_id
curve_hol_city
addr city list (from infsys_montage_lists)
city_list curve_id
addr_id city_code city_code
hol_city_code
Datatypes
The data in each field of the database must conform to a particular datatype. Building
on the system datatypes char, varchar, int, float, and bool, Infinity scripts construct a
number of Infinity datatypes. The Infinity datatypes can be found in the Infinity Data
Model Quick Reference. For example, the Quick Reference entry:
tells you that the datatype Description is a string of up to fifty characters, and the word
“varchar” indicates that the datatype is of the Sybase datatype “varchar.” For
Naming Conventions
In the Infinity database, the table, column, and datatype names were designed to
provide specific information about what entities are and how they are used. Standard
naming conventions improve the readability of the database and provide guidelines for
the naming of any tables you may add later.
All column and table names use strictly lower case letters. The underbar character “_”
delimits words within a name. These names are printed in helvetica font throughout
this guide.
Infinity datatypes use names of mixed case, to distinguish them from the tables and
columns. They, too, use underbars to delimit words in the name.
The lengths of the names were dictated by limitations of the database system. Some
standard abbreviations are used in table names:
abbreviation description
accel accelerator
act actual
addr address
adv advice
agg aggregate
agmt agreement
alloc allocation
amort amortization
auth authorization
calc calculation
coll collection
config configuration
confirm confirmation
corr correlation
cov coverage
cpty counterparty
db database
def definition
doc document
emp employee
exer exercise
Table names use a standard set of prefixes and suffixes. Prefixes usually indicate the
general area of table function. In most cases, the meaning is obvious:
Figure 3-4. Table suffixes indicate what kind of data a table may hold.
Attribute suffixes follow sets of rules to help you anticipate the types of data stored in
fields. In Figure 3-5 below, each suffix (or entire column name) is matched with its
corresponding Infinity datatype, as well as the system datatype used to build that
Infinity datatype.
Figure 3-5. Standard column suffix names (and column names) indicate what kind of data to expect.
The scripts used to create the indexes are listed in the “Scripts: Tables, Primary Keys,
and Indexes” chapter of the Infinity Data Model Reference Guide.
Unique Index
A unique index is one in which no two rows are permitted to have the same index
value.
Clustered Index
In a clustered index, instances of the tables are sorted so that their physical order is the
same as their indexed order. There can only be one clustered index per table, and it is
created on the primary key(s).
Non-Clustered Index
The Data Model provides for a few non-clustered indexes in the database. In these
indexes, the physical order is not the same as the indexed order. The non-clustered
index creates an extra level of data between the index structure and the data itself,
filled with pointers to the rows of data.
For example, a phone book is physically indexed by last names. The last name would
be the primary key, and it would also be the clustered index. If an additional index let
you search by street address, pointing you to the correct pages in the directory, then
street addresses would be a non-clustered index.
Composite Index
The Infinity Data Model specifies some composite indexes, where two or more
column names must be used to search. You would search a phone book file with a
composite index made up of two primary keys, last name and first name.
To see information about a particular table’s indexes, use the SQL command:
sp_helpindex <tablename>
In order to model securities and trades of securities, it is first necessary to have some
basic information concerning the organizations and people who are involved in
trading the securities. This information is contained in the organization and person
tables in the Infinity Data Model. Discussing these tables first will lay the groundwork
for understanding the tables dealing with securities and cashflows. It will also provide
a case study showing the logical design underlying the data modeling process.
This chapter traces the development of a relational data model derived from real world
business rules. It should clarify some nuances of relational design and Infinity’s own
design philosophy. After reading this chapter, you should be able to read the Data
Model diagrams and tables, and you should understand how tables are populated with
data.
The other chapters of this manual include fewer details concerning how to populate
tables and why these tables exist; instead, they focus on what information the different
tables and data fields are used to model.
Even if you are confident with relational database technology, you should not ignore
this chapter; it is this manual’s only discussion of employee and organization tables. It
will also further familiarize you with Infinity’s database vocabulary.
A data model is merely a representation of constraints and rules for business behavior.
To model employee/organization relationships, you need to decide exactly what about
these relationships you want to record. Ultimately, for generality, we will model a
more general type of relationship — a person/organization relationship — to take
account of the fact that there may be people related to organizations of which they are
not necessarily employees.
To model relationships between employees and organizations, we will start with the
business rule that an organization employs many employees. There are four basic
parts to this simple rule: organizations, employees, the employment relationship, and
the fact that one organization might be related to more than one employee. In a
relational model, the nouns “employee” and “organization” become entities. The verb
“employ” describes the relationship between the nouns, and the one-to-many aspect of
organization employs
employee
The model above simply states that an organization employs many employees. To get
beyond this elementary level of abstraction, think about what you specifically want to
know about the employees and organizations. Much of this data, such as addresses or
phone numbers, serves to define a given employee or organization. These are the
descriptors, or adjectives, that could serve as attributes in our employee and
organization tables. However, the fact that addresses and phone numbers can apply
equally well to organizations and people suggests that, in fact, address information
should be broken out into a separate table.
To go further, suppose that we know we want to store, for each employee, a first, last,
and middle name, as well as an employee identification number and a job type
designation. Employee tables could be populated with this information.
However, it could be difficult to generalize these data. For example, what should be
done for people who are entered into the database, but are not employees? They, too,
would need to have their names entered and would need to be tracked by some type of
unique id (In this book and in the Infinity Data Model, the term “id” refers to a unique,
integral identification number assigned to each instance of an entity). This suggests
that the employees should first be entered in a more general person table before being
entered in a more specific employee-person table.
These are the types of logical considerations that lead to the development of the
Infinity Data Model schema. In the case of employees, these considerations are
resolved by creating two tables, a prsn table, and an emp_prsn table. The table prsn
will contain all people in the database, along with their names and a unique prsn_id
providing a retrieval key. For those people who happen to be employees, they will also
be entered in the emp_prsn table, where they will be retrieved by the same key, here
called the emp_prsn_id. A person that is not an employee such as a counterparty
contact would be listed in the prsn table, with a unique prsn_id, but not in the
emp_prsn table. Thus, there will be less rows in the emp_prsn table than there are in
the prsn table.
Because the emp_prsn table only contains information about employees, it can be
used to store information that we do not need to store for every person in the database,
4-2 Modeling Employees and Organizations Infinity Data Model Developer’s Guide
such as an employee identification number (emp_num in Figure 4-2 below) and a job
type designation (emp_type_code below).
prsn emp_prsn
As an aside, note that the above figure and all figures in this chapter do not include
every column included in the corresponding table in the Infinity Data Model. For
example, the prsn table has a few more columns than noted above. To include every
column might clutter the figures needlessly. For completeness, later in this chapter we
list every column in every table depicted here. Also, the Infinity Data Model Quick
Reference gives a complete listing of every table described here and elsewhere in this
book.
Organizations are modeled in the org table, where each record is identified by a unique
identification number. The org_id constitutes the entire primary key (also referred to
as “PK”) of the table. The org table also includes several attributes to store the
organization’s name plus a short name (an abbreviated name short enough to fit in the
selection menus displayed by the Infinity applications).
prsn_id (PK)
first_name
middle_name
last_name
emp_prsn
org
emp_prsn_id (PK)
org_id (PK) employs
org_id (PK)
name
emp_type_code
short_name
emp_num
Figure 4-3. Relationships between the organization, emp_prsn, and prsn tables.
Looking at the preceding diagram, we can see that the emp_prsn table performs
another task in addition to modeling employee-related information. It also helps to
resolve the dilemma of associating many prsn instances with many org instances.
Since the primary key of the emp_prsn table is made up of the key attributes from the
org table and the prsn table, the emp_prsn table records which persons work for which
organizations.
As mentioned at the beginning of this chapter, we also want to model other types
relationships between persons and organizations, even if these relationships cannot be
characterized as employment. Figure 4-3 above shows how the emp_prsn table helps
to resolve the many-to-many relationship between persons and organizations, but the
emp_prsn table handles only employment relationships.
You saw in the previous chapter that many-to-many relationships are vague and non-
specific. With a many-to-many relationship, it would be impossible to tell which
person is related to which organization, and which organization is related to which
4-4 Modeling Employees and Organizations Infinity Data Model Developer’s Guide
person. To avoid modeling such a relationship, we create an associative entity called
prsn_org_relation:
prsn
prsn_id (PK)
first_name
middle_name
last_name
prsn_org_relation
org
prsn_id (PK)
org_id (PK)
org_id (PK)
name
short_name prsn_org_relation_code (PK)
job_func_code
job_title_str
Figure 4-4. An associative entity (prsn_org_relation) models the relationships between persons and
organizations.
To identify the person and organization involved, the prsn_org_relation table includes
the prsn_id, a foreign key migrating from an instance of the prsn table, and the org_id,
a foreign key migrating from an instance of the org table. The table also includes a
code word to indicate the nature of the relationship. This attribute is called the
prsn_org_relation_code and migrates from a list of valid types of person-organization
relationships. The prsn_org_relation_code also contributes to the primary key,
enabling the Data Model to handle multiple relationships between a person and an
organization.
To summarize the relationships described above: all persons have unique ids, and each
person would have a corresponding row in the prsn table. A person’s unique id is the
primary key in that table, stored in the column prsn_id. Persons who are also
employees will also be listed in the emp_prsn table. Their unique id will be the
primary key in the emp_prsn table, stored in the column emp_prsn_id. Persons who
are not employees will not be listed in the emp_prsn table.
Organizations have unique ids, and each organization has a corresponding row in the
org table. An organization’s unique id is the primary key in the org table, and it is
stored in the column org_id. The relationship between an organization and a person is
identified in the prsn_org_relation table.
The following excerpt from the Infinity Data Model Quick Reference offers a more
complete look at the prsn, org, emp_prsn, and prsn_org_relation entities.
prsn
prsn_id 0 Prsn_Id:int(4) PK
first_name 0 Prsn_Name:varchar(30)
middle_name 1 Prsn_Name:varchar(30)
last_name 0 Prsn_Name:varchar(30)
prefix_str 1 Prefix_Str:char(12)
suffix_str 1 Suffix_Str:char(12)
auth_b 0 Bool:bit(1)
auth_id 1 Auth_Id:int(4)
org
org_id 0 Org_Id:int(4) PK
org_ref_str 1 Org_Ref_Str:char(20)
org_name 0 Org_Name:varchar(255)
short_name 0 Org_Short_Name:varchar(20)
trading_unit_b 0 Bool:bit(1)
auth_b 0 Bool:bit(1)
auth_id 1 Auth_Id:int(4)
sequence_number 0 Sequence_Number:int(4)
emp_prsn
emp_prsn_id 0 Prsn_Id:int(4) PK prsn
org_id 0 Org_Id:int(4) PK org
emp_type_code 0 Emp_Type_Code:char(12)
emp_num 0 Emp_Num:varchar(20)
auth_b 0 Bool:bit(1)
auth_id 1 Auth_Id:int(4)
prsn_org_relation
prsn_id 0 Prsn_Id:int(4) PK emp_prsn
org_id 0 Org_Id:int(4) PK emp_prsn
prsn_org_relation_code 0 Prsn_Org_Relation_Code:char(12) PK
job_func_code 0 Job_Func_Code:char(20)
job_title_str 1 Job_Title_Str:varchar(30)
active_b 0 Bool:bit(1)
auth_b 0 Bool:bit(1)
auth_id 1 Auth_Id:int(4)
Figure 4-5. The prsn, org, emp_prsn, and prsn_org_relation tables excerpted from the Data Model Quick Reference.
The preceding excerpt from the Data Model Quick Reference lists all of the attributes
(columns) for each of the four entities (tables) being discussed. For each attribute,
Figure 4-5 lists four types of information:
4-6 Modeling Employees and Organizations Infinity Data Model Developer’s Guide
what order to create instances of tables; to maintain data integrity, you should
not create a table which takes data from a table which does not yet exist.
• a datatype designation specifying the type and size of data the attribute may
contain. All attributes are datatyped with Infinity types, as well as the native
Sybase types. This contributes to relational integrity and portability.
• the notation “PK” if the attribute contributes to the primary key of the entity.
• the name of the parent table if the attribute is a foreign keys attribute. This is
useful in maintaining relational integrity.
The names of most attributes indicate the information they are intended to store. On
reading the attribute names above, other types of information may come to mind
which do not fit into the available attributes. Additional information concerning
persons and organizations will be stored in separate entities, linked to the prsn or org
entity by foreign key attributes. Separating out this kind of data, which is likely to be
repeated many times, makes the database more flexible and more efficient.
Every organization is either a legal entity or a non-legal entity. Legal entities have a
legal country of residence, and a legal standing as an exchange, a financial institution
or a non-financial institution. Non-legal entities are subsidiaries of legal entities, and
hence have a ‘parent’ organization. Non-legal entities can have non-legals as parents,
provided there exists one non-legal in the organization hierarchy that has a legal
parent.
Legal Organization
The database table legal_entity stores information about legal organizations. The
database table non_legal_entity stores information about non-legal organizations.
version 5.2 Other organization relationships captured in the Infinity Data Model 4-7
Every organization has an entry in the table org, and then also one in either
legal_entity or non_legal_entity.
The organization tables listed so far are used to model all entities, regardless of
whether they lie internal to your organization, or represent counterparties to it. For
front office activity, this information would suffice. For back office activity, however,
we need a way to distinguish “us” from “them”.
To capture this information, the Infinity Data Model includes the concept of a primary
business entity. The primary business entity, or pbe, is a legal entity within your
organization that has no parents. All entities internal to your organization are
descendents of the primary business entity.
Besides the pbe, some of the other tables in the Infinity Data Model need to
distinguish “us” from “them”. These tables usually contain two columns, one headed
subject_org_id and the other headed object_org_id. With a few exceptions, the
organization listed as subject is an organization within the pbe hierarchy. The
organization listed as object is an organization outside of the pbe hierarchy. All
organization ids in these other tables are foreign keys migrating from the org table.
The processing organization is stored in the table process_org. Like the pbe_org_id,
the process_org_id is a foreign key, migrating from the org table. This organization
may be either a legal or a non-legal entity.
As there can be multiple processing organizations, each one processing advices for
different products or different child organizations within the pbe hierarchy, we need
some way to capture the relationship between processing organizations and the
organizations they support. This relationship is captured in the table
process_org_coverage.
4-8 Modeling Employees and Organizations Infinity Data Model Developer’s Guide
Modelling relationships between organizations
Some of the organizations contained in the org table have specific relationships to
each other. One organization can be a counterparty to another, a broker for another, or
a nostro agent for another.
If two organizations have any relationship between them, there will be an entry in the
table cpty for which the subject_org_id, object_org_id pair will be identical to the
org_ids of the two organizations. There will also be one or more entries in the table
cpty_role -- one entry to describe each type of relationship. In other words, if one
organization is a nostro agent and also a trading counterparty to another organization,
there will be one entry in cpty and two entries in cpty_role.
The column auth_id identifies a unique row in another table, auth_status. In other
word, auth_id is the primary key in auth_status. The table auth_status stores
authorization information -- who entered the information and when, who authorized it,
and when. As with the separation between prsn and emp_prsn, the Infinity Data
Model has separated the information to be authorized from information about the
authorization itself.
Many tables in the database exist primarily to store data for other tables. These are
called foundation tables and include the domain table, list tables, quote tables, and
seed tables.
Some of the foundation tables come with data pre-loaded by Infinity. All pre-loaded
data is reproduced in the Infinity Data Model Reference Guide.
This chapter also includes a short section on issues you should be aware of when
customizing the Infinity Data Model.
For simplicity, this chapter refers to the domain and list tables individually, instead of
referring to the single infsys_montage_lists or infsys_montage_domains.
The domains store codes and ranges of acceptable numerical values. The primary key
for each table is a _code value. For example, the primary key of the
curve_usage_domain is curve_usage_code.
The domain_name is the historical name of the table where each row in
infsys_montage_domains came from.
The name of the _code column is always based on the domain_name, with the word
“code” replacing “domain.” The _code column contains a word or abbreviation which
identifies the code. This is the value which users see when choosing from a domain in
the Infinity applications.
The montage_group_code column contains a code designed to let you and Infinity
know which instances of the domain table were created by whom. When Infinity ships
the database, every montage_group_code is ‘INFINITY.’ When you start creating
your own codes, you will give them your company’s unique group code. This group
code should be stored in the table infsys_montage_group_code.
The Infinity applications, on start-up, will load all static domain and list data for
which the montage_group_code is INFINITY. To get Infinity applications to load data
for other group codes, the entry in the table infsys_montage_group_code
corresponding to your group code should have infsys_action_code = Load.
The inf_enum column contains an integer representation of the code, which can be
used within applications as an enumerated type. The integer representation is designed
to speed application execution, and is used in particular by the Infinity Fin++ Class
Libraries. Be sure not to duplicate inf_enum values when adding your own instances
of domains.
All domains are shipped with pre-loaded data. This data represents the range of code
values that Infinity applications understand. Any changes to the contents of the
_domain table should be done extremely carefully, since the Infinity applications
Note that the term_domain is an exception to the rule that you should not add data to
the domain table. Applications users can add instrument maturity terms to the
term_domain table as needed using the Define Term window of Infinity Curve
Manager. Consult the Infinity Curve Manager Reference Guide for information on
using the window.
tick_size_domain Describes how large a tick value is, from one unit to
one-1,000,000th.
Figure 5-1. Domain tables and the purposes of the domain codes
Note that these domains also serve as the parent tables for foreign keys in many other
tables within Infinity. These foreign key relationships indicate that when you insert or
modify a value in the child table, you must check it against the parent domain table for
a matching value.
As in the domains, the list data is also represented as character codes. For example,
the city_list table contains codes for various cities: ‘NYC’, ‘LON’, etc.
The list tables are shipped with pre-loaded data. This data represents the range of code
values pre-defined within Infinity. The purposes given below are the purposes of the
codes as they are shipped by Infinity; you may want to add your own codes that
expand on these purposes. Consult the List Tables chapter of the Infinity Data Model
Reference Guide for a complete list of the List Table values shipped by Infinity.
Figure 5-2. List tables and the purposes of the list codes within these tables
Special care should be taken when changing (and deleting) values in the list tables, in
order to maintain the integrity of the data which has already been entered into the
database. As with domains, there is no check in the data model to ensure data
integrity.
Note that these list tables serve as the parent tables for foreign keys in many other
tables within Infinity. These foreign key relationships indicate that when you insert or
modify a value in the child table, you must check it against the parent list table for a
matching value.
For example, the hol_header table includes a column city_code. When inserting or
modifying a record in the hol_header table, you must match the value of the city_code
column with an entry in the city_list table. Otherwise, you will lose data integrity.
Quote Tables
Two tables provide histories of quotes pertaining to securities and reference indexes.
These tables end in _quote. The sec_quote table stores a quote history for securities.
Similarly, the ref_index_quote table maintains a history of quotes for reference
indexes. These tables can be populated directly, through Infinity applications, or
through third-party live feeds.
Live feed population of quote tables through the Infinity application Middleman,
available beginning with Infinity v5.2 products, requires configuration of the
corresponding _address table. Specifically, to set up a live feed for specific reference
index values, you need to add rows to the table ref_index_address. To set up a live
Prior to v5.2.1, these id numbers were provided by a set of seed tables, each of which
furnished instances of an entity with unique, sequential numbers. Beginning with
v5.2.1, these seed tables have been dropped, and a different approach for generating
unique numbers has been implemented. Nevertheless, the concept of generating
unique numbers remains the same. If you are using v5.2 of the Infinity Data Model,
see page 22. If you are using v5.2.1 or later, read on.
Some database systems build the function of sequential record numbering into their
database engines. However, such a design precludes the portability found in the
Infinity design. The Infinity Data Model provides unique numbering by using
bucketed sequential numbers as identification numbers for database records.
In order to ensure the integrity of the data within Infinity, take care when altering the
tables that implement the number generation scheme in Infinity. These tables include
infsys_dist_seed_bases, infsys_seed_base_buckets, infsys_seed_bases, and
infsys_seed_partitions.
This section explains the details and outcomes of changes made to the seed tables in
version 5.2.1 to address a known deadlocking problem in the Sybase version of the
Infinity Data Model. To this end, Infinity consolidated the seed tables into a more
compact structure and created a stored procedure that provides seed values. Further
measures taken to address this problem included removing and redefining indexes and
by redefining a table, as explained in Appendix A.
version 5.2 Providing unique identification numbers for saved entities 5-15
advice_init_rule_seed
advice_seed
auth_seed
book_seed
curve_seed
expected_xfer_seed
general_ledger_action_seed
general_ledger_post_seed
general_ledger_rule_seed
hol_seed
legal_agmt_seed
login_failure_seed
model_interface_seed
org_seed
payment_engine_action_seed
payment_engine_rule_seed
payment_request_action_seed
payment_seed
prsn_seed
repo_group_seed
reval_action_seed
reval_rule_seed
risk_batch_run_seed
risk_batch_sec_reval_seed
risk_batch_seed
risk_curve_group_seed
risk_hedge_group_seed
risk_hedge_vehicle_seed
risk_perturb_group_seed
risk_perturbation_seed
risk_rpt_seed
sec_seed
sec_val_data_seed
stlmt_seed
trade_seed
trans_seed
valid_access_func_seed
var_data_seed
vs_seed
The impact of this change in 5.2.1 is minimal. Ultimately, however, there could be
some incompatibilities with work clients have done independently.
In the general scheme, the seed values may no longer be sequential. Any code written
to make use of sequential ids being assigned to consecutive requests will have to be
changed to remove this dependency. In version 5.2.1, however, the ids remain
sequential, because of the existence of sequential id dependencies in some of Infinity’s
code. When this type of dependency is removed from Infinity’s code, some of the ids
will lose their sequential characteristic. This will occur in a release subsequent to
5.2.1.
All Infinity supplied static data has had any relevant seed values reassigned to be
above two billion. All locations in the Infinity Data Model where these values
occurred have been updated accordingly. If a client, however, defined new tables that
contain references to Infinity static data, such as through a sec_id, that data will have
to be updated.
Last, if clients have written their own software making use of the old seed tables, that
code will have to change to make use of the stored procedure, infsp_getseed, that
performs the appropriate steps to obtain the next seed value for a seed base.
Furthermore, it is recommended that any additional seed tables clients have created be
merged into this paradigm, although that is not strictly necessary.
To correct this situation, a two-pronged approach was taken. The first tack was to
investigate the deadlocked transactions and determine where the deadlocks were
occurring, i.e. specific data and index pages. To address this part of the problem,
Infinity changed a number of index and key definitions and set a limit on the number
of rows per page for the sec_hol_city table. These changes are detailed in Appendix A.
The second tack involved a redesign of the seed tables. Consider that after the index,
key, and row limit changes, there were still performance and deadlock issues. The
reason is that the primary keys of the affected tables contain an id value from a seed
table. In all of the tables, the primary key was the seed value, or contained a seed
value. These seed values are sequential, which is not good for clustering, and so all the
transactions were serialized, waiting for the transactions ahead to complete.
After consideration of the Sybase white paper, “How Surrogate Primary Key
Generation Affects Concurrence and the Cache Hit Ratio,” (see http://www.sy-
base.com/Offerings/Whitepapers/) several approaches were considered.
One was to take the seed value and reverse the bit order before using it as a seed.
Another was to generate random seed values. Both these approaches were dropped,
however, in favor of using the simpler concept of seed buckets.
version 5.2 Providing unique identification numbers for saved entities 5-17
Summary of changes to Infinity’s seed generation structure
To see what this means, consider the following three tables with sample data.
infsys_seed_partitions
The first table, infsys_seed_partitions, simply maintains data describing the defined
partitions. The partition_id is used as part of the primary key in the other two tables.
This table is self-explanatory. Note that the zero partition is used for Infinity Static
Data and describes a range of values of seed_bases. This is discussed more below. The
inclusion of the partition concept was done to facilitate the use of replication.
Table name: infsys_seed_partitions
(In this document, column names to the left of the double line are primary key fields.)
infsys_seed_bases
The next table, infsys_seed_bases, is basically the header table for the various seed
bases within a partition. The example data shown below include entries for ‘sec’
which has multiple buckets and for ‘vs.’ which does not. The number_of_seed_buckets
field, of course, specifies the number of buckets assigned to a seed base. The interval
field is used by the algorithm that produces the variations in the bucket_start field in the
infsys_seed_base_buckets table, and is discussed in Section below. The initial_bucket_id
specifies the bucket to be used first; it is initialized to one. The active_bucket_id is the
most recently used bucket. It is initially zero, but after the first seed value is assigned,
it will cycle repeatedly from one to the number of seed buckets for that seed base. The
bucket_length is the length of the bucket or buckets associated with a seed base within a
infsys_seed_base_buckets
The third table is the detail table for the seed bases within a partition. For each bucket
associated with a seed base and partition, the initial seed value in the bucket and the
current seed value in the bucket are specified.
Note the value of 2,000,000,963 for the current bucket value for the zero partition for
the sec seed base. This means there are 963 static data values for sec.
Of more importance are the bucket_start values for the eleven buckets for sec. The
difference in values between any two adjacent buckets is either 50,000,000 or
60,000,000. This is the maximum difference achievable, and is generated by the
Optimal Interval Algorithm using the number_of_seed_buckets and interval values from
the infsys_seed_bases table. The three supported algorithms for generating these
records are given in Section below.
Table name: infsys_seed_base_buckets
version 5.2 Providing unique identification numbers for saved entities 5-19
Implementation schedule for bucketed seeds
In 5.2.1, all seed bases are given a single bucket of length two billion in partition one.
The above example shows eleven buckets for the sec_id. This bucketing will be
implemented in a subsequent release, once the Infinity applications have been
converted. Other ids that will have multiple buckets are curve_id and trade_id, and
possibly others. Each of these will have their bucket ranges determined by the Optimal
Interval Algorithm.
In the future, clients may alter the values after doing an installation by looking at the
populate.csh shell script in $INFINITY_INSTALL/montage/schema/bin. This script
generates the appropriate INSERT statements based on the number of buckets selected
and the interval algorithm chosen. Alterations of the default on an upgrade are much
more difficult and should be done with caution. In version 5.2.1, however, these values
should not be altered.
The stored procedure, infsp_getseed, that the Infinity DBAPI (database application
programming interface) executes to obtain the next seed value for a given seed base,
automatically cycles through all the available buckets. Thus, in the case of sec, in the
above example, consecutive sec_id values will differ by at least fifty million. This
distributes both the data and the indexes across pages rather than having consecutive
transactions store values on the same data and index pages.
Note that clients who have implemented different schemes independently can easily
incorporate their work into this framework. All they need do is convert their method
into a stored procedure called infsp_getseed, give it the same signature as Infinity’s
infsp_getseed, and then replace the provided copy of infsp_getseed with their own.
Of course, no such scheme should be implemented until after the Infinity applications
no longer depend on ids being sequential.
Again, this was with five TransDup processes, each running hundreds of transactions
as fast they could.
Note, however, that a redesign of the audit database system has been completed and a
prototype implemented. With this in place, the characteristics on the severely stressed
system look like:
• Percentage of transactions deadlocked: 2.4%
• Average time to execute transaction: 7 seconds
This audit database redesign will be incorporated into a release subsequent to 5.2.1.
a1 = 1
ai =
{ I +ai-1, if I + ai-1 <= N
If N and I have No Common Factors, i.e. common factors other than one, then
{1,...,N} = {ai / i = 1,...,N}.
version 5.2 Providing unique identification numbers for saved entities 5-21
Note, regardless of the algorithm chosen, the database is populated according to the
rule:
I=1
Clearly, for I = 1, N and I have no common factors and the definition of the sequence
implies
ai = i for i = 1, ..., N.
Select I and N such that I and N have no common factors. Then calculate the ai’s based
on the sequence definition. See the example of N = 10 and I = 7, above.
if N is even then
if N = 2 then I = 1
else
if N/2 is even then
I = (N/2) + 1
else
I = (N/2) + 2
endif
else
I = ceil(N/2)
endif
This algorithm guarantees that N and I have no common factors and that the ai’s are as
far apart as possible.
Documentation of Proofs
In order to ensure the integrity of the data within Montage, the seed tables should not
be altered without the assistance of Infinity Technical Support. In order to enforce this,
all seed tables have a trigger to prevent insertion or deletion.
In v5.2, there are 27 seed tables in the Data Model, each one corresponding to a table
whose records will be keyed off of its id value (i.e. the trade table will be keyed off
trade_id, which will be taken from the trade_seed table).
If two users simultaneously access a seed table and retrieve that current id, then
neither of the users will have a unique value. This is a problem referred to as
concurrency.
begin tran
update <seed table> set <id name>=<id name> + 1
select <id name> from <seed table>
commit tran
The syntax above applies only to v5.2 and earlier databases. The first and last
commands delimit the commands to the database, grouping them in a transaction in
order to avoid concurrency problems. The second command increments the id value in
the table. The third command retrieves the id, and the final command concludes the
transaction. Locking and unlocking by using a database transaction is critical to
guarantee uniqueness for the retrieved id value. If you lock a table, other users must
wait until the lock is removed before they can query the table. (Note: you should
therefore consider handling this query on a separate database connection from other
routine database queries.)
You must use the above method when creating new records that use an id value as a
primary key. In order to create a new set of curve tables, you would first increment and
retrieve the curve_id from the curve_seed table. Having done this, you would then use
that one curve_id to insert data into all of the appropriate curve tables. If, for some
reason, the transaction fails, its particular id will be lost, and there necessarily will be
gaps in the id order of the records for those tables. Deleting old records also creates
gaps in the id sequence. This is not an issue for a relational database, but the user
should be aware of it.
However, you should avoid changing existing components of the Data Model. For
example:
• Dropping tables from the database would cause major problems for
Infinity applications and classes.
Contact Infinity Technical Support before making any changes to the Data Model.
The holiday section of the database stores holiday rules and actual holiday dates for
world financial centers. The hol_header table stores the rules for the holiday, while the
hol_data table stores the actual holiday dates.
Included with Infinity are Infinity’s holiday calendars for a predefined set of cities.
These calendars are listed in the Data Model Reference Guide. This chapter reviews
the methods used to store those holidays and shows how to define new ones.
specific_weekday_code
specifies on which day of the week this holiday occurs, using a weekday_code value
from infsys_montage_domains with domain_name = “weekday_domain”.
city_code
holds the three-letter city code where that holiday applies, using a code from the
infsys_montage_lists table with list_name = “city_list”.
easter_offset_day
tells how many days from Easter Sunday this holiday occurs (if applicable).
easter_related_b
a “1” indicates that the holiday is calculated with respect to Easter.
final_year
the final year for the celebration of this holiday, as stored in the database.
hol_name
the holiday’s name.
day
the day of the month of the holiday.
month
the month of the holiday.
sat_roll_offset_day
indicates on which day the holiday is observed when that holiday falls on a Saturday.
start_year
the first year for the celebration of this holiday, as stored in the database.
sun_roll_offset_day
indicates on which day the holiday is observed when that holiday falls on a Sunday.
Offset Days
Offset days are designed to track a holiday’s behavior when it falls on a weekend. If a
holiday occurs on a Saturday, check the sat_roll_offset_day entry. If that value is -1,
the holiday is observed on the Friday before. If that value is 2, the holiday is observed
two days later, on the next following Monday.
For example, if Christmas were to fall on a Saturday, it would be observed at the New
York markets on the Friday before. You could query the database to find that the offset
value is -1.
hol_id 12
city_code NYC
Figure 6-2. Sample hol_data values for Christmas 1998 in New York.
This table is denormalized in that the city_code is stored in both the hol_data and
hol_header tables. Given a hol_id number, you could get the city_code from the
hol_header table. However, this denormalization speeds database queries.
To find out all the hol_id numbers for all the instances of Whit Monday around the
world, you would execute:
Be sure to use the exact spellings for each of the holidays as found in the Holiday
Rules section of the Data Model Reference Guide.
hol_id 2 221 11
specific_weekday_code THU
easter_related_b 0 1 0
day 1 0 22
month 1 0 11
sat_roll_offset_day 2 0 0
sun_roll_offset_day 1 0 0
Figure 6-4. Three sample instances of the hol_header table, one for each type of holiday: absolute (New
Year’s), Easter-related (Good Friday), and specific weekday (Thanksgiving).
Note that Thanksgiving is celebrated on the fourth Thursday of November. The day
value of 22 indicates that Thanksgiving will be observed on the first Thursday after
November 21.
While offsets from Easter are stored in the database, Easter Sunday itself is not. The
database comes populated with data for such holidays as Easter Monday and Good
Friday, but it is up to the application programmer to determine the dates for Easter
Sunday itself. The Infinity Static Data Manager application will do this. If you need to
perform the calculation directly, the following simple program can be used (this
example is written in standard C++ code):
// easter.cxx
// calculate easter offset, given year
#include <iostream.h>
int
main()
{
int year;
return 0;
}
If you add a holiday through the Infinity Static Data Manager, the application will add
the holiday rules to hol_header, generate dates and add these dates to hol_data.
You do not need to use the Infinity Static Data Manager to add a holiday, but if you
don’t, remember to keep the two tables hol_header and hol_data synchronized. The
Infinity Data Model doesn’t have the ability to keep any pair of tables synchronized.
Removing a Holiday
The procedure of removing a holiday from the database requires interaction with both
the hol_data and hol_header tables. They have a dependent relationship.
Consequently, in order to completely remove a holiday, you need to execute two SQL
statements:
If you delete a holiday through the Infinity Static Data Manager, the application will
automatically execute these two statements. If you use another application, make sure
the application deletes the holiday from both hol_data and hol_header.
The hol_type_code values migrate to a number of security tables. These tables include
sec_hol_city, curve_hol_city, ref_index_hol_city, money_market_attribute_hol_city,
exchange_attribute_hol_city, bond_attribute_hol_city, and sec_hol_default.
Within the Infinity database there is a set of tables that share the prefixes trade_ or
trans_. These tables are designed to handle the information involved in actually
trading a security.
The trade tables contain information pertaining to the collections of trade legs. The
trade table has a trans_id number, which is a foreign key, that identifies trades as part
of a transaction. This table’s primary key is the trade_id. The trade represents the
actual exchange of instruments, and hence has information (such as dates and strings)
for tracking purposes. The trade is also typically connected to some relevant legal
information.
The pivotal table in the transaction/trade section of the database is trade_leg. This
table relates transaction and trade information to the security tables of the database.
Many trade legs can be involved in a given trade; most commonly there are two.
Instances of trade_leg pertaining to the same trade are given common trade_id
numbers, and a sequential trade_leg_id is added to make up the primary key
combination. Each trade_leg contains a sec_id corresponding to the actual financial
instrument which is being exchanged as part of this particular trade.
One example of a trade would be an exchange of a USD LIBOR cap for a premium
paid in USD. This one trade would foster two records in the trade_leg table: one for
the USD cap side and one for the USD currency side. The securities themselves (the
cap and the currency payment) are defined separately in the security tables.
trans trade
trade_leg security
table
trade
more trade legs
Figure 7-1. Table diagram relating trans, trade, and trade_leg tables.
Trades then consist of many trade legs. Each trade leg is associated with a security,
which points to the actual cash flows, and is organized through header tables.
For example, suppose you managed a portfolio of one hundred plain vanilla, fixed-for-
floating swaps. Using a stored SQL statement, a portfolio instance would define one
hundred trade records as members of that portfolio. Each of these trades might be the
child of a different transaction instance.
Each trade table would be the parent to two trade_leg instances; one for the floating
side of the swap, and one for the fixed side. Each trade_leg would then have one sec
(security) record storing general information about that fixed or floating leg (such as
when it was created, who created it, etc.).
The characteristics of each swap leg (timing, rates, fixed or floating, etc.) are then
stored in swap_leg_header tables. These header records are the parents to many flow
records, each of which models a payment related to the trade leg. Figure 7-2 illustrates
the tables used to model a fixed-for-floating swap in the Infinity Data Model, as well
as the relationships between these tables.
7-2 Transaction and Trade Tables Infinity Data Model Developer’s Guide
trade_leg sec swap_leg flow
header
fixed
transaction trade
floating
Currencies themselves are also defined as securities (see page 9-3). A purchase of a
government bond in return for a payment of US dollars would be modeled in two
trade_leg tables: one for the bond, and one for the dollars used to buy the bond.
A portfolio of trades would typically be those you would want to analyze in a group,
especially for risk analysis purposes. You might want to define a portfolio of JPY
swaps so you could calculate your exposure to that currency. For more information on
defining and using portfolios in the Data Model, see Chapter 13, Portfolio Tables.
The use of these tables will be illustrated by the following simple trade: Bank_A buys
US$100,000 face value of 10-year US Treasury bonds (when issued on the secondary
market) from Bank_B at a price of 98.00. The example on the following pages will
The first thing you must do when creating a new transaction in the trans table is to get
a unique trans_id. Once you have this unique trans_id, use it for identifying your
transaction when inserting and retrieving records.
trans_id 523
entered_user_code fodev_user_1
The trans_id of 523 is a sample value; the entered_user_code is the current user’s
login name; the update_datetime is the current time, using the Sybase function
getdate().
If you are using the Infinity applications, or if you are using another application built
using the Fin++ Class Libraries, the values in the trans table are automatically set.
The trades involved in this transaction can then get the same trans_id number as a
foreign key to be identified as part of the same transaction.
7-4 Transaction and Trade Tables Infinity Data Model Developer’s Guide
The trade table
Having populated the trans table, you must then create a trade to represent the bond
purchase. The trade will also need a unique trade_id.
Once you have a valid trade_id, create a new trade record. The following entries
correspond to the current example:
trade_id 530
entered_user_code fodev_user_1
quote_price 0.980000
reference_str NULL
indentification_str NULL
trade_status_code BOOKED
trade_type_code MARKET
trader_prsn_id 4
trans_id 523
verified_user_code NULL
update_user_code NULL
process_org_id 3
subject_org_id 1
sales_prsn_id NULL
sequence_number 1
Figure 7-4. The trade table, populated with sample data to model a US Treasury bond purchase.
The trade_id of 530 is a sample value. Typically this will be greater than or equal to
the trans_id.
The remark is a text field where you can enter a description of the trade.
The reference_str and identification_str attributes are both fields you can use to record
any in-house numbering schemes for this trade. For example, you could use these
fields to record numbering schemes leftover from old systems.
The settlement_date is the date on which the trade actually begins. The trade_date is
the date on which the trade was agreed to by both parties.
The trade_status_code gives the organizational status of the trade (such as whether it
is booked or pending). The trade_status_code is a foreign key, migrating from
infsys_montage_lists with list_name = trade_status_list.You can add other statuses if
necessary, but if you do so, and if you use the Infinity application Trader, you will also
have to modify the access permission tables or no user will have permission to save
trades with your new status. See Chapter 15 on access permissions. Note that the
Infinity risk management applications are configured to only recognize trades that
have at least pending status. The Infinity back office applications are configured to
only recognize trades that have at least booked status.
The trader_prsn_id is the identification number of the trader responsible for this trade.
It is not required that the trader be a user of the system; this person only needs a
person identification number, not a user name. This value migrates from a prsn table;
trader_prsn_id is a role name.
The trans_id is the id of the parent transaction. The identification number migrates
from the trans table as a foreign key. The update_datetime records the current time.
The subject_org_id is the organization id (from the org table) of the primary
organization involved in the trade. This is kept separate from the counterparty
organization in order to allow the trade to be viewed from any party’s perspective.
(These counterparty organization id’s will be logged in the trade_leg_org_partic
table.)
7-6 Transaction and Trade Tables Infinity Data Model Developer’s Guide
Creating the two trade_leg tables for this trade
In our US Treasury example, this trade will be modeled with two trade_leg table
records: one for the bond (sec_id 2006) and one for the cash (sec_id 1011) that is used
to purchase it (see the chapter on security, Chapter 8, for information on modeling
cash securities in the sec table).
trade_leg_id 1 2
accrued_interest_amount 0 0
Figure 7-5. Two instances of the trade_leg table, one for each leg of a US Treasury bond purchase.
Notice that prior to creating this trade, the traded securities must have already been
defined. In this case, those securities are the US Treasury bond (sec_id 2006) and US
dollar currency (sec_id 1011). The assignment of a sec_id to a trade_leg record
represents the link between the trading portion and the security definition portion of
the Infinity Data Model.
The primary key for the trade_leg table is made up of the trade_id and the
trade_leg_id. The trade_id comes from the trade table, and the trade_leg_id is
sequential, starting at 1.
The trade_amount is the amount of the security represented by the trade leg. In the
case of a bond, this is the total principal amount of the bond(s) in the trade leg. Our
$100,000 bond is entered as a trade_amount of 100,000 in the PRIMARY leg.
The trade_amount for the SETTLE leg was calculated by taking the amount for the
PRIMARY leg times 0.98 (the price of the bond as a percent of par). Please note that
In the case of a swap, the trade_amount is one, indicating that the trade_leg represents
one swap leg valued at the principal amount specified in the corresponding
swap_leg_header entry.
530 BROKER 6
Figure 7-6. The trade_org_partic table, showing that org 6 acts as broker on trade 530.
If there is a broker with a non-standard commission, the broker fee and broker
currency would be stored in the table trade_commission. For our example, we assume
7-8 Transaction and Trade Tables Infinity Data Model Developer’s Guide
the broker fee is standard and thus there would be no entry in trade_commission for
trade_id 530.
For each leg of a trade you must identify how the organizations involved participated
in the trade_leg_org_partic table. These organizations are recorded by their org_id,
allowing them to be identified by their records in the org table. They have participant
codes, indicating whether they are the payers (deliverers) or receivers of the
instrument associated with that trade leg.
In this example, as Bank_A buys the bond (leg 1), it will be the receiver, and Bank_B
will be the payer of this leg. Assuming that Bank_A has org_id “1” and Bank_B has
org_id “14” in the org table, then the trade_leg_org_partic entries would be:
530 1 PAY 5
530 1 RECEIVE 1
530 2 PAY 1
530 2 RECEIVE 5
Figure 7-7. The trade_leg_org_partic table, showing that org 1 receives leg 1 in return for payment of
leg 2.
You can also record any number of additional participants to the trade_leg as paying
agents, legal agents, etc. You could add new codes to the infsys_montage_domains,
where domain_name = partic_type_domain, to include any kind of participation. It is
important that you accurately record which institutions are involved in every
trade_leg, because this information is used for portfolio analysis and operations
functions. You must have accurate participation records to calculate exposure to the
risk of counterparty default.
The table trading_book for our example environment might look like this:
book_id 1
book_name BOND_BOOK
acct_org_id 1
remark NULL
auth_b 1
auth_id 123
Figure 7-8. The trading_book table, showing the book_id for the book named BOND_BOOK.
In the table trading_book, the field acct_org_id identifies the organization that owns
the book listed. It is a foreign key, migrating from the org table.
Given the above, for our bond example, the table trade_leg_book_alloc would then
look like:
trade_leg_id 1 2
book_id 1 1
7-10 Transaction and Trade Tables Infinity Data Model Developer’s Guide
Recording pricing information for a trade
For each leg of a trade, it is possible to record the pricing curve or curves that were
used to calculate the price of that leg at the time when the trade was saved. It is
important to note that this information should be associated with the trade leg and not
with the security itself, since a security may be multiply traded (in different legs) and
priced off of different curves each time. The details of the curve (in particular, its id
and its usage) are recorded in the trade_leg_val table. In order to find out more about
the curve, it will be necessary to query the curve tables for the corresponding curve_id
and curve_datetime.
Note the field sec_id in the trade_leg_val table. This field is required so that
underlying securities, such as the swap legs that underlie a swaption, can be priced
independently from the primary security. The primary security is stored in the table
trade_leg.
trade_id 530
trade_leg_id 1
sec_id 2006
curve_usage_code DISCOUNT
curve_id 36
curve_matrix_id NULL
interp_code LINEAR
curve_side_code MID
curve_basis_shift 0
volatility_type_code NULL
Figure 7-10. The trade_leg_val table, showing that curve 36 was used to
discount the cashflows associated with trade leg 1.
subject_org_id 5 5 1 1
object_org_id 1 1 5 5
stlmt_id 36 37 52 53
auth_b 1 1 1 1
Figure 7-11. The table trade_stlmt, showing the instructions for the bond example.
Trade info codes migrate from infsys_montage_domains. Like other domain codes, if
you add a trade info code, you have to recompile the applications to get your code
recognized by Infinity applications. Also, trade info codes are added automatically by
Infinity applications; that is, an end-user using the Infinity applications cannot specify
a particular trade info code for a particular trade.
In contrast, the table trade_keyword stores extra codes that a user can define and attach
to particular trades. These keywords can be used to drive back office processing, risk
management, or grouping of trades for reporting purposes.
Trade keywords are just that: keywords. They do not permit a user to attach extra
comments alongside. For that purpose, use the table trade_attention. This table
permits you to attach a trade attention code and a remark for that code.
You can write applications that permit end-users to specify values you will store in the
table trade_info, but we don’t advise this practice. Instead, keep the distinction
enforced by the Infinity applications: use trade_info to store information
7-12 Transaction and Trade Tables Infinity Data Model Developer’s Guide
automatically; use trade_keyword to store user-specified information without adding
comments; use trade_attention to store user-specified information with comments.
The security tables within the Infinity Data Model store the parameters for the
derivative securities (also known as instruments) exchanged by a trading desk. The
tables contain the information needed to characterize and price derivatives
instruments.
In the interest of brevity, this chapter does not attempt to describe every security, and
every header table. In particular, the header tables for asset options, bond futures,
equities and equity derivatives, spreads, and when issued bonds are not described here.
For a description of the information stored in these tables, contact Infinity support
personnel.
The sec table contains general descriptive information that characterizes a security.
Every security in the Infinity Data Model requires a record in the sec table. The
primary key for the sec table is the sec_id.
Along with the sec table itself, there are other tables that store information common to
most or all securities. Following is a brief listing of those tables which will be
discussed in this chapter, and their functions:
sec_relative if a security’s start and maturity dates are defined relative to a given
date, this table stores those offset terms
The _header tables make up the second tier of the security table hierarchy. There is
one _header table for each type of security. A _header table stores the information
that characterizes a specific security (e.g. maturity date, coupon frequency, fixed rate,
floating rate index, compounding parameters).
For each row in the sec table, there is one row in the appropriate _header table. The
Infinity Data Model includes the following _header tables:
bond_header bonds
equity_header equities
spread_header spreads
bond_attribute bonds
Currency Securities
Currencies are modelled as securities, using the sec table. For example, in the
purchase of a government bond in return for a payment of US dollars, the dollar
currency payment would be modelled as a trade_leg with a sec_id identifying the
security of the trade leg as US dollar currency.
Each national currency is modelled only once in the sec table, with a sec_type_code
of ‘CURRENCY’ and a currency_code identifying the currency being modelled. The
currency_code value migrates from the infsys_montage_lists table with list_name =
currency_list.
To create a currency security using the Infinity applications, use the Spot FX Rates
window and select the command ‘Add Cur Pair’ (the Spot FX Rates window can be
accessed via the Utilities menu in the FX Arbitrage module of Trader). Currencies
must be added in pairs, with a cross rate saved to the sec_quote table listing the value
of the secondary currency in terms of the primary security. The Currency Pair window
allows you to create currency securities for any supported currency_code in the
infsys_montage_lists table, and the Spot FX Rates window allows you to enter
currency cross rates.
Foreign Exchange
The Infinity Data Model does not include a foreign_exchange_header table. This is
because FX trades are the simple exchange of one currency for another on a date. The
currencies of these transactions are modelled in the database as separate securities
with a sec_type_code of ‘CURRENCY.’ If the US dollar security is sec_id 1 and the
Since currencies are saved to the database in pairs, each currency saved using the
applications will have an entry in the fx_quote_style table for each other currency for
which cross rates are stored. Before an FX trade may be modelled, the currencies to be
traded must be specified as a valid currency pair in the fx_quote_style table, and a
cross rate for the pair must exist in the sec_quote table. See the preceding section on
currency securities for information on using the applications to add currency pairs and
cross rates.
Spreads
The spread_header table is an operational table designed to allow spreads to be added
to bonds using Infinity’s applications. It is not intended as a means for defining spread
securities. The structure of the spread_header table is documented in the Data Model
Quick Reference.
To apply a spread to a security, use the spread-related fields in the _header table
associated with that security. For example, to apply a spread to a swap you would use
the compound_spread_rate and ref_index_spread_rate fields in the swap_leg_header
table.
Flow tables
The third tier of the security tables consists of the flow tables. The tables flow and
flow_calc_reset characterize the cashflows generated by securities. There is one row in
the flow table for each cashflow generated by a security. The sec_id migrates to the
flow tables from the corresponding _header table. Securities that generate cashflows
include swaps, caps/floors, and bonds. See Chapter 9, Flow Tables, for more
information.
The sec_id field is the primary key of the sec table. When creating a new security in
the Infinity database, at least five fields must be populated with data to identify it:
sec_id, sec_def_code, sec_type_code, sec_product_code, and leg_type_code.
As an example of an entry in the sec table, consider a standard vanilla swap: 2-year
US dollar fixed 4% for 6-month US dollar LIBOR.
Assume that the sec_id of the fixed leg of the swap is 2329 and the sec_id of the
floating leg is 2330.
The fixed leg and floating leg would be recorded in the sec table as follows:
Figure 8-5. Entries in the sec table for the fixed leg and floating leg of a vanilla swap.
Worldwide holiday data is needed to insure that each security’s payment and reset
dates coincide with the banking calendar(s) of the trading center(s) in which it is
traded. This information is stored in the sec_hol_city table. See the Holiday Tables
chapter for details about defining holidays in the Infinity database.
The sec_hol_city table is structured so that a security can be associated with multiple
cities. The structure of the table is as follows:
Notice that the primary key consists of the first three fields. Therefore, a given sec_id
value can appear in multiple rows of the table. One security can have zero, one or
many holiday cities, and the holidays can apply to payment dates, reset dates, or both.
Infinity is planning to stop support for Sybase System 10 with v5.3. Starting with that
release, the filler field will be removed and max_rows_per_page will be implemented
in its place.
Figure 8-7. Entries in the sec_hol_city table applying holidays to the swap legs.
The sec_quote table stores the historical prices of individual securities. Because the
quote_datetime field is part of the primary key of the table, new price quotes for
securities can be appended to sec_quote and uniquely identified by their time stamp.
The sec_quote table has the following structure:
Since the sec_quote table stores the quoted prices for each security over the entire
history of each security, the table will grow to contain a very large number of records.
Database administrators should monitor the size of the table and delete unwanted
records in order to enhance database performance.
To demonstrate the use of the sec_quote table for foreign exchange, take the example
of a US-dollar-for-Canadian-dollar exchange. An entry in the sec_quote table might
be as follows (where security 1011 is USD and security 1013 is CAD):
sec_id 1011
settlement_sec_id 1013
quote_type_code MARKET
bid_value 1.60
offer_value 1.60
settlement_term NULL
quote_method_code PRICE
update_datetime NULL
Figure 8-9. Entries in the sec_quote table for exchanges of USD for CAD.
sec_id 55 55
Figure 8-10. Entries in the sec_quote table showing bid and offer values for a futures contract.
In the above entries, the quote values were entered by hand via an Infinity application;
however, the database could be linked to a live quote feed to have prices automatically
entered in the table.
The sec_relative table provides a way to define all over-the-counter securities in terms
of relative dates (a specified term but no specified start and end dates) instead of
absolute dates. In the sec_def_code field of the sec table, a security is defined as
‘RELATIVE’, ‘SPECIFIC’, ‘ONLY_UNDERLYING_RELATIVE’, or
‘ONLY_UNDERLYING_SPECIFIC’. If the security is to be defined relatively, an
entry in the sec_relative table is needed for that security.
Infinity applications require the use of relatively defined securities for the generation
of some interest curves. For example, to generate a CP-LIBOR spread curve, the
Infinity Curve Manager application prices relatively defined CP and LIBOR swap legs
against market quotes.
Note that the terms used here are taken from the infsys_montage_domains table, with
table_name = term_domain. The term codes give number of days according to the 30/
360 day count basis, and hence must be interpreted by application code according to a
specified day count convention. For example, a maturity_term value of 180 means 6
months, but the actual number of days will be calculated at the time when a specific
start date and day count are designated.
sec_id 1003
Figure 8-13. Defining the relative term of a 6-month money market instrument with the sec_relative
table.
In the explanation that follows, the swap_leg_header table will be dissected in detail.
Since many attributes in the swap_leg_header table are common to other _header
tables, these attributes will be discussed in detail only in the section on the
swap_leg_header table. Thereafter, only the unique features of each subsequent
_header table will be highlighted.
The swap_leg_header table consists of forty-nine fields. These fields define the
essential aspects of both fixed and floating swap legs.
Below, you will find the columns of the swap_leg_header table listed in the order in
which they physically appear in the database. In the excerpt from the Data Model
Quick Reference below, each column is assigned a number between 1 and 49,
displayed to the left of the column name. In the column descriptions starting on page
8-17, the number of each field appears next to its name to help you cross-reference the
table structure below.
Navigating the forty-nine fields of the swap_leg_header table by their physical order
will not allow you to see the interrelationships between the fields. Therefore, the
columns have been massed into functional groups, as detailed in the chart on page 8-
16.
For a swap leg with a swap_leg_code of ‘FIXED’, the reset fields and the reference
index fields are not applicable; they should contain a NULL value. For a floating leg,
the only field that does not apply is the fixed_rate field.
Swap leg structures of ‘CUSTOM’ and ‘EQ_PRIN’ refer to the amortization of both
the fixed and floating legs. To model these swap legs, use the amortization fields,
payment fields, compounding fields, and flow calculation fields. If the swap leg is a
floating leg, characterize its rate resetting schedule and reference index parameters
with the appropriate fields.
The ‘BULLET’ and ‘FULL_CPN’ structures are non-amortizing fixed and floating
legs; leave the values of the amortization fields NULL. For fixed legs with these
structures, reset and reference index fields do not apply.
The amortization fields are only needed to describe swap legs in which the principal
amount is amortized.
The payment fields in the swap_leg_header table characterize the payment structure
of a swap leg. The payment fields differ from the flow fields of the swap_leg_header
table in that the payment fields describe the actual exchange of monies. The flow fields
store the parameters needed to calculate the payments.
Compounding fields apply to cases where the flows in a swap leg are calculated more
frequently than they are paid, e.g. calculated quarterly and paid semiannually. Stated
another way, whenever flow_calc_frq_code is more frequent than the
payment_frq_code, compounding occurs. Three fields in the swap_leg_header table
define the compounding characteristics of the swap leg interest flows:
The flow fields in the swap_leg_header table govern the calculation of a swap’s
cashflows. Most of the flow_ fields are populated with values from the domain tables.
Resets apply only to floating rates. For the fixed leg of a swap, the reset fields should
be left NULL. A reset occurs when a floating rate is set from a reference index. In the
standard floating rate swap leg, each flow calculation requires only one reset.
Common structures in the market are reset quarterly and calculated quarterly and reset
and calculated semiannually. The table design permits more complicated structures.
Indexes may be reset daily, then averaged for a payment calculation made quarterly,
for example.
The frequency of rate resetting is also related to the value in the flow_rate_calc_code
field. If the flow_rate_calc_code is ‘INDEX,’ then the flow rate is calculated from a
single index quote on a posted date; the reset_frq_code should be the same as the
flow_calc_frq_code. If the flow rate is calculated from an average
(flow_rate_calc_code of ‘AVG_UNWT’ or ‘AVG_WT’) of resetting events, then the
reset frequency should be more frequent than the flow_calc_frequency.
The ref_index_ fields describe the index against which a floating leg of a swap is set.
For a fixed swap leg, these fields do not apply; leave them NULL. The values in the
reference index fields must be consistent with the entries in the
ref_index_term_source table.
The fixed side is 2-year, semiannual, 4% (this record was generated using the Infinity
Trader application):
sec_id 2329
reset_calc_align_code NULL
reset_weekday_code NULL
flow_timing_code END_PER
swap_leg_code FIXED
structure_code BULLET
flow_calc_timing_code NULL
ref_index_currency_code NULL
ref_index_code NULL
ref_index_source_code NULL
ref_index_term NULL
amort_frq_code NON
act_notl_code NOTIONAL
amort_start_date NULL
compound_type_code NONE
compound_spread_rate 0.00
payment_date_roll_code MOD_FOLLOW
day_count_code ACT/360
initial_exchange_amount 0.00
final_exchange_amount 0.00
fixed_rate 0.04
flow_calc_frq_code NON
flow_rate_calc_code NULL
legal_agmt_code NULL
payment_lag_day_type_code BUS
sec_id 2329
payment_lag_term 0
payment_frq_code SA
principal_amount 1000000.00
ref_index_spread_rate 0.00
flow_calc_date_roll_code NULL
reset_frq_code NON
flow_calc_lag_day_type_code NULL
flow_calc_lag_term 0
flow_calc_start_date NULL
reset_period_term 0
accrual_date_roll_code MOD_FOLLOW
manual_reset_b 0
reset_cutoff_term 0
amort_pay_amount 0.00
ref_index_factor NULL
accrual_day_count_code ACT/360
reset_day_of_month 0
flow_calc_code SIMPLEINT
compound_calc_timing_code NULL
flow_calc_weekday_code NULL
reset_convert_before_average 1
Figure 8-16. The swap_leg_header table populated with sample data for a simple fixed swap leg.
sec_id 2330
reset_calc_align_code NULL
reset_weekday_code NULL
flow_timing_code END_PER
swap_leg_code FLOAT
structure_code BULLET
flow_calc_timing_code BEG_PER
ref_index_currency_code USD
ref_index_code LIBOR
ref_index_source_code T3750
ref_index_term 180
amort_frq_code NON
act_notl_code NOTIONAL
amort_start_date NULL
compound_type_code NONE
compound_spread_rate 0.00
payment_date_roll_code MOD_FOLLOW
day_count_code ACT/360
initial_exchange_amount 0.00
final_exchange_amount 0.00
fixed_rate 0.00
flow_calc_frq_code SA
flow_rate_calc_code INDEX
legal_agmt_code NULL
payment_lag_day_type_code BUS
payment_lag_term 0
payment_frq_code SA
sec_id 2330
principal_amount 1000000.00
ref_index_spread_rate 0.005
flow_calc_date_roll_code PRECEDING
reset_frq_code SA
flow_calc_lag_day_type_code BUS
flow_calc_lag_term -2
reset_period_term 0
accrual_date_roll_code MOD_FOLLOW
manual_reset_b 0
reset_cutoff_term 0
amort_pay_amount 0.00
ref_index_factor 1.20
accrual_day_count_code ACT/360
reset_day_of_month 0
flow_calc_code SIMPLEINT
compound_calc_timing_code NULL
flow_calc_weekday_code NULL
reset_convert_before_average 1
The amort_curve_spread_rate indicates the market spread between the rate of the
curve underlying the index used for amortization and the rate of the discount curve.
The amort_index_spread_rate is the contractual spread on top of the reference index
used for amortization.
version 5.2 Index Amortizing Swaps and the swap_leg_index_amort_header table 8-29
The amort_calc_date_roll_code defines how the amortization calculation date should
roll if it lands on a non-business day. The full range of possible values is stored in the
date_roll_domain. The amort_calc_lag_term indicates the number of days prior to a
period that the amortization rate is calculated for that period. The
amort_calc_lag_day_type_code indicates whether business days or calendar days are
counted when applying lag days to rate resets. The amort_calc_timing_code indicates
at what point during the period that index amortizing swap leg flows are calculated.
Three values (as listed in the flow_calc_timing_domain) are possible. A BEG_PER
flow calculation is made on the beginning date of the flow. An ARREAR flow
calculation is made at the end of the period. An ADVANCE flow calculation is made
in the previous period.
The following example is an index amortizing swap leg with a base rate of 3%, a
clean-up call of 1%, an amortization curve spread of 1%, and an amortization index
spread of 2%.
sec_id 2055
ref_index_currency_code USD
ref_index_code LIBOR
ref_index_term 180
ref_index_source_code ISDA
ref_index_factor 1.0000
ref_index_spread_rate 0.0000
base_rate 0.0300
clean_up_call 0.0100
lockout_period 1.002740
amort_from_original_b 1
interest_curve_spread_rate 0.0000
interest_index_spread_rate 0.0000
amort_curve_spread_rate 0.0100
amort_index_spread_rate 0.0200
amort_calc_date_roll_code NULL
amort_calc_lag_term 0
amort_calc_lag_day_type_code NULL
amort_calc_timing_code BEG_PER
The following table shows the entries for US Treasury bonds and Japanese
government bonds:
Figure 8-21. UST Bonds and JGBs defined in the bond_attribute table.
version 5.2 Bonds and the bond_attribute and bond_header Tables 8-31
Attributes apply to groups of bonds. The individual bonds themselves are defined in
the bond_header table. As in the case of the swap_leg_header table, the bond_header
table has one record for every bond defined in the database, and hence must have
fields to accommodate all types of bonds. Therefore, depending on the bond type,
many fields may be zero or null.
The following example shows sample bonds as entered through Infinity’s Trader
application.
payment_frq_code SA SA
settlement_term 1 0
ex_div_offset_day 0 0
version 5.2 Bonds and the bond_attribute and bond_header Tables 8-33
Table name: bond_header
tax_reclaim_offset_day 0 0
The data fields that govern the structure of the options are the cap_floor_cod, the
strike_price, and the binary_payoff_amount. The cap_floor_code determines whether
the security is a cap or a floor. The owner of a cap is compensated as rates raise above
a certain level; a floor owner is compensated as rates fall below a certain level. The
strike_price determines the level. In a standard cap or floor, the compensation equals
the difference between the strike price and the rate. If the cap is a binary cap or floor,
however, the compensation is a fixed amount. This fixed amount would be stored in
the field binary_payoff_amount.
This table structure offers flexibility in defining caps. You can construct an amortizing
cap by editing the principal_amount field in the flow table. Similarly, the term of the
index can be changed from flow to flow. This makes possible caps with short
underlying periods in the first or last flow, as well as caps where the term varies for
some other reason. For example, you can construct a 3-year cap which caps a 3-month
index for the first year and a 6-month index for the rest of the life of the deal. You can
also change the level of protection from flow to flow by changing the strike_price field
in the flows themselves. This makes it possible to construct a five-year cap, for
example, which begins with a strike price of 10%, and, over the life of the instrument,
moves to 14%.
version 5.2 Caps and Floors and the cap_floor_header Table 8-35
As an example of this flexibility, the following shows a 2-year, semiannual, 6% cap on
3-month USD LIBOR, on a principal of $1,000,000:
sec_id 1533
reset_calc_align_code NULL
reset_weekday_code NULL
flow_calc_code SIMPLEINT
flow_timing_code END_PER
structure_code BULLET
ref_index_currency_code USD
ref_index_code LIBOR
ref_index_source_code ISDA
ref_index_term 90
flow_rate_calc_code INDEX
amort_frq_code NON
amort_start_date NULL
cap_floor_code CAP
day_count_code ACT/360
flow_calc_frq_code NON
legal_agmt_code NULL
payment_date_roll_code MOD_FOLLOW
payment_frq_code SA
payment_lag_day_type_code BUS
payment_lag_term 0
principal_amount 100000000.00
flow_calc_lag_day_type_code BUS
flow_calc_lag_term 0
flow_calc_date_roll_code PRECEDING
reset_frq_code SA
flow_calc_start_date NULL
flow_calc_timing_code BEG_PER
sec_id 1533
strike_price 0.06
accrual_date_roll_code MOD_FOLLOW
manual_reset_b 0
ref_index_factor 1.00
reset_cutoff_term 0
reset_period_term 0
amort_pay_amount 0.00
compound_calc_timing_code NULL
reset_day_of_month 0
flow_calc_weekday_code NULL
binary_payoff_amount NULL
reset_convert_before_average 1
Futures and options are securities defined in terms of a trade that may take place in the
future. In the case of a futures contract, the future exchange of instruments is modelled
in the exchange_attribute table.
If the settlement method for the contract is by delivery of the underlying (this is
referred to as physical settlement), then the first_notif_date and last_notif_date define
the range of dates within which the seller must notify the buyer as to what actual
security is to be delivered. The fields first_ex_delivery_date and last_ex_delivery_date
define the ranges within which that delivery must occur.
The maturity_date is the date the obligations or rights associated with the contract
expire. If the settlement method is cash, then this is the last_trade_date, since no
physical delivery takes place. If physical delivery does occur, the maturity date is the
last exercise or delivery date ( last_ex_delivery_date).
The following table shows the exchange_attribute entries for the 3-month Eurodollar
money market futures series and the 3-month Eurodollar options series (based on
contracts in the futures series). Here the underlying security 1012 is a relative LIBOR
money market with a 3-month maturity term.
settlement_term 1 1
contracts_traded 40 20
Figure 8-29. The 3-month Eurodollar futures series and options series stored in the
exchange_attribute table.
sec_id 53 1386
option_underlying_sec_id NULL 53
Figure 8-30. Entries in the exchange_header table for March 1995 contracts on the 3-month
Eurodollar futures series and options series.
Table name
money_market_attribute
currency_code 0 Currency_Code:char(3) PK
money_market_type_code 0 Money_Market_Type_Code:char(12) PK
tick_size_code 1 Tick_Size_Code:char(12)
day_count_code 1 Day_Count_Code:char(12)
payment_date_roll_code 1 Date_Roll_Code:char(12)
payment_frq_code 1 Frq_Code:char(3)
quote_method_code 0 Quote_Method_Code:char(12)
settlement_term 1 Term:int(4)
accrual_date_roll_code 1 Date_Roll_Code:char(12)
money_market_header
sec_id 0 Sec_Id:int(4) PK sec
accrual_date_roll_code 1 Date_Roll_Code:char(12)
money_market_type_code 0 Money_Market_Type_Code:char(12)
fixed_rate 1 Rate:float(8)
issuer_inst_code 1 Inst_Code:char(12)
maturity_date 1 Date:datetime(8)
start_date 1 Date:datetime(8)
payment_date_roll_code 1 Date_Roll_Code:char(12)
settlement_term 2 0
Figure 8-32. money_market_attribute table entries for USD LIBOR instruments and T-Bills.
sec_id 1488
accrual_date_roll_code MOD_FOLLOW
money_market_type_code LIBOR
fixed_rate 0.063750
issuer_inst_code NULL
payment_date_roll_code MOD_FOLLOW
sec_id 2043
otc_option_underlying_code SECURITY
exercise_code EUROPEAN
put_call_code PUT
settlement_method_code PHYSICAL
settlement_term 0
strike_price 0.00
option_event_price 0.00
option_type_code SWAPTION
settlement_sec_id 2042
underlying_sec_id 2041
rebate_amount NULL
isexercisable 1
exercise_schedule_id NULL
The spread_set_name column contains the name of the bond/spread set. The sec_id
refers to the bond to be priced, using a benchmark plus a spread; the
benchmark_sec_id identifies the benchmark bond itself.
update_datetime indicates what time the spread value was entered or changed.
version 5.2 Bond Repurchase Agreements and the repo_header table 8-47
The following example is for an overnight repo, rolling principal only, with a 1%
haircut. This record was generated using the Infinity Repo Manager application.
sec_id 2750
repo_type_code O/N
repo_day_count_code ACT/360
repo_date_roll_code Unknown
repo_roll_method_code PRINCIPAL
cum_dividend_b 0
haircut 0.0100
repo_term 1
ref_index_currency_code NULL
ref_index_code NULL
ref_index_source_code NULL
ref_index_term NULL
The event_date is the date the event takes effect. The repo_rate is the loan rate for the
repurchase agreement. The collateral_id is the sec_id of the collateral bond. The
collateral_amount is the face value of the collateral bond. The collateral_price is the
value of the collateral bond after repricing. The principal_amount is the initial
principal used in repo valuation. accrued_interest is the total accrued interest on the
trade.
loan_event_id 1 2 3 4
Figure 8-41. The loan_event table, populated with sample data for a bond repurchase agreement.
The loan_event_flow_relation table connects a flow_id from the flow table with the
sec_id and loan_event_id combination, allowing you to determine which loan event
generated a specific flow.
version 5.2 Bond Repurchase Agreements and the repo_header table 8-49
Chapter 9
Flow Tables
In the Infinity Data Model, securities that contain cashflows (such as swaps or bonds)
store their cashflows separately in the flow table. This table identifies individual flows
by a combination primary key made up of both the sec_id and a sequential flow_id, so
that the flows can easily be identified with their security.
Once flows have been generated from the parametric definition of a security, they can
be analyzed separately from the security itself. However, it should be noted that if the
flows are edited directly, the connection to the security definition may be lost. It is also
important to note that the analytics necessary to compute cashflows are contained in
the applications or class library, and not in the Data Model.
All flows, regardless of type, are stored in the flow table. The types of allowed flows
are listed in the infsys_montage_domains, with domain_name = flow_type_domain.
The flow types include simple flows, such as principal, exchange, or fee flows,
calculated flows, such as interest or compound flows, and option flows. Therefore,
depending on the type of flow, many of the fields for a given record may be zero or
null. The application ensures that the correct fields are used for a given flow type.
Figure 9-1. The structure of the flow table. The “g, i, or o” column is not part of the database; it indicates whether a field is
designed for general identification, for index-related flows, or for option-related flows.
sec_id
The sec_id identifies the security with which the flow is associated, using a value from
the sec table. Note that cashflows cannot exist independently of their security.
flow_id
The flow_id distinguishes individual cashflows. Along with the sec_id, this makes up
the primary key. For each new security, the initial flow_id will be one, and additional
cashflows will be numbered sequentially.
Note that when the Infinity applications are used to regenerate a security’s cashflows,
the old cashflows are deleted from the flow table, and the new cashflows are numbered
starting with an initial flow_id that would have been the next number in the security’s
old flow_id sequence.
For example, if one regenerates the cashflows for a security whose cashflows have the
flow_ids 1-8, the flow table will contain cashflows with flow_ids 9-16 after
regenerating. The entries in the flow table for the combination of the security’s sec_id
and flow_id numbers 1-8 will have been deleted.
flow_amount
This field stores the amount of money in the flow. If the amount of the flow is still
undetermined, this field is 0.
flow_date
The flow_date is the date on which the flow occurs.
flow_term
This field is not implemented in version 5.2.1.
flow_type_code
This code migrates from the flow_type_domain. Flows of notional principal, for
example, are indicated as NOTL_PRIN; actual principal is encoded ACT_PRIN;
INTEREST indicates interest flows. This field is not allowed to hold a NULL value;
for each flow, you must identify a type.
sequence_number
This code is used to ensure integrity between the database and back office
applications.
The following fields of the flow table are designed specifically to capture flows
originating from securities tied to interest rates or floating indexes. When modeling
flows unrelated to rates or indexes, these fields would remain NULL or zero (except
where noted otherwise in the Infinity Data Model Quick Reference).
flow_calc_code
The flow_calc_code indicates the method used to calculate an interest payment
amount.
flow_calc_date
The flow_calc_date is the date on which the flow is determined.
flow_calc_rate
The flow_calc_rate refers to the rate used to calculate the flow.
flow_discount_rate
If the flow is a present value of an interest flow, the discount rate is given here.
flow_rate_calc_code
The flow_rate_calc_code determines the way the rate is calculated (as an average, a
single set, etc.).
manual_reset_b
If this boolean value is true (1), the rate for this flow has been manually adjusted from
what might have been automatically generated by an application.
official_b
If this boolean value is true (1), the flow amount has been set based on an officially set
rate.
maturity_term
This field is not implemented in version 5.2.1.
period_maturity_date
This field gives the maturity date for flows that are defined for an absolute time period.
period_start_date
This field gives the start date for flows that are defined for an absolute time period.
principal_amount
When a flow is an interest payment, the principal_amount field records the principal
amount from which the flow is calculated.
ref_index_term
This field represents the term of the reference index for the flow, i.e., 6-month LIBOR
would be represented with a value of 180.
ref_index_spread_rate
This field records any spread over the reference index for this flow.
start_term
This field is not implemented in version 5.2.1.
underlying_flow_id
If a flow represents the compounding of a previously calculated interest payment, the
underlying_flow_id field contains the flow_id of that previously calculated interest
payment.
ref_index_factor
This is a multiplier for the reference index. A value of 1 indicates that the reference
index is used as is.
The flow table is also used to store option-related flows, such as those generated by
caps and floors.
exercise_code
The exercise_code describes the convention for exercising an option. An
AMERICAN option is exercised at any time up to its expiration date. A BERMUDA
option can be exercised at select dates. A EUROPEAN option can only be exercised at
the expiration date. Since cap and floor flows have known dates, only EUROPEAN
type exercises are supported in the flow table.
put_call_code
The put_call_code is a string literal that identifies whether an option is a PUT option
or CALL option. For caps, this value is ‘CALL’ and for floors, it is ‘PUT.’
option_maturity_date
This field contains the date on which the option expires, for an option defined with
absolute dates.
option_maturity_term
This field is not implemented in version 5.2.1.
binary_payoff_amount
This field indicates the payout amount for this flow in a binary cap.
When a floating rate flow is stored in the flow tables, the dates on which the rate is
sampled are stored in the flow_calc_reset table. This table has four columns.
The primary key of the flow_calc_reset table consists of three fields: reset_group_id,
reset_date and sec_id. If one set of reset dates applies to a set of flows, the flows
should be grouped as a reset group. The flow_calc_reset table stores the reset date
information for all calculations in a single reset group.
The last field in the flow_calc_reset table is the calc_weight_rate. In the case of
averaging transactions, this field records the relative weight which applies to each rate
sampling when you calculate an average.
flow_id 9 10
flow_term 0 0
flow_calc_rate 0 0
flow_discount_rate 0 0
manual_reset_b 0 0
estimated_b 0 0
maturity_term 0 0
option_maturity_term 0 0
principal_amount 0 0
ref_index_term 0 0
ref_index_spread_rate 0 0
start_term 0 0
strike_price 0 0
ref_index_factor 0 0
payment_release_b 0 0
Figure 9-3. Entries in the flow table for the initial and final principal flows of a swap.
flow_id 13 14 15 16
flow_term 0 0 0 0
flow_discount_rate 0 0 0 0
manual_reset_b 0 0 0 0
estimated_b 0 0 0 0
maturity_term 0 0 0 0
option_maturity_term 0 0 0 0
ref_index_term 0 0 0 0
reset_group_id 2 2 2 2
ref_index_spread_rate 0 0 0 0
start_term 0 0 0 0
strike_price 0 0 0 0
ref_index_factor 0 0 0 0
payment_release_b 0 0 0 0
Figure 9-4. Entries in the flow table for semiannual interest payments from the fixed leg of a 2-year swap.
Exchange Flows
For swaps, we also show exchange flows, which contain the actual amount of
principal exchanged. Exchange flows are primarily used in FX swaps. For a notional
interest rate swap, exchange flows are zero.
flow_id 11 12
flow_amount 0 0
flow_term 0 0
flow_calc_rate 0 0
flow_discount_rate 0 0
manual_reset_b 0 0
estimated_b 0 0
maturity_term 0 0
option_maturity_term 0 0
principal_amount 0 0
ref_index_term 0 0
ref_index_spread_rate 0 0
start_term 0 0
strike_price 0 0
ref_index_factor 0 0
payment_release_b 0 0
Figure 9-5. Entries in the flow table for the initial and final exchange flows of a swap.
At the time the floating leg is saved, the flow_amounts are zero because the floating
interest flows are not yet known. Each flow amount will be calculated by the Infinity
Trader application when the floating rate for that flow is reset. Likewise, the
flow_calc_rate field contains a zero value until the rate is reset from the index.
The flow_calc_date field, which was NULL for the fixed leg, contains the date on
which the floating rate flows will be calculated. In the flow_rate_calc_code field, the
value of INDEX specifies that the flow amount will be calculated based on the index
rate posted on the calculation date.
The ref_index_term field specifies the term of the reference index in days. In the
example, the value of 180 indicates a six-month index. To find out that the index is
six-month LIBOR, we must query the ref_index_quote table.
The ref_index_spread_rate field contains the spread which is added to the index rate.
This value is stored as a decimal, so the 50 basis point spread in this example is
entered here as 0.005. The ref_index_factor field stores the factor by which the Infinity
Trader application will multiply the index rate before adding the spread and
calculating the flow.
flow_id 5 6 7 8
flow_amount 0 0 0 0
flow_term 0 0 0 0
flow_calc_rate 0 0 0 0
flow_discount_rate 0 0 0 0
manual_reset_b 0 0 0 0
estimated_b 0 0 0 0
maturity_term 0 0 0 0
option_maturity_term 0 0 0 0
reset_group_id 1 2 3 4
start_term 0 0 0 0
flow_id 5 6 7 8
strike_price 0 0 0 0
payment_release_b 0 0 0 0
Figure 9-6. Entries in the flow table for semiannual interest payments from the floating leg of a 2-year
swap.
Option-related Flows
The following example shows the four option flows for a 2-year, semiannual, 6% cap
on 3-month LIBOR on a principal of $100 million. Notice that now the reference
index and option-related fields have been filled in. A value of zero is stored in the
flow_amount column for flow values that are not yet known. Currently these flows are
only used for option flows in caps.
flow_id 12 13 14 15
flow_term 0 0 0 0
manual_reset_b 0 0 0 0
estimated_b 0 0 0 0
maturity_term 0 0 0 0
option_maturity_term 0 0 0 0
ref_index_term 90 90 90 90
reset_group_id 14 15 16 17
start_term 0 0 0 0
payment_release_b 0 0 0 0
Figure 9-7. Entries in the flow table for semiannual option flows from a 2-year cap on 3-month LIBOR.
The reference index tables store information about the interest rate reference indexes
used to determine cashflows in floating rate securities. Common examples of these
indexes include the US-dollar LIBOR, the US commercial paper rate (CP), and
Japan’s TIBOR.
Ten tables model reference indexes, their sources, and their values:
• The infsys_montage_lists table with list_name = ref_index_list establishes
the range of valid names for the reference indexes used in security
transactions.
• The infsys_montage_lists table with list_name = ref_index_source_list
establishes the range of valid sources which provide reference index
quotes.
• The ref_index_attribute table contains information about the date roll, day
count, rounding and other conventions related to a reference index.
• The ref_index_hol_city table stores a city code which designates the
holiday calendar used for a given reference index.
• The ref_index_term_source table holds the valid source or sources for
each defined combination of currency, reference index and index term.
• The ref_index_quote table stores all reference index quotes. Since the
date and time of the quote are part of the table’s primary key, the
ref_index_quote table provides a history of quoted interest rates for each
reference index. If a real time feed has been set up, the ref_index_address
table stores the real time address for quotes. In an environment without a
real time feed, the ref_index_address table would be empty.
• The infsys_montage_domains table with domain_name =
ref_index_relation_domain stores the range of codes that describe the
ways reference indexes can relate to one another.
• The ref_index_index_relation table stores records for reference indexes
(defined by a unique combination of currency, index, source, and term)
that are related to each other.
• The ref_index_relation_def table uses a ref_index_relation_code to define
each reference index relationship.
The following example demonstrates the procedure of adding USD LIBOR to the
Infinity Data Model as a new reference index. For the purposes of this example,
suppose that USD LIBOR has not been established in the database as a reference
ref_index_list
To add USD LIBOR to your database, you would first need to add the name LIBOR as
a value within the ref_index_list, which lists abbreviations for all the reference
indexes.
list_name ref_index_list
list_code LIBOR
montage_group_code INFINITY
Figure 10-1. The record in the infsys_montage_lists table establishing LIBOR as a ref_index_code.
ref_index_source_list
The infsy_montage_lists table with list_name = ref_index_source_list establishes the
range of valid sources (e.g., ISDA, BBA) which provide reference index quotes.
If more than one source will provide LIBOR quotes, adding LIBOR as a reference
index will require making several entries in this table, one for each source of USD
Figure 10-2. Three records in the infsys_montage_lists table, establishing ISDA, BBA, and LIBO as
valid sources for reference index quotes.
As with the previous values, a number of reference index sources are pre-packaged
data, shipped with the Data Model.
To define the conventions for USD LIBOR reference index quotes, the
ref_index_attribute table would be populated as illustrated below. Note that these
specifications are being assigned only to LIBOR rates for US dollars, since the
ref_index_currency_code column, part of the primary key, contains the value USD.
ref_index_currency_code USD
ref_index_code LIBOR
quote_method_code SIMPL_INT
day_count_code ACT/360
settlement_term 2
rounding_convention_code ISDA_RATE
settlement_date_roll_code FOLLOWING
ref_index_currency_code USD
ref_index_code LIBOR
city_code LON
hol_type_code PAYMENT
Figure 10-4. The entry in the ref_index_hol_city table specifying London PAYMENT holidays for the
USD LIBOR reference index. All four columns contribute to the primary key.
The USD LIBOR reference index will have an entry in this table for each combination
of term and source. The following two entries are included as examples.
ref_index_term 30 90
Figure 10-5. Two entries in the ref_index_term_source table, specifying that ISDA will be a source for
1-month and 3-month USD LIBOR quotes.
A USD 3-month LIBOR quote for June 12, 1995, would be recorded:
ref_index_code LIBOR
ref_index_term 90
ref_index_source_code T3750
ref_index_currency_code USD
quote_value 0.055
estimated_b 0
auth_b 1
auth_id 803
Note the two fields: auth_b and auth_id. These fields allow back office applications to
ensure that quotes are official and authorized. See chapter 4 on organization
information for more information about these two fields.
If a real time feed has been set up, the real time address for each quote is stored in
ref_index_address.
Each date and time for which a curve is defined represents an instance of a curve.
Each such instance is identified in the curve_datetime table by a combination of its
curve_id and the date and time for which the curve is valid. This table also uses a
curve_instance_code to specify the time of day which the curve’s data represent
relative to the market’s opening and closing. The rates which make up a specific curve
are stored in the table curve_data. This table holds both bid and offer rate values, as
well as the offset, in days, for the observation date.
The curve header tables store parameter values for the four different types of curves.
The curve_interest_header, curve_volatility_header, curve_basis_header, and
curve_repo_header tables contain information more specific to interest, volatility,
basis, and repo curves, respectively. For a given curve, only one of these tables will
contain a record, since the curve types are mutually exclusive. Additional data about
repo curve groups is contained in the curve_repo_group and
curve_repo_group_special tables.
Curves can be defined in three ways: simple curves are defined as a set of data points
and offset terms; derived curves are defined based on a set of underlying securities and
curves; and dependent curves are defined as a function of other curves. These
definitions are stored in the curve_def_simple, curve_def_derived_sec,
curve_def_derived_curve, and curve_def_dependent tables.
The curve_hol_city table designates the different holiday calendars associated with a
curve.
Figure 11-1. A 5-point discount factor curve, plotting 90 days into the future.
This discount factor curve says that a dollar today (day count 0) is worth $1. For a
dollar in nine days, the owner of the curve is willing to buy it (bid) for $0.9982 today
or sell it (offer) for $0.9984. Most curves (yield curves, discount factor curves,
forward curves, and volatility curves) used in derivative products trading can be
expressed in this way: days offset from the current date, with bid and offer values. The
numbers in the table above would be stored in the curve_data table; the fact that it is a
discount factor curve would be stored in the curve table itself. The table curve_data
curve_id
This field contains a seed number taken from curve_seed. The rest of the values in
curve, other than curve_name and description, are codes taken from domain and list
tables used to describe the curve.
curve_level_type_code
This field is not implemented in version 5.2.1.
curve_interpretation_code
This field is not implemented in version 5.2.1.
curve_status_code
This field tells whether a curve is open or locked. You might want to lock a curve to
prevent the list of underlying securities from being accidentally changed. This is used
in conjunction with the Infinity applications to restrict access to certain curves.
curve_data_code
This field describes what kind of curve data are being described: zero rate data,
forward rate data, discount factor data, or yield data.
curve_type_code
This field describes whether a curve is an interest rate curve, a repo curve, a volatility
curve, a foreign exchange curve, or a basis curve.
currency_code
This field states the currency for which the data are meaningful.
interp_code
This filed describes the interpolation type: Linear, Spline, Log-linear, or Time-
weighted-linear.
description
This field contains additional descriptive information which is not directly available
through Infinity applications.
user_code
This field names the user who entered the curve.
class_name
This field lists the Fin++ class that was used to save this curve.
As an example entry in the curve table, consider a locked zero rate pricing curve for
swaps, based on LIBOR instruments, named LIBORTEST.
curve_id 6
curve_level_type_code NULL
curve_interpretation_code NULL
curve_status_code LOCKED
curve_def_code DERIVED
curve_data_code RATE
curve_name LIBORTEST
curve_type_code INTEREST
currency_code USD
interp_code LINEAR
description NULL
user_code login_1
class_name InfCurveZeroSql
All interest curves represent the time value of money by plotting interest rates against
time, but the type of interest rates being used must be noted so that the resulting curve
can be applied appropriately.
The curve table uses a curve_data_code value to specify the type of the datapoints
used to plot the curve : discount factors, zero rates, yields, or forwards. For all interest
curves, the curve_interest_header table contains more detailed information on the
The values of bond_relative_b and interp_code are used in the process of generating
the interest curve. The bond_relative_b is used to determine if the bonds used to build
the curve are to be treated as if they were to mature on their actual or relative maturity
dates.
The following example shows the curve_interest_header entry for a 6-month LIBOR
curve, with linear interpolation, actual/360 daycount and semiannual compounding.
Table: curve_interest_header
curve_id 6
bond_type_code UST
ref_index_code LIBOR
day_count_code ACT/360
compound_frequency_code SA
sec_term 0
bond_relative_b 1
ref_index_term 180
Basis curves also plot rates against time. A basis curve might be calculated from
spread rates and then subtracted from an index rate curve, such as LIBOR, to calculate
another curve, such as the commercial paper (CP) rate curve.
Basis curves are modeled in the curve_basis_header table as dependent curves which,
when subtracted from a standard index curve such as LIBOR, produce a resulting
index curve such as the CP curve. In the curve_basis_header table, the curve_id is the
identification number of the basis curve, the underlying_curve_id is the identification
number of the standard index curve (e.g., LIBOR), and the result_curve_id is the
identification number of the resulting index curve (e.g., CP). The
curve_curve_operator_code identifies the mathematical operation which is used to
apply the basis curve to the underlying curve in order to arrive at the result curve.
The basis curve could be single currency or cross currency. In the cross currency
scenario, there would be two underlying curves, one for each currency. The fields
underlying_curve2_id and underlying_curve_side_code store information about the
cross currency curve. The field fx_rate stores the rate of exchange between the two
currencies.
Table: curve_basis_header
curve_id 77
underlying_curve_side_code NULL
result_curve_id 32
underlying_curve_id 29
curve_curve_operator_code SUB
underlying_curve2_side_code NULL
underlying_curve2_id NULL
fx_rate 1.000000
Figure 11-7. Modeling a basis curve (77) which is subtracted from a LIBOR curve (29) to produce the CP
rate curve (32).
The underlying, basis, and result curves would appear in the curve table as follows.
Table: curve
curve_id 29 32 77
Figure 11-8. Instances of the curve table for a LIBOR curve (29), a CP curve (32), and the basis curve
(77) used to arrive at the CP curve.
Since the underlying, basis, and result curves are related by a mathematical operator,
they will also have an entry in the curve_def_dependent table.
You can assign a strike price for each volatility curve with the strike_price attribute.
The settlement_sec_id identifies the security you would be trading for the underlying
instrument. In the Infinity Market Environment Manager application, the strike price
and security id’s do not affect the curve generation algorithm and are for tracking
purposes only.
curve_id 20
sec_id NULL
ref_index_code LIBOR
ref_index_term 90
sec_maturity_term 360
strike_price .10
settlement_sec_id NULL
unit_time_code 360_DAY_YEAR
Figure 11-10. Sample table values for curve_volatility_header to model a volatility curve for an option
on 3-month LIBOR.
A repo curve is a simple curve charting rates for bond repurchase agreements. The
structure of curve_repo_header is depicted below.
Each curve is associated with a particular bond on special, which is identified by its
sec_id in the curve_repo_header table. The bond_type_code characterizes the bond
for which the repurchase agreement has been made. The issuer_inst_code specifies
the issuer of the bond. The sec_id also refers to the bond.
The following example shows the curve_repo_header table for a UST repo curve.
curve_id 130
bond_type_code UST
issuer_inst_code USGVT
curve_id 130
sec_id 1983
day_count_code ACT/360
Groups of repo curves are used to obtain repo rates for the Infinity Repo Manager and
Bond Options Trader applications. Information about repo curve groups is contained
in two additional tables. A repo curve group consists of a General Collateral Curve (a
repo curve saved as General Collateral) and, typically, a group of other repo curves,
each associated with a particular bond on special. The curve_repo_group_special
table identifies the repo curves that make up an instance of a repo curve group. The
group is identified by its repo_group_id and by the date and time it was last saved. The
curve is identified by its curve_id.
The following example illustrates the curve_repo_group_special table for the curve
data in the previous table. Note that all three attributes contribute to this table’s
primary key.
The curve_repo_group table establishes a repo curve group in the database by giving
it a name (repo_group_name) and id number (repo_group_id). The login name of the
user who created the curve group is stored in the user_code column.
repo_group_id 11
user_code fodev_user_1
repo_group_name REPO-KE
Curve Data
Once a curve has been defined in the curve header tables and a specific instance of the
curve has been specified in the curve_datetime table, the rate data used to plot the
curve can be entered in the curve_data table.
The curve_datetime table contains the dates for which data exist in the curve_data
table. The intermediary step of the curve_datetime table is designed to improve the
performance of very large historical curve databases.
The table curve_data contains the same curve_id and curve_datetime primary keys as
curve_datetime, plus attributes for the daycount, the numerical bid and offer rate
values, and the time that the data point was updated. While curve_datetime contains
exactly one record for each saved instance of a curve, curve_data contains as many
records as there are data points for an instance of a curve.
A curve defined once in the curve header table can foster many instances in
curve_datetime — one for each time the curve was generated and saved to the
database. To select a particular instance of a curve, you must query both
curve_datetime and curve_data.
The following example entries in the curve_data table show the data points generated
for a zero rate curve covering about 10 years (note: for convenience of display, the
update_datetime field is not shown, as it is always the same as the curve_datetime for
curves generated by the Infinity Market Environment Manager application).
Table: curve_data
Figure 11-19. The curve_data table, containing zero rates extending 10 years into the future.
Other curves are not directly known; they must be constructed from market data. For
example, an interest curve could be pieced together using prices of short-term
currency instruments, medium-term futures instruments, and long-term spreads or
bond instruments. Curves constructed in this manner are known as derived interest
rate curves. The curve_def_derived_sec table uses sec_id numbers to point to the
securities which underlie a derived curve.
Lastly, some curves are functions of other curves. Such a curve might be built as the
sum of a LIBOR interest curve and a basis curve. In the database, these are known as
dependent curves, and they are stored in curve_def_dependent tables. These curve
dependencies are expressed as a curve_curve_operator_code for addition (ADD),
subtraction (SUB), multiplication (MUL), or division (DIV).
The following example entries in the curve_def_simple table show a simple LIBOR
curve made up of terms though 10 years. The corresponding curve_data table records
are shown as well. Note that the database does not perform the conversion from terms
to dates; this must be done by the corresponding application.
Table: curve_def_simple
curve_id curve_offset_term
2 1
2 7
2 14
2 21
2 30
2 90
2 180
2 360
2 720
2 1080
2 1800
2 3600
Table: curve_data
Figure 11-21. The curve_data table, containing rates for a simple curve extending 10 years into the
future.
The database permits you to define curves as functions of other curves. If you wanted
to define a CP basis curve as the difference of two other curves, such as a CP curve
and a LIBOR curve, you would store this relationship in the curve_def_dependent
table.
For example, curve 108 is the resultant curve of the sum ( curve_curve_operator_code
‘ADD’) of curve 6 (a LIBOR curve) and curve 74 (a flat LIBOR spread curve).
curve_id 108
related_curve1_side_code NULL
related_curve1_id 6
shift_rate NULL
slope_rate NULL
square_rate NULL
related_curve2_id 74
curve_curve_operator_code ADD
related_curve2_side_code NULL
Figure 11-22. The curve_def_dependent table, specifying that curve 108 is the sum of curve 6 and
curve 74.
Table: curve_def_derived_sec
Table: sec
54 USD FUTURE
55 USD FUTURE
56 USD FUTURE
57 USD FUTURE
58 USD FUTURE
59 USD FUTURE
60 USD FUTURE
Additionally, the actual market quotes for these securities would be found in the
sec_quote table, indexed by sec_id.
Keep in mind that the Infinity Data Model does not perform the calculations to
actually derive the curves; it only stores the data used to generate the curves and the
resulting curve data. A curve generation application such as Infinity’s Market
Environment Manager is required in order to derive curves.
The curve_def_derived_curve table stores data about the underlying curves used to
generate a derived curve. It is used for generating volatility curves. For each instance
of this table, there is a curve_id, an underlying_curve_usage_code (used to specify
whether the curve is used for discounting or forecasting), the underlying_curve_id,
and the underlying_curve_side_code (not implemented in the Infinity Market
Environment Manager application).
The following sample entries show the curve_def_derived_curve table being used to
model a USD 3-month LIBOR volatility curve (curve_id 91) built from an underlying
USD 3-month LIBOR interest curve (curve_id 88).
curve_id 91 91
underlying_curve_id 88 88
Figure 11-25. Entries in the curve_def_derived_curve table, identifying curve 88 as the underlying
curve for derived curve 91.
Curve Holidays
The curve_hol_city table organizes information about the holiday schedules that affect
a curve’s rate data. For example, a LIBOR curve would be subject to London holidays,
and a PRIME rate curve would be subject to New York holidays.
The instance of the curve_hol_city table below shows that New York holidays apply to
curve 10.
curve_id 10
city_code NYC
hol_type_code PAYMENT
Figure 11-26. The curve_hol_city table, specifying New York holidays for curve 10. All three attributes
contribute to the primary key.
Chapter 12
Volatility Surface Tables
Within the Montage Data Model, there is a group of tables that allow you to create and
store volatility surfaces. These tables all begin with the prefix vs_.
The attributes of the vs table and related tables are detailed below.
Table name: vs
Table name
vs_def_exp_relative
vs_id 0 VS_Id:int(4) PK vs_datetime
def_datetime 0 Datetime:datetime(8) PK vs_datetime
exp_term 0 Term:int(4) PK
vs_def_exp_specific
vs_id 0 VS_Id:int(4) PK vs_datetime
def_datetime 0 Datetime:datetime(8) PK vs_datetime
exp_date 0 Datetime:datetime(8)) PK
vs_def_strike
vs_id 0 VS_Id:int(4) PK vs_datetime
def_datetime 0 Datetime:datetime(8) PK vs_datetime
strike 0 Value:float(8) PK
vs_def_tenor
vs_id 0 VS_Id:int(4) PK vs_datetime
def_datetime 0 Datetime:datetime(8) PK vs_datetime
tenor 0 Term:int(4) PK
vs_tenor_spread
vs_id 0 VS_Id:int(4) PK vs_datetime
def_datetime 0 Datetime:datetime(8) PK vs_datetime
tenor 0 Term:int(4) PK
bid_spread 0 Value:float(8)
offer_spread 0 Value:float(8)
Figure 12-2. Table structures for the vs, vs_def_exp_relative, vs_def_strike, vs_def_tenor, and vs_tenor_spread
entities.
The following example shows an entry in the vs table for a tenor spread surface. Most
of the parameters are descriptive, as in the case of curves: the surface is for USD
LIBOR instruments, which are likely to be based on money market futures (quote
method) and hence have a 2 day settlement period and a modified following date roll.
Table name: vs
vs_id 21
user_code login_1
currency_code USD
vs_id 21
ref_index_code LIBOR
vs_name generic
vs_def_code TENOR_SPREAD
strike_quote_method_code MM_FUTURE
settlement_term 2
maturity_date_roll_code MOD_FOLLOW
unit_time_code 360_DAY_YEAR
Figure 12-3. An entry in the vs table listing the general specifications for tenor spread surface 21.
vs_id 21
tenor 30
Figure 12-4. An entry in the vs_def_tenor table specifying that the base tenor for
surface 21 is 30 days.
In order to indicate the spread for the points relative to the base tenor, we enter the
spreads (as a function of tenor) in the vs_tenor_spread table. Note that the base tenor
of 30 shows up in this table as well, and, as expected, has a spread of zero. Also note
that tenors are represented as terms measured in days (e.g. a term of 360 is one year).
Figure 12-5. Entries in the vs_tenor_spread table showing the spreads for terms
of up to five years.
The remaining axes for the surface are the expiration period of the option and the
strike price. This information is contained in the tables vs_def_strike and either
vs_def_exp_relative or vs_def_exp_specific. The vs_def_strike table gives the range
of strike rates:
Table name
vs_data
vs_id 0 VS_Id:int(4) PK vs_datetime
vs_datetime 0 Datetime:datetime(8) PK vs_datetime
exp_offset 0 Offset_Day:int(4) PK
strike 0 Value:float(8) PK
tenor 0 Term:int(4) PK
bid_value 0 Value:float(8)
offer_value 0 Value:float(8)
vs_datetime
vs_id 0 VS_Id:int(4) PK vs
vs_datetime 0 Datetime:datetime(8) PK
vs_instance_code 0 Instance_Code:char(12)
vs_status_code 0 Status_Code:char(12)
Figure 12-8. Table structures for the vs_data and vs_datetime entities.
Once the parameters of the volatility surface have been set, the surface points
can be generated. Each instance will be date and time stamped and recorded in
vs_id 21
vs_instance_code CLOSE
vs_status_code OPEN
Figure 12-9. An entry in the vs_datetime table stating that an instance of surface 21
has been generated for February 15, 1995, at 4:29.
exp_
vs_id vs_datetime strike tenor bid_value offer_value
offset
exp_
vs_id vs_datetime strike tenor bid_value offer_value
offset
Figure 12-10. Entries in the vs_data table describing the February 15, 1995, instance of tenor spread
surface 21.
The above data are for a flat 17% surface. It has 35 points which corresponds to the
matrix of 7 expiries times 5 strike values. The third dimension is given by the 6 tenor-
spreads. Consequently, had this been a simple surface, there would have been 210
records in the vs_data table. Just as modeling curves can require many instances of
the curve_data table, modeling volatility surfaces can require many instances of the
vs_data table.
Chapter 13
Portfolio Tables
Within the Infinity Data Model, there is a group of tables that allow you to group
trades into sets called portfolios.
A portfolio of trades would typically be those you would want to analyze in a group.
You might want to define a portfolio of JPY swaps, a portfolio of trades engineered by
a certain trader, or a portfolio of bonds that mature before a certain date.
Each portfolio is saved as a set of selection criteria which will be used to retrieve
trades from the database. The flexibility of portfolio definitions in the Data Model is
designed to facilitate risk management.
Trades can also be assigned to transactions, and they can be assigned to accounts. A
transaction would typically be a set of related trades, done together for a common
financial purpose, such as a cross-currency swap and a related currency hedge. To see
how trades are assigned to transactions or accounts, see Chapter 7, Transaction and
Trade Tables.
Dynamic portfolio definitions can be saved to the portfolio tables, with search criteria
saved to the portfolio_def table and structured query language (SQL) statements (if
any) saved to the portfolio table. If a portfolio has been saved as a set of search criteria,
the application retrieving the trades will create SQL statements from those criteria at
the time the trades are retrieved. If the portfolio has been saved as a set of SQL
statements, the application will apply the SQL statements at runtime to retrieve a set
of trades from the database.
Dynamic portfolio definitions only set guidelines for the types of trades to be included
in a portfolio. As trades are added to the database, they are not automatically included
in any dynamic portfolios. Instead, applications which use portfolios will retrieve
trades matching the portfolio definition only when instructed to do so.
A typical dynamic portfolio would be defined to include all USD caps. Within the
Data Model, this portfolio could be defined with an SQL statement saved to the
The database entry for this portfolio, called “MTM_CAP”, is shown in Figure 13-2.
Each time an application needs to update the portfolio this SQL statement is issued,
and all of the USD caps with a “pending” or “booked” trade status are retrieved from
the database to populate the portfolio.
Retrieving trades for portfolios involves querying the trade, trade_leg, and
w_sec_denormal tables. The trade and trade_leg entities are discussed in Chapter 7,
Transaction and Trade Tables. The w_sec_denormal table is a denormalized table
used in Infinity’s Risk Manager and Scenario Builder applications to accelerate
portfolio selection. The table duplicates information that would otherwise have to be
retrieved from the sec, trade_leg, bond_header, swap_leg_header, and
exchange_header tables.
SQL statements stored in the portfolio table may also be used to define static
portfolios. A static portfolio definition specifies the identification numbers of the
trades in the portfolio. Using SQL, the following portfolio definition extracts trades
with ids from 10 through 34:
The database entry for this portfolio, named “FIRST34TRANS”, is shown in Figure
13-3, on page 13-5.
Table name
Column name Null Datatype PK FK:Parent Table
portfolio
portfolio_name 0 Portfolio_Name:varchar(50) PK
portfolio_status_code 0 Status_Code:char(12)
select_clause 1 Sql_Clause:text(16)
from_clause 1 Sql_Clause:text(16)
modified_b 0 Bool:bit(1)
where_clause 1 Sql_Clause:text(16)
portfolio_def
portfolio_criterion_code 0 Portfolio_Criterion_Code:varchar(50) PK
portfolio_name 0 Portfolio_Name:varchar(50) PK
portfolio_criterion_choice 1 Portfolio_Criterion_Choice:varchar(50) PK
Each portfolio definition is saved as one record in the portfolio table and one or more
records in the portfolio_def table. Any SQL statements in the definition will be saved
in the portfolio table, and there will be one record in the portfolio_def table for each
search criterion in the definition.
The portfolio table contains the three attributes used to store SQL portfolio definitions.
The table also specifies whether a portfolio may be modified.
The modified_b value is a boolean variable indicating whether the portfolio uses a
custom SQL definition. Set the value of this variable to 0 if your definition is based
only on criteria saved to the portfolio_def table. If the portfolio is defined using SQL
statements, set this variable to 1.
The portfolio_def table contains the non-SQL portion of the portfolio definition. A
unique record in the portfolio_def table is made up of a portfolio_criterion_code
identifying the attribute of the trade being used as a search criterion, paired with a
portfolio_criterion_choice value specifying the desired quality for that attribute. The
list of valid codes for portfolio_criterion_code come from the
infsys_montage_domains table, with domain_name = portfolio_criterion_domain.
Along with the portfolio_name, these values constitute a unique record in the
portfolio_def table. Most portfolio definitions will require a number of records in the
portfolio_def table.
The following tables show the entries in the portfolio and portfolio_def tables for the
examples described above.
portfolio_name MTM_CAP
portfolio_status_code OPEN
modified_b 0
WHERE trade.trade_status_code IN
(’PENDING’,’BOOKED’)
AND w_sec_denormal.sec_type_code IN (’CAP’)
where_clause
AND w_sec_denormal.currency_code IN (’USD’)
AND trade_leg.sec_id = w_sec_denormal.sec_id
AND trade_leg.trade_id = trade.trade_id
Figure 13-2. The entry in the portfolio table for an SQL-defined portfolio which includes all USD caps
with a trade_status of PENDING or BOOKED.
portfolio_name FIRST34TRANS
portfolio_status_code OPEN
modified_b 1
WHERE trade.trade_status_code IN
(’PENDING’,’BOOKED’, ’PRICING’)
where_clause AND trade_leg.trade_id = trade.trade_id
AND trade.trade_id >= 10
AND trade.trade_id <= 34
Figure 13-3. The entry in the portfolio table for an SQL-defined portfolio which includes all trades with
an identification number from 10 through 34.
These examples would have corresponding entries in the portfolio_def table. Each
would be the child of a portfolio instance and a portfolio_criterion instance. The
portfolio_def entries for portfolio “MTM_CAP” only are displayed below.
Figure 13-4. The entries in the portfolio_def table for a portfolio defined to include all USD caps.
Application Interaction
To further understand the structure of the portfolio tables, it helps to observe their
interaction with the Infinity Risk Manager application. In the application’s Portfolio
Definition window, the user is given the option of creating a portfolio definition using
the given criteria codes or by writing custom SQL statements. When a user writes
custom SQL to define a portfolio, that information is stored in a single record in the
portfolio_criterion_code values
potential
portfolio_
criterion_
choice
values
Custom SQL
statements
would be
inserted
in one
record in
the portfolio
table.
Figure 13-5. Risk Manager’s Portfolio Definition window, displaying the definition of a portfolio
including all USD caps.
The portfolio menus in Figure 13-5 (currency, security type, leg type code, etc.) are all
portfolio_criterion_code values. Any of the values selected in these menus (BOND,
CAP, USD, FIXED, etc.) will be saved as a portfolio_criterion_choice value, creating a
record in the portfolio_def table for each criterion value saved. The portfolio definition
based on these menu selections (USD currency and CAP security type) would be
stored in two records in the portfolio_def table. The bottom third of the window
displays the SQL definition of the portfolio. SQL definitions are optional, but once a
portfolio has been saved as a set of SQL statements, only the SQL definition will be
used to populate the portfolio. The definition entered in the Custom SQL window is
stored in one record in the portfolio table, in the select_clause, from_clause, and
where_clause fields.
Overview
Purpose
This chapter is written to assist users who want to retrieve risk reports from the
Infinity Data Model after they have generated and stored the reports using the Infinity
Risk Manager or Infinity Scenario Builder application.
Sybase / isql
This chapter was created for users of the Sybase version of the Data Model. Oracle
and other database users may have to adjust some queries, but the basic table structure
is the same.
Sample queries given in this chapter are designed to run using Sybase’s Transact-
SQL. Users may also employ other commercially available query tools (e.g. Microsoft
Access, Bluestone’s dbViewer) to query the tables.
This chapter assumes basic familiarity with SQL, as well as basic familiarity with
usage of Infinity’s Risk Manager application.
Further documentation
Consult the risk table diagrams in the Infinity Data Model Reference Guide for an
overview of the tables discussed here.
For more information about using Infinity Risk Manager and Infinity Scenario
Builder, please refer to the Infinity Risk Manager and Scenario Builder Reference
Guide.
The basic risk table structure remains the same from version to version of the
database. However, since some report-related attributes and some risk parameter
Purpose
Scenario Builder allows users to automate evaluation and risk analysis of large groups
of trades. Each scenario, or “process,” is a set of instructions defining the group of
trades to be analyzed, the type of analysis to be done, the assumptions and methods
with which the analysis will be done, and the means by which the resulting risk
reports will be output.
While the application provides a graphical user interface, Scenario Builder can also be
run in a command line mode. The command line interface, combined with the ability
to save generated reports to the Infinity database, allows your organization to integrate
Scenario Builder with existing risk reporting systems.
This mode requires the user to supply the name of the scenario (risk_batch_name), the
valuation_date, and login information. Before it can be run in command line mode,
the scenario must already have been defined using Scenario Builder in its normal,
graphical user interface mode.
Scenarios run from the command line must save their output to the Infinity database,
so each step of the scenario definition must include the output instruction to
SAVE_TO_DB only.
Running Scenario Builder from the command line also requires that all the necessary
Infinity environment variables have been set in the shell from which the command is
invoked. If these settings are buried in a script, rather than in the user’s .cshrc or .login
file, then these environment variables will need to be set by hand before running the
application. Even though running the application from the command line does not
invoke any application windows, it is still necessary to set the ND_PATH environment
variable for the application to run.
To invoke Scenario Builder from the command line, first change directories to the
Scenario Builder application directory. Then type the command “scenario” with the
following arguments:
For example, to run the scenario “END OF DAY” for May 26, 1995, change
directories to the Scenario Builder directory and type:
After you issue this command, the application will automatically search for login
information in a file called “infLogin.scenario” in the home directory of the user
running the scenario.
An infLogin file may also be saved to the application’s executable directory for use as
the default infLogin file for all users; the application will read this default infLogin file
only for those users who have no infLogin file in their home directory.
If the application fails to find an infLogin file in either your home directory or the
application’s executable directory, the standard Infinity login dialogue box will
prompt you to enter the server name, database name, user name, and password.
To make an “infLogin.scenario” file, create a text file listing the server name, database
name, Infinity user login name, and Infinity user password on separate lines. For
example, for user j_trader on SERVER_1, database_4, with password “tintin,” the file
would read:
SERVER_1
database_4
j_trader
tintin
To prevent unauthorized users from using the login and password, put the UNIX
security template “r-x------” on the file.
version 5.2 Running Scenario Builder from the command line 14-3
Note that the user login name and password stored in the infLogin file are the Infinity
application login and password, not the Sybase server isql login and password.
A csh script may be used to simplify running of Scenario Builder from the command
line. The script could be written as follows:
!#/bin/csh
cd /infinityDir/apps/scenario
setenv ND_PATH ../oit-lib
scenario "BatchName" 5/26/1995
Output
When running Scenario Builder from the command line, the application generates the
desired reports, saves them to the risk_rpt_ tables of the database, and returns a
risk_batch_run_id number to the screen.
Scenario Builder also writes an error log file to the user’s home directory (or to the
directory specified using the Preferences command in Scenario Builder’s Process
menu). Each error log file is named “error_log.n”, where “n” is the risk_batch_run_id
number of the scenario.
The remainder of this chapter assumes that the scenarios ran properly, with no errors.
Errors should be corrected by using Scenario Builder running in normal GUI mode to
redefine curve groups or portfolio definitions as required.
Use SQL database queries to find the risk reports produced by your scenario. Retrieve
the entries in the risk_batch_run table which match the returned risk_batch_run_id
number. The table will contain an entry for each report produced by the scenario you
have just run, identifying that report by its risk_rpt_id.
Different types of risk reports are saved to different risk_rpt_ tables in the database.
For example, a mark-to-market by trade report with NPV values for 20 trades would
be saved as 20 rows in the risk_rpt_mtm table.
From your query of the risk_batch_run table, you know the risk_rpt_id of the report
you need, but you still do not know which of the risk_rpt_ tables contains your report.
A table called risk_rpt identifies the type of the report you have produced, keyed by
the report’s risk_rpt_id. Use the risk_rpt_id (retrieved previously from the
risk_batch_run table) to query the risk_rpt table. The report type is listed in the
risk_rpt_code column of the risk_rpt table.
Figure 14-1. The risk_rpt_code values and their corresponding tables in the Infinity Data Model
Once you know the risk_rpt_id number and the name of the appropriate table, you can
access your report. For a mark-to-market by trade report, the query would be as
follows:
Data is saved by row in the risk_rpt_ tables, but not tabulated into totals. So, if you
wanted to recreate an entire mark-to-market report, including a total NPV, you might
do the following (assuming a risk_rpt_id number of 20):
The first query returns all the rows in the report, each listing the NPV of a trade leg.
The second query returns the sum of all the NPV values. (Each NPV value is stored in
the “npv” column of the risk_rpt_mtm table.)
The parameters used for a particular risk report would be found in the risk_rpt_param
table, keyed again by risk_rpt_id. These parameters include the valuation date,
valuation method, time buckets, and other parameters which you might want to
include in your own custom reports. Most of these parameters are set using the Risk
Parameters window of Risk Manager. Consult the Infinity Risk Manager and Scenario
Builder Reference Guide for details.
The curve assignments used in the generation of reports are stored in risk_rpt_curve_
tables. For example, to find the curves used to discount all CURRENCY securities in
risk report number 20, try:
Scenario definitions
risk_batch_def
The most important table in the definition of a scenario is the risk_batch_def table. It
includes a row for each analysis step in the scenario. The attributes of the
risk_batch_def table include:
The last four attributes in the bullet list above correspond to the first four columns
listed in the Scenario Builder application’s Scenario Definition window.
The contents of the Actions column, on the right side of Scenario Builder’s Scenario
Definition window, are stored in the risk_batch_rpt_instruct table. Instructions saved
from the Actions column direct the scenario’s output to the desired medium. For
command line scenarios, the Actions value must be “SAVE_TO_DB”.
Custom development
If you wish to perform the same analysis on multiple portfolios, you can gain
flexibility by creating a single scenario and running it repeatedly, changing only the
portfolio name each time. To do this, you will update the portfolio_name attribute in
the appropriate row(s) of the in the risk_batch_def table before each run of the
scenario.
Since the scenario will be run from the command line, the definition must specify that
the results of the analysis will be saved to the database (the risk_rpt_instruct_code in
the risk_batch_rpt_instruct table should be “SAVE_TO_DB”).
• select a new portfolio name from the flat file list and loop back to
update the risk_batch_def table.
Note that such a structure requires the use of a curve group which includes
assignments for all the securities in all the portfolios you intend to evaluate.
Because each risk parameter group may be associated with more than one base
counterparty, risk parameters are defined in one table (risk_param_group) and then
linked to counterparties using a separate table (risk_param_group_base_cpty).
Note that if you run a risk report defining every single counterparty involved in the
portfolio as a base counterparty, the net exposure in all the risk reports will be zero.
To run the same analysis repeatedly, substituting a base counterparty each time,
implement the following structure:
Note that in some cases the steps for using multiple base counterparties might have to
be combined with the steps for using multiple portfolios into a single script (if, for
The strategy outlined above could also be used to alter risk parameters directly in the
database, allowing the use of different parameters for each run of Scenario Builder. To
do this, you could implement the following structure:
The access permissions tables in the Infinity Data Model were created specifically to
support the Infinity security scheme specified via the Infinity Access Manager
application and enforced throughout the other applications. Thus, this chapter is not
useful to those who do not use the Infinity applications.
The table emp_prsn_login_name maps the login name to the emp_prsn_id and the
org_id. This table has the following structure:
The Infinity applications will track this user every time he attempts to log in to the
system, expiring his password when appropriate, according to the password policy set
up for the user. The table user_system_info stores this tracking.
The Infinity application Access Manager permits a user group to have a unique
password policy. Alternatively, a user group may take a default policy. If a user group
has a unique password policy, information about the policy is specified in the table
password_policy_info. The default password policy is specified in the table
default_password_policy_info. A user group that is using the default policy would not
have an entry in password_policy_info that matched its user_group_code.
For each user group, the set of functions granted to that user group are listed in
access_perm_policy_matrix. There is one row in this table for each function granted.
This table is updated by the Infinity application Access Manager; in terms of the GUI,
there is one row in this table for every specified ‘Y’, for each user group.
You can add values to valid_access_func_info to get new functions recognized by the
Infinity application Access Manager. Note that the Infinity applications will only
recognize the functions that are in the pre-shipped table, so adding functions to our
applications will have no effect. Nevertheless, you can add entries to this table to have
Access Manager control functions in externally developed applications.
This investigation uncovered the following. First, a number of indexes were ill-
formed. They were defined on fields, such as code fields, whose data values are
severely clustered on a particular value. For example, consider the index XIE2sec
defined on currency_code in the table sec:
currency_code
------------- -----------
ATS 1
AUD 22
BEF 1
CAD 32
CHF 88
DEM 183
DKK 1
ESP 1
FIM 1
The value of 6117 for USD means that the large majority of code values are
equivalent, thereby negating the effectiveness of the index on that field.
Checking the query plans, it was found that none of these indexes were used by any
query. These indexes were dropped from the data model. Specifically, the removed
indexes are
sec.XIE1sec
sec.XIE2sec
sec.XIE3sec
sec_hol_city.XIE1sec_hol_city
sec_hol_city.XIE2sec_hol_city
trade.XIE1trade
trade_leg.XIE1trade_leg
flow.XIE1flow
flow.XIE2flow
The primary key for sec_hol_city was redefined, rearranging the order of the fields to
match the query in the TransDup processes. Originally, the primary key was defined
on city_code, sec_id, and hol_type_code, but retrieval never specified a city_code. So, the
primary key was redefined to be on sec_id, hol_type_code, and city_code. In this way the
queries could make use of the index.
A-2 Data Model Changes in the 5.2.1 Release Infinity Data Model Developer’s Guide
Setting a limit on the number of rows per page for sec_hol_city
The sec_hol_city table remained a hotspot for contention. In Sybase System 11, the
max_rows_per_page parameter was set to the value 11. In System 10, however, this is
not available, so the sec_hol_city was given an additional character field of length 187
with blank as the default value to simulate this storage feature. This field is called
“filler” and will be removed once Infinity discontinues support for Sybase System 10.
This chapter gives suggestions for efficient pruning of the Infinity database in order to
hold down database size and thus increase general performance. It is intended to serve
as an introduction to the referential integrity issues an administrator would face when
designing a pruning strategy. The database does not require pruning. It has been
Infinity’s experience, however, that the performance of databases which reach large
sizes (0.5 gigabytes and up for front-office application installations) can benefit from
deleting or archiving certain unused records.
This chapter does not cover the topics of performance tuning or server configuration.
It only discusses the data itself.
Versions
Infinity version
This chapter is written to accompany Infinity Data Model version 5.2.1, but much of
the information here also applies to earlier versions of the Data Model. Note that the
version numbers of the Infinity Data Model and the Infinity applications do not always
match one another.
The current version number, release date, platform, and database type are stored in the
infsys_db_version_history table.
This chapter uses examples appropriate to the Sybase RBDMS version System 11.
Oracle and Sybase System 10 administrators may have to adjust some of the sample
queries, but the structure and usage of the Infinity data should still apply.
All code segments in this chapter were created using Sybase’s Transact-SQL and the
isql character-based interface.
Other resources
This chapter is focused on the contents of the Infinity Data Model tables. Database
administrators should refer to their Sybase or Oracle documentation for information
about data server performance tuning.
To view all the database interaction occurring in an application, put a one-line file
named “infDebugFlags” in the user home directory. This line should have one line of
text in it: “SQL”.
This flag will echo every database query to the standard output. Unless it is redirected,
this will be the terminal from which you invoke the application.
You should be sure to remove or comment out (with a # character) the debug flag once
you are finished using it, because it will significantly slow down performance for other
users who start the application while the flag is active.
For more information about the use of debug flags, see the Infinity paper Useful
Debug Flags.
Please refer to the Infinity Static Data Manager Reference Guide for information on
the modules of this application.
The auth_status table does not require any maintenance, but database administrators
should be keenly aware that if they write any scripts to manually change any tables
which have an auth_id and auth_b column, they must be sure to add rows to the
auth_status table.
See the chapter on organizations for examples of the use of the auth_id in the Infinity
Data Model.
When you first install the Infinity database, a stored procedure scans all the security
and header tables and populates w_sec_denormal with information from the these
security header tables.
This procedure should not need to be run again. The w_sec_denormal table is a
denormalized view of the security tables. Every time you insert, delete, or update a
record in a security or security header table, the corresponding action occurs on
w_sec_denormal via triggers such as sec_ti and swap_leg_header_ti.
Some administrators may prefer to circumvent the application and populate the table
directly in the database, particularly if they are adding large numbers of users.
The following Sybase SQL script populates the table to give every user the rights to
trade every product in every trading book for seven particular currencies. An
administrator would probably want to be a bit more selective than this, especially
because the script, as written below, does a five-way join. Administrators should thus
be careful with a large number of users, currencies, or trading books.
Note that the script uses view product_type_list and view currency_list instead of
infsys_montage_lists.
DELETE trader_book_authorization
go
In Trader, Futures Trader, and Futures Options Trader, each user may create his or her
own “speed buttons” to create a default set of frequently-traded securities. These
buttons are defined directly through the applications and the definitions are unique to
each user.
When a user defines a speed button in the Trader application, this populates a row in
the trader_accel table. When a user defines a speed button in the Futures Trader or
Futures Options Trader application, this populates a row in the
exchange_blotter_accel table.
New application users may prefer to copy speed buttons from other users rather than
go through the trouble of defining their own. In this case, a database administrator
could assist their new user by adding rows to the exchange_blotter_accel and
trader_accel tables.
For example, if a new user with the login name “archie” wanted to copy the Futures
Trader and Futures Options Trader speed buttons defined by the user with the login
name “jughead,” an administrator might do the following to update the
exchange_blotter_accel table:
primary_business_entity
A primary business entity is the main legal unit for the bank. In transactions, the PBE
establishes perspective, in that the PBE side is always the “us” side of the transaction.
For example, if you work at Bank Q, and all the users of the system work for divisions
of Bank Q, your PBE will probably be Bank Q. In all except internal trades, the
counterparties with which Bank Q trades are not primary business entities. Consult the
Infinity publication Infinity Customer Information Manager Reference Guide for
information on modeling organizational structures.
The stored procedure requires one parameter, the org_id of the organization you wish
to designate as a PBE. This org_id number can be found in the org table.
Sample usage:
As with any stored procedure, the complete text of the inf_add_pbe procedure may be
found with the sp_helptext command (Sybase only).
For example, if, in your trading location, there is a two-day settlement on FX trades of
USD vs. CAD, an administrator should:
1. determine the sec_id numbers for USD and CAD currency securities. These can
be found using the following query:
The city_code value must be a valid code listed in the infsys_montage_lists table, with
list_name = city_list.
Suppose you wanted to change the precision of the USD-CAD currency pair from four
to five digits. You would:
1. determine the sec_id numbers for USD and CAD currency securities. These can
be found using the following query:
To book trades using the applications, you must first define one or more trading books
to which the trades will be assigned.
The stored procedure inf_add_trading_book adds trading books to the database. The
stored procedure accepts two arguments, the name of the trading book and the org_id
of the organization that trades it. The stored procedure then populates the tables
trading_book, org_book_relation, and auth_status.
Names of trading books can have up to 12 characters. Spaces are not permitted (use an
underscore “_” instead). The Infinity applications require that the trading book name
be expressed in CAPITAL letters only.
Execute the stored procedure with the “EXEC” command, providing the name of the
trading book and org_id of the org that owns it. You do not have to put the name of the
trading book in quotes unless it is also a Sybase or Oracle reserved word:
You can execute the stored procedure repeatedly to add more trading books.
As with any stored procedure, the complete text of the inf_add_pbe procedure may be
found with the sp_helptext command (Sybase only).
The lists of available values for the Internal SIC code and SIC code fields come from
the info_value_num table. You must insert values directly into that table to have them
appear in the corresponding list boxes.
If you make changes to the info_value_str and info_value_num tables, you must
recompile ciMan.
You can modify the contents of the other list boxes in ciMan by using Infinity Static
Data Manager to add values to infsys_montage_lists. Inserting values to this table
does not require that you recompile ciMan.
There are several database tables that you may periodically alter, to configure the back
office engines and applications. The use of these tables will be explained in
forthcoming documentation on the back office engines. Contact your Infinity
representative regarding the availability of these documents.
The physical network communications port used by the ffServer and eventServer must
be stored in event_rc_config. The directory where the eventServer object code resides
must be stored in event_server_home_config.
The physical network communications port used by the infTalkServer must be stored
in inftalk_rc_config.
Curve-related tables
Curve tables will grow through time, and it is possible to eliminate unneeded
historical curve data without sacrificing any referential integrity or pricing
capabilities.
Administrators should determine a policy for curve data preservation. Of course, some
institutions’ data preservation policies may be more or less conservative than others’.
One such policy might be to eliminate (or archive) all curve data:
The tables subject to pruning would be those large tables keyed by a particular
curve_id number and a curve_datetime time stamp. In a version 5.2.1 database, these
would be the tables curve_datetime, curve_data, curve_def_derived_sec, and
curve_int_algorithm. A related (and very large) table, sec_quote, could also be
attacked in a curve-data pruning script.
A basic pruning script strategy might be to first create a temporary table filled with
curve_id numbers and curve_datetime time stamps meeting the chosen criteria. Then,
scripts would delete or archive instances of curve_datetime, curve_data,
curve_def_derived_sec, and curve_int_algorithm which use the same curve_id
numbers and curve_datetime time stamps.
To check to see if a curve instance is being used to price a trade, check against the
trade_leg_val table.
To check to see if a curve instance has been used to generate a risk report, check the
table risk_rpt_curve.
To check to see if a curve is a derived interest rate curve, check the values of
curve_def_code and curve_type_code in the curve table. The columns will read
“DERIVED” and “INTEREST,” respectively, for a derived interest rate curve.
Once you have determined which curve_datetime time stamps are no longer needed in
the database, you could also use this information to prune the sec_quote table. Rows
are added to sec_quote each time a user saves a derived interest rate curve. If a curve
instance no longer exists, the sec_quote values for that time stamp are no longer
required. To make sure you are deleting only the quotes for securities used to build a
particular curve, check the curve_def_derived_sec table.
You should never delete sec_quote values with a SETTLE quote_type_code. These
quotes are not related to curves; they reflect closing prices of exchange-traded
securities.
When initially tackling a large, bloated database, it would be wise to prune the curve
tables by joining and deleting only a few months of time stamps at a time. Otherwise
one risks filling the server transaction log.
You will probably find that you are able to delete a significant percentage of your
curve_data (over 25%) by using the criteria suggested above. This number would
depend most directly on the curve- and risk report-saving behavior of your users.
To determine which trades of different securities have matured, refer to the table
below. The sec_type_code attribute is taken from the sec table. You can tell which
kinds of securities are involved in a trade by looking in the trade_leg table, which lists
a sec_id for each trade leg.
Before maturing, deleting, or archiving a trade, you may want to check against the
flow table to make absolutely sure all the flows relating to this trade are in the past.
When deleting or archiving trades, you might be tempted to delete the security
definitions in the sec table as well. NEVER do this for exchange-traded instruments,
bonds, or currency securities. The only “safe” securities and _header tables to delete
would be matured swap legs, FRAs, caps, floors, and swaptions. For more on deleting
the securities themselves, see the section on security-related tables below.
You may also want create different archiving or deleting strategies for trades with a
PRICING, CANCELLED, NO_TRADE, or VANISHED status. Users may leave
forgotten PRICING trades sitting in the database long after they have been created.
You would probably want to remove all the PRICING trades where the
update_datetime attribute of the trade table indicates that no one has changed the
trade for a few months.
Of course, if you delete a trade, you would probably also want delete the
corresponding trans and trans_info rows.
Security-related tables
As more over-the-counter securities are traded, the sec and _header tables will fill up.
While trades of exchange-traded instruments trade one frequently-traded sec_id for
another (usually currency), OTC trades such as swaptions each create their own
securities specifically for use in that single trade. As trades are deleted or archived,
these one-time-use securities are no longer useful.
Therefore, the only “safe” securities and _header tables to delete would be matured
swap legs, FRAs, caps, floors, and swaptions.
Before maturing, deleting, or archiving a security, you may want to check against the
flow table to make absolutely sure all the flows relating to this trade are in the past.
Do not delete securities which are being used as templates or which are being used to
generate curves. Before deleting a security, be sure to check the sec_template table to
make sure no one is using it as a template. Check in curve_def_derived_sec to make
sure it is not being used as a relative security for generating curves.
The procedure for pruning unneeded volatility surface data would be similar to that
used for eliminating unneeded curve data.
As with curves, you can tell if a volatility surface is being used for trade pricing by
looking in trade_leg_val.
Also as with curves, surface timestamps which have been used to generate risk reports
are recorded in the risk_rpt_curve table In the risk_rpt_curve table, the curve_id
column may refer to a curve or surface, and the curve_usage_code specifies whether
the referenced id number was a curve or a surface.
The timestamps for a surface are stored in vs_datetime, and the points for a particular
timestamp are stored in vs_data.
Once you have selected unused surfaces and timestamps, you would want to delete or
archive data keyed by a particular vs_id and vs_datetime. These tables would be
vs_datetime, vs_data, vs_def_exp_relative, vs_def_exp_specific, vs_def_strike,
vs_def_tenor, and vs_tenor_spread.
Risk report tables can occupy large amounts of space if their growth is left unfettered.
Most likely an institution would want to archive old reports rather than simply delete
them.
Large risk report tables do not significantly slow down the Infinity applications,
because the applications only write to these tables and do not read from them. If you
are using your own query tools to read from these tables after they have been created,
then risk table size will be a more important issue for you.
Every time a risk report is saved to the database, a row is added to the risk_rpt table.
This is the table an administrator would use to determine the age of a report, using the
risk_rpt_id key and datetime attribute.
Completely archiving all the data about a particular risk report would require
archiving the rows in all tables using that particular risk_rpt_id as a key. While over
forty tables key off a risk_rpt_id number, only a handful would be appropriate for any
particular report.
For example, if you wanted to archive all the data associated with a mark-to-market
report, you would archive:
Other reports might require the archiving of a different risk_rpt_ table, as well as:
In general, it is safest to make sure you archive enough of data to recreate the analysis
completely, assuming you still have the market data and trade data needed to price the
trades. Note that in the pruning recommendations made above for curve data, it was
recommended that you preserve curve data timestamps which had been used to
generate risk reports.
expected_xfer
The expected_xfer table keeps track of every expected transfer sent through the
system. For trades that have matured, vanished, or been cancelled, you can safely
remove all expected transfers related to that trade_id.
general_ledger_post
This table lists all postings made by an expected transfer. For expected transfers
purged from the expected_xfer table, you can safely remove the general_ledger_post
entries related to that expected_xfer_id.
Sample scripts
The following script deletes all non-last-quote-in-day quotes from the sec_quote
table. Be sure to back up your sec_quote table before running this (as a backup
measure).
This script has been tested for effectiveness but not for performance. It may create a
rather large transaction log. It has not been tested on very large databases. An
administrator may want to cut the data table into smaller views representing smaller
time slices.
Market Environment Manager can still call up mid-day curves from the database after
this script has been run. If users ask for new security quotes on that day, Market
Environment Manager will load end-of-day security quotes from the previous day.
Risk Manager always calls up the last quotes for a given day when doing historical
analysis. Thus this script should have no effect on Risk Manager or Scenario Builder.
If a user calls up a trade in Trader, the curve saved along with the trade would still be
loaded as long as the curve_data table still exists. However, a user would be unable to
hedge the trade from within the Trader worksheet.
Note that this data pruning strategy is much more reckless than the strategies outlined
earlier in this chapter. This less conservative strategy is designed to preserve only the
ability to reprice trades as the curves existed at the end of a trading day. The script is
The quote_type_code attribute in the sec_quote table does not necessarily reflect the
time of day at which a quote was saved. You may have, for instance, a 16:00:00
“CLOSE” instance and then a 16:01:30 “OPEN” instance of the same security quotes.
The Market Environment Manager, Trader, and Risk Manager applications select the
last curve timestamp on a given day regardless of the quote_type_code values of the
security quotes.
Administrators should first test this script by changing all the “DELETE” statements
to “SELECT” statements and making sure the unneeded quotes are the only ones
being erased.
This script is broken into two parts—the first part deletes instances where
sec_quote.settlement_sec_id values are NULL, and the second part deletes where
they are not NULL. The script is broken up this way to provide more control and to
more precisely cover different possible cases. This value is NULL for quotes which
are simply prices (such as a price for a future) and the value is non-NULL where one
security is quoted in terms of another (such as an FX quote).
This script was initially written for Sybase version 4.x, which does not allow the use
of cursors. This script would be more efficient in Sybase System 10 or 11 if it were
rewritten to use cursors.
DELETE sec_quote
WHERE convert(varchar(10),sec_id)+
convert(varchar(10),settlement_sec_id) +
convert(varchar(25), quote_datetime)
IN
(SELECT convert(varchar(10),sec_id)+
(SELECT max(quote_datetime)
FROM sec_quote sq2
/* the inner select has its own version of sec_quote
called sq2 */
WHERE
sq1.sec_id = sq2.sec_id
AND
sq1.settlement_sec_id = NULL
AND
sq2.settlement_sec_id = NULL
AND
convert(varchar(15),sq1.quote_datetime, 101) =
convert(varchar(15), sq2.quote_datetime, 101)
)
)
go
print ’’
print ’New number of rows in sec_quote:’
select count(*) from sec_quote
print ’’
go
DELETE sec_quote
WHERE convert(varchar(10),sec_id)+
convert(varchar(10),settlement_sec_id) +
convert(varchar(25), quote_datetime)
(SELECT convert(varchar(10),sec_id)+
convert(varchar(10),settlement_sec_id) +
convert(varchar(25), quote_datetime)
(SELECT max(quote_datetime)
FROM sec_quote sq2
/* the inner select has its own version of
sec_quote called sq2 */
WHERE
sq1.sec_id = sq2.sec_id
AND
sq1.settlement_sec_id != NULL
AND
sq2.settlement_sec_id != NULL
AND
sq1.settlement_sec_id = sq2.settlement_sec_id
AND
convert(varchar(15),sq1.quote_datetime, 101) =
convert(varchar(15), sq2.quote_datetime, 101)
)
)
The Infinity Data Model Reference Guide, versions 5.2 and 5.2.1, includes diagrams
of the various areas of the Infinity Data Model, lists all static data shipped in the Data
Model, and lists the contents of foundation and holiday tables.
The Infinity Data Model Quick Reference, versions 5.2 and 5.2.1, contains an
alphabetical listing of every table and attribute in the database. Also available is the
Data Model Quick Reference and List of Modifications. For each release, this
document points out the changes in the Data Model from the previous version. The
Quick Reference is shipped on the Infinity release CD in Adobe Acrobat and
FrameMaker formats.
The Infinity Data Model Quick Reference—On-Line Version, is an ASCII text version
of the Quick Reference described above. This document is shipped on your Infinity
release CD. The file is called
/online-docs/acrobat/data_model/quickref/quickref.txt
Nath, Aloke. The Guide to SQL Server. Addison-Wesley, Reading, Massachusetts, 1990. This
volume discusses the implementation of a relational database using the Sybase SQL
Server RDMS and isql.
All examples, unless specified, are taken from the Montage Data Model.
ALTERNATE KEY A candidate key that has not been chosen as the primary key.
ASSOCIATIVE ENTITY An entity that inherits its primary key from two or more other entities.
For example, prsn_org_relation is an associative entity; it more
effectively models a many-to-many relationship between prsn and
org.
BASE ATTRIBUTE An attribute for which a role name is assigned. See also role name.
CASCADE A procedure for ensuring that the deletion of an entity instance causes
the simultaneous deletion of all other entity instances dependent on it
for existence.
CHILD ENTITY The entity to which a relationship contributes a foreign key; found on
the ‘many’ end of the one-to-many relationship.
COMPOSITE KEY A primary key that contains two or more attributes, possibly foreign
keys.
DATATYPE Specifies what kind of information each column will hold and how
the data will be stored. An attribute can be represented using an
DEPENDENT ENTITY An entity that depends on one or more other entities for its
identification. Its primary key contains foreign keys.
DERIVED ATTRIBUTE An attribute which can be determined from the values of other
attributes.
DOMAIN A set of values that an attribute may take. In the Montage database,
these sets of values are stored in _domain tables.
FIRST NORMAL FORM A standard for relational database design in which repeating fields or
repeating groups of fields are removed.
INDENTIFIER The name of a database object (table, view, index, procedure, trigger,
column, default, or rule). An identifier can be from 1 to 30 characters
long. The first character must be a letter or either the # or _ symbols.
IDENTIFYING
RELATIONSHIP A relationship in which all primary key attributes of the parent entity
become part of the primary key of the child entity.
INDEPENDENT
ENTITY An entity that does not depend on any other entity for identification.
For example, the seed tables are all independent entities.
D-2 Glossary of Relational Modeling Terms Infinity Data Model Developer’s Guide
indexes sort primary key attributes in order. Non-clustered indexes
create an extra level of pointers to data.
KEY A field used to identify a record, also often used as the index field for
an index. In entity-relationship diagrams, key attributes are those
shown above the key line. See also non-key.
LIST In the Montage database, a table (ending in _list) storing code values
to describe any particular entity.
NONIDENTIFYING
RELATIONSHIP A relationship in which the child entity gets data from the parent
entity, but the primary key of the parent entity only becomes a non-
key attribute of the child entity.
PARENT ENTITY The entity from which a foreign key migrates; found on the ‘one’ end
of a ‘one-to-many’ relationship.
PRIMARY KEY An attribute or group of attributes that has been chosen as the unique
identifier of an entity.
REFERENTIAL
INTEGRITY The rules governing data consistency, specifically the relationships
among the foreign keys of tables. Foreign key data must always be
matched to maintain referential integrity.
RESTRICT A process to ensure that deletion of an entity instance will not occur
unless there are no other instances dependent on it for existence.
ROLE NAME A new name for a foreign key attribute that defines the role it plays in
the child entity. For example, related_org_id is a role name in the
org_org_relation entity. Its domain must be a subset (which can
include the entire set) of the domain of the foreign key.
ROW A set of related columns that describes a specific entity; also called a
record or instance.
SECOND NORMAL
FORM A standard for relational database design that involves tables that
have composite primary keys (i.e., primary keys that consist of two or
more concatenated secondary or foreign keys). This standard requires
that all columns in such a file be dependent upon the entire primary
key expression rather than upon any part thereof.
SEED TABLE In the Montage database, a single-instance table containing only one
column: an identification number. Seed tables are necessary to
guarantee unique id numbers for such entities as org, curve, and sec.
STRUCTURED QUERY
LANGUAGE (SQL) A data definition and manipulation language developed for use in
relational database management systems.
THIRD NORMAL FORM A standard for relational database design that requires the elimination
of any nonkey field dependent upon any other fields except the
primary key.
TRIGGER A special form of a stored procedure that goes into effect when a user
gives a change statement such as INSERT, DELETE, or UPDATE to a
specified table or column. Triggers are used to enforce referential
integrity.
USER-DEFINED
DATATYPE A definition of the type of data a column can contain, created by the
user and defined in terms of the existing system datatypes.
D-4 Glossary of Relational Modeling Terms Infinity Data Model Developer’s Guide
Index avg_calc_method_domain 5-4
B
base tenor 12-3
base_rate 8-29
basis curves 11-7
A benchmark_sec_id 8-46
Access (Microsoft) 14-1 bid_value 8-11
access_func_group_list 5-11 binary_payoff_amount 9-6
Account Manager District B-9 Bluestone dbViewer 14-1
account_type_domain 5-4 bond on special 11-10
accrual_date_roll_code 8-18 bond options 8-45
accrual_day_count_code 8-18 bond/spread set 8-46
accrued_interest 8-49 bond_attribute 8-4, 8-31
act_notl_code 8-18 bond_future_attribute 8-4
act_notl_domain 5-4 bond_header 8-31
active_bucket_id 5-18 bond_spread_benchmark 8-45
adding applications users B-4 bond_type_code 11-10
adding trading books B-9 bond_type_domain 5-4
addr_type_list 5-11 bonds 8-31
admin_type_domain 5-4 book-based user authorization B-4
advice_status_domain 5-4 books B-9
advice_type_list 5-11 bucket_length 5-19
amort_calc_date_roll_code 8-30 bucket_start 5-18, 5-19
amort_calc_lag_day_type_code 8-30 business_event_list 5-11
amort_calc_lag_term 8-30 business_type_domain 5-4
amort_calc_timing_code 8-30
amort_curve_spread_rate 8-29
amort_from_original_b 8-29 C
amort_frq_code 8-19 calc_weight_rate 9-6
amort_index_spread_rate 8-29 cap_floor_code 8-35
amort_pay_amount 8-19 cap_floor_domain 5-4
amort_start_date 8-19 cap_floor_header 8-34
analysis_date_type_domain 5-4 maintaining B-14
applications users: adding B-4 cardinality 2-5
archiving data B-1 cash securities 8-4
_attribute tables 8-4 child organization 4-7
attributes 2-2 child tables 2-5
audit database city_list 5-11
performance 5-21 Classification field in CiMan B-9
auth_b 4-9 clean_up_call 8-29
auth_id 4-9 closing prices: saving B-11
auth_seed B-3 _code 5-1
auth_status 4-9 collateral bond 8-47
maintaining B-3 collateral_amount 8-49
auth_status_domain 5-4 collateral_id 8-49
auth_type_domain 5-4 collateral_price 8-49
authorization B-4 columns
changing order 5-24
compound_calc_timing_code 8-20 curve_hol_city 11-2, 11-20
compound_spread_rate 8-20 curve_id 11-3
compound_type_code 8-20 curve_instance_code 11-13
compound_type_domain 5-4 curve_instance_domain 5-5
compounding 8-20 curve_int_algorithm B-11
concurrency 5-23 curve_int_algorithm_domain 5-5
contact_type_list 5-11 curve_interest_header 11-5
contract_series_list 5-11 curve_interpretation_code 11-3
contract_series_sec_type 8-37 curve_interpretation_list 5-12
contract_size_amount 8-38 curve_level_type_code 11-3
country_list 5-11 curve_level_type_domain 5-5
CP rate 10-1 curve_offset_term 11-15
cpty 4-9 curve_repo_group 11-12
cpty_role 4-9 curve_repo_group_special 11-11
cpty_role_list 5-11 curve_repo_header 11-10
cpty_type_list 5-11 curve_seed 5-23, 11-3
cum_dividend_b 8-47 curve_side_domain 5-5
currency curve_status_code 11-3
modeled as security 7-3, 8-4 curve_status_domain (not used) 5-5
currency_code 8-4, 8-7, 11-4 curve_status_list 5-12
currency_list 5-12 curve_type_code 11-4
currency-based user authorization B-4 curve_type_domain 5-5
curve 11-1, B-11 curve_usage_domain 5-5
and trade legs 7-11 curve_volatility_header 11-5, 11-9
basis 11-7 curve-related tables: maintaining B-10
curve table 11-3 Custom Interval Algorithm 5-22
dependent 11-15 Custom SQL field 13-6
holidays 11-20 Customer Information Manager B-6, B-9
interest 11-5
simple 11-15
used in risk reports B-11 D
volatility 11-9 data independence 2-1
volatility, modeling underlying curves 11-15 data model
curve_archive_domain 5-4 index definitions A-1
curve_basis_header 11-5, 11-7 key definitions A-1
curve_curve_operator_code 11-17 or just look like one
curve_curve_operator_domain 5-4 data model extension 5-24
curve_data 11-1, 11-13 data_group_list 5-12
maintaining B-11 database management systems 2-1
curve_data_code 11-4 datatypes 3-3
curve_data_domain 5-5 dropping or modifying 5-24
curve_datetime 11-1, 11-13, B-11 date_roll_domain 5-5, 8-30
curve_def_code 11-4 datetime_curve_status_code 11-13
curve_def_dependent 11-1, 11-15, 11-17 day_count_code 8-18
curve_def_derived_curve 11-1, 11-15, 11-20 day_count_domain 5-5
curve_def_derived_sec 11-1, 11-15, 11-18, B-11, DBMS 2-1
B-15 dbViewer 14-1
curve_def_domain 5-5 deadlocking fix 5-17
curve_def_simple 11-1, 11-15 debugFlags B-2
curve_fx_header 11-5 denormalization 2-10
description 8-7, 11-4 F
doc_index_list 5-12
filler column in sec_hol_city A-3
doc_tmpl_group_list 5-12
Fin++ class library 1-2
doc_type_list 5-12
final_exchange_amount 8-18
domain codes
first_ex_delivery_date 8-39
data integrity 5-10
first_exercise_date 8-44
domain_name 5-2
fixed_rate 8-18
floor 8-35
E flow 8-49
Easter, see holidays basic relationships 7-2
emp_prsn table 4-2, 4-6 general identification fields 9-3
emp_type_list 5-12 index-related flow fields 9-4
employee maintaining B-14
relationship with organization 4-1 option-related flow fields 9-5
entered_datetime 8-6 flow_amount 9-3
entered_user_code 8-7 flow_calc_code 8-21, 9-4
entity 2-2 flow_calc_date 9-4
associative 2-7, 4-5 flow_calc_date_roll_code 8-21
dependent 2-5 flow_calc_domain 5-6
independent 2-5 flow_calc_frq_code 8-21
names 2-3, 2-8, 3-6 flow_calc_lag_day_type_code 8-21, 8-22
Error Log flow_calc_lag_term 8-21
Scenario Builder 14-3 flow_calc_rate 9-4
error_list 5-12 flow_calc_reset 9-6
error_severity_list 5-12 maintaining B-14
event_date 8-49 flow_calc_start_date 8-21
event_rc_config B-10 flow_calc_timing_code 8-21
event_server_home_config B-10 flow_calc_timing_domain 5-6, 8-30
exchange traded instruments: saving closing prices flow_date 9-3
B-11 flow_discount_rate 9-4
exchange_attribute 8-4, 8-38 flow_id 8-49, 9-3
exchange_blotter_accel flow_rate_calc_code 8-21, 9-4
maintaining B-5 flow_rate_calc_domain 5-6
exchange_header 8-37, B-13 flow_term 9-3
exchange_list 5-12 flow_timing_code 8-19
exchange-traded instruments 8-37 flow_timing_domain 5-6
maturing B-14 flow_type_code 9-3
exercise_code 9-5 flow_type_domain 5-6
exercise_domain 5-5 foreign exchange 8-4
exercising trades B-13 foreign exchange settlement term B-7
expectation_domain 5-5 foreign key 2-5, 2-6
expected_xfer_state_domain 5-5 from_clause 13-3
expected_xfer_status_domain 5-5 frq_domain 5-6
expected_xfer_timing_domain 5-5 FX quote precision B-7
expected_xfer_type_domain 5-6 fx rates 8-4
extending the data model 5-24 FX settlement term B-7
FX Trader application B-7
fx_quote_style 8-5
fx_swap_type_domain 5-6
G infsys_seed_bases 5-15, 5-18
infsys_seed_partitions 5-15, 5-18
greek_calc_method_domain 5-6
infsys_version_history B-1
initial_bucket_id 5-18
H initial_exchange_amount 8-18
instance 2-2
haircut 8-47
interest_curve_spread_rate 8-29
_header tables 8-3, B-12, B-14
interest_index_spread_rate 8-29
maintaining B-14
Internal SIC code B-9
hol_data 6-3
interp_code 11-4
hol_header 6-1, 6-5, 15-1, 15-2
interp_domain 5-6
hol_type_code 6-7, 8-9
interval in infsys_seed_partition 5-18
hol_type_domain 5-6, 6-7
in-the-money B-13
holiday
isexercisable 8-44
absolute, Easter, and specific 6-5
isql 14-1
holiday tables 6-1
issuer_inst_code 11-10
adding values B-3
issuer_inst_list 5-12
defining new holiday rules 6-4
using SQL to query 6-3
holiday, removing 6-6 J
holidays 8-8
job_func_list 5-12
I K
id numbers
keys 2-4
obtaining in 5.2 5-23
normalization rules 2-10
obtaining in 5.2.1 5-17
identification numbers 5-15
identification_str 7-6 L
IMM futures and futures options B-14 lag_day_type_domain 5-6
index amortizing swap 8-29 lang_domain 5-6
indexes 3-8 last_ex_delivery_date 8-39
clustered 3-8 legal entity 4-7
composite 3-8 legal_agmt_clause_list 5-12
non-clustered 3-8 legal_agmt_list 5-12
unique 3-8 legal_entity 4-7
inf_add_pbe stored procedure B-7 LIBOR reference index 10-1
inf_add_trading_book stored procedure B-9 list codes
infLogin.scenario 14-3 and data integrity 5-14
info_data_type_domain 5-6 modifying 5-14
info_db_table_domain 5-6 list tables 5-11
info_type_list 5-12 adding values B-2
info_value_num B-9 live feed address 5-14
info_value_str B-9 loan_event 8-48
infsp_getseed 5-17, 5-20 loan_event_flow_relation 8-49
infsys_action_list 5-12 loan_event_id 8-49
infsys_dist_seed_bases 5-15 loan_event_type_code 8-49
infsys_montage_domains 5-2 loan_event_type_domain 5-6, 8-49
infsys_montage_lists 5-2 lockout_period 8-29
infsys_seed_base_buckets 5-15, 5-19
M org table 4-6
org_addr_relation_list 5-13
manual_reset_b 8-23
org_book_relation B-9
in flow table 9-4
org_book_relation_list 5-13
many-to-many relationship 4-4
organization
matured trades B-12
participation in trade leg 7-8
maturity_date 8-18, B-12
relationship with employee 4-1
maturity_term 8-13, 9-4
organization relationships 4-7
Microsoft Access 14-1
otc_option_header 8-44
Middleman 5-14
maintaining B-14
modified_b
otc_option_sec_usage_list 5-13
in porfolio table 13-3
otc_option_underlying_domain 5-7
money market instruments 8-42
out-of-the-money B-13
money_market_attribute 8-4, 8-42
over-the-counter securities B-14
money_market_header 8-42
money_market_type_domain 5-7
Montage P
abstract table diagram 3-3 parent organization 4-7
functional areas 3-1 parent tables 2-5
system schematic 1-2 partic_side_domain 5-7
month_cycle_domain 5-7 partic_type_domain 5-7, 7-9
partition_id 5-18
N password_use_domain 5-7
payment dates
naming conventions 3-6
holidays 6-7
tables and columns 3-4
payment_date_roll_code 8-20
ND_PATH 14-2
payment_direction_domain 5-7
non_legal_entity 4-7
payment_engine_oper_domain 5-7
non-keys 2-4
payment_engine_state_domain 5-7
non-legal entity 4-7
payment_frq_code 8-19
normal form 2-10
payment_lag_day_type_code 8-20
normalization 2-9
payment_lag_term 8-20
NULL 2-6
payment_notif_domain 5-7
‘0’ and ‘1’ in Quick Reference 4-6
payment_start_date 8-19
number_of_seed_buckets 5-18, 5-19
payment_status_domain 5-7
payment_type_list 5-13
O PBE B-6
pbe_org_id 4-8
object_org_id 4-8
performance gains 5-20
offer_value 8-11
performance of the database B-1
official_b 9-4
period_maturity_date 9-4
offset days 6-2
period_start_date 9-4
one-to-many 2-5
pnl_decomp_item_domain 5-7
Optimal Interval Algorithm 5-22
pnl_decomp_sequence_domain 5-7
option_maturity_date 9-5
pnl_trade_leg_status_domain 5-7
option_maturity_term 9-5
populate.csh shell script 5-20
option_type_domain 5-7
portfolio 13-1
Oracle 14-1
basic relationships 7-2
org
contrasted with transaction 13-1
designating a primary business entity B-7
dynamic and static definitions 13-1
generating risk reports for more than one 14-9 R
Portfolio Definition window 13-6
Rate Calc Manager 10-4
portfolio table 13-3
rating_source_list 5-13
portfolio_criterion_choice 13-4
rating_type_list 5-13
portfolio_criterion_domain 5-8, 13-4
RDBMS 2-1
portfolio_def 13-4
rebate_amount 8-44
portfolio_name 13-4, 14-8
ref_index_address 5-14
portfolio_status_code 13-3
ref_index_attribute 10-1, 10-3
post_operation_domain 5-8
ref_index_code 8-23, 8-47
post_state_domain 5-8
ref_index_currency_code 8-23, 8-47
post_type_domain 5-8
ref_index_factor 8-24, 9-5
prefix naming conventions 3-6
ref_index_hol_city 10-1, 10-4
pre-loaded data 5-1
ref_index_index_relation 10-1, 10-6
PRICING trade status B-14
ref_index_list 5-13, 10-1, 10-2
primary key 2-4
ref_index_quote 5-14, 10-1, 10-5
primary_business_entity 4-8
ref_index_relation_def 10-1, 10-6
maintaining B-6
ref_index_relation_domain 5-8, 10-1, 10-6
principal
ref_index_source_code 8-24, 8-47
actual 8-18
ref_index_source_list 5-13, 10-1, 10-2
notional 8-18
ref_index_spread_rate 8-24, 9-5
principal_amount 8-18, 8-49, 9-4
ref_index_term 8-23, 8-47, 9-4
printer_list 5-13
ref_index_term_source 10-1, 10-4
process_org 4-8
reference index 10-1
process_org_coverage 4-8
adding 10-2
processing org 4-8
maintaining B-2
product_type_list 5-13
reference index relationships 10-6
proj_flow_date_domain 5-8
reference_str 7-6, 8-7
prsn table 4-2
referential integrity 2-1
prsn_org_relation 4-5, 4-6
related_curve_1 and related_curve_2 11-17
prsn_org_relation_list 5-13
relational data model 2-1–2-10
pruning B-1
relationships 2-3
put_call_code 9-5
identifying 2-5
put_call_domain 5-8
recursive 2-9
relative securities 8-13
Q deleting B-15
querying tools 14-1 removing old data B-1
Quick Reference repo_date_roll_code 8-47
column meanings 4-6 repo_day_count_code 8-47
quote precision for FX rates B-7 repo_group_id 11-11, 11-12
quote tables 5-14 repo_group_name 11-12
quote_datetime 8-10 repo_header 8-47
quote_history_code 10-4 repo_rate 8-49
quote_history_domain 5-8 repo_roll_method_code 8-47
quote_method_code 8-11 repo_roll_method_domain 5-8
quote_method_domain 5-8 repo_term 8-47
quote_price 7-6 repo_type_code 8-47
quote_type_code 8-10, B-11 repo_type_domain 5-8
quote_type_list 5-13 reports: from Risk Manager 14-5
reset dates
holidays 6-7 in flow table 9-3
reset group 9-6 sec_ident_list 5-13
reset_calc_align_code 8-22 sec_name 8-7
reset_calc_align_domain 5-8 sec_product
reset_cutoff_term 8-23 maintaining B-14
reset_day_of_month 8-22 sec_product_domain 5-9
reset_frq_code 8-22 sec_quote 5-14, 8-2, 8-10
reset_group_id 9-5 maintaining B-11, B-17
reset_period_term 8-22 used in fx trades 8-4
reset_weekday_code 8-23 sec_quote_address 5-15
Risk Manager 14-1 sec_recalc_lock 8-12
Risk Manager application sec_relative 8-2, 8-13
saving portfolios 13-5 maintaining B-3
risk report sec_settle_sec_city_spot B-7
for multiple base counterparties 14-10 sec_settle_sec_tick_size B-7
retrieval 14-1–14-11 sec_template
risk report tables maintaining B-3, B-15
maintaining B-16 sec_type_code 8-7
risk_analysis_domain 5-8 sec_type_domain 5-9
risk_batch_def 14-8 sec_val_domain 5-9
risk_batch_name 14-2 security tables 8-1
risk_batch_run_id 14-3, 14-5 deleting records B-14
risk_rpt seed bucket generation algorithms 5-21
maintaining B-16 seed buckets 5-17
risk_rpt_ tables 14-1–14-11 seed numbers
risk_rpt_curve_ 14-8, B-11 retrieving 5-24
risk_rpt_domain 5-8 seed tables
risk_rpt_instance_domain 5-8 in v5.2 5-22
risk_rpt_instruct_domain 5-9 in v5.2.1 and later 5-15
risk_rpt_param 14-8 seed values
role name 2-8, 7-6 obtaining in 5.2 5-23
row 2-2 obtaining in 5.2.1 5-17
rtd_mdds_list 5-13 select_clause 13-3
sequence_number 9-3
Sequential Interval Algorithm 5-22
S SETTLE quote_type_code B-11
sat_roll_offset_day 6-2 settlement days required for FX trades B-7
Scenario Builder 14-1 settlement_date 7-6
sec 8-2, 8-6 settlement_method_code 8-38, 8-44
deleting records B-14 settlement_method_domain 5-9
maintaining B-14 settlement_sec_id 8-10
modeling a vanilla swap 8-8 settlement_term 8-11, 8-13
sec_curve_default SIC code B-9
maintaining B-14 simple volatility surface 12-1
sec_def_code 8-6 size of database B-1
sec_def_domain 5-9 source field 8-7
sec_fees 8-2 sp_helptext B-7
sec_hol_city 8-2, 8-8, A-2 speed buttons B-5
sec_id 8-6, 8-17, 8-46, 8-49, 11-10 speed of database B-1
example of primary key 2-4 spread 8-5
spread_set_name 8-46 trade 7-1
spread_type_code 8-46 basic relationships 7-2
spread_type_domain 5-9 diagram with trans and trade_leg 7-2
SQL trans_id 7-6
Transact-SQL 5-23 update_datetime 7-6
SQL debugging flag B-2 trade leg
SQL portfolio definitions 13-1 basic relationships 7-2
start_date 8-18 primary and settlement legs 7-7
start_term 8-13, 9-5 trade table 7-5
static data 5-17 maintaining B-12
Static Data Manager application B-2, B-15 trade_amount 7-7, B-8
status_list 5-13 trade_attention_list 5-13
stlmt_bank_domain 5-9 trade_date 7-6
strike_price 8-35, 9-6, B-13 trade_info_domain 5-9
structure_code 8-17 trade_keyword_list 5-13
structure_domain 5-9 trade_leg 7-1
structured query language 13-1 diagram with trans and trade 7-2
subject_org_id 4-8, 7-6 trade_leg table 7-7
suffixes 3-7 trade_leg_org_partic 7-9
sun_roll_offset_day 6-3 trade_leg_type_code 7-7
Surrogate Primary Key Generation 5-17 trade_leg_type_domain 5-9
swap trade_leg_val 7-11, B-11, B-15
annuity structure 8-17 trade_partic_type_domain 5-9
bullet payment structure 8-17 trade_sec_relation_domain 5-9
custom structure 8-17 trade_status_code 7-6, B-12
equal principal payment structure 8-17 trade_status_list 5-13
full coupon payment structure 8-17 trade_trade_relation_domain 5-10
vanilla swap modeled in sec table 8-8 trade_type_code 7-6
zero coupon structure 8-17 trade_type_list 5-14
swap_leg_code 8-17 Trader Manager application B-4
swap_leg_domain 5-9 trader_accel
swap_leg_header 8-14 maintaining B-5
maintaining B-14 trader_book_authorization
swap_leg_index_amort_header 8-29 maintaining B-4
swaption trader_prsn_id 7-6
exercising B-13 trade-related tables: maintaining B-12
Sybase 14-1 trading_book B-9
system administration trans
customizing or extending the data model 5-24 diagram with trade and trade_leg 7-2
trans table 7-4
maintaining B-12
T trans_id 7-4
tables 2-2 trans_info_domain 5-10
dropping 5-24 trans_seed 7-4
tenor spread surface 12-1 transaction 7-1
term_domain 5-3, 5-9 basic relationships 7-2
them side of trade 4-8 contrasted with portfolio 7-3
TIBOR reference index 10-1 transaction control 5-23
tick_size_code B-8 transaction locking 5-23
tick_size_domain 5-9 transaction log B-11
transaction-related tables: maintaining B-12
Transact-SQL 5-23, 14-1
TransDup 5-17, 5-20
transmission_list 5-14
U
underlying_flow_id 9-5
unit_time_domain 5-10
update_datetime 8-7, 8-11, 8-46
us side of trade 4-8
user authorization B-4
user_acct_status_domain 5-10
user_code 11-4, 11-12
user_default B-2
user_group_list 5-14
users: adding for applications B-4
V
val_delta_calc_domain 5-10
verified_user_code 8-7
volatility surface-related tables: maintaining B-15
volatility surfaces 12-1
volatility_type_domain 5-10
vs table 12-1
vs_data 12-5
maintaining B-15
vs_datetime 12-5
maintaining B-15
vs_def_ tables 12-2
vs_def_code 12-1
vs_def_domain 5-10
W
w_sec_denormal 2-10, 13-2
maintaining B-3
weekday_domain 5-10
weekend_domain 5-10
weighted average rates 9-6
WHATSNEW file on release CD 5-22
where_clause 13-3