Archive for June, 2009

SPX skewed Iron Condor for August

June 30, 2009

It took a while to convince me that the market is spinning its wheels and not ready to blast off or blow up in the next few weeks, but now that I’m convinced I put on the only trade that anyone would put on in a sideways market: the Iron Condor.

My underlying vehicle of choice is SPX, which is the cash-settled, European-style index that tracks the S&P 500. It’s big, it’s liquid and it’s cool. On the downside, they still use open outcry for this market, which means that suffering from slippage is just part of the game.

When constructing this spread, I had in mind that I’m gonna let it go for the full cycle. That means I’m going to exit the trade in 51 days and let the chips fall where they may, I’ll be able to handle it. Fifty-one days out for an Iron Condor is a little on the long-term side. I’m stretching my upper limit of 48 days that I typically apply to putting these spreads on, but I also have a good reason for doing so. July 4th weekend. Everyone is gearing up for the summer season with this long weekend, which I take to mean that nobody will be feverishly following the markets, at least nobody with serious capital to move it.

First step is setting up the spread: decide on the delta of the short strikes. Remember from the beginner’s guide to options you once read that at-the-money options have a delta of .50. So you’re gonna have to pick something under .50 but greater than zero. We could go into how the delta reflects the probability of expiring, but quite frankly I don’t buy any of those arguments and so I won’t bore you with Gaussian probabilities. Let’s just say that the lower the delta of the short strike, the less chance it has of being in-the-money at expiration.

It follows that if you have less chance of becoming in-the-money than your neighbor, you should get paid less, because you are taking on less risk, ostensibly. So keep this in mind. I chose to explore the world of 10 deltas on the put side and on the call side. That gives me a roughly 90% chance of staying out-of-the-money at expiration. Ooops, forget I said that. It gives me a pretty darn good shot at having my short option expire worthless. There, I feel better now.

With the 10 delta as our guide, we can easily identify the put side at the 790 strike and the call side at the 1010 strike. That’s where we start. Now we buy protection against the Black Swan events which rarely happens except last year when it rarely didn’t happen. We are going to buy calls and puts that are further out-of-the-money so we end up paying less for protection than what we receive for assuming risk. Normally, you pick equidistant strikes for protection on the put side and the call side, but this month I’m employing a little skew action. I’m worried about everyone waking up tomorrow and finding out that our market is worth a lot less than we’ve been led to believe. That leads to a selloff, which hurts the put side. So to give myself a little short delta bias, I’m putting the put side insurance only 5 points away, and the call side insurance 10 points away. The result, a 785/790 put vertical and a 1010/1020 call vertical.

This was marked at $1.30 credit when I constructed it. The SPX options have very large bid/ask spreads (I guess because the open outcry method needs to give shouting market makers a chance to take a drink of water). With this in mind, slippage is the cost of doing business. I put in an order for $1.25. Nothing. Okay fine, you can have another dime. Limit order of $1.15. Filled right away. Oh great, that didn’t feel right. Oh well, I’ve got my trade on for the summer doldrums.

The management of this trade is the easy part. Close your eyes until expiration and then look at your account balance. Hopefully, you get to keep the paltry $1.15 credit. Worse case you end up giving that money back and ponying up $8.85 of your hard-earned trading capital.

Expected Drawdown on 50/200 Cross

June 29, 2009

After running a single backtest on the 50/200 cross for ES futures going back 25 years, we found that the maximum drawdown for the system was $81,425. This is an intraday drawdown that the historical simulation experienced. But what if by some wild chance, history does not repeat itself and the trade sequence in the future does not mimic the past?

In our historical simulation, there were 17 losing trades and 10 winning trades. The first ten trades ran in the following order: winner, loser, loser, winner, loser, loser, loser, winner, loser, loser. I can type out the order for the entire 27 trades in the system, but you get the idea.

What’s to say the order of wins and losses will be exactly the same in the future? Answer: nothing. In fact, we’d be very surprised if the next 27 trades followed the same order as the first 27 trades. The fact that the first 27 trades fell as they did is completely the result of luck. And the equity curve derived from this order is also the result of luck. If we are to derive a reasonable expectation of what our drawdown could be going forward, we need to take out the element of luck. How do we do that? We randomize the trade order. Enter Monte Carlo simulation.

Think of this as shuffling cards, and taking a snapshot after each shuffle. All black cards are winners and all red cards are losers. We have the deck stacked with 17 red cards and 10 black cards. For those with statistical savvy, you’ll recognize there is not even a valid sample size of 30 to draw statistical inference from in our exercise. At this point, we’re just going through the process, and make no claims about the validity of the 50/200 cross as a tradeable system.

