Tuesday, July 13, 2010


Yet another interesting concept that every novice in stock markets should be familiar with. Margins dictate what amount you are supposed to pay to the exchange outright as an assurance that you will not default. When you purchase a stock's share, you dont pay the amount immediately. You pay your broker the next day (t+1) and your broker is supposed to pay to the exchange the day after that (t+2). So, if you bought the stock at Rs 25 and its price fell to Rs 20 by EOD that day, then you are in a loss of Rs 5 on each stock. You might thus choose to default and not pay to your broker. Due to such scenarios, the concept of margins is introduced. In laymans terms, you are supposed to pay some money outright to your broker when you make a purchse as a security. This is called margin. In the event of you defaulting, this money will be used by broker to pay up for the notional loss on that scrip incurred.

Volatility: In simple terms, it means how often does the price of a stock change. We can calculate volatility of a stock as follows -
Note down the price of the stock for last 30 days in first column. The second column values are calculated as LN(curr_days_close_price / prev_days_close_price) where, LN = natural logarithm. Find the standard deviation across all the values in the second column. This standard deviation is called historical volatility of that stock. This is one measure of volatility.

There can be different types of margins that are enforced by the exchange -
1. Security VaR : It can be defined as - "With 99% confidence, the total loss suffered on a particular stock over one days time period will not be more than 5%". So in this, VaR = 5%. Thus, it has three componenets- a confidence level, a time period, and a percentage value indicating loss. NSE gives VaR values for its listed stocks with a confidence value of 99% over one day time frame. The actual VaR rate that you are charged is calculated using this Security VaR and the stocks price. (This is done based on a fixed formula which i am too bored to describe :-P).

2. Extreme Loss Margin: This can be given by max ((1.5 * historical_volatility), (5% of your position)). This aims at covering losses occuring outside VaR margin. This value if calculated at the start of every month by calculating rolling data for past 6 months.

The actual margin that you are charged is a sum of these two.

Saturday, July 10, 2010

Total_Delivered_Qty / Total_Traded_Qty

I was just reading a book which suggested how to pick up small cap stocks for screening, for beginners. It enlisted some few benchmarks, one of which was that the stock should have its daily_trading_vol >1M and <25M. This figure is calculated as - close_price * avg_vol_traded_for_last_5_days. I just happened to look at nseindia.com for a sample of such a figure and noted that they have not one, but two figures indicating avg_traded_qty:
  • total_traded_qty
  • total_traded_qty_delivered
Mystical figures, they seemed at first! But with some googling, I figured the difference. Let us say 100 shares of IBM were traded on 27th June, 2010. For simplicity, one share is traded between one unique buyer and seller. So, it means, 100 ibm were bought and 100 ibm were sold. But it doesnt necessarily mean that all 100 ibm's that were sold were actually delivered to those 100 buyers. A person might just buy 10 ibm in the morning session and square his position buy selling 10 ibm in the closing session. As we see, no delivery was made here, just plain trading was done. So, total-traded_qty might be 10, but total_traded_qty_delivered is zilch. Interesting.

So why would anyone want to do this? Large traders might just choose to do heavy buying at the start of trading to make the prices artificially go up. And then, they might sell off all those shares towards the end session and pocket the difference.

Implications? If the percentage of Total_Delivered_Qty / Total_Traded_Qty is less, it means the stock price movements are more manipulated than based on fundamentals. So beware when calculating close_price * avg_vol_traded_for_last_5_days! Make the right choice for the second term.

Friday, January 8, 2010

Direct Market Access

When an institutional client wishes to trade some stock on a particular exchange, there is a definite path that his orders go through before they reach the exchange. There are multiple players involved along this path. Lets consider a very superficial view of how this flow looks like:

So, in this, as usual the broker acts as the middleman between the client and the exchange. He provides the client with certain  services for which he charges a fee. A ten thousand feet view of these services would include three main services -
  • Sales desk: which enables the clients to send orders, mainly. At this point, the order is converted to a form that the broker systems can understand. 
  • Trading Desk: which is responsible  for actually working upon these orders strategically, using  some algorithms like TWAP, VWAP etc before sending them to the exchange. 
  • Order routers: which act like an exit point, for the orders, from the brokerage house  to the exchange. These routers have knowledge of multiple  exchange and may route  to the  exchange where the order will get best possible execution prices.
Once these orders go to the exchange, the exchange has appointed market makers who quote bid and ask prices for different securities. These orders go to these market makers who then  ultimately send them to the exchange trading systems and order books.

Although this traditional model works  great  for retail clients, there are some big hedge funds, single huge institutional investors who need more  than this. These clients are sophisticated  clients having their own expertise in all respects - infrastructure as well as traders. They don't need any extra services provided by the broker. They prefer to use trading strategies, slice-and-dice orders as per their own expertise. So, in such a scenario, all they need from the brokers is for them to provide these clients with exchange connectivity. So, the above flow  now looks something like -

This is what we call Direct Market Access (DMA) flow.

There are two kinds of DMA's mainly:
  1. In the first type, the client has his own expertise. However, he still needs to use the order router service of the clearing member (basically broker) which then routes his orders to different exchanges. This was the first step towards DMA and removing the "call by phone and place order" stage. Thus, in this stage, orders still go through the market  makers before entering into the order books.
  2. In the second type, the client, in true sense, needs only exchange connectivity from the broker. For this purpose, the brokers may provide the client with a  platform which has global  connectivity across exchanges in the world. This platform is deployed on the client end rather than working on the broker side. Examples of such a platform are Morgan Stanley's Passport, Goldman Sachs' REDIPlus etc. These tools allow clients to place orders which will directly be entered into the exchanges order books. This is DMA in its true sense! Its as shown in the diagram above by the rounded arrow flow.
  1. Self expertise: The clients can rely  on their own expertise rather than using some brokers services. This enables them to build custom strategies suited for their firm while trading. They can synthesize orders as they like. they also have their own infrastructure . All this saves them the cost of equivalent services provided by the broker.
  2. Lesser commisions per trade, since they no longer use broker services,  but their own internal expertise.
  3. Ability to quote their own prices. Normally, they way it works is, the clients may quote their own prices. The market makers quote the prices they can offer to the brokers. The brokers in turn can offer only these prices  to the clients. However, with DMA, since we skip the market makers, the clients are free to place their own prices on limit orders as they want.
  4. Faster time to processing. Since DMA enables clients to enter orders directly into the order books, it saves the time of going through all the intermediaries which in the normal case take more time.
  5. Ability to capture arbitrage opportunities due  to high  speed.
  6. Visibility: in the normal case, the market makers may choose to show only some orders on the order book and not show some. However, with DMA, clients are guaranteed that all their orders can be seen by everyone on  the market. This enables faster executions.
  7. Ability to capture high liquidity pools.

Thursday, January 7, 2010

Short Selling

A man trying to sell a blind horse always praises its feet

This is one of the most intriguing concepts I have come across after Options, in my recent spell of reading. Someone profiting from things going bad around him. That is the essence of short selling. What an idea Sirji :-P. I have commented in my previous posts a couple of times that "going short" means profiting from prices going down and "going long" means profiting from prices going up. We dig into this more now. Short selling means selling something that you don't own directly. In this, the trader borrows stocks from someone and sells them in the market. While doing this, he expects that the prices of that stock will go down. He then buys back those stocks from the market at the new lower price and returns them back to the person he originally borrowed from. The spread, as usual, is what he pockets.

Who are the players involved?
 A short seller borrows stocks from his broker, which he then sells in the market. The broker on his part doesn't really buy the stocks and lend them to the short seller. He would already be holding brokerage accounts from several other investors. These investors would have bought shares using their brokerage accounts. The broker will lend these shares that are lying with him to the short seller. Thus, the original investor who had bought the shares becomes the lender.

