Ziggy Update

I let Ziggy, my automated futures-trading program, trade one SPX futures contract (ES) all week. It finished with a $297 profit. Here is the equity-curve chart for the week (click to enlarge):


And here are the daily totals:


As you can see, Monday and Tuesday were a disaster. There are two reason for that. First, both days were “reversal days” where prices glided down in the morning, and glided back up in the afternoon. Those are the worst days for Ziggy. Fortunately, they only occur once a month or so, but I had the bad luck of getting hit with two of them to start the week.

The second reason for the losses was slippage. My initial tests showed that Ziggy could do OK with market orders, but it turns out that that was a wrong conclusion. Ziggy got nickled-and-dimed to death with bad fills on Monday and Tuesday to the tune of about $300.

So, on Tuesday night, I re-tooled for limit orders, which is a big deal because it complicates the program’s logic. I don’t have an ideal solution to the problem of un-filled orders yet, but the new version works much better in the real world. As you can see on the “7/29/2009 – 7/31/2009” line of the table above, Ziggy v2.00 made $979 from Wednesday to Friday, with a 60% batting average.

Wednesday was the big day. That was the type of day that I had in mind when I first started working on the program. The SPX barely moved, but the intra-day action was wonderfully volatile. Watching Ziggy on Wednesday was like watching a John Deere combine harvesting the crop.

So, even though the week started out with an industrial accident, I’m very happy with how it finished up. It’s not easy to watch your computer makes trades. It requires a lot of discipline to resist the urge to “help” it. I only did that three times over the entire week, and without my “help”, Ziggy would have made another $100 or so.

It’s a funny thing; while I have coded my trading rules into software, the software is a much better trader than I am. Ziggy always follows its trading rules, it trades without emotion, like a robot, and it has perfect concentration. The latter is very important for scalping, which is sort of like driving a race car: if you doze off for just a few seconds, you might crash and burn.

Ziggy can make enough money to pay for its own electricity now, so it’s earning its keep. If it can prove itself over the next couple of weeks by building up enough equity, I will let it trade two contracts. At that point, I can start working on code that scales into, and out of, positions to get better average prices.

Caruso-Cabrera – Dumb as Bag of Hammers

In this video, you can see CNBC talking head Michelle Caruso-Cabrera saying that it’s OK for manufacturing jobs to be sent to Asia because they are beneath Americans. Her position is that Joe Sixpack should stop hitting things with hammers inside of factories and go work as a scientist at a bio-tech firm.

OK, there are plenty of smart people who work in factories. And maybe Caruso-Cabrera is right; maybe they should be turned out of their jobs, and forced to go through ten years of higher education to prepare for their new careers as rocket scientists.

But what about the dumb people? Not everybody is smart, you know. Not everybody can “use their brain” to “move up the job value chain.” The fact is that repetitive assembly-line jobs that don’t require higher thought are an ideal way for dumb people to earn a living.

Note to Caruso-Cabrera: when you go to small town, take its only factory and send it to China, THE DUMB PEOPLE DO NOT GO WITH IT. What do you suggest they do for a living now that you have applied your economic genius to their town?

In addition to advocating the export of factory jobs while the USA suffers double-digit unemployment, Caruso-Cabrera also advocates the importation of engineers and programmers via H1-B visas. Brilliant strategy: export jobs, import workers.

Speaking of H1-B visas, isn’t it time that CNBC was outsourced? Why not start with Caruso-Cabrera? She works on the stock-market channel and can’t even pronounce the word “stock”. Instead, she says “stalk”, like she is talking about celery or something. Shouldn’t CNBC bring over an Indian woman on an H1-B visa to replace Caruso-Cabrera? I’m sure that a smart, young, attractive Indian woman who can pronounce “stock” could easily be found. And she will work for 10% of what Caruso-Cabrera makes. C’mon GE, its time to boost your profits some more with another “cost control”.

