Your Ad Here

Friday, January 22, 2010

Equities Symbology in fix protocol

Symbology is the process of identifying the symbol for which the  equity order has been sent , symbol could be stock , futures ,options , convertibles , bonds etc.
 

Fix protocol defines many ways to identify the correct symbol which has to be traded. Commonly used tag is Symbol(tag 55) and combination of SecurityID and SecurityID Source.

Different brokers implement in a different way , also fix protocol defines many SecurityID source e.g. RIC (Reuters Information Code) , SEDOL, CUSIP, ISIN , Exchange symbol etc.
 

Same company can be listed in different exchanges and they have different RIC codes for that e.g. Sony has RIC code  6758.T for Tokyo stock exchange and 6758.OS for Osaka Stock Exchange.
RIC is the most widely used SecurityID source , though Japanese market use there own numeric code called “QUIK Code”  e.g. for Sony RIC code is 6758.T and QUIK code is “6758”

RIC code generally use Reuters market symbol as suffix e.g.   “.T” represent Tokyo Stock Exchange while “.OS” represent Osaka Stock Exchange.Exchange symbol is also popular e.g. for Yahoo , exchange symbol is generally “YHOO”

Also Orders for instruments with suffixes (different classes of stock, preferred stock, etc.) can be sent in one of two ways:
• Symbol and Suffix notation (i.e. 55=VIA 65=B, 55=AA 65=PR and 55=IBM 65=PRA)
• Comstock notation (i.e. “VIA.B” “AA-“ and “IBM-A”)

The FIX field for symbol suffixes is SymbolSfx (65). On all execution reports, symbols will be reported in
Symbol and Suffix notation.




Thursday, January 21, 2010

FIX 4.2 vs FIX 4.4

FIX protocol has evolved over time , its now more than a decade its started by Fidility and Solomon Brothers.
Still most widely used version is FIX 4.2 , many firms , clients , hedge funds , pension funds still use it for online trading but even after launch of more advance version it still remains the popular one. on advance side FIX 4.4 is getting popularity.

There are many differences between these two version of fix protocol , some of them I am highlighting here.

1) Thre was tag called ExecTransType (tag 20)  which was there in FIX 4.2 and now merged to ExecType tag 150 into FIX4.4 , this tag used to define the nature of exeuction received from the exchange or broker.

2) Replaced the use of the QuantityType (tag 465) field with new QtyType (tag 854) which contains a re-organized/consolidated set of values.

3) Removed various Settlement Instructions-related fields.

4) Added "Quote Response" to list of messages for which Quote Status Report message is the appropriate response.

There are many other changes which are available in the release notes of  fix 4.4 http://www.fixprotocol.org, I will add some more as I come to know which is used in day trading more often .

Wednesday, January 20, 2010

web service

Web Services can convert your application into a Web-application, which can publish its function or message to the rest of the world.
The basic Web Services platform is XML + HTTP.

Basic idea behind web -service is that not just web page but also mobile pages or stand alone application can connect , this also isolate the buisness logic.

For example if we have a server which gives details of available seats on a flight any website can send query in the form of xml or normall SOAP request and get that detail and can show in the format they want.

since XML is used over http for communication we got data independece so a C++ or .NET application can connect to web service , this means write once  ,access from anywhere from anything.

there are many application server which provides webservice e.g. websphere , weblogic , iPlanet etc

Tuesday, January 19, 2010

Algorithmic trading

Today everybody is talking about Algorithmic trading , this is not magic but this certainly improved the Execution quality , provided better prices ,raised the electronic trading volume and consider to be best replacemtn for some of the regular trading strategy e.g. VWAP , TWAP , Iceberg etc.

Saturday, January 16, 2010

FIX Protocol


The Financial InformationExchange (FIX) Protocol is a messaging standard developed specifically for the real-time electronic exchange of securities transactions. FIX has rapidly emerged as the most popular electronic trading standard worldwide though many exchanges has there own protcol for communication e.g. Omnet protocol used by Sydeny Future Exchange, AMS3 protocol used by HongKong Stock Echange , thought FIX protocol is most vast and widely used.

FIX Protocol is very flexible , while still offering a basic level of uniformity and consistency. In order to accommodate custom requirements, FIX has been designed to be fully customisable, as the precise order, and definition of many of the FIX fields is left up to the two transacting parties. However, the FPL has gone to great lengths to both root out ambiguities in the protocol as well as provide direction in areas of the protocol that are left open to interpretation.

A Fix Engine is the software which implements the fix protocol and which is used be broker , clients firms  for electroning trading .There are many commercial fix engines available e.g. Appia from NYFIX , Cameron Fix Engine etc.
 

Wednesday, May 30, 2007

J2ME Optimization Tips

Hi Folks,
Optimization is very important while you are programming for small devices , optimization can be broadly divided into two category.
   
Optimization to reduce JAR Size.
-------------------------------------
In earlier days there is used to be 64K limit for jar size for most of the nokia devices and most of the carrier , still this is important because market share of these devices still holds significant number.

JAR Size is contributed by two things code + resource , resource includes images and audio , video file , since in most of the cases resource contribute around 60% of jar size start with optimizing it , for this
1  use optimized images , whose size is less but they look decent , there are several tools comes for this e.g. PNG Optimizer etc.
2.    use optimized audio files , midi files are always less size than wav and wav is always less than mp3 , so wherever possible use optimize audio files.
3.    For high optimization some coder create a  compress binary file with all the resources and load them while your application starts up , though this leads to increase the startup time which should not be more than 3 seconds to pass some of the career testing or certification e.g. NSDL testing of BREW devices etc.
 
Code Optimization
----------------------
If all your resource is optimized and you have to optimized code then you need to reduce the byte code size , starts with easy one then go for byte code  instrumentation.
1.    Use a good quality Obfuscator , proguard is one of good one.
2.    Minimize the number of classes in your application , each class ads up to 200 Bytes into JAR Size so try to minimize the classes. Though this is against the principal of OOPS which advocate
3.    Individual classes for individual responsibility you need to make trade off with this while programming for small devices.
4.    Don’t use Inner class these leads additional meta data byte code ,reducing inner class will reduce jar size significantly , I have seen the code where people use inner class to implement Runnable or CommandListener avoid these pattern.
5.    Use classes whose size are less e.g. use Short instead of Integer , though I would suggest avoid using Wrapper classes instead of these use primitive.
 
I would add some more techniques and also write about performance improvement for small devices when I get some time , so keep checking.