Its all because of fungibility...
The reason why the broker was able to confidently lend someone elses shares to the short seller was because a share as an entity is fungible. Fungibility is the property of a good or a commodity whose individual units are capable of mutual substitution. Examples of highly fungible commodities are crude oil, wheat, orange juice, precious metals, and currencies (courtsey wikipedia). Thus, when the lender demands his shares back, say when he wants to sell them, the broker can in turn give him shares belong to some other investor holding a brokerage accout with him. Brokers typically hold a pool of securities in their brokerage accounts, so that they can transfer them to-and-fro. 

The lender retains his rights...
While the broker has lent the investors shares to the short seller, that does not expropriate the normal rights the investor would enjoy as a shareholder. He still retains the right to vote as a shareholder. The short seller does not get this previlige. Also, when the company pays dividends, they will actually go to the short seller. But since he doesn't really own the shares, he is obliged to pay the broker the amount of dividend he received who then transfers this sum to the original lender.

Some terminology:
If the broker falls short of shares in his pool, and if the lender wisher to sell his shares, then the broker asks the short seller to return him back the borrowed shares. This is called calling back. This prompts the short seller to buy back at the current market price and return the shares. This is called covering position. The process of broker finding a lender to lend stocks to the short seller is called locate.

Margin accounts:
When the short seller borrows shares from the broker, he has to open what is called as a margin account. The broker will ask the short seller to put something as a collateral for the even that the short seller defaults. Thus, the short seller puts some amount in this margin account as a collateral. These accounts are evaluated daily. The broker is expected to maintin some minimum sum in this account. As the stock prices move, so does the value of money in this account. If the price go up, the short  seller will have to put more money into his account. For this, the broker makes what is called a margin call. For e.g. if the short seller shaorts 100 shares at $5000 at time 't'. and at time 't+x', those 100 shares are worth $5500. Then if he is required to maintain lets say 45% of the total value of his shorts in his margin account, then the broker will make a margin call of another $225 tothe short seller at time 't+x'.

So how does each party earn money?
As explained till now, the short seller earns money if the prices fall down and he pockets the spread. When a borrower shorts shares, the proceeds from it are kept in his brokerage account with the broker. The broker will put this sum on interest to earn some extra bucks. The short seller is not entitled to this interes since he does not really own the stocks. Further, the broker will also put the money in the margin account on interest, which goes into his pocket. Aslo, the short seller is charges some basic fee by the broker for providing short selling services. In case of lenders, the earnings vary depending upon the size of  the investor. For small investors who have just bought a few shares through their brokerage accounts, they dont really get any share in the short sell pie, since the broker is eligible to allocate their shares to some other borrower without their knowledge as long as he can return them back when asked for. However,  there is a group of large institutional investors who explicitely with to lend their stocks on rent. This is known as securities lending. They do this via a custodian lends stocks on their behalf. The brokers, in such  cases, give a part of the interest they earn to these lenders (because of their size). Also, the dividends and right to vote are held by the lenders as explained earlier. Note that the lender is obliged to the interest on his stocks only if he owns them in entirety i.e. he himself hasn't put them as a collateral with  the broker.

What metrics are used by short sellers?
The short sellers generally employ a set of complicated metrics to analyse the markets. Few of them are -
  1. Short interest: This denotes the total number of stocks that have been shorted in the market and haven't been  repurchased back.
  2. Days to cover (DTC): This denotes the relationship between the number of shares that have been legally shorted in the market and the number of trading days needed to repurchase them back. 
Besides these,  they use techniques such as - locating the worst performing stocks in the market, using insider information to bust inflated company accounts, waiting for "bubbles" to burst like the dotcom bubble in 1996.

Saturday, January 2, 2010

Options pricing - underlying factors

Note that below discussion is in context of stock options for the simplicity of explanation
Option pricing techniques have become one of the basic necessities for any option trader, in order to  determine the fair price that can be paid for that option contract. Furthermore, options pricing is essential to derive a theoretical value for an option contract in future. This can help  traders to  take speculative positions on the price movements of an option contract. In general, any option pricing technique is based upon a set of underlying factors. These underlying  factors can be forked into two broad categories - Non-quantifiable and Quantifiable.

