To view the Macro's predefined by GCC,
sepeng@ubuntu:~/c++$ cpp -dM /dev/null
#define __DBL_MIN_EXP__ (-1021)
#define __pentiumpro__ 1
#define __UINT_LEAST16_MAX__ 65535
... ...
Saturday, June 29, 2013
Friday, October 7, 2011
Saturday, September 3, 2011
Friday, September 2, 2011
Array and Pointer
- an array can be considered as a constant pointer; eg,
int *p;
int a[5];
we could do p = a, but not a = p;
another example,
int a[5];
int *p;
p=a; *p=10;
p++; *p=20;
p=&a[2]; *p=30;
p=a+3; *p=40;
p=a; *(p+4)=50;
- void pointer
- null pointer
- pointers to function: usually being used as a parameter
int *p;
int a[5];
we could do p = a, but not a = p;
another example,
int a[5];
int *p;
p=a; *p=10;
p++; *p=20;
p=&a[2]; *p=30;
p=a+3; *p=40;
p=a; *(p+4)=50;
- void pointer
- null pointer
- pointers to function: usually being used as a parameter
static in C++
- use static inside a function (or a loop)
- use static in a class (static member, and static member function)
- use static as a global variable inside a file
- use static in a class (static member, and static member function)
- use static as a global variable inside a file
Saturday, August 27, 2011
ETFs
- fund managers: ETFs, eg, 2823 HK, 2800 HK, INDI SP
- fund managers: trade the constitutes of the ETFs
- broker: execution services; in some cases of India and China, participate notes
- P-Notes: P-Notes <-> underlying
- booking issues
- fund managers: trade the constitutes of the ETFs
- broker: execution services; in some cases of India and China, participate notes
- P-Notes: P-Notes <-> underlying
- booking issues
Saturday, June 25, 2011
books/articles to read
- portfolio rebalance: MSCI rebalance, Russell rebalance
- exchange traded funds: from product structure, sales, trading, transaction service
Sunday, May 22, 2011
some trading rules for KRX
- no IOC for short sell orders
- sunshine policy for program orders during expiration date, ie, disclose the orders by no later than 14:45 KST
- random end rules: it will be trigger when final call price deviates by more than 3% from its previous price (last price published at 14:40 KST), and the call execution time will be extended to a point (5min max) randomly decided by the trading system; this only applies on expiration date
- pre-disclosure and post-disclosure rules on expiry date
Sunday, February 27, 2011
FIX (I)
FIX (financial information exchange) protocol is the global protocol used for Electronic trading of different asset classes e.g Equity, Fixed Income FX (foreign exchange) , Derivatives Futures and Options and its knowledge is essential to understand Electronic trading and FIX messages. I have listed some of the very common but informative questions asked in fix protocol interview question, this list is by no means complete and only contains questions on top of my mind, I would encourage reader to post any question they have been asked and I will include in this list, Please feel free to ask any other question related to FIX (financial information exchange) protocol I would be happy to answer those. FIX messaging is term used to describe communication using FIX protocol.
If you are java developer looking for FIX + Java jobs then having a look on these FIX (financial information exchange) protocol interview snippets can benefit you in interview. usually for a FIX (financial information exchange) protocol job interviewer test whether candidate has actually worked in FIX protocol or not and whether he is familiar with various FIX tags and different FIX protocol version or not. SinceFIX (financial information exchange) versions differ significantly form one version to other knowledge of FIX tags and there value for a particular version is very important. There are lots of jobs available for Core Java and FIX (financial information exchange) protocol developer even if you had worked in FIX for 1 year you could be very much sought after in job market.
FIX (financial information exchange) protocol interview questions
What is the difference between ClOrdID and OrderID?
In FIX (financial information exchange) protocol ClOrdId is a unique id assigned by buy-side while the later is assigned by sell-side. OrderID normally remains same for a message chain (e.g. on Cancel and mod orders) while ClOrdID changes with Cancel and Modification.
What is difference between TransactTime and Sending Time?
TransactTime: Time of execution/order creation (expressed in UTC (Universal Time Coordinated, also known as 'GMT')
SendingTime: Time of message transmission (always expressed in UTC (Universal Time Coordinated, also known as 'GMT')
What is TradeBust and Trade Cancel?
Some times exchange wants to cancel a trade , if exchange is using FIX protocol then it sends execution report (MsgType=8) and ExecType=H(Cancel) , this is called TradeBust , after this earlier trade will not go for settlement and deemed as cancelled. In other times exchange (or execution party) wants to correct either TradePrice or Trade Quantity in that case they send execution report (MsgType=8) and ExecType=G (Correct), this is called Trade Correct.
As per FIX (financial information exchange) protocol
A Cancel on an execution (trade bust, ExecType (150) = Trade Cancel) happening the same day of the trade will result in CumQty (14) and DayCumQty (425) each decreasing by the quantity busted, and LeavesQty (151) increasing by the quantity busted. OrderQty (38) and DayOrderQty (424) will remain unchanged. If the business rules allow for a trade bust to be reported on a later date than the trade being busted, the OrderQty (38) and DayCumQty (425) will remain unchanged, the LeavesQty (151) and DayOrderQty (424) will increase by the quantity busted, and the CumQty (14) will decrease by the quantity busted.
What do you mean by Funari OrderType?
Funari is a special order type normally used in Japanese and Korean exchange where unexecuted quantity of a limit order turned as Market order during Market close, it is denoted as OrdType=I in FIX (financial information exchange) protocol.
What are differences between FIX 4.0 and FIX 4.2?
In FIX 4.0 we had tag called ExecTranType which describe Execution type in FIX 4.2 this tag is merged with ExecType (tag 150) and now OrdStatus will show status of order instead of Execution type. Later versions of FIX (financial information exchange) protocol is now 5.0 or even higher.
What do you mean by Sashinari & Hikenari order types?
These are again special order types available in Japanese exchanges added on FIX (financial information exchange) protocol later.
Sashinari (Limit market order) = First, this is treated as a limit order. However, if all or part of the order is still unexecuted, then the remaining quantity is changed to market order at "day's" closing (O-hike).
Hikenari (Market order on close) = this order type can be placed either for closing of morning session or closing of afternoon session. However, if an order is placed for closing of morning session and there are still unexecuted quantities, then the remaining quantity (not expired at morning close) is treated as a market order for "the opening of afternoon session".
If an order is placed during afternoon session, it is treated as a market order on afternoon close
Sashinari and Hikenari are available in TOCOM exchange.
What are header tags in FIX (financial information exchange) Protocol?
Header tags are certain special tags in FIX (financial information exchange) protocol which comes in the beginning of a FIX Message.
Only the first few fields of the header must be in sequence, see FIX (financial information exchange) Spec Volume 1. "The first three fields in the standard header are BeginString (tag #8) followed by BodyLength (tag #9) followed by MsgType (tag #35)."
Also "General message format is composed of the standard header followed by the body followed by the standard trailer."
Fields of the header thus must not appear in the body, if they then FIX engine will not be able to parse and understand message and will complain about it.
What is difference between DMA orders and CARE orders?
These are general concept irrespective of FIX (financial information exchange) protocol. DMA orders are Direct to Market order means it will not touched by any trader or salesperson on broker side while CARE orders also called as Broker Intervention (BI) orders will be touched by Trader or salesperson on broker side.
So if a Trader has any view on Market he can take advantage of that while working with BI order.
What is the difference between Application level Reject (MsgType=8 and ExecType=8) and Session level reject (MsgType=3)?
FixEngine will reject any message which doesn't confirm FIX protocol i.e. some mandatory tags missing e.g. MsgType with Session level reject , application will not get that message for processing , while application e.g. OMS or Execution System will reject message based on Business logic or FIX (financial information exchange) Protocol trade life cycle with application level Reject (MsgType=8 and ExecType=8).
What is FIX Messaging?
FIX messaging is term used to describe communication using FIX protocol. So if two FIX engines are communicating with each other using financial information exchange protocol we call it as they are communicating using FIX messaging.
If you are java developer looking for FIX + Java jobs then having a look on these FIX (financial information exchange) protocol interview snippets can benefit you in interview. usually for a FIX (financial information exchange) protocol job interviewer test whether candidate has actually worked in FIX protocol or not and whether he is familiar with various FIX tags and different FIX protocol version or not. SinceFIX (financial information exchange) versions differ significantly form one version to other knowledge of FIX tags and there value for a particular version is very important. There are lots of jobs available for Core Java and FIX (financial information exchange) protocol developer even if you had worked in FIX for 1 year you could be very much sought after in job market.
FIX (financial information exchange) protocol interview questions
What is the difference between ClOrdID and OrderID?
In FIX (financial information exchange) protocol ClOrdId is a unique id assigned by buy-side while the later is assigned by sell-side. OrderID normally remains same for a message chain (e.g. on Cancel and mod orders) while ClOrdID changes with Cancel and Modification.
What is difference between TransactTime and Sending Time?
TransactTime: Time of execution/order creation (expressed in UTC (Universal Time Coordinated, also known as 'GMT')
SendingTime: Time of message transmission (always expressed in UTC (Universal Time Coordinated, also known as 'GMT')
What is TradeBust and Trade Cancel?
Some times exchange wants to cancel a trade , if exchange is using FIX protocol then it sends execution report (MsgType=8) and ExecType=H(Cancel) , this is called TradeBust , after this earlier trade will not go for settlement and deemed as cancelled. In other times exchange (or execution party) wants to correct either TradePrice or Trade Quantity in that case they send execution report (MsgType=8) and ExecType=G (Correct), this is called Trade Correct.
As per FIX (financial information exchange) protocol
A Cancel on an execution (trade bust, ExecType (150) = Trade Cancel) happening the same day of the trade will result in CumQty (14) and DayCumQty (425) each decreasing by the quantity busted, and LeavesQty (151) increasing by the quantity busted. OrderQty (38) and DayOrderQty (424) will remain unchanged. If the business rules allow for a trade bust to be reported on a later date than the trade being busted, the OrderQty (38) and DayCumQty (425) will remain unchanged, the LeavesQty (151) and DayOrderQty (424) will increase by the quantity busted, and the CumQty (14) will decrease by the quantity busted.
What do you mean by Funari OrderType?
Funari is a special order type normally used in Japanese and Korean exchange where unexecuted quantity of a limit order turned as Market order during Market close, it is denoted as OrdType=I in FIX (financial information exchange) protocol.
What are differences between FIX 4.0 and FIX 4.2?
In FIX 4.0 we had tag called ExecTranType which describe Execution type in FIX 4.2 this tag is merged with ExecType (tag 150) and now OrdStatus will show status of order instead of Execution type. Later versions of FIX (financial information exchange) protocol is now 5.0 or even higher.
What do you mean by Sashinari & Hikenari order types?
These are again special order types available in Japanese exchanges added on FIX (financial information exchange) protocol later.
Sashinari (Limit market order) = First, this is treated as a limit order. However, if all or part of the order is still unexecuted, then the remaining quantity is changed to market order at "day's" closing (O-hike).
Hikenari (Market order on close) = this order type can be placed either for closing of morning session or closing of afternoon session. However, if an order is placed for closing of morning session and there are still unexecuted quantities, then the remaining quantity (not expired at morning close) is treated as a market order for "the opening of afternoon session".
If an order is placed during afternoon session, it is treated as a market order on afternoon close
Sashinari and Hikenari are available in TOCOM exchange.
What are header tags in FIX (financial information exchange) Protocol?
Header tags are certain special tags in FIX (financial information exchange) protocol which comes in the beginning of a FIX Message.
Only the first few fields of the header must be in sequence, see FIX (financial information exchange) Spec Volume 1. "The first three fields in the standard header are BeginString (tag #8) followed by BodyLength (tag #9) followed by MsgType (tag #35)."
Also "General message format is composed of the standard header followed by the body followed by the standard trailer."
Fields of the header thus must not appear in the body, if they then FIX engine will not be able to parse and understand message and will complain about it.
What is difference between DMA orders and CARE orders?
These are general concept irrespective of FIX (financial information exchange) protocol. DMA orders are Direct to Market order means it will not touched by any trader or salesperson on broker side while CARE orders also called as Broker Intervention (BI) orders will be touched by Trader or salesperson on broker side.
So if a Trader has any view on Market he can take advantage of that while working with BI order.
What is the difference between Application level Reject (MsgType=8 and ExecType=8) and Session level reject (MsgType=3)?
FixEngine will reject any message which doesn't confirm FIX protocol i.e. some mandatory tags missing e.g. MsgType with Session level reject , application will not get that message for processing , while application e.g. OMS or Execution System will reject message based on Business logic or FIX (financial information exchange) Protocol trade life cycle with application level Reject (MsgType=8 and ExecType=8).
What is FIX Messaging?
FIX messaging is term used to describe communication using FIX protocol. So if two FIX engines are communicating with each other using financial information exchange protocol we call it as they are communicating using FIX messaging.
Sunday, January 16, 2011
algo trading strategies
- Implementation Shortfall
- VWAP
- TWAP
- POV (Participate)
- Iceberg
- dagger
- VWAP
- TWAP
- POV (Participate)
- Iceberg
- dagger
Subscribe to:
Posts (Atom)