ASPEN_INSTRUMENT

 

Related Items

 

 

Purpose

Identifies the characteristics of an instrument.

 

 

Structure

typedef struct

{

   ASPEN_INUM           inum;

   char                 symbol[ASPEN_SYMBOL_SIZE+1];

   char                 description[ASPEN_SYMDESC_SIZE+1];

   int                  type;

   ASPEN_ATTRIBUTES     attributes;

   int                  exchange;

   ASPEN_QUANTUM        quantum;

   ASPEN_QUANTUM        strike_quantum;

   ASPEN_PRICE          strike_price;

   unsigned int         expire;

   float                dollars;

   int                  tradingSessionCount;

   ASPEN_SESSION_TIME   tradingSession[ASPEN_MAX_TRADING_SESSIONS];

   ASPEN_TICK           last;

   ASPEN_PRICE          trade;

   ASPEN_VOLUME         trade_size;

   int                  trade_exchange;

   ASPEN_PRICE          bid;

   ASPEN_VOLUME         bid_size;

   int                  bid_exchange;

   ASPEN_PRICE          ask;

   ASPEN_VOLUME         ask_size;

   int                  ask_exchange;

   ASPEN_PRICE          high;

   ASPEN_PRICE          low;

   ASPEN_PRICE          previous;

   ASPEN_PRICE          net_change;

   ASPEN_VOLUME         open_interest;

   ASPEN_VOLUME         prev_futures_volume;

   ASPEN_PRICE          open;

   ASPEN_PRICE          open2;

   ASPEN_PRICE          close;

   ASPEN_PRICE          close2;

   ASPEN_VOLUME         dvolume;

   ASPEN_VOLUME         uvolume;

   ASPEN_VOLUME         tvolume;

}ASPEN_INSTRUMENT;

 

 

Fields

inum

inum, or instrument number, contains a unique value used to identify an instrument when retrieving information about that instrument. The inum is only valid for the duration of the session and is session-specific, i.e., not valid with any other session.

 

symbol

symbol is an ASCIIZ character string with up to ASPEN_SYMBOL_SIZE characters and a terminating null.

 

Ticker symbols vary from feed to feed. Generally speaking, stocks are fairly uniform (with the exception of Rueters (formerly BridgeFeed), which employs a convention for specifying instrument region and type). U.S. Futures are also fairly uniform, but non-U.S. Futures are not.

 

description

description is an ASCIIZ string with up to ASPEN_SYMDESC_SIZE characters and a terminating null. This field contains a description of the financial instrument (if description text was provided by the datafeed to the Server). For example, if symbol contained "MSFT", then description might contain “Microsoft Corporation”.

 

type

type identifies the fundamental type of the instrument. Constants have been defined to represent all possible values. The prefix for each identifier is ASPEN_IT_.

 

Every financial instrument an Aspen Server records in its database is assigned a specific instrument type.

 

Also, every exchange defined in a Server has an associated type which is representative of the types of instruments traded on that exchange.

 

Following is an alphabetic list of possible values for instrument type fields and the meanings of those values:

 

Constant

Instrument Type

ASPEN_IT_BASKET

Baskets of securities.

ASPEN_IT_CASH_SPOT

Cash or spot prices on commodities.

ASPEN_IT_CORP_BOND

Corporate bonds.

ASPEN_IT_FOREX

Foreign exchange instruments.

ASPEN_IT_FUTURE

Futures contracts.

ASPEN_IT_INDEX

Indices or statistical values.

ASPEN_IT_MONEY_MARKET

Money Market Funds.

ASPEN_IT_MORTGAGE

Mortgage-backed securities.

ASPEN_IT_MUNI_BOND

Municipal Bonds.

ASPEN_IT_MUTUAL_FUND

Mutual Funds.

ASPEN_IT_SPREAD

Spreads on Futures or Options.

ASPEN_IT_STOCK

Stocks.

ASPEN_IT_TREASURY

Cash US Treasuries

ASPEN_IT_UNKNOWN

Instruments for which the Server has insufficient information to assign one of the other instrument types.

 

attributes

attributes are stored in an ASPEN_ATTRIBUTE structure that specifies any special attributes associated with this instrument. The currently supported attributes are

 

attributes.options

attributes.puts

attributes.calls

 

Each of these fields may be evaluated as either TRUE or FALSE for a given instrument. Note that if attributes.options is FALSE neither attributes.puts nor attributes.calls may be TRUE.

 

exchange

exchange is an Aspen-defined exchange number which identifies the exchange on which the instrument trades. The ASPEN_GetExchangeInfo service may be used to obtain more information about particular exchanges.

 