Non-quantifiable factors:
These are the factors  which cannot be quantified or forecast. Theoretically, these factors do not stand an existence because, an options price should be  completely deterministic from its fundamentals. However, since stock markets never work completely on fundamentals, so does option pricing. In a marketplace, the price of an option contract is determined largely by the forces of supply and demand. Buyers and Sellers place competitive bids on the price, and finally one price which is agreed upon by both is finalised. Further, an unpleasant piece of news about the options underlier can drive public sentiments against that option contract. An unstable political state of affair may also invite counter reactions from the street. All such factors, and many other, together may cause the option price to digress from its theoretical counterpart.

Quantifiable factors:
Theoretical value of an option contract comprises of two main components -
1. Intrinsic value - This component indicates the fundamental value of the option contract based on the value of its underlier and the strike price of the option.In plain terms, it can be considered to be equal to the difference between price of the underlier and the strike price.
2. Time value - Any amount of premium paid over the intrinsic value is the time value of that option contract. It indicates the amount of extra money above intrinsic value that the buyer is willing to pay with the hope that the market will turn in his favour. This value generally decreases (decays) as the time to expiry approaches. on the day of expiry, this value should be zero. This is because, longer the time to expiry, more time the buyer has for the market to turn in his favour. As expiry approaches, the time probability of this happening reduces and hence the time value of the option decreases. This decay is generally faster towards the end of option expiry as compared to that in the initial period. This is shown in the following graph -

courtesy tradingmarkets.com

Based on the above discussion, following are the set of quantifiable factors often used by option pricing models -
  1. Stock price of the underlier - This forms a part of the intrinsic value of the option. As this value increases, call options price increase and put option price decrease. As this value decreases, call options price decrease and put option price increase.
  2. Strike price - This forms a part of the intrinsic value of the option. As this value increases, call options price decrease and put option price increase. As this value decreases, call options price increase and put option price decrease.
  3. Time until expiration - This forms a part of the time value of the option. As this value increases, both call and put option prices increase. As this value decreases, both call and put option prices decrease. This is as explained above.
  4. Volatility of the underliers stock price -  This forms a part of the time value of the option. Volatility means the variation in the underlying stocks price value. It does not necessarily indicate a bullish  or bearish trend in the stock movement. Just indicates the fluctuations. As this value increases, both call and put option prices increase. As this value decreases, both call and put option prices decrease. This is because, high volatile stock has a greater chance of being more favourable for the long side and similarly the short side).
  5. Dividends - This is more of a passive factor. However its important because, for a person who is long a call contract, he will get the delivery of stock on  exercising the option. And after that, if the company decides  to give dividends for its shares, then the long party will profit from it. Since, the ex-dividend dates are generally  know in advance, this factor is taken into consideration while determining  the  option price. As this value increases, call options price decrease and put option price increase. As this value decreases, call options price increase and put option price decrease. This is because, the effective stock  price is equal to actual stock price less the dividends paid. This effective stock price  is what is used in intrinsic value calculation. Thus, as dividends increase, effective stock price decreases and vica versa. Thus the above relations.
  6. Interest rates (time value of money) - This  is an inevitable factor in evaluation of any financial instrument since it indicates the time value of money. As this value increases, call options price increase and put option price decrease. As this value decreases, call options price decrease and put option price increase. This can be explained by a simple example. Consider a trader who wants to buy 100 IBM stocks. Instead of buying them right  now, he can buy one call option. Thus, he now makes a small initial investment of the option premium as opposed  to earlier. This money temporarily saved can be put in an interest bearing account which will fetch him some extra bucks. Thus, he would be willing to pay some more premium in order to make some extra bucks given that interest rates are rising. Thus the above relations. 
To summarize,

Friday, January 1, 2010

Options - Basics

To be, or not to be, that is the question
(Hamlet, Act III, Scene I)

