com.dxfeed.ipf
Class InstrumentProfile

java.lang.Object
  extended by com.dxfeed.ipf.InstrumentProfile
All Implemented Interfaces:
Serializable, Comparable<InstrumentProfile>

public class InstrumentProfile
extends Object
implements Comparable<InstrumentProfile>, Serializable

Represents basic profile information about market instrument. Please see Instrument Profile Format documentation for complete description.

See Also:
Serialized Form

Constructor Summary
InstrumentProfile()
          Creates an instrument profile with default values.
InstrumentProfile(InstrumentProfile ip)
          Creates an instrument profile as a copy of the specified instrument profile.
 
Method Summary
 void addNonEmptyCustomFieldNames(Collection<? super String> targetFieldNames)
          Adds names of non-empty custom fields to specified collection.
 int compareTo(InstrumentProfile ip)
          Compares this profile with the specified profile for order.
 String getAdditionalUnderlyings()
          Returns additional underlyings for options, including additional cash.
 String getBaseCurrency()
          Returns base currency of currency pair (FOREX instruments).
 String getCFI()
          Returns Classification of Financial Instruments code.
 String getCountry()
          Returns country of origin (incorporation) of corresponding company or parent entity.
 String getCurrency()
          Returns currency of quotation, pricing and trading.
 String getCUSIP()
          Returns Committee on Uniform Security Identification Procedures code.
 int getDateField(String name)
          Returns day id value for a date field with a specified name.
 String getDescription()
          Returns description of instrument, preferable an international one in Latin alphabet.
 String getExchangeData()
          Returns exchange-specific data required to properly identify instrument when communicating with exchange.
 String getExchanges()
          Returns list of exchanges where instrument is quoted or traded.
 int getExpiration()
          Returns day id of expiration.
 String getExpirationStyle()
          Returns expiration cycle style, such as “Weeklys”, “Quarterlys”.
 String getField(String name)
          Returns field value with a specified name.
 int getICB()
          Returns Industry Classification Benchmark.
 String getISIN()
          Returns International Securities Identifying Number.
 int getLastTrade()
          Returns day id of last trading day.
 String getLocalDescription()
          Returns description of instrument in national language.
 String getLocalSymbol()
          Returns identifier of instrument in national language.
 String getMMY()
          Returns maturity month-year as provided for corresponding FIX tag (200).
 double getMultiplier()
          Returns market value multiplier.
 double getNumericField(String name)
          Returns numeric field value with a specified name.
 String getOPOL()
          Returns official Place Of Listing, the organization that have listed this instrument.
 String getOptionType()
          Returns type of option.
 String getPriceIncrements()
          Returns minimum allowed price increments with corresponding price ranges.
 String getProduct()
          Returns product for futures and options on futures (underlying asset name).
 String getSEDOL()
          Returns Stock Exchange Daily Official List.
 String getSettlementStyle()
          Returns settlement price determination style, such as “Open”, “Close”.
 int getSIC()
          Returns Standard Industrial Classification.
 double getSPC()
          Returns shares per contract for options.
 double getStrike()
          Returns strike price for options.
 String getSymbol()
          Returns identifier of instrument, preferable an international one in Latin alphabet.
 String getTradingHours()
          Returns trading hours specification.
 String getType()
          Returns type of instrument.
 String getUnderlying()
          Returns primary underlying symbol for options.
 void setAdditionalUnderlyings(String additionalUnderlyings)
          Changes additional underlyings for options, including additional cash.
 void setBaseCurrency(String baseCurrency)
          Changes base currency of currency pair (FOREX instruments).
 void setCFI(String cfi)
          Changes Classification of Financial Instruments code.
 void setCountry(String country)
          Changes country of origin (incorporation) of corresponding company or parent entity.
 void setCurrency(String currency)
          Changes currency of quotation, pricing and trading.
 void setCUSIP(String cusip)
          Changes Committee on Uniform Security Identification Procedures code.
 void setDateField(String name, int value)
          Changes day id value for a date field with a specified name.
 void setDescription(String description)
          Changes description of instrument, preferable an international one in Latin alphabet.
 void setExchangeData(String exchangeData)
          Changes exchange-specific data required to properly identify instrument when communicating with exchange.
 void setExchanges(String exchanges)
          Changes list of exchanges where instrument is quoted or traded.
 void setExpiration(int expiration)
          Changes day id of expiration.
 void setExpirationStyle(String expirationStyle)
          Returns expiration cycle style, such as “Weeklys”, “Quarterlys”.
 void setField(String name, String value)
          Changes field value with a specified name.
 void setICB(int icb)
          Changes Industry Classification Benchmark.
 void setISIN(String isin)
          Changes International Securities Identifying Number.
 void setLastTrade(int lastTrade)
          Changes day id of last trading day.
 void setLocalDescription(String localDescription)
          Changes description of instrument in national language.
 void setLocalSymbol(String localSymbol)
          Changes identifier of instrument in national language.
 void setMMY(String mmy)
          Changes maturity month-year as provided for corresponding FIX tag (200).
 void setMultiplier(double multiplier)
          Changes market value multiplier.
 void setNumericField(String name, double value)
          Changes numeric field value with a specified name.
 void setOPOL(String opol)
          Changes official Place Of Listing, the organization that have listed this instrument.
 void setOptionType(String optionType)
          Changes type of option.
 void setPriceIncrements(String priceIncrements)
          Changes minimum allowed price increments with corresponding price ranges.
 void setProduct(String product)
          Changes product for futures and options on futures (underlying asset name).
 void setSEDOL(String sedol)
          Changes Stock Exchange Daily Official List.
 void setSettlementStyle(String settlementStyle)
          Changes settlement price determination style, such as “Open”, “Close”.
 void setSIC(int sic)
          Changes Standard Industrial Classification.
 void setSPC(double spc)
          Changes shares per contract for options.
 void setStrike(double strike)
          Changes strike price for options.
 void setSymbol(String symbol)
          Changes identifier of instrument, preferable an international one in Latin alphabet.
 void setTradingHours(String tradingHours)
          Changes trading hours specification.
 void setType(String type)
          Changes type of instrument.
 void setUnderlying(String underlying)
          Changes primary underlying symbol for options.
 String toString()
          Returns a string representation of the instrument profile.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InstrumentProfile