Since I use TradersStudio, the following is Monte Carlo data derived from the software. I’m also using a Monte Carlo Test macro designed by Rich Denning, who was kind to contribute the macro in a recent issue of TASC.

First, let’s take a look at the original equity curve for the system:

After running the Denning Monte Carlo macro, we have the following distribution chart. The Y axis is the total number of trades sequences that have fallen into the X axis bin. The X axis is the level of drawdown. You will notice that most of the trade sequences (about 108) had a drawdown of $99,760. The total number of trade sequences run were 1,000.

Finally, here is a terminal report that shows what the drawdown expectation is given different confidence levels:

Since our distribution is not normal, we have limited utility for standard deviation in determining confidence levels. Instead, we take the percent of simulations to find the interval. This takes into account the kurtosis natured skew of our distribution.

What’s interesting is that our historic simulation’s max drawdown of $81,000 is quite a bit below the average of $104,000 and the median of $128,000. In fact, we really shouldn’t get too excited about the drawdown on this system until it exceeds the 95% level, which is $149,000.

As stated earlier, these statistics are more or less a practice run of the process and a definition of best practices in systems development. It’s clearly almost ridiculous to draw any statistical conclusions from a system that averages about one trade per year.

XEO JUL/AUG 360 Put Calendar closed

June 29, 2009

The stock market rally of the century has decimated my short play, the XEO JUL/AUG 360 put calendar. When the front month hedge against the back month long option erodes to less than 10% the value of the long option, it’s time to throw in the towel.

The trade was put on about six weeks ago for a debit of $3.45. Credit received for closing the trade was $1.45, which nets a loss of $2.00. This spread actually got to break-even on Jun 22, just a week ago. But the biggest sell-off in weeks was erased in the subsequent days.

There are still 18 days left on the short front month put, but since its value has eroded substantially, it offers no hedge against theta risk for the long AUG 360 put. With the holiday weekend coming, negative theta would only hurt this trade, and the only salvation would be a series of sell-offs, dropping the value of the S&P 100 and raising volatility.

Personally, I don’t see that happening as everyone is on vacation, creating low volume and a general sense of lethargy and malaise.

What I am looking at closely is the relatively low volatility in the market. Long put calendars work in this environment if volatility increases and/or price action goes lower. It didn’t work on this trade, but then again you don’t get the rally of the century every month.

50/200 cross in SP Futures

June 25, 2009

If someone were to buy and sell ES futures over the last 25 years based on the 50-day simple moving average crossing over the 200-day moving average, what kind of results would they get?

Below is a table that represents the statistics of this simple trade:

Now if we were to optimize the parameter set and run permutations, would the results improve with different parameter sets?

I ran 112 permutations with the fast average ranging from 30 to 100 in steps of 10 and the slow moving average ranging from 120 to 250 in steps of 10.

Next I plotted the slow average against the fast average and then used Net Profit as the third axis. This yielded an optimization space that is depicted below:

Below is the optimization space based on the Pessimistic Return on Margin objective function. Notice that the 50/200 cross stands atop a lonely hill that represents a local maxima, but not the global maxima.

Testing the code for the Bumblebee

June 23, 2009

Now that we’ve expended brain cells in the coding of a trade idea, we’d like to make sure the thing works as we think it should. Before we spend any more brain cells determining how well our system will perform going forward, we’d better complete this important step.

With TradersStudio, a list of trades is generated with a backtest run. These trades can be depicted on a chart as neat little arrows at the point where a trade was transacted. The Bumblebee system requires the programming of a proprietary indicator, which I’ve done behind the scenes. Now we overlay the chart (with the neat little arrows) with the proprietary indicator to see if the arrows are where they’re supposed to be.


The first time I ran this process through I was horrified to find a mistake in my programming, which generated all manner of errant trades. After removing the poltergeist, I was able to get a clean programmed code.

I ran the code test on data from 1973 to 1974 in the Cotton market. My future backtesting (I know, bad choice of words) will not touch this data. I will begin in 1988 and include a total of 10 markets. But for now, I’ve chosen some data that I don’t mind contaminating.

If you’re suspicious about my worries concerning contamination, suspend your doubts for now. We are participating in best practices; that’s the point of using way out of range data. Though it may not matter now, later on it will be important to keep backtest data separate from walk-forward data. This best practice is designed to help avoid curve fitting.

Alright, we’re now done with the first third of our system development. Next we run the second third, which includes Backtest, Optimize, Walk Forward, or for acronym fans, BOW. Each phase is progressively more interesting, which keeps us doing what we’re doing. During this second phase, we will generate all manner of data that we need to process and understand correctly.