What is an option:
An option is an contract between a buyer and a seller, which gives the buyer a right, but not an obligation, to trade (buy/sell) some asset at some point in future at a predecided price. In plain english terms, an option contract would say something like - "Ted (option buyer) can sell 100 IBM stocks (asset) at a price of $10/share on or before 15th July, to Fed". Let us assume that our hypothetical option comes for a price of $2.

Some terminology:
The asset on which the buyer of the option has a right to trade is called as the option underlying or underlier. 
The date till which the option is effective is called as the expiration date of the option.
The price at which the underlier gets traded is called as the option strike price.
Since an option contract gives the buyer a right but not an obligation, to trade the underlier, it has some cost associated with it. The buyer agrees to pay a one time amount called as option premium to the seller to buy the option.
So in our example above,
underlier => IBM stock
expiration date => 15th July
strike price => $10
premium => $2

Exercising an option:
When the buyer decided to use his right to trade the underlying security of the option that he owns, then this is called as exercising the option. In our example above, if on 13th July, Ted decided to sell 100 IBM stock shares to Fed at $10/share, then Ted is said to be exercising his option.

Types of option - put / call
When an option contract gives the buyer a right to buy the underlier at the strike price from the seller, on/before the expiration date, then it is called as a call option.
When an option contract gives the buyer a right to sell the underlier at the strike price to the seller, on/before the expiration date, then it is called as a put option.

Types of option - American / European / Bermudan
If the option can be exercised at any time on and before the expiration date, then it is called as an American option.
If the option can be exercised only at the expiration date, then it is called as an .European option.
If the option can be exercised only on a discrete set of days on and before the expiration date, then it is called as an Bermudan option. 

Buying and Selling puts and calls:
Buying a call option gives the buyer a right to buy the underlier at the strike price on/before the expiration date. 
Buying a put option gives the buyer a right to sell the underlier at the strike price on/before the expiration date.
Selling a call option obliges the seller to sell the underlier at the strike price on/before the expiration date, when (and if) the buyer wishes to exercise his option.
Selling a put option obliges the seller to buy the underlier at the strike price on/before the expiration date, when (and if) the buyer wishes to exercise his option.
Note that selling an option is more popularly known as writing an option.

in-the-money, out-of-money, at-the-money:
At the expiration date, if, for a -
call option, the current market price of the underlier is more than the strike price
put option, the current market price of the underlier is less than the strike price
then, that option is said to be in-the-money. This is because it is offering the buyer of the option a more favourable price than the market price while exercising the option.

At the expiration date, if, for a -
call option, the current market price of the underlier is less than the strike price
put option, the current market price of the underlier is more than the strike price
then, that option is said to be out-of-money. This is because it is offering the buyer of the option a less favourable price than the market price while exercising the option.

At the expiration date, if, for a -
call option, the current market price of the underlier is equal to the strike price
put option, the current market price of the underlier is equal to the strike price
then, that option is said to be at-the-money. This is because it is offering the buyer of the option the same price as the market price while exercising the option.

As is obvious from above definitions, an option will be exercised only if it is in-the-money or at-the-money. When the option is out-of-money, the buyer of the option might as well chose to let the option expire and not exercise it since he is getting a better price in the market.

Some terminology:
Going Long: In the context of options, going long would mean to buy an option contract. So, the person who goes long on an option would have a right but no obligation to exercise the option. Further, his potential loss is limited by the amount of the premium paid.

Going Short: In the context of options, going short would mean to sell (write) an option contract. So, the person who goes short on an option would have an obligation to fullfill the assignment if the option holder decides to exercise the option. Further, his potential loss is theoritically unlimited (practically limited by the fact that stock price cannot go below zero).

Open a position: In the context of options, opening a position means to add to an existing set of positions already undertaken. One can open a new position by -
  1. Going long i.e. opening a long position (buying an option contract).
  2. Going short i.e. opening a short position (selling an option contract).