quantum

The quantum specification is used to interpret all price value fields (fields of type ASPEN_PRICE) for an instrument (excluding strike_price).

 

strike_quantex, strike_price

These two fields collectively specify a strike-price value for an option (put or call) instrument in accordance with the rules for Price Values. These values are only valid for an instrument whose option attribute is TRUE.

 

expire

expire gives the expiration date of a futures contract or an option (put or call). The date is given in terms of days since January 1, 1900.

 

dollars

The dollars field is a single-precision (4-byte) floating point number representing the value in U.S. Dollars corresponding to every normalized whole-point price move of the instrument. For example, if the instrument was measured in sixteenths, dollars would represent the dollar value of a change of 16/16ths, or 1 (one).

 

tradingSessionCount

tradingSessionCount gives the number of defined trading periods, or trading sessions, per day for the instrument.

 

tradingSessions[]

tradingSessions[] is an array of structures where each structure specifies the opening and closing time for one trading session within a day. The value of tradingSessionCount indicates how many array elements contain valid trading session descriptions. Elements tradingSessions[0] to tradingSessions[tradingSessionCount - 1] comprise, in increasing chronological order, all of the valid trading periods for the instrument. See page Time Values, page 21, for details on interpreting opening and closing times.

 

Every defined exchange also has an associated set of trading periods. Generally, the trading periods defined in an instrument's master record are identical to those of the instrument's primary exchange. However, sometimes they are different, and the instrument's definition should take precedence.

 

last

last is an ASPEN_TICK structure containing information regarding the last tick for the instrument received by the Server from the data-feed. Tick information includes a price, volume, absolute time, tick type and possibly some additional attributes. At end-of-day processing, the sub-fields last.price and last.volume are both reset to ASPEN_NO_NUM.

 

last is the only field which will contain information from refresh ticks (ticks with a tick-type of ASPEN_BATE_REFRESH).

 

trade

trade contains the price value from the most recently received qualified tick. trade is reset to ASPEN_NO_NUM by end-of-day processing.

 

trade_size

trade_size contains the volume of the most recently received qualified tick.

 

trade_exchange

trade_exchange contains an integer indicating the regional exchange which originated the trade. This field is only valid for instruments of type ASPEN_IT_STOCK. Constants have been defined to describe each regional exchange.

 

ASPEN_RX_DEFAULT

ASPEN_RX_BOSTON

ASPEN_RX_CINCINNATI

ASPEN_RX_MIDWEST

ASPEN_RX_PACIFIC

ASPEN_RX_NASDAQ

ASPEN_RX_PHILADELPHIA

ASPEN_RX_INSTINET

ASPEN_RX_NYSE

ASPEN_RX_AMEX

 

bid

bid contains the price value from the most recently received bid tick (bate type ASPEN_BATE_BID). bid is reset to ASPEN_NO_NUM by end-of-day processing if the exchange's rules require the field to be cleared.

 

bid_size

bid_size contains the volume from the most recently received bid tick (bate type ASPEN_BATE_BID).

 

bid_exchange

bid_exchange contains an integer indicating the regional exchange which originated the bid. This field is only valid for instruments of type ASPEN_IT_STOCK. Constants with a prefix of ASPEN_RX_ have been defined to describe each regional exchange. See the table for trade_exchange, above.

 

ask

ask contains the price value from the most recently received ask tick (bate type ASPEN_BATE_ASK). ask is reset to ASPEN_NO_NUM by end-of-day processing if the exchange's rules require the field to be cleared.

 

ask_size

ask_size contains the volume from the most recently received ask tick (bate type ASPEN_BATE_ASK).

 

ask_exchange

ask_exchange contains an integer indicating the regional exchange which originated the ask. This field is only valid for instruments of type ASPEN_IT_STOCK. Constants with a prefix of ASPEN_RX_ have been defined to describe each regional exchange. See the table for trade_exchange, above.

 

high

high is the price value of the highest-priced qualified tick processed during the trading day. high is reset to ASPEN_NO_NUM by end-of-day processing.

 

low

low is the price value of the lowest-priced qualified tick processed during the trading day. low is reset to ASPEN_NO_NUM by end-of-day processing.

 

previous

previous gives a price value from the last qualified tick of the previous day. For a futures contract, that would be the previous day's settlement tick. (If the previous day or days had no qualified trades, this value will be carried forward from whatever day the last qualified tick was reported.) During end-of-day processing, previous is set to the price value of the last known qualified tick.

 

net_change

