Archive for June, 2009

“Trade what you see, not what you think”

June 30, 2009

Another draft post I’m going to go ahead and publish now. More to follow.

There are many ways to be wrong in trading, but here are two big ones:

1. Any time you use a trending strategy in an oscillating market you will be wrong.
2. Any time you use an oscillating strategy in a trending market, you will also be wrong.

This is where the oft-repeated platitude “Trade what you SEE, not what you THINK!” breaks down for me. A price level is “seen”; it is self-evident, and as long as the price quote is genuine, it an indisputable, objective fact. In order to act on this information, however, you have to “think” something! You must interpret the price level as either too extreme (oscillating, fade it) or not extreme enough (trending, follow it). Now we delve into the realm of opinion, the land where large number probabilities and the next trade win/loss binary play out. But the truth is this: You cannot put on a trade without making some kind of interpretation of data.. You have to see AND think. I believe the fallacy comes when you try to see AND think at the same time. Without making a well thought out plan before you go to trade, you are more likely to be influenced by emotion and other human biases and be caught on the wrong side of a trade.

I believe that the market hours are for seeing and trading, not thinking. If you want to think and plan during market hours, then don’t trade. The thinking should be done beforehand, via a consistent, disciplined, and tested trading plan with definite setup conditions. Again, you MUST think something at some point to interpret price and take a position. Instead of “Trade what you see, not what you think”, I believe the better mantra for trading is “Plan your trade and trade your plan”.

More to come…

Quick Status Update

June 25, 2009

Work has been killing me, and I’ve been feeling under the weather. Sorry for the recent lack of updates. This should improve soon. Thanks for reading!

Messing Around With Cumulative Tick

June 13, 2009

After a comment by Donahchoo on Twitter, I started thinking of ways of looking at cumulative values of the NYSE Tick.

As with many other topics, there has been exhaustive treatment of what the Tick is and the significance thereof. Richard at Move the Markets has a very good Tick article if you want this background info. Dr. Brett Steenbarger talks a lot about how he uses cumulative adjusted Tick; see his blog for more details on what he does with it. Building on this foundation of what the Tick is, I’ll jump right in. This is more of a thought journal of my impressions than an exhaustive treatment of an optimized indicator, so it’s a bit rough around the edges.

I’ve been thinking that the most revealing information comes when we see extremes in the value of the Tick. Many times we hear of the tick being referenced to absolute levels: above +1000 could mean heavy buying, below -1000 heavy selling. The trouble with this is that sometimes you get a spike in the Tick that is unsustainable (and you should fade it), and sometimes you get heavy, extended readings for a long time (that you should be following). But the absolute level of the Tick doesn’t really tell me which is which. Additionally, it seems that when the low of a bar of the Tick stays relatively high (such as the low of a 5 min Tick bar being at +400 and the high at +1200), that means more for strength than having both a high and a low reading in the same bar, as in both +1200 and -1200.

So to define an extreme, I decided to use a different approach. First, I apply two exponential moving averages to create bands. I plotted the EMA(20) of the highs in the Tick, and the EMA(20) of the lows. Then I wrote a script to sum the net extremes ONLY, ignoring any Tick readings happening inside the bands, using this formula:


def htick = high("$TICK");
def ltick = low("$TICK");
def avgh = expaverage(htick,20);
def avgl = expaverage(ltick,20);
def bull = if htick > avgh then htick - avgh else 0;
def bear = if ltick < avgl then ltick - avgl else 0;

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

That code will sum only the extreme Tick readings, as defined by our EMA bands. I like this because it forms an adaptive definition for tick extremes, and it also captures the effect of having high Tick highs and lows as I described above, and vice versa for low highs and lows.

I wrote a full indicator to test this out on a 5min chart of the last 3 days in ES. I’ve plotted the indicator below the price chart. I’ve also included a separate plot of the Tick for visualization purposes. The CumTick indicator is doing all it’s own calculations behind the scenes. There are three things going on that I’ll explain:

1. A net sum line (thin line) for the cumulative values of ctick as described in the code above.
2. A 20 period EMA of the net sum line. This is done for smoothing purposes. This line is colored according to values in it’s own past–if the EMA is above the value of the same EMA 4 periods ago, it is green, else red. This lookback is kind of like the way the Fisher transform looks back at it’s own past values, only it uses a lookback period of 1.
3. I have added a cloud, red if the EMA is below zero, and green if it is above zero.

cumtickoverview

You can see that the red/green EMA does pretty well on choosing the dominant market direction. Zooming in for some detail, I’ve annotated graphically what my code from above is doing:

cumtickdetail

I wrote a couple of strategies to run a quick backtest on this. I went long when the EMA went from red to green, and opposite for shorts. I also included an ‘exit on close’ to keep this to a daytrading strategy only. Here’s what the trades looked like:

cumtickstrategy

Only a couple of whipsaws, but the entries had some significant retracement at times. With no stop loss or profit target, just reversing according to color and going flat at the end of the day, here’s the results (in ES points) for the 3 day period:

Max trade P/L: 10.00
Total P/L 26.25
Total 41 order(s)

That’s very encouraging! I always want to do a sanity check on new ideas. If it’s not profitable in a simple test, you’re not going to mine gold by tweaking it. I would need to do more work in looking at stops and more backwards data to gain confidence in it, and work on an entry setup to see if there was a smarter way to get in. I welcome comments and any ideas anybody may have, if you’re interested. You can download my indicator file and the strategy files (look for “Cumulative Tick.zip”) in the “Work in Progress” section at my google site.

Inflation, Deflation and Wealth Redistribution

June 10, 2009

The Federal Reserve has two mandates:
1. Price Stability (often read as low monetary inflation)
2. Maximum Employment (usually accomplished by a moderately growing economy)

Basically, the Fed would like to target a 1%-2% price inflation rate annually. This rate is (theoretically) where maximum sustainable economic growth occurs. More inflation than this can result in runaway asset price inflation (breaking Mandate #1) or an overheated economy that meets with a bust later on (breaking Mandate #2).

Throw all of the above in the recycle bin. This is worthless PR drivel meant for the consumption of the masses. I will give you a key to understanding politics and politicians:

Ignore what they say. Watch what they do.

In that regard, what is the true mandate of the Federal Reserve?

Protect the interests of the wealthy.

Does this occur because the wealthy run the government, or because the government creates wealthy people? Probably some of both. But I digress.

Why do I say that the Federal Reserve mandate is to protect the wealthy? Because of one simple thing: The Fed will always, in all ways and everywhere defer to the side of economic and monetary inflation over deflation.

Deflation strikes fear in the heart of all wealthy people. Why? Wealthy people have a majority of their wealth in assets. Assets produce income or store wealth in proportion to their price. If asset prices fall, their store of wealth, income produced, and relative standing all go down in large measure. Conversely, deflation (as long as it does not crush the economy) favors the working poor, who generally live off of a fixed income as they trade their time and labor for money. The “poor” generally don’t have assets to deflate, and their expenses form a greater percentage of their overall wealth, so the reduction in prices directly impacts their lifestyle. Basically, deflation has the net effect of transferring wealth from the rich to the poor.

Inflation strikes fear in the heart of all working “poor” people. Why? “Poor” people have a majority of their wealth in fixed income streams or cash. This income (job, pensions, etc) is relatively fixed in relation to prices. If asset prices rise, their store of wealth, income produced, and relative standing all go down in large measure. Conversely, inflation (as long as it does not crush the currency) favors the wealthy, who generally live off of income and assets that gain a greater value as prices rise. The wealthy generally don’t have problems with fixed income streams that are penalized by inflation, and their expenses form a smaller percentage of their overall wealth, so the rise in prices is offset in large measure by the rise in the value of their assets. Basically, inflation has the net effect of transferring wealth from the poor to the rich.

Back to the Federal Reserve–Ignore the rhetoric. Have the policies of the recent past, from Greenspan’s free money, to Bernanke’s rate slashing campaign, to the alphabet soup of toxic investment relief vehicles, buying Treasurys, increasing money supply in the face of global credit deflation–have they been using every tool in their arsenal to combat inflation or deflation? They always err on the side of inflation. ALWAYS. It’s simple to see why. Follow the money.

By my read, about half of the S&P’s ~40% gain since the March lows has been made up of inflationary pressures, leaving only ~20% in actual equity appreciation. Bears, shorts and other doomsayers have been annihilated in this latest wave, even though they may have been accurate in their prognostications for the economy. This is part of the reason why. Half green shoots, half green paper.

Of course, hyper-inflation is as damaging as mega-depression. I’m not arguing the extremes. Just pointing out that if you can’t dance the 1%-2% dance precisely, which side of the line do you think the Fed and other monetary and fiscal authorities will fall towards? The Fed will always choose inflation over deflation. The margin of safety will always be on the inflationary side of the line. Count on it, position for it, expect it.

Just know that the revolutionary socialists aren’t the only ones that pursue a policy of wealth redistribution.

Shaded Opening Range Indicator for Think or Swim

June 9, 2009

There is a function in Think Desktop called “AddCloud()”. This function shades the space between two plots. Assuming that you have previously defined two plots, plotA and plotB, here’s how you would use it:

AddCloud(plotA, plotB);

That’s it! The area between the two plots will be shaded–green if plotA is above plotB, and red if plotB is above plotA.

There are a lot of uses for this, but here’s one I threw together–a shaded opening range indicator:

Shaded OR

You input the market open time, and the time that you want the opening range (OR) to finish. As time progresses through the OR, the peak high and low are constantly updated and revised backward, thanks to the declare fullrange; operator. With this indicator, you get a red shaded area when the OR is active, and it turns green once the OR is completed.

You can download the “OR_Shaded” indicator from my google site in the Thinkscript Studies section. This one is free. Thanks to all my readers, donors, and customers! Your support is appreciated. Comment if you have any thoughts or questions.