Author: shyam

Machine Learning Stocks

There are no “new new” things in finance, there are no “unique” opportunities and the stock that you labored so hard to pick is no “diamond in the rough.”

The perils of static classification

In the olden days, stocks were classified either based on the industry they operated in (i.e., sectors) or based on their market cap (i.e. cap-weighted indices.) But neither of them do justice to the underlying risk or technical behavior of the stocks themselves. Not all stocks in an index are similar, nor do they have a 100% overlap with other stocks within the same sector. Buy say you really liked a stock, like ACCELYA for example, but found its valuation unattractive, how do you go about finding a substitute?

Finding substitutes using clustering

This is where machine learning can help. Using clustering algorithms, stocks can be grouped based on parameters different from just industry or market-cap. What if stocks are grouped based on risk metrics (alpha, beta, Sharpe…) and technicals (RSI, ADX…)?

This was the question we set out to answer and we are now proud to present the results in the “Quant” tab in the equities page. Here’s how the Quant section looks like for Accelya:

ACCELYA Quantitative Analysis

It shows that Accelya, although a retail value favorite, is not alone when it comes to its risk profile and technicals. There are other fish in the sea that is worth a gander.

This might be a scary thought for most investors: their favorite stocks are not alone, and there might be cheaper substitutes to the stocks that they like.

Geek Note

  • All factors are equally weighted and normalized.
  • A lot depends on whether the underlying data is actually clustered or not. For example, if you only cluster based on risk metrics, then by definition, most stocks will cluster around Alpha=0 and Beta=1.
  • Risk metrics look back 365 calendar days whereas technical metrics look back over shorter time-frames.
  • In case you are wondering, there is no information content in observing “cluster migration.”

Related:
Alpha, Beta, Sharpe and Information Ratio
Risk Adjusted Returns

Monthly Recap: September 2013

Nifty monthly performance heatmap

The NIFTY ended the month up 4.82% (+11.16% in USD) on the back of improving sentiment regarding the economy and the US Fed’s continued QE program.

Index Performance

FMCG was the leader but commodities was not too far behind.

Index performance

Top Winners and Losers

ULTRACEMCO +22.68%
ASHOKLEY +26.25%
JSWSTEEL +34.76%
RANBAXY -19.01%
TCS -5.18%
SESAGOA -4.24%
The perfecta: Cement, Auto and Steel

ETFs

JUNIORBEES +8.00%
BANKBEES +7.33%
NIFTYBEES +5.71%
INFRABEES +0.61%
GOLDBEES -2.39%
PSUBNKBEES -6.51%
Better quality midcaps seem to have caught a bid…

Advancers and Decliners

advancers and decliners

Yield Curve

It was the month of the “surprise” rate hike…
Indian yield curve

Interbank Rates

The volatility in the interbank rates over the last month has been phenomenal…

india interbank rates

Sector Performance

sector performance

[stockquote]NEULANDLAB[/stockquote]

Weekly Recap: The fallacy of inept bad guys

Nifty performance

The Nifty ended the week -2.98% (-2.30% in USD terms.) Banks took much of the heat.

Index Performance

index performance

Top Winners and Losers

ZEEL +6.59%
ASHOKLEY +6.74%
APOLLOHOSP +9.39%
YESBANK -14.45%
DLF -12.97%
BANKINDIA -11.42%
Yesbank continued its roller-coaster ride…

ETFs

INFRABEES +2.50%
JUNIORBEES -0.08%
GOLDBEES -0.44%
NIFTYBEES -2.79%
PSUBNKBEES -5.90%
BANKBEES -6.64%
Is infrastructure finally turning the corner or is this a dead-cat bounce after tumbling last week?

Advancers and Decliners

advance decline ratio

Yield Curve

Long term rates ended higher – it looks like the market is pricing in 50bps rate hike?

yield curve

Interbank Rates

The rates that banks charge each other has come down over the last 30 days. Does it mean that the liquidity crunch is nearing an end?

interbank rates

Sector Performance

sector performance

Thought for the Weekend

It means assuming the opposition is a legitimate threat until they prove otherwise, rather than assuming that they’re incompetent. Most of all, it means abandoning the belief that we deserve to win, and instead believing we have to earn all of our victories the hard way.

Source: The fallacy of inept bad guys

USDINR – Does a Long Call Condor make sense?

The Avg. True Range of USDINR is 1.06 with volatility coming in at 0.24. An October 62.0/62.5/63.0/63.5 Long Call Condor will allow you to bet on the Rupee staying within a range.

USDINR Long Call Condor

The market value is coming in at Rs. -155.00 but as you can see from the payoff diagram, the max profit is upwards of Rs. 500.

The Rupee will move if Rajan or Chidambaram announce something about controlling CAD or tinkering with the rates. Is Rs. 155 enough compensation for the Rajan risk?

 

[stockquote]ATULAUTO[/stockquote]

Weekly Recap: The Market for Lemons

nifty weekly performance heatmap

Nifty ended the week +2.76% (INR) +5.31% (USD) as both the markets and INR rallied on the back of the non-taper announcement from the US Fed.

Index Performance

Realty took a hit yesterday on the back of RBI’s 25bps rate hike (previously: here)

indexperf.2013-09-13.2013-09-20

Top winners and losers

SRTRANSFIN +13.54%
JSWSTEEL +17.30%
YESBANK +26.62%
RANBAXY -26.98%
GSKCONS -7.04%
BHEL -5.15%
All over the place, as the market tries to make up its mind…

ETFs

BANKBEES +5.05%
JUNIORBEES +3.13%
PSUBNKBEES +2.83%
NIFTYBEES +2.81%
GOLDBEES +1.58%
INFRABEES -4.55%
Banks rallied on the back of “no-taper” but are likely to give up most of their gains as RBI’s tightening stance sinks in…

Advancers and Decliners

adline2.2013-09-13.2013-09-20

Yield Curve

What exactly did the RBI do? Short term-yields have actually come down in spite of the 25bps increase in repo-rate. Ajay Shah tries to explain the head-scratcher here: The RBI has just intensified the muddle.

yieldCurve.2013-09-13.2013-09-20

Sector Performance

sectorperf.2013-09-13.2013-09-20

Thought for the weekend

Markets characterized by asymmetric information between sellers and buyers commonly resulted in declining quality of products offered for sale. In a market where the quality of products for sale is difficult to determine (such as used cars), if the majority of offerings are low quality “lemons,” buyers will come to distrust sellers and drive the average transaction price down to the “lemon price.” In this environment, the sellers of high quality used cars will only be offered lemon prices, since buyers can’t tell the difference. And since lemon prices are below the true value of the high quality vehicles, the sellers of good used cars will choose not to sell, eventually resulting in a market with only lemons being offered for sale.

Source: The market for idiocy

Ginormous USDINR chart

e385268aacd8409fa1847a6a47595868635153561016570285