Site Meter The Lawyer Trader: September 2011

Wednesday, September 28, 2011

Leading Indicators Study Say's Bears are Still in Control

One indicator that I created a while back and have been following is called the "Leading Indicator Study."  No, these are not the economic data leading indicators, these are just different etfs of asset classes that represent the bullishness or bearishness of the market that tend to lead big moves.  It is based on the Euro (FXE), Copper (JJC), Small Caps (IWM), Emerging Markets (EEM), VIX (VIX or VXX), Long Term Treasuries (TLT), Short Term Treasuries (SHY) and Consumer Staples (XLP). 

I'm not going to go into exactly how this works, but I wanted to share the general idea...maybe it will spark some ideas with clever traders that look at such things to derive an edge.  The basic concept is to take risk sensitive asset classes, determine whether they are in an uptrend or downtrend, and then create a score based on the trends.  This particular indicator uses a couple of regression calculations to determine the trends and then it adds points for the bullish trends and subtracts points for the bearish.  Simple enough.  Regression is not necessary, you could easily use a moving average or volatility break out system in place of the regression.  The point is to look at multiple asset classes at the same time to get a heads up on what the market's current risk appetite is.

Here's a screen shot of the indicator paired with the S&P 500, note the colors of the price bars are indicative of the bullishness (green), bearishness(red), buycaution (yellow) and sellcaution(blue):

Hopefully you found this interesting and you can work out something similar or even better to implement with your own market analysis.  As you can see with the chart, price bars are red and the indicator score is a very low -92 which confirms the bearishness of the market.  That tells me not to get too excited about any rallies until this indicator gets back to bull territory.

TLT

Wednesday, September 21, 2011

CNBC Portfolio Challenge

I couldn't help myself...I had to sign up. Not gonna spend a lot of time on it (not really a revenue producing activity) but it is fun. I put together a couple of portfolios and will manage them in my spare time just for the heck of it.

Off to a good start so far..here's the rank as of today:


1068th isn't bad considering there are over 500,000 portfolios.  We'll see how it goes.

Have a good one.

TLT

Thursday, September 15, 2011

Take a Look at the EuroDollar Index over 3 Month Libor

This is an interesting indicator. Much like the TED spread and a handful of others, it tends to give good indications of whether the market is likely to move higher or lower. Nothing is perfect, but the short term interest rate markets are usually quick to move when something is anticipated in the market. Take a look at the chart, and notice the crosses on the moving averages:
I chose to use the word "anticipate" rather than signal because that's what I use this for.  It's not a signal in and of itself, it's a tool that helps gauge the likely overall direction of the market.  So why the 3 Month Libor instead of 1 Month? No special reason, you could use 1 Month Libor..the 3 Month is a little smoother when plotted with the EuroDollar. (*Note this is the EuroDollar market that is made up of dollar deposits in other countries..this has nothing to do with the Euro Currency in the forex market).

Something interesting to watch and keep on your radar. Hope everyone is managing the volatility..it's a wild one right now.

TLT

Thursday, September 8, 2011

Index Trader Indicator for Think or Swim: Using Volume, Advance/Decline and Cumulative Tick for Day Trading

I've been playing around with a day trading indicator.  It consists of the ratio of advancing stocks to declining stocks (on the NYSE), Up volume vs. Down volume (NYSE) and the cumulative tick (also NYSE).  Basically, if advancing stocks are above declining and the UpVolume for the day is higher than the down volume, this indicator will show you that the market is bullish.  To filter these signals, I use the cumulative tick.  If the tick lines up with the other two then the bars are painted green (when bullish) or red (when bearish).  If the tick conflicts with the other indicators, the bar will be painted blue.  Check out a five minute SPY chart:

This indicator is useful for day trading, as it can help you determine where the market internals are pushing the market and get you on board with the trend as it's developing intra-day.  This indicator should not be used all by itself for entries and/or exits.  It is not perfect, as there are plenty of times when the bars are green and prices just drop.  I have been playing with it more as a filter.  For example, if I'm trading using bollinger bands, I will look for long intra-day setups when the bars are green.  Or if I'm looking to fade rallies using a stochastic oscillator, I'll look to sell an over bought signal if the bars are red.  There are lots of possibilities to incorporate this and tweak it to your liking.

