Trading Database
A
database
is a collection of information. The
brokerage statements of a trader, or the price and
volume data of various futures contracts are both
examples of a database. There are all kinds of
databases, but the ones we will be concerned with
relate to commodity information such as the open,
high, low, and close of a future contract.
The
manipulation of a database is of great importance to
many traders. Manipulation is the ability to perform
calculations on the data, such as a moving average
of price data or any other type of study. We may
then analyze the information to see how certain
trading strategies compare with others.
A
database language is a program designed to allow the
user to access important information about the data.
It is one of the most efficient ways of finding
information. However, if the data require many
calculations, you should look into a spreadsheet or
programming language. The decision of a spreadsheet
or programming language depends on the amount of
data and the complexity of the calculations.
In
trading, most databases consist of the price
information such as the open, high, low, close,
volume, and open interest. The data is usually
grouped by day or some form of time. Most of the
data for a data base is usually obtained either with
diskettes or through modem via phone, satellite, or
other source. Each computer language works with a
database in different ways. Some are much more
efficient than others.
A
record structure
pertains to how the data
is organized. An
individual record refers to a specific day or time
of the data. For example, a typical record of
futures prices may contain the date, open, high,
low, close, volume, and open interest for the day.
The next record will have the next day's
information. The combination of all the trading days
for the future constitutes a data file on the
futures contract. A NYSE data file might contain the
date, prices, volume, and open interest for the
March 1991 contract.
A
field
refers to a specific element of the
record.
The opening price or
volume figure is a field in a record. We can have
all types of fields in a record.
A
key or primary key is a field which uniquely
identifies a record.
For example, the date
of January 31, 1992 uniquely identifies the opening,
high, low, and closing price for the March 92
treasury bonds. A key provides a way to efficiently
access large amounts of data.
One
of the important considerations in designing a
database is the way a record is structured. The
structure of a record can have a great impact on how
easy or hard it is to access or manipulate the data,
or to work with other programs or databases. The
database is the skeleton, or foundation, of the
information system. A poorly designed database will
have problems in speed, access, efficiency, and many
other applications, no matter how well the programs
are designed or how fast the computers may operate.
The programmer must place crucial importance to the
design of the database.