public InstrumentProfile()
Creates an instrument profile with default values.


InstrumentProfile

public InstrumentProfile(InstrumentProfile ip)
Creates an instrument profile as a copy of the specified instrument profile.

Parameters:
ip - an instrument profile to copy.
Method Detail

getType

public String getType()
Returns type of instrument. It takes precedence in conflict cases with other fields. It is a mandatory field. It may not be empty. Example: “STOCK”, “FUTURE”, “OPTION”.

Returns:
type of instrument.

setType

public void setType(String type)
Changes type of instrument. It takes precedence in conflict cases with other fields. It is a mandatory field. It may not be empty. Example: “STOCK”, “FUTURE”, “OPTION”.

Parameters:
type - type of instrument.

getSymbol

public String getSymbol()
Returns identifier of instrument, preferable an international one in Latin alphabet. It is a mandatory field. It may not be empty. Example: “GOOG”, “/YGM9”, “.ZYEAD”.

Returns:
identifier of instrument.

setSymbol

public void setSymbol(String symbol)
Changes identifier of instrument, preferable an international one in Latin alphabet. It is a mandatory field. It may not be empty. Example: “GOOG”, “/YGM9”, “.ZYEAD”.

Parameters:
symbol - identifier of instrument.

getDescription

public String getDescription()
Returns description of instrument, preferable an international one in Latin alphabet. Example: “Google Inc.”, “Mini Gold Futures,Jun-2009,ETH”.

Returns:
description of instrument.

setDescription

public void setDescription(String description)
Changes description of instrument, preferable an international one in Latin alphabet. Example: “Google Inc.”, “Mini Gold Futures,Jun-2009,ETH”.