Eroding options on eroding assets: FAS, FAZ and their calls

June 17, 2009

Whew, that was quite a ride on the FAS/FAZ train this month. My premium collecting strategy has dodged the bullets of having my lovlies called away from me. I sold calls at the 10 strike on both FAS and FAZ last month, and today was able to buy back my lonely FAS JUN 10 call for a nickel. I bought back the FAZ JUN 10 call for a nickel, I don’t remember, maybe two weeks ago.

But this fun and games also has a downside. I am the owner of perpetually eroding assets, namely long the triple-leveraged ETFs. I calculated what my effective stock decay has been since I bought them a mere two months ago, and compared it to the option decay that I benefited from. View the horror on the chart.

These ETFs are eroding faster than 30 day-out freekin call options! And they’re OTM options to boot.

This next option cycle is show time as I’m no longer selling the 10 calls in both underlyings. In fact, I’d like to get off this roller coaster and have dutifully sold ATM calls in both. That means I sold the JUL 9 call in FAS and the JUL 6 call in FAZ. One of them will have to get called away next month.

Credit received is another $1.82. When one of these gets called away next month, I will be the owner of either FAS at the effective price of $7.06 a share or FAZ at the effective price of $4.06. The math is roughly correct.

Let the games continue.

US Treasury recalls dollars

June 12, 2009

I knew it would come to this …

Treasury Department Issues Emergency Recall Of All US Dollars

Coding the Bumblebee

June 4, 2009

Ah, the excitement and sheer joy that is before us as we learn to code a trade system. I am using TradersStudio as my EOD trading software. Though it has its own programming language, its language is very similar to Visual Basic. So it helps to get a grasp of the VB language and since I’m not a programmer (just one in the making), I’ve elicited the help of an online video tutorial service to assist me in my endeavors to learn programming. Programming can be fun, just like re-grouting your shower. So let’s get to it!

Before we get into the very exciting world of coding a trade system, let’s review why it’s a good idea, and why paper and pencil methods are inferior.

1. Properly coded programs don’t miss trades or make the wrong trades.

2. Coded programs enable the system to test over a vast range of dates and markets that would take the better part of a century if it were attempted by hand.

3. Testing done with a coded program accumulates all manner of data that adds to different ways of viewing your results.

4. Coded programs enable a trade system developer to draw valid statistical inferences because of the vast data that is accumulated.

5. Minor changes to a trade system can be easily programmed and tests can be re-run with minimal effort and time.

Okay, that enough for now. For the Luddites who insist on paper and pencil methods, let me grant this benefit to their antiquated methods.

Manual backtesting ‘programs’ the trader to take trades when signals are generated and take them off when their system dictates.

Trust me though, after you’ve invested enough time in programming, backtesting, optimizing and walking forward, the last thing you’ll want to do is violate your trading system in real-time, thus nullifying all the time and effort you put into developing the system.

I offer below the program code for Bumblebee:

‘********************************
‘ Three parameter system, not always in

Sub Hysterosis (SlowLength As Integer, FastLength As Integer, StdMult As Double)

‘Declare variables

Dim SlowAve As BarArray
Dim FastAve As BarArray

Dim SlowPlus As BarArray
Dim SlowMinus As BarArray

‘Direct where the variable gets its data

SlowAve = Average(Close, SlowLength,0)
FastAve = Average(Close, FastLength,0)

SlowPlus = UpperBolBand(Close, SlowLength, StdMult, 0)
SlowMinus = LowerBolBand(Close, SlowLength, StdMult, 0)

‘Enter position criteria

If FastAve > SlowPlus And FastAve[1] < SlowPlus[1] Then
Buy(“Buy”,1,0, Market,Day)
End If

If FastAve SlowMinus[1] Then
Sell(“Sell”,1,0,Market,Day)
End If

‘Exit position criteria

If FastAve SlowAve[1]Then
ExitLong(“XLong”, “Buy”, 1, 0, Market, Day)
End If

If FastAve > SlowAve And FastAve[1] < SlowAve[1] Then
ExitShort(“XShort”, “Sell”, 1, 0, Market, Day)
End If

End Sub

Not that complicated, really. But then again, this is a fairly simple system. What we told our good silicon friends to do is the following:

We would like to enter a long trade when the fast moving average closes above the upper Bollinger band of the slow moving average. To exit this trade, we need the fast moving average to close below the slow moving average. And do the same on the short side, please.

This chatty explanation is called pseudo-code. It’s an important step, but then again it’s pretty obvious.