Also in the video, they are carrying on about how their boss GE CEO Jeff Immelt made some comments about how the USA should do more manufacturing. The talking heads even “challenged” the professor guest to figure out a way to do it. Can you imagine the hypocrisy? It was Corporate America that rammed the free-trade laws with low-wage countries like China and India through Congress in unconstitutional “fast track” style for the sole purpose of exporting jobs. Now GE/CNBC is acting like they are some sort of champion for American workers.



Both Monday and Tuesday were reversal days, however, they were sort-of lackluster. Take a look at this 60-minute chart of the futures (click to enlarge):


The futures peaked overnight Monday and Tuesday. The market bottomed and reversed Monday and Tuesday afternoon. However, both daytime sessions failed to approach the overnight highs, and were somewhat lacking in spirit. (The blue lines connect the overnight peaks to the closes of the daytime sessions.)

The shorts selling those peaks made more money than the longs buying those dips. Both made money, but we might wonder if the dip-buyers are happy with their meager gains, and willing to step up and buy the next dip. If they go to the sidelines, we could have a downtrend day.

Tuesday’s Trading 7/28/09

I wrote this back here:

“Imagine IBM rolling across America, buying up smaller software companies, firing all the American programmers and shipping the jobs to India.”

…and IBM has just taken over two more software companies.

Note to SPSS and Ounce Labs employees: get your resumes in order because your jobs are going to India.

Note to American college students: forget about studying computer science. IBM will see to it that the investment that you make in yourself will have a market value of zero.

God save the global economy!

Lies! Lies! Lies and Propaganda!

Here is a CNBC story with the most egregious lies and propaganda I have ever seen. Everybody knows that hemlines go up during good times and down during hard times. And now CNBC is trying to tell us that the opposite is true; that one-piece, retro swimsuits replacing bikinis in Miami Beach is a “return to happier times.”

Ridiculous. Blatant lies and propaganda.

The ladies are covering up to look more conservative so that they can land the “marrying kind” of man. They think that the marrying-kind likes a less flirty type of girl because she will be more faithful. Why do women want the marrying-kind? Because he has a job, and such things are scarce these days.

Happy, prosperous ladies with well-paying jobs do not go to the beach in gigantic, frumpy, one-piece swimsuits from the 1930’s. Seeing Brazilian bikini-makers doing land-office business in “cover ups” should send a chill down your spine.

This is not cause for celebration. This is a frightening social trend, and CNBC needs to broadcast a retraction.

Monday’s Trading – 7/27/09

Last week, the SPX hit resistance in the 979 area and then closed at 979.26. And that was only 0.02 points away from the 979.22 Fibonacci level that I calculated back in the Box of Miracles almost two months ago. How’s that for accuracy? Since the market is still respecting those Fib levels, the next three should prove important also if the SPX continues to rally.

Ziggy Takes Baby Steps

I let Ziggy, my futures scalping program, trade with real money this afternoon. I turned it loose in my account around 1:30pm and let it run until the end of the day. It had full authority to make trades and didn’t ask me if I approved or not.

Ziggy made 9 scalps with 6 wins and 3 losses in a nearly flatlined market, and made a total profit of $66.10. So it made $26.40 per hour, which is much better than minimum wage. And that was with one ES contract. With 10 contracts the profit would have been $661, and if I had sold my condo and given it 100 contacts to trade, it would have been $6,661. 🙂

So, we have proof of concept: Ziggy will work in the real world. But a problem has surfaced. Should Ziggy use market orders or limit orders? Good fills are very important for a scalping program like Ziggy because it is like a discount retailer: working on razor-thin margins and making it up on volume.

At first glance, you would want to use limit orders to get the price that you have calculated to be a bargain for the recent price action. But limit orders also guarantee that you will miss trades, especially when the market is moving fast and runs away from your price. Market orders will always get filled, but the prices that you get will often be slightly worse than with limit orders. The good thing about the futures market is that I have never seen a bad tick. The ES never trades at some absurd price for one tick like you see SPY doing frequently, especially outside of regular trading hours. Because of that, you can use market orders with futures and not worry about getting pole-axed.