The net_change field represents the difference between the price of the last reported tick (last.price) and the price value in the previous field, unless the exchange reports an explicit net-change value, in which case the reported value replaces the calculated value.  net_change is reset to ASPEN_NO_NUM by end-of-day processing.

 

open_interest

open_interest contains a volume value which indicates the prior day's open interest, as reported by the exchange. open_interest is reset to ASPEN_NO_NUM by end-of-day processing.

 

prev_futures_volume

The prev_futures_volume field gives the total volume of futures contracts for the previous day's activity, as reported by the exchange. prev_futures_volume is reset to ASPEN_NO_NUM by end-of-day processing.

 

The open_interest and prev_futures_volume fields are valid only for futures instruments (type ASPEN_IT_FUTURE).

 

open

open gives a price related to the opening activity of the instrument. Usually it records the price of the first qualified tick of the day, unless superceded by an opening value explicitly reported by the exchange.

 

An alternative use of the open field pertains only to some futures contracts. In this scenario, the open field provides one of two prices which define an opening range. The second price is placed in the open2 field. One of the two fields is the low for the range, the other field has the high. open is reset to ASPEN_NO_NUM by end-of-day processing.

 

open2

The open2 field is used only to provide the second price value of an opening range for some futures contracts. In such cases, open2 provides either the high or low of the range and the open field provides the other. If open2 contains an ASPEN_NO_NUM value, then there is no range being given, and open will not contain a range-related value. open2 is reset to ASPEN_NO_NUM by end-of-day processing.

 

close, close2

These two fields pertain only to some futures contracts, and are only set if values have been explicitly reported by the exchange. If reported, their interpretation is an analog of the open, open2 range-reporting technique. Otherwise, the fields contain ASPEN_NO_NUM values. close and close2 are both reset to ASPEN_NO_NUM by end-of-day processing.

 

dvolume

dvolume contains a running total of volume values for qualified ticks that are considered down-ticks; if a qualified tick has a lower price than the previous qualified tick then it is classed as a down-tick. dvolume is reset to 0 by end-of-day processing.

 

uvolume

uvolume contains a running total of volumes for qualified ticks that are considered up-ticks; if a qualified tick has a higher price than the previous qualified tick then it is classed as an up-tick. uvolume is reset to 0 by end-of-day processing.

 

If a qualified tick price is equal to the previous qualified tick price, then it is counted in the same class (up or down) as the previous tick.

 

If the tick is the first qualified tick of the day and has the same price value as the last known previous tick (see previous field), then it will have neither an up nor a down classification; its volume value will not be accumulated in either dvolume or uvolume.

 

tvolume

The tvolume field maintains a running total of volume values for all qualified ticks during the trading day as accumulated by the Server, unless an explicit value is reported by the exchange, in which case the exchange value replaces the computed value. tvolume is reset to 0 by end-of-day processing.

 

 

Remarks

The ASPEN_INSTRUMENT structure is probably the most important Aspen structure, aside from being the largest. All available information about a financial instrument is given, including a variety of up-to-the-moment values.

 

Retrieving an instrument's information for the first time requires use of the ASPEN_GetInstrumentNumber and ASPEN_GetInstrumentInfo services. If real-time updates have been enabled for the instrument on a particular session, then Aspen will provide a complete, updated copy of this structure anytime it is changed by the Server.

 

Usually these updates reflect a change in price-related fields, but some descriptive fields may also change if the Server receives new information about the instrument.

 

Updates are reported to the application when the application calls AspenEvent(). The event code for instrument updates is ASPEN_InstrumentUpdateNotice.

 

Many price-related fields, such as high or low, are set according to trading rules that are exchange-specific. The term qualified tick will refer to any type of tick which is qualified to affect such fields. This usually means ticks of the ASPEN_BATE_TRADE, ASPEN_BATE_SETTLE, or ASPEN_BATE_BID type (if the exchange rules specify that a bid acts as a trade).

 

 

See Also

AspenDecodePrice()

AspenEvent()

ASPEN_ATTRIBUTES

ASPEN_BATE

ASPEN_EXCHANGE

ASPEN_GetExchangeInfo

ASPEN_GetInstrumentInfo

ASPEN_GetTickHistory

ASPEN_InstrumentUpdateNotice

ASPEN_INSTRUMENT_UPDATE_NOTICE

ASPEN_INUM

ASPEN_PRICE

ASPEN_QUANTUM

ASPEN_QUANTUM

ASPEN_ReplaceTicks

ASPEN_SESSION_TIME

End-Of-Day Processing

Price Values

 

©2006 Aspen Research Group, Ltd. All rights reserved. Terms of Use.