Close a position: In the context of options, closing a position means to reduce from an existing set of positions already undertaken. One can close an existing position by -
  1. Going long i.e. Buying an option contract to offset an existing option contract that is written.
  2. Going short i.e. Selling an option contract to offset an existing option contract that is bought.
With respect to options, a closing transaction is done to avoid actual delivery of the underlier. For e.g. a company may have strategically gone long on a call option to buy 100 cows. Now, they don't intend to actually exercise this option and take care of the cattle. Instead, they will simply close their transaction by going short on  a call option to sell away those 100 cows. Note that an option position can only be closed before the option holder exercises the option.

Exercising an option - Process flow

The diagram above depicts the typical participants involved in the process of exercising an option. When a client wants to exercise his option, he should inform his broker well before the expiration date. This broker will in turn inform the OCC (Options Clearing Corporation) of the intent of its client to exercise his option. The OCC would then pick up one clearing members from a pool of clearing members. Clearing members are nothing but brokers for short clients. The selected clearing member would have many clients who would have written an option contract with the same terms as the one the original client wants to exercise. The clearing member will pick up one such client randomly and then assign him the job of making the actual delivery.

Trivia: A short client may chose to close his position to avoid assignment as mentioned above. In case of stock options, a call option holder may chose to exercise the option well before the expiry since the company may be giving dividends and he  may want his share in the dividends. So, in such cases, the option writers should be alert as to the date of dividends so that they may close their positions well before that date.

Sunday, December 27, 2009

Dark liquidity pools

Real integrity is doing the right thing, knowing that nobody’s going to know whether you did it or not. -  Oprah Winfrey

What are Dark Pools:
Dark pools are internal crossing networks wherein, typically large orders from traders are crossed internally without routing them to the exchange. The prime feature of dark pools is the anonymity they provide with respect to the identity of the trader, the trading price as well as the liquidity.

What is the need for them:
Large institutional investors generally follow sohisticated strategies which may require them to buy/sell large proportions of a stock at short notices. These investors are vary of trading such large quantities because of the market impact they bring about whihc may shift the prices against them. Tradionally, Quants were employeed to come up with complicated strategies of loading/unloading such large quantites by buying and selling in equity as well as derivative markets for that security. However, these methods were soon found not to be sustainable for a long time. This need for an alternate trading facility other than the exchange gave rise to the concept of "dark pools". This allows traders to trade large quantites without having these trades shown up on the exchange side order books. This in turn guarantees no market impact of such trades.

These pools are owned by private brokers like Morgan  Stanley, Goldman Sachs etc. They may also be shared across multiple brokerage houses.
Dark pools are recorded to the national consolidated tape.  However, they are recorded as over-the-counter transactions.  Therefore detailed information about the volumes and types of transactions is left to the crossing network to report to clients if they desire and are contractually obligated. Dark Pool transactions are recorded on the exchanges' consolidated tape. The SEC, and anyone else that wants to purchase the consolidated tape, has some limited visibility into those transactions.

  1. Alternate trading systems (ATS), as they are refered by, provide internal crossing of client orders without having to route them to the exchange. This saves execution and routing time. Further, it provides anonymity by not having these orders shown up in the exchange order books.
  2. Unlike exchange, where such large orders might  be sliced and routed to different destinations, and executed are possibly different prices, these dark pools can provide a fixed execution price (often midpoint of ap and bp) since they dont need to slice the order, entire chunk can be executed at same price often.
  3. They offer high levels of liquidity for trading stocks. Sometimes, traders might find it difficult to trade less liquid stocks in open exchanges. So they may opt for dark pools in such cases.
  4. Low transaction fees. This is because, unlike exchanges wherein these costs might be incurred on each slice, the costs for dark pools is much lesser.
  1. These dark pools are only accessible via electronic trading.
  2. There is a limitation on the total volume of trading done  on a particular stock that can pass through dark pools.
  3. Since they hide the order level information from outside world, one cannot guarantee that the prices one sees on the exchange are indeed the real prices of that stock. Now, although this might not affect retail investors because they can still trade at the price available in exchange relative to the price they expect, as long as both of them are in sync. However, the regulators who are looking to keep the prices of a stock as close to its fundamentals as possible would have problems with this. 