Parameters:
description - description of instrument.

getLocalSymbol

public String getLocalSymbol()
Returns identifier of instrument in national language. It shall be empty if same as symbol.

Returns:
identifier of instrument in national language.

setLocalSymbol

public void setLocalSymbol(String localSymbol)
Changes identifier of instrument in national language. It shall be empty if same as symbol.

Parameters:
localSymbol - identifier of instrument in national language.

getLocalDescription

public String getLocalDescription()
Returns description of instrument in national language. It shall be empty if same as description.

Returns:
description of instrument in national language.

setLocalDescription

public void setLocalDescription(String localDescription)
Changes description of instrument in national language. It shall be empty if same as description.

Parameters:
localDescription - description of instrument in national language.

getCountry

public String getCountry()
Returns country of origin (incorporation) of corresponding company or parent entity. It shall use two-letter country code from ISO 3166-1 standard. See ISO 3166-1 on Wikipedia. Example: “US”, “RU”.

Returns:
country of origin (incorporation) of corresponding company or parent entity.

setCountry

public void setCountry(String country)
Changes country of origin (incorporation) of corresponding company or parent entity. It shall use two-letter country code from ISO 3166-1 standard. See ISO 3166-1 on Wikipedia. Example: “US”, “RU”.

Parameters:
country - country of origin (incorporation) of corresponding company or parent entity.

getOPOL

public String getOPOL()
Returns official Place Of Listing, the organization that have listed this instrument. Instruments with multiple listings shall use separate profiles for each listing. It shall use Market Identifier Code (MIC) from ISO 10383 standard. See ISO 10383 on Wikipedia or MIC homepage. Example: “XNAS”, “RTSX”/

Returns:
official Place Of Listing, the organization that have listed this instrument.

setOPOL

public void setOPOL(String opol)
Changes official Place Of Listing, the organization that have listed this instrument. Instruments with multiple listings shall use separate profiles for each listing. It shall use Market Identifier Code (MIC) from ISO 10383 standard. See ISO 10383 on Wikipedia or MIC homepage. Example: “XNAS”, “RTSX”/

Parameters:
opol - official Place Of Listing, the organization that have listed this instrument.

getExchangeData

public String getExchangeData()
Returns exchange-specific data required to properly identify instrument when communicating with exchange. It uses exchange-specific format.

Returns:
exchange-specific data required to properly identify instrument when communicating with exchange.

setExchangeData

public void setExchangeData(String exchangeData)
Changes exchange-specific data required to properly identify instrument when communicating with exchange. It uses exchange-specific format.

Parameters:
exchangeData - exchange-specific data required to properly identify instrument when communicating with exchange.

getExchanges

public String getExchanges()
Returns list of exchanges where instrument is quoted or traded. Its shall use the following format:
     <VALUE> ::= <empty> | <LIST>
     <IST> ::= <MIC> | <MIC> <semicolon> 
<LIST> the list shall be sorted by MIC. Example: “ARCX;CBSX ;XNAS;XNYS”.

Returns:
list of exchanges where instrument is quoted or traded.

setExchanges

public void setExchanges(String exchanges)
Changes list of exchanges where instrument is quoted or traded. It shall use the following format:
     <VALUE> ::= <empty> | <LIST>
     <IST> ::= <MIC> | <MIC> <semicolon> 
<LIST> the list shall be sorted by MIC. Example: “ARCX;CBSX ;XNAS;XNYS”.

Parameters:
exchanges - list of exchanges where instrument is quoted or traded.

getCurrency

public String getCurrency()
Returns currency of quotation, pricing and trading. It shall use three-letter currency code from ISO 4217 standard. See ISO 4217 on Wikipedia. Example: “USD”, “RUB”.

Returns:
currency of quotation, pricing and trading.

setCurrency

public void setCurrency(String currency)
Changes currency of quotation, pricing and trading. It shall use three-letter currency code from ISO 4217 standard. See ISO 4217 on Wikipedia. Example: “USD”, “RUB”.