Here is the think script code for think or swim if anyone out there uses TOS.

//
def VolUp = close("$UVOL");
def VolDn = close("$DVOL");

def advancers = close("$ADVN");
def decliners = close("$DECN");

def BullVol = if volup>voldn then 1 else 0;
def BullAdv = if advancers>decliners then 1 else 0;
def BearVol = if volup<voldn then 1 else 0;
def BearAdv = if advancers<decliners then 1 else 0;

def BullMode = if BullVol and BullAdv then 1 else 0;
def BearMode = if BearVol and BearAdv then 1 else 0;

def upper = no;
input hidecumtick = yes;
input symbol = "$TICK";
input period = 20;
input smooth = 5;
input lookback = 4;
input filter = 300;
def p = period;
def i = barNumber();
def na = double.nan;
#input usetrend = {"No", default "Yes"};
def usetrend = yes;
rec htick = if IsNaN(high(symbol)) then htick[1] else high("$TICK") ;
rec ltick = if IsNaN(low(symbol)) then ltick[1] else low("$TICK");
rec avgh = if i == 1 then htick else Max(filter, avgh[1] + 2 / (p + 1) * (htick - avgh[1]));
rec avgl = if i == 1 then ltick else Min(-filter, avgl[1] + 2 / (p + 1) * (ltick - avgl[1]));


def hi = high("$TICK");
def lo = low("$TICK");

def Last = if IsNaN(close(symbol)[-1]) then close(symbol) else double.nan;

def amean = if IsNaN(close) then na else (avgh + avgl) / 2;
def trendmean = if usetrend AND (htick > avgh OR ltick < avgl) then amean else 0;

def bull = if htick > avgh then htick - avgh  else 0;
def bear = if ltick < avgl then ltick - avgl  else 0;

rec ctick = if i == 1 then 0 else if IsNaN(htick) OR IsNaN(ltick) then ctick[1] else ctick[1] + bull + bear + trendmean; 

def ctickavg = ExpAverage(ctick, smooth);
def cumtick = if IsNaN(close) then na else ctickavg;
def nettick = if IsNaN(close) then na else ctick;

def zero = 0;

AssignPriceColor(if !upper then color.current else if cumtick > cumtick[lookback] AND ltick < avgl then color.green else if cumtick > cumtick[lookback] then color.gray else if cumtick < cumtick[lookback] AND htick > avgh then color.red else color.gray);

def hcumtick=if !hidecumtick then cumtick else na;
def hzero=if !hidecumtick then zero else na;
AddCloud(hcumtick, hzero );
def buy = if cumtick > cumtick[lookback] AND ltick < avgl then low - tickSize() else if cumtick > cumtick[lookback] then na else if cumtick < cumtick[lookback] AND htick > avgh then na else na;
def sell = if cumtick > cumtick[lookback] AND ltick < avgl then na else if cumtick > cumtick[lookback] then na else if cumtick < cumtick[lookback] AND htick > avgh then high + tickSize() else na;

def ahi = if IsNaN(close) then na else avgh;
def alo = if IsNaN(close) then na else avgl;
def hib = if hi < 0 then hi else na;
def lob = if lo > 0 then lo else na;
def phi = hi;
def plo = lo;

#plot zero=0;
#
# Formatting:

Def TickBull = (if cumtick > cumtick[lookback] then 1 else 0);

assignPriceColor(if BullMode and TickBull then color.Green else if BearMode then color.red else color.blue);
//


That's all folks.  I have been working on quite a few indicators and strategies lately and would be happy to share more code if there is enough interest/demand.  We'll see.  Hope everyone's trading is going well.

TLT

*****Update*****
The above code has been fixed.  A reader alerted me to a problem with the coding from the original post..not sure what happen but it appears to be a copy/paste error.  The new code should work much better