Dark algorithms:
Given thast algorithmic trading is only a sub partt of electronic trading, algorithms will eventually become an integral part of managing liquidity in the markets. Brokers often try to find best possible pools for execution of client order to ensure best prices. For this, they slice and route the orders to different pools based on their availability. Any leftover volume is broken up and placed back across the pools, with the result that the buy-side firm’s order is executed efficiently with minimised risk of overexposure or missed opportunities, and without the firm having to manage the multiple venues itself. As such, traders these days are trying to cook algorithms which expose minimum information of the trade to the external world. Then there are algorithms who try to  find hidden liquidity by tracking such dark pools and efficiently manage the order execution by routing the  orders to the best pool. Credit Suisse's Guerilla and Sniper are two such dark algorithms. This is a snippet of an interview of Toby Bayliss, Citi posted on ftmandate.com about the use of algorithms in dark pool trading -

FTM: The need for gaining access to the growing number of dark pools of liquidity has resulted in the development of new liquidity-seeking algorithms. How do they work?
TB: Smart order routers work by having an understanding of each of the liquidity pools and how they work and interact with flow. Each venue differentiates itself by having its own methodology for interacting with the actual flow that is there. Negotiation takes place in different ways. A smart order router needs to understand each and have access to all of them.
Depending on the aggressiveness of your liquidity-seeking algorithm, it may seek only to interact with dark liquidity –sending in hidden order types to see if they are matched on the other side. To get more aggressive, you can interact with order book flow or you can post liquidity on certain venues.

FTM: And what are the challenges for sell-side firms trying to differentiate themselves in this area?
TB: It really comes down to speed, which is crucial; knowledge of where things are trading; and building up that knowledge over time. Because speed is important, you want to target venues where you have seen liquidity in the past or where liquidity exists at the moment. Because there are so many venues you can only ping so many at a time before you have to prioritise which will target. Pinging is sending the minimum size order for that venue and seeing if you get a fill. The actual knowledge side is also crucial. At Citigroup we own Lava, which has the concept of a dark book. This effectively allows clients to enter the full order size even if they only send a small part to market. Lava has the knowledge that a large order exists so it can match large buyers and sellers of large blocks. It gives you a higher probability of finding the other side for your whole order size.

Trading strategy: Sniffer programs

It is double pleasure to deceive the deceiver

Its been quite sometime since algorithmic trading was introduced on the street and ever since that, these sharp, cutting-edge algo's have been craftily used to beat their mortal counterparts. Now, we have now reached a stage wherein one algo is made to beat another algorithm. This is called "gaming". Lets call these cool next-gen algos as bots (it adds a true gaming feel ;-) ). These bots are basically used to perform only one function extremely well, track down other algos and either use this information to go along with the tide and make profit or work against these algorithms' strategies. These bots are called sniffers. They listen on the network traffic and try to detect patterns in the orders sent. A very basic example of what a sniffer does was explained in my previous post on High Frequency trading in strategy number 3. It explains how HFT traders used sniffers to exploit the naive algos and book profits by buying at a less price and selling at high price to these algos a fraction of a second faster.

Saturday, December 26, 2009

Trading strategy: Iceberg orders

False face must hide what the false heart doth know

(Macbeth Act I Scene VII)

