Tuesday, July 13, 2010

Margins

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.
Advantages:
  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
Introduction:
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
OR
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
OR
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
OR
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.