Parameters:
currency - currency of quotation, pricing and trading.

getBaseCurrency

public String getBaseCurrency()
Returns base currency of currency pair (FOREX instruments). It shall use three-letter currency code similarly to currency.

Returns:
base currency of currency pair (FOREX instruments).

setBaseCurrency

public void setBaseCurrency(String baseCurrency)
Changes base currency of currency pair (FOREX instruments). It shall use three-letter currency code similarly to currency.

Parameters:
baseCurrency - base currency of currency pair (FOREX instruments).

getCFI

public String getCFI()
Returns Classification of Financial Instruments code. It is a mandatory field for OPTION instruments as it is the only way to distinguish Call/Put type, American/European exercise, Cash/Physical delivery. It shall use six-letter CFI code from ISO 10962 standard. It is allowed to use ‘X’ extensively and to omit trailing letters (assumed to be ‘X’). See ISO 10962 on Wikipedia. Example: “ESNTPB”, “ESXXXX”, “ES” , “OPASPS”.

Returns:
CFI code.

setCFI

public void setCFI(String cfi)
Changes Classification of Financial Instruments code. It is a mandatory field for OPTION instruments as it is the only way to distinguish Call/Put type, American/European exercise, Cash/Physical delivery. It shall use six-letter CFI code from ISO 10962 standard. It is allowed to use ‘X’ extensively and to omit trailing letters (assumed to be ‘X’). See ISO 10962 on Wikipedia. Example: “ESNTPB”, “ESXXXX”, “ES” , “OPASPS”.

Parameters:
cfi - CFI code.

getISIN

public String getISIN()
Returns International Securities Identifying Number. It shall use twelve-letter code from ISO 6166 standard. See ISO 6166 on Wikipedia or ISIN on Wikipedia. Example: “DE0007100000”, “US38259P5089”.

Returns:
International Securities Identifying Number.

setISIN

public void setISIN(String isin)
Changes International Securities Identifying Number. It shall use twelve-letter code from ISO 6166 standard. See ISO 6166 on Wikipedia or ISIN on Wikipedia. Example: “DE0007100000”, “US38259P5089”.

Parameters:
isin - International Securities Identifying Number.

getSEDOL

public String getSEDOL()
Returns Stock Exchange Daily Official List. It shall use seven-letter code assigned by London Stock Exchange. See SEDOL on Wikipedia or SEDOL on LSE. Example: “2310967”, “5766857”.

Returns:
Stock Exchange Daily Official List.

setSEDOL

public void setSEDOL(String sedol)
Changes Stock Exchange Daily Official List. It shall use seven-letter code assigned by London Stock Exchange. See SEDOL on Wikipedia or SEDOL on LSE. Example: “2310967”, “5766857”.

Parameters:
sedol - Stock Exchange Daily Official List.

getCUSIP

public String getCUSIP()
Returns Committee on Uniform Security Identification Procedures code. It shall use nine-letter code assigned by CUSIP Services Bureau. See CUSIP on Wikipedia. Example: “38259P508”.

Returns:
CUSIP code.

setCUSIP

public void setCUSIP(String cusip)
Changes Committee on Uniform Security Identification Procedures code. It shall use nine-letter code assigned by CUSIP Services Bureau. See CUSIP on Wikipedia. Example: “38259P508”.

Parameters:
cusip - CUSIP code.

getICB

public int getICB()
Returns Industry Classification Benchmark. It shall use four-digit number from ICB catalog. See ICB on Wikipedia or ICB homepage. Example: “9535”.

Returns:
Industry Classification Benchmark.

setICB

public void setICB(int icb)
Changes Industry Classification Benchmark. It shall use four-digit number from ICB catalog. See ICB on Wikipedia or ICB homepage. Example: “9535”.

Parameters:
icb - Industry Classification Benchmark.

getSIC

public int getSIC()
Returns Standard Industrial Classification. It shall use four-digit number from SIC catalog. See SIC on Wikipedia or SIC structure. Example: “7371”.