Sometimes a client may wish to write off a certain stock off his books, which he had heavily invested in. Such a client may call up his broker and ask to sell say 1M shares of IBM. Now, the most primitive approach the broker could have used is to just place one large sell order with a quantity of 1M (market or limit based on client preferences). However, the disadvantage of doing this is that, if some trader X is actively trading IBM and he suddenly sees this huge order, he may have a doubt that someones got some insider information on IBM stock falling down and is trying to write it off. So he too may follow suit and this may in turn trigger a chain of such transactions. The law of demand-supply commands that IBM stock price will fall in this scenario. This eccentric price shift was not backed by any fundamentals but instead just by the whim of a few traders thinking that IBM is going to fall. So in all this, our poor client who wished to write off IBM is left to face the brunt of selling at a low price. To avoid such situations, his broker may chose to just show a small part of the total order onto the market (before its execution) and hide the rest. Such an order is like an iceberg, tip above the water surface, rest is deep down the water. Thus its called as an "Iceberg order". The broker will slice and dice the original order and time it using some algorithm like VWAP, TWAP etc. Slicing is done to disintegrate the original order while timing is done to make sure it gets the best execution price. The client may specify some slicing parameters like -
  • Total size of the order
  • Maximum size to be displayed at any given point (know as "Disclosed quantity")
  • Actual "Displayed quantity" (this is NOT specified by client but instead calculated based upon the executions received on the "Disclosed quantity".
Note that some exchanges support Iceberg orders by themselves while some dont. For the latter types, the brokers (Investment banks) use sophisticated proprietary algorithms and infrastructure to simulate this.

Operational semantics:
Consider this hypothetical case:
  • Iceberg order - total-qty=300 , Disclosed-qty=50
  • Two other pure limit orders O1, O2 - qty=50, price=100
  • One pure limit order O3 - qty=50, price=99.5
Lets say the broker determines that he should break up the Iceberg into 2 "visible" slices of 50 each(V1, V2) and 4 "invisible" slices of 50 each.  (I1,  I2, I3, I4)
Initially, the broker sends first visible slice. This gets queued up on the exchange as per the price/time priority rules. This order is seen to outside world. This new order will then enter below the already existing pure limit orders queued up on the exchange. A new visible order is sent only when the previous one is completely executed.No invisible slice is sent till ALL visible slices get completely executed. Once all visible slices are executed, invisible slices assume positions below the already existing pure limit order of same qty. So in our case, at three discrete time intervals t1 < t2 < t3, we might have a possible scenario as -
                                    t1: V1, O1, O2
                                    t2: O1, O2, V2, O3
                                    t3: O3, I1, I2, I3, I4
(above listing is in decreasing priority from left to right)
Obviously, the client would wish his total order to get executed ASAP. The repeated lessening of priority on each new slice of the iceberg order, may act as an impediment to this. So brokers often try to somehow ensure that new slices do not enter at low priority, by techniques like revising the "Disclosed quantity" and thus amending a previously partially filled visible slice with an increased quantity or something like that. This ensures minimum delay between different slices of the same iceberg order. Note that brokers may also route these slices to different exchanges in order to bring more randomness to the identity of the original iceberg order, to avoid getting tracked down by sniffers.

To summarize..
Icebergs offer - 
  1. Ability to reduce market impact on the prices of the stock.
  2. Control the liquidity in the market.
  3. Convenience to the original client, by not having him to manually slice-and-dice, but instead having a formalised notion of an iceberg order.

Buy side firms and Sell side firms

I have been reading about financial markets for a while, and often encountered this terminology of "buy-side and sell-side firms". Earlier, I was too lazy to know what it really meant and just overlooked it, since it never became a road block to my overall understanding of the actual topic i would be reading :-P Anyways, here it is, finally! (directly lifted from Wiki Answers)

On Wall Street, "buy side" refers to firms that invest money or 'buy' securities and "sell side" refers to the investment banks that provide the buy side firms with products and services such as initial public offerings (IPO's), secondary offerings, trading, research, conferences, etc. The "sell side" firms are 'selling' IPO's and services to the buy side firms.
Examples of buy side firms would be large mutual fund companies like Fidelity or T Rowe Price. Examples of sell side firms would be investment banks like Goldman Sachs, Morgan Stanley, etc.
Most of the large investment banks also have small buy side operations that are run separately from the larger sell side. For example, you can buy a mutual fund from Morgan Stanley or Merrill Lynch, but this isn't where these firms make most of their money.