The frustrating thing is that back-testing and optimization can’t help your with making the limit-or-market order decision because no back-testing technology can precisely simulate a real market.

So, I think I will have Ziggy use market orders for now. The results it achieves will be less than those projected by my back-testing. However, I continue to make improvements and the back-testing results keep getting better and better, so while Ziggy’s transition into trading with real money won’t be completely smooth, I’m confident that it will be profitable.

(Note: I am not ignoring your comments, but I am pretty much coding around the clock and barely have time to read my own blog. So, don’t feel like I’m ignoring you.)

Friday’s Trading – 7/24/09

Yerk mentioned that Thursday’s buying began after the open, and not during the pre-market. That’s a relatively rare type of day. I haven’t done a definitive study, but at first glance, such days may occur only once or twice a month.

The last two were June 25th and June 11th. Both days opened with small gaps and then rallied strongly. June 11th, of course, formed a top that lasted for a month. June 25th finished strong, but the market couldn’t push much higher in the following days, and then went off the cliff five days later.

So, this sort of day may be an indication that a short-term top is near. A possible explanation is that the buying is done by mutual funds who wait until after the open for sufficient liquidity to do their buying. Perhaps the funds are buying because retail investors, excited by the uptrend, send in new money, and fulfill their usual role as “last in” during a rally.

Pow! Right to the Moon!

Click chart to enlarge:


That’s a chart of Ziggy v1.04 running on TradeStation’s “continuous” futures contract data. You would think that the blast-off after the TARP crash in September would be due to the VIX spike, but Ziggy is still going strong as the VIX declines.

But that chart is very understated. In real life, that $62,349 profit would be much higher. First, the continuous contract chart includes overnight data which distorts indicators at the open each morning. Using TradeStation’s “daytime session only” charts, the number is $78,853.

Second, for these tests I’ve been using ThinkOrSwim’s $3.50 commission. But Ziggy will trade with TradeStation’s $2.40 rate, so add another $1.10 per trade. As a scalper, Ziggy makes a lot of trades – 6,709 over this period – so add on several thousand more dollars.

Third, these numbers are for a single contract. As Ziggy builds its equity, I will have it trade more contracts. So, after it made $5,000 in October, it could have traded two contracts in November, and instead of making $13,000, it would have made $26,000. And if I let it scale up as soon as it had the equity, it would be more than that. After a few more months of that kind of progression, it would have a rather gigantic profit. And the more contracts it trades, the lower commissions go with TradeStation’s bulk-rates. With enough volume I would buy a seat on the Chicago Mercantile Exchange and cut commissions to the bone, which will free-up even more capital for trading…

So that’s the plan. 😉

But there’s more! This version is the first to look at market internals to judge the strength of the market; so I have only scratched the surface there. Ziggy also does not use any of George’s methods yet. It doesn’t even look at higher timeframes. That will be another avenue for improvements. This version now has three new modes: in addition to “scalp” mode, it now has “bull”, “bear”, and “night”. So, it can play trends in “bull” and “bear” mode, and scrape out a few dollars overnight. But I have only begun to develop those parts of the program, so they will improve with further effort.

Believe it or not, I have also come up with a completely different strategy that surpasses Ziggy by 33% when testing on 4Q08 data. Ziggy does better over the compete range of test data though, so this new strategy will come to the forefront the next time the VIX spikes. I have built a modified version of it into Ziggy though, and the program will use it at certain times.

Ziggy has been profitable for 13 weeks in a row:


It has only made $2,900 in July, but I am very happy with that performance since Ziggy is optimized for range trading and July has been a very trendy sort of month, first plunging down, and then shooting straight back up.

Here is a picture of Ziggy scalping the futures this afternoon:


Profitable trades are connected by green lines; unprofitable ones by red lines. Lots of green, right? “1” means it is long one contract. “-1” means it is short one. As you can see, it constantly flips from long to short.

At 15:04, Ziggy was short when CNBC announced a positive development for nearly-bankrupt CIT. But it made up that loss on the next two scalps. Ziggy made $300 during the period shown on the chart. With 10 contracts, it would have been $3,000.

Note on the chart it says “Strong Buy”. That’s because Ziggy judged the price action to be strong and, as a result, it was more eager to buy dips, and more reluctant to turn short.

Ziggy does not use stops. It’s takes its losses like a man. Actually, I have run hundreds of thousands of back-tests trying every conceivable combination of stop-loss and profit-target settings, and every last one of them reduces performance. Isn’t that fascinating?

P.S. One last thing… Ziggy might do even better with the NDX futures since they are likely to be more volatile, just like the QQQQ is more volatile than the SPY. So, the scalpings should be better. I have done one small test so far, and this does seem to be the case.

Google Doesn’t Get the Global Economy

After reporting earnings, Google’s stock is down in the post-market, while IBM’s is up. Google just doesn’t get the global economy like IBM does.

Note to Google: the global economy is about running a John Deere combine through your programming staff, slaughtering your expensive American workers, and replacing them with cheap Indians. Don’t you get it? That’s the whole purpose of the global economy. In short, you must learn to be evil. I suggest taking evil lessons from IBM, and one day, you too can have fabulous, fabulous profits from the “Export The American Economy” trade.

Wednesday’s Trading – 7/15/09

Tuesday was the kind of day for which I designed Ziggy to thrive upon, and running on the TradeStation simulator, it did exactly that. It made 16 scalps in the futures, 14 wins and 2 losses. While the futures moved 5.25 points from 9:30am to 4:00pm, Ziggy caught 12 points. After commissions, and trading a single contract, that’s over $500 profit.

My original idea was to wait for trend days like Monday, and then run Ziggy on the next day, which could reasonably be expected to be a range day as the market consolidates the big move. And this week, the concept played out perfectly. But I have noticed that on trend days, the market spends a good part of the day trading in a range. So, there will be a catalyst in the morning, like Meredith Whitney on Monday, the market will price it in very quickly with a powerful trend, and then go back to ranging.

So, my second idea was to just wait for that to play out, and then start Ziggy up after noon or so. It’s easy for me to identify catalysts, but very difficult for a program. And that would have worked well on Monday too. Ziggy had big losses in the morning, but profits in the afternoon.

My next idea is to have Ziggy try to figure out if a catalyst has occurred by looking at the internals. Eventually, I will have it look for things like a spike up, or down, in the Vix, the TICK, breadth, volume, etc. Hopefully that will work out and the program will be able to make an intelligent guess at “trend day” or “range day” and then act accordingly.

It’s quite exciting and I’m spending over ten hours a day on coding.

Tuesday’s Trading – 7/14/09

Can Meridith Whitney move the market, or what? Outside of the feds, nobody has that kind of power. And how jealous is Cramer? Instead of criticizing Whitney, he should be thanking her for boosting his stupid GS position.

On his show Monday night, Cramer said that he had been “buying Goldman for years and been right for years.” Is buying GS at $250 in 2007 really something to brag about? Even worse, Cramer urged lecture halls filled with college students to buy “just one share” of GS (and Sears), just so they could get in the game and learn how fabulous the stock market was. Any of those kids who followed his idiotic top-ticking advice must be cursing him now.

Cramer also went on the Howard Stern show on February 4th, 2008 and told comedian Artie Lange to buy Black & Decker because a housing recovery was underway. Another totally moronic call. Let’s hope Artie didn’t take the advice. BDK is still chopped in half.

Whitney is a serious analyst with market-moving power. Cramer is just a bulltard who does a clown show on CNBC every night. No wonder he is jealous of Whitney.