Wednesday, May 7, 2014

Fama French factors in Indian stock markets

Fama French three factor model has been widely used through out the world to identify risk and returns characteristics of various investment strategies. It uses a three factor approach(contrasted against one factor approach of CAPM) to decompose the returns of stocks into the returns of the market as a whole. These three factors are:
  • Market returns(MKT)
  • Returns of High B/M stocks over low B/M stocks(HML)
  • Returns of small market capitalization stocks over large market capitalization stocks(SMB)
Given these three factors the returns of a stock can be mathematically written as:


Why bother with Fama French?
  • It can be used to measure and control portfolio risk in a more holistic manner as it takes into account two more factors apart from market beta.
  • It can be used to identify the investment styles of various fund managers by regressing the returns of their portfolios on factor returns
  • As investors think differently during different times, behavior of HML and SMB can be used for regime identification and classification
  • The time series properties of these factors can be used to create long short trading ideas to generate alpha

Fama French in Indian context:
The analysis is done using the data from Jan 2006 to Apr 2014. Everyday stocks are sorted based on their market capitalization. Top 200 stocks are picked up for further analysis. This step is done to minimize survivorship bias. Within this list, stocks are once again sorted on their B/M. The difference between the returns of top and bottom quartile of this sorted list is the return of HML index for the day. Similarly sorting based on market capitalization is performed on this list of 200 stocks to generate returns of SMB index for the day. These steps are repeated for all the days to generate the HML and SMB indices. CNX Nifty is used as a proxy for MKT. The following are the performance of these three factors since 2006.


As we can see, these three factors are not independent of each other. Extreme movements in one factor typically correspond with the extreme movements in other factors. An example of this would be the rally of 2009 when high B/M stocks outperformed low B/M stocks. Also during the same time small market cap stocks heavily outperformed large market cap stocks. This means that even a market factor neutral portfolio can be very volatile during sharp moves in markets(as other factor exposure might not be zero). 

Correlations matrix(values significant at 95% levels are marked in orange):


MKT
HML
SMB
MKT

0.46
-0.40
HML


-0.01
SMB




Auto-correlation function(values significant at 95% levels are marked in orange):


Lag 1
Lag 2
Lag 3
MKT
0.05
-0.01
-0.03
HML
0.15
0.06
0.03
SMB
0.07
-0.03
-0.06

It is clear that the factors(in particular HML) show significant positive serial correlation and hence, very likely to exhibit momentum characteristics. This means style ignorant short term reversion strategies can suffer during sharp trends in  these factors.

K-means clustering based stock classification

K-means clustering is one of the simplest techniques used for classification. It partitions n observations into k clusters in which each observation belongs to the cluster with nearest center. Mathematically, K-means clustering tries to find the set of μ such that the following expression should be minimized.
Here d(x,y) is the distance function. Typical distance functions used are squared euclidean, sum of absolute differences and correlation. μi is the center(mean/median as per the definition of distance function) of the observations in Si.

In line with my previous post on Factor analysis based stock classification, we will attempt to classify stocks into groups to uncover hidden trends if any exists.

Classification of LIX15 stocks:
LIX15 is an Indian equity market index that consists of 15 highly liquid stocks traded on NSE. The observations matrix consists of normalized daily returns of these 15 stocks sampled from February to November 2013. K-means clustering is applied on the data using squared euclidean distance function. Following is the result of a two cluster classification:

Cluster 1
Cluster 2
AXISBANK
CAIRN
BANKBARODA
MCDOWELL-N
HINDALCO
TATAMOTORS
IDFC

JINDALSTEL

JPASSOCIAT

JSWSTEEL

MARUTI

RCOM

SBIN

TATASTEEL

YESBANK


The result are clusters with disproportionate size and non obvious interpretations. Interestingly enough the stocks in cluster 2 are the stocks which do not show any significant loading on factors during the factor analysis. Hence prima facie k-means has classified LIX15 constituents into two groups, one that moved with the broad market and the other which exhibited heavy idiosyncratic movements during the analysis period. Following is the outcome of a three cluster classification:

Cluster 1
Cluster 2
Cluster 3
CAIRN
AXISBANK
MCDOWELL-N
HINDALCO
BANKBARODA
TATAMOTORS
JINDALSTEL
IDFC

JPASSOCIAT
MARUTI

JSWSTEEL
SBIN

RCOM
YESBANK

TATASTEEL



The clusters roughly corresponds with sectorial themes. 


Fundamental theme
Cluster 1
Metal stocks
Cluster 2
Financial services stocks
Cluster 3
Erratic/heavily idiosyncratic stocks

Classification of BANKNIFTY stocks:
As with the LIX15 analysis, a two cluster based classification is performed on the BANKNIFTY constituents.Following are the resulting clusters:

Cluster 1
Cluster 2
AXISBANK
BANKBARODA
HDFCBANK
BANKINDIA
ICICIBANK
CANBK
INDUSINDBK
PNB
KOTAKBANK
SBIN
YESBANK
UNIONBANK

The fundamental interpretation of the resulting clusters is quite clear. 


Fundamental theme
Cluster 1
Private sector banks
Cluster 2
Public sector banks

Conclusion:
Using clustering techniques, we have been able to group stocks. These grouping tend to convey a particular fundamental meaning. Among the LIX15 constituents the major classification is on the sectorial line. Among the BANKNIFTY constituents the classification lies along the public vs private ownership lines. These conclusions are in line with the one obtained from factor analysis based classification of stocks..

HFT and algorithmic trading in India

Algorithmic trading was introduced in India in 2009 and within a span of 5 years it has gained a considerable share in market. Some random facts and developments in the algorithmic trading scenario in India:
  • Order percentage: Orders received from co-location in cash market segment are around 70% of the total cash orders. In derivatives segment the number is even higher, around 95%. For the currency derivative segment the number is of the order of 25%. 
  • Volume percentage: In India, algorithmic trading comprises of about 20-30% of the total trading volume, which is much lower when compared to US(60-70%) and Europe(40-50%).
  • Latency: Round trip latency is the time taken from initiation of a order to receipt of its conformation. Round trip latency for co-location based connections is around 2 ms. This number should be contrasted against latency for leased line which is around 30 ms and that of VSAT connection which is around 700 ms. 
  • Strategies: In the initial days algorithmic trading was used to exploit arbitrage opportunities. Subsequently algotraders ventured into speculative trading (like market making, statistical arbitrage etc.). Lately, institutional investors have started using algorithmic trading platforms for efficient trade execution (buying/selling large quantities of stocks with minimal impact costs).
  • Regulations: SEBI has taken many proactive measures to regulate algorithmic trading. These measures include risk control checks at exchange and trader's end, half yearly audits of trading systems, pre-approval of strategies from exchanges, penalties on high daily order/trade ratio etc.