Returns:
Standard Industrial Classification.

setSIC

public void setSIC(int sic)
Changes Standard Industrial Classification. It shall use four-digit number from SIC catalog. See SIC on Wikipedia or SIC structure. Example: “7371”.

Parameters:
sic - Standard Industrial Classification.

getMultiplier

public double getMultiplier()
Returns market value multiplier. Example: 100, 33.2.

Returns:
market value multiplier.

setMultiplier

public void setMultiplier(double multiplier)
Changes market value multiplier. Example: 100, 33.2.

Parameters:
multiplier - market value multiplier.

getProduct

public String getProduct()
Returns product for futures and options on futures (underlying asset name). Example: “/YG”.

Returns:
product for futures and options on futures (underlying asset name).

setProduct

public void setProduct(String product)
Changes product for futures and options on futures (underlying asset name). Example: “/YG”.

Parameters:
product - product for futures and options on futures (underlying asset name).

getUnderlying

public String getUnderlying()
Returns primary underlying symbol for options. Example: “C”, “/YGM9”

Returns:
primary underlying symbol for options.

setUnderlying

public void setUnderlying(String underlying)
Changes primary underlying symbol for options. Example: “C”, “/YGM9”

Parameters:
underlying - primary underlying symbol for options.

getSPC

public double getSPC()
Returns shares per contract for options. Example: 1, 100.

Returns:
shares per contract for options.

setSPC

public void setSPC(double spc)
Changes shares per contract for options. Example: 1, 100.

Parameters:
spc - shares per contract for options.

getAdditionalUnderlyings

public String getAdditionalUnderlyings()
Returns additional underlyings for options, including additional cash. It shall use following format:
     <VALUE> ::= <empty> | <LIST>
     <LIST> ::= <AU> | <AU> <semicolon> <space> <LIST>
     <AU> ::= <UNDERLYING> <space> <SPC> 
the list shall be sorted by <UNDERLYING>. Example: “SE 50”, “FIS 53; US$ 45.46”.

Returns:
additional underlyings for options, including additional cash.

setAdditionalUnderlyings

public void setAdditionalUnderlyings(String additionalUnderlyings)
Changes additional underlyings for options, including additional cash. It shall use following format:
     <VALUE> ::= <empty> | <LIST>
     <LIST> ::= <AU> | <AU> <semicolon> <space> <LIST>
     <AU> ::= <UNDERLYING> <space> <SPC> 
the list shall be sorted by <UNDERLYING>. Example: “SE 50”, “FIS 53; US$ 45.46”.

Parameters:
additionalUnderlyings - additional underlyings for options, including additional cash.

getMMY

public String getMMY()
Returns maturity month-year as provided for corresponding FIX tag (200). It can use several different formats depending on data source:

Returns:
maturity month-year as provided for corresponding FIX tag (200).

setMMY

public void setMMY(String mmy)
Changes maturity month-year as provided for corresponding FIX tag (200). It can use several different formats depending on data source:

Parameters:
mmy - maturity month-year as provided for corresponding FIX tag (200).

getExpiration

public int getExpiration()
Returns day id of expiration. Example: DayUtil.getDayIdByYearMonthDay(20090117).

Returns:
day id of expiration.

setExpiration

public void setExpiration(int expiration)
Changes day id of expiration. Example: DayUtil.getDayIdByYearMonthDay(20090117).

Parameters:
expiration - day id of expiration.

getLastTrade

public int getLastTrade()
Returns day id of last trading day. Example: DayUtil.getDayIdByYearMonthDay(20090116).

Returns:
day id of last trading day.

setLastTrade

public void setLastTrade(int lastTrade)
Changes day id of last trading day. Example: DayUtil.getDayIdByYearMonthDay(20090116).

Parameters:
lastTrade - day id of last trading day.

getStrike

public double getStrike()
Returns strike price for options. Example: 80, 22.5.

Returns:
strike price for options.

