Showing posts with label quantmod. Show all posts
Showing posts with label quantmod. Show all posts

Sunday, April 26, 2015

This is NOT Nuts, Where is the Crash? (II)

With dollar index on record highs, emerging market equities (except, of course, China!) getting bullied around on fed hike scare, and as the Greek saga continues, investors around the world are beginning to worry about risk trades. Especially equities and high yields. IF I am not mistaken, the latest Bloomberg investors survey points to that direction. Well, it seems we need not worry, not as yet! The Risk-On is going still very much strong.

I take the major equity indices around the world along with treasuries and internal sovereign ETFs (iShares) as well as high yields, and run some PCAs. The correlations as below.


The first one is obviously the risk-off/ risk-on factor. The second one is more like a fixed income allocation factor. The last one is domestic (US) vs international factor. We pick up the first factor and run it through a regime switch model (a Hidden Markov Model). The results below. The figure shows S&P Performance (orange) vs. the probabilities of different states we may be in. State 3 (bottom-most in black) represent Risk-On, state 2 (middle in black) is the Risk-Off state, and state 1 (top most in black) can be construed as Risk-Moderation state for lack of better words. As we can see, we are very much in Risk-On (click image for bigger picture).



Given the general nature of flows, esp smart money flows, chasing asset price momentum, we can say that much touted crash/ correction is a bit further away in to the future. Interestingly, similar analysis for other factors along with the assumption above means, for domestic investors, US fixed income is becoming increasingly less attractive, and foreign FIs more so.

__________________________________________________________________________________
1. if you are wondering about the title, part I is here)
2. data from 2010 onward, analysis and plots by depmixS4 and Quantmod package on R 

Sunday, December 21, 2014

NIFTY: Day traders Vs. Investors (+ A Christmas Present !!)

Here are some interesting charts comparing how S&P CNX Nifty has performed over last many years - split between day-session performance vs. overnight. The pattern is very interesting. In 2007-2008, the day traders dominated, both in profits and in losses. Be it the run up to the pre-crisis top in early 2008, or the crash. It was again the day traders who profited most in the comeback in 2009. This continued till the peak in 2010. 

However, after that, something changed. 2010 was the last great year for the day traders. Since 2011, the overnight returns dominated returns during the day session, far and steady. That was the case during the mild bearish runs in 2011, the sideways market in 2012. And the trend continues strongly in to the current bull period. 

The overnight returns now dominates day session so much that if this continues, going long overnight and shorting the markets during the day is now a super profitable strategy !!



What is driving this? Well to start with: the vols are down, and NIFTY (like most emerging markets) is perhaps influenced by the Feds and the BoJ much more than it used to be back in 2007. I would suspect most emerging markets will show very similar patterns. And this is VERY different than, say , S&P 500, where overnight and day-session has their fare share of misery and joy.

Will this continue? Well, the flow of funds that world-wide QEs initiated is still churning around, and will perhaps take a long time before the dust settles down. But it is an altogether different scenario if we enter a high vol regime in 2015, irrespective of market direction.

The tail piece: for folks looking for public source of intraday data on stocks - here is a quick and dirty R scripts. Feel free to use and modify as you please. Quantmod of course does a wonderful job for daily data. This routines are similar and extend to intraday.


. Merry Christmas and happy holidays everyone!