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.