setStrike

public void setStrike(double strike)
Changes strike price for options. Example: 80, 22.5.

Parameters:
strike - strike price for options.

getOptionType

public String getOptionType()
Returns type of option. It shall use one of following values:

Returns:
type of option.

setOptionType

public void setOptionType(String optionType)
Changes type of option. It shall use one of following values:

Parameters:
optionType - type of option.

getExpirationStyle

public String getExpirationStyle()
Returns expiration cycle style, such as “Weeklys”, “Quarterlys”.

Returns:
expiration cycle style.

setExpirationStyle

public void setExpirationStyle(String expirationStyle)
Returns expiration cycle style, such as “Weeklys”, “Quarterlys”.

Parameters:
expirationStyle - expiration cycle style.

getSettlementStyle

public String getSettlementStyle()
Returns settlement price determination style, such as “Open”, “Close”.

Returns:
settlement price determination style.

setSettlementStyle

public void setSettlementStyle(String settlementStyle)
Changes settlement price determination style, such as “Open”, “Close”.

Parameters:
settlementStyle - settlement price determination style.

getPriceIncrements

public String getPriceIncrements()
Returns minimum allowed price increments with corresponding price ranges. It shall use following format:
     <VALUE> ::= <empty> | <LIST>
     <LIST> ::= <INCREMENT> | <RANGE> <semicolon> <space> <LIST>
     <RANGE> ::= <INCREMENT> <space> <UPPER_LIMIT> 
the list shall be sorted by <UPPER_LIMIT>. Example: “0.25”, “0.01 3; 0.05”.

Returns:
minimum allowed price increments with corresponding price ranges.

setPriceIncrements

public void setPriceIncrements(String priceIncrements)
Changes minimum allowed price increments with corresponding price ranges. It shall use following format:
     <VALUE> ::= <empty> | <LIST>
     <LIST> ::= <INCREMENT> | <RANGE> <semicolon> <space> <LIST>
     <RANGE> ::= <INCREMENT> <space> <UPPER_LIMIT> 
the list shall be sorted by <UPPER_LIMIT>. Example: “0.25”, “0.01 3; 0.05”.

Parameters:
priceIncrements - minimum allowed price increments with corresponding price ranges.

getTradingHours

public String getTradingHours()
Returns trading hours specification. See Schedule.getInstance(String).

Returns:
trading hours specification.

setTradingHours

public void setTradingHours(String tradingHours)
Changes trading hours specification. See Schedule.getInstance(String).

Parameters:
tradingHours - trading hours specification.

getField

public String getField(String name)
Returns field value with a specified name.

Parameters:
name - name of field.
Returns:
field value.

setField

public void setField(String name,
                     String value)
Changes field value with a specified name.

Parameters:
name - name of field.
value - field value.

getNumericField

public double getNumericField(String name)
Returns numeric field value with a specified name.

Parameters:
name - name of field.
Returns:
field value.

setNumericField

public void setNumericField(String name,
                            double value)
Changes numeric field value with a specified name.

Parameters:
name - name of field.
value - field value.

getDateField

public int getDateField(String name)
Returns day id value for a date field with a specified name.

Parameters:
name - name of field.
Returns:
day id value.

setDateField

public void setDateField(String name,
                         int value)
Changes day id value for a date field with a specified name.

Parameters:
name - name of field.
value - day id value.

addNonEmptyCustomFieldNames

public void addNonEmptyCustomFieldNames(Collection<? super String> targetFieldNames)
Adds names of non-empty custom fields to specified collection.


compareTo

public int compareTo(InstrumentProfile ip)
Compares this profile with the specified profile for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The natural ordering implied by this method is designed for convenient data representation in a file and shall not be used for business purposes.

Specified by:
compareTo in interface Comparable<InstrumentProfile>

toString

public String toString()
Returns a string representation of the instrument profile.

Overrides:
toString in class Object
Returns:
string representation of the instrument profile.


Copyright © 2013 Devexperts. All Rights Reserved.