New Toy

I’m probably really late to the part on this one but I just found a neat little toy in tradestation. Back at the hedgy we ran a small statistical arbitrage book. Stat arb sounds a lot more fancy then it really is, it’s pretty simple actually but sounds a lot cooler. Anyway, I used to run back-tests on various pairs but being more of a visual person, I also plotted the charts along with a log-ratio of the two securities. Previously I thought I could only use closing prices and hence a static line, something like this:

Cruising along the internet I was able to find a posting describing how to create a candlestick chart for pairs to include the Open, High, & Low data. It looks something like this:

Pretty sweet right?? OK, I thought so. It probably doesn’t change the effectiveness of the strategy all that much, it still revolves around finding the right pairs and proper risk management. Here’s how I did it:

inputs: R1(1), R2(1), Length(40);
Vars: LRc(0), LRopen(0), LRh(0), LRl(0), UBand(0), LBand(0);

LRc = log(c data1  / c data2)*100;
LRopen = log(o data1 / o data2)*100;
LRh = log(h data1 / h data2)*100;
LRl = log(l data1  / l data2)*100;

UBand = BollingerBand(LRc, Length,2);
LBand = BollingerBand(LRc, Length,-2);

If LRc >= LRopen then begin
Plot1(LRopen, “Open”, Green);
Plot2(LRc, “Close”, Green);
Plot1(LRopen, “Open”, Red);
Plot2(LRc, “Close”, Red);

Plot3(LRh, “High”, White);
Plot4(LRl, “Low”, White);

After the indicator is created, format the indicator and do the following:

Format the indicator so Plot1 is type BarHigh, Plot2 is type BarLow, Plot3 is type BarHigh, Plot4 is type BarHigh. Set the weight of Plot1 and Plot2 to medium thick weight, and Plot3 and Plot4 to a thin weight.

The full posting with instructions came from here. Have fun!

Bonus: There’s actually 2 clues in here on potential strategies that one can utilize, let me know if you find them and want to discuss.


~ by largecaptrader on October 30, 2010.

2 Responses to “New Toy”

  1. I’m guessing from this that you’re an intra-day trader?

    • No, all time frames, but usually not more then a few days. Interesting blog you have, need to spend some time on it.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: