Jumat, 19 Maret 2010

Backtesting Trading Ideas

Several readers have asked me to talk about how to backtest.

Firstly, I backtest an idea.

I see something happening over and over again in the market, and if I think it may be useful to watch and trade, I write down exactly what I want I saw. For example, order flow was positive as VB and smoothed CVD were green, both EMAs GREEN, and Price pulls back to 33EMA. This is the idea I that I want to test.

I then print out ten days of charts (I can't work from a screen - even my 24 inch ones) and look for that idea. I mark the charts every time I see it.

Once the chart is marked I write down the entry price in a column with a number corresponding to the mark on the chart and whether it is a LONG or a SHORT. I then go back to the chart and see whether my first logical scale point is reached or whether my drop dead stop would be hit. I take out the statisctics on those trades and look for a high win rate. How high? Over 60%. If I get that, then I'm in business. I then look at all the winning trades and all the losing trades to see what else I can do to filter out only losers. My aim is to get to at least 70% win rate.

I want to see at least 50 trades for this exercise so you may need more than 10 days of charts if the idea doesn't happen often enough and you're still interested.

Next, I concentrate on the winning trades. I look to see what each trade would have made using my exit rules.

I then gather the statistics adding back the losing trades. I now can decide whether I have something I can add to my trading setups.

The final step of this backtesting for me is to program it. Up until recently I used MultiCharts Easylanguage. Kiki helped me with this. However, with MarketDelta I have Volume Delta which is hugely important for me in seeing order flow. MultiCharts only gave me upticks and downticks. I look back on about a year of data and also forward walk it too.

This can all be done manually but using a computer for programming the backtests obviously makes it quicker.

P.S.
1. MarketDelta  has better than excellent customer service and they can help with backtesting for their system
2. If your question hasn't been answered or you don't see it posted, please email them again, I've managed to delete some comments accidentally.  This time I'll blame it on jet lag.

 Today's trades are for the Bund. You can see that there were only 50% winning trades but the day ended GREEN.

Click to enlarge

Kamis, 18 Maret 2010

Setups? What setups?

What are setups anyway? For me, a setup is a snapshot showing a picture of a point in time when there is a perceived direction of price for the next minimum scale out distance with sufficient momentum.

What my definition is saying is that the trader is not looking at the separate components that make up the picture. He is looking at the net of all the information that he has processed - the picture.

If I focus on individual components of the picture, I cannot "feel" what is actually happening in the market. Its not when this line crosses that but what it means when this line crosses that, something totally different.

So in creating setups, I define what I want to see in the picture and that may manifest itself by getting information in a number ways from a number of sources.

COMMENTS: I'll catch up and respond to as many as I can on the week-end. Its been pretty busy this week with Nick.  Just to let everyone know there have been some great suggestions for a new FloBot name.  It's been a nice diversion talking about the pros and cons of each name. Hopefully there will be a decision by the end of next week.

Today's trades are the Euro FX. I have shown entries only as an example of how FloBot logic can be used to enter trades and then let the trader manage them. You will see short trades in an obvious down trend and then sideways chop which FloBot avoided this time. When the down trend resumed, FloBot caught the move probably one bar later than an electroniclocal may have. That's the price for filtering out chop. In autotrading, its all about trade offs. I have not optimised all the rules yet - what to use and when -as we are not yet in that mode and there is still a lot of manual tweaking in what you see now.

Click to enlarge

Rabu, 17 Maret 2010

Is FloBot a Terrible Name?

I think I am very much in touch with the difficulties in becoming CP (consistently profitable). It is hard to forget my own pain in striving to become a trader for a living.

Kiki and I have been playing around with some ideas on how we can try using FloBot to turn a previously struggling trader into one that can make money while they are honing their skills. We both have some ideas about this which we are still discussing. We will talk about as soon as FloBot is ready and we have worked out something which we think is viable.

On another entirely different matter.

I got an email that basically said FloBot was a really terrible name.  What can I say, I wasn't a marketing major at Uni and neither was Kiki.

If you the readers can come up with a better name, that would be great.  The person who supplies the chosen name will receive a "surprise" related to their trading.

Now for todays trades. Its Euro FX futures. Another good market - aren't they all when you are making money! The logic was "all in and all out". The way FloBot is being set up is so that we can use logic exit rules or use monetary scale out points or both. Every setup will have an on and off switch so we can just trade one or more setups for any particular market. We will identify any setups not to use through automated back testing.


click to enlarge

Sweeps week

Who else is tired of these third-party health care reform commercials? I'm going to be sick if I see one more ad trying to sway Congress to vote for or against the health care bill. This feels more like a presidential campaign than the dog days of March. These commercials are amazingly annoying and don't really prove any points. One of them shows a hurricane hitting the Gulf Coast, as if that explains why Obamacare will allegedly kill grandma.

But what is more infuriating is that these commercials are aimed at U.S. Rep. Jason Altmire, who isn't my congressman. Instead, I'm stuck with the regrettable Tim Murphy, a Republican who has made it clear for months that he won't support any Democratic form of health care reform. Even thought I don't live in Altmire's district, I decided enough was enough and called his D.C. office. I told the receptionist that while I don't live in his district (although just 26 miles from the Aliquippa office) that many people in Western Pennsylvania do support reform.

But the commercials keep coming and this area isn't alone. We find out this week that Rep. Kathy Dahlkemper, D-Erie, is getting pounding by ads that she should not support a bill that the crazies claim won't adequately fund cancer... just weeks after both of her parents died of cancer.

Disgusting.

It's clear that these third-party organizations (cough cough, big-money corporations) are just slinging mud to see what sticks. And it appears to be a preview to the kind of garbage we can expect after the Supreme Court ruled in January that companies may spend relentlessly against political foes. Gee, I can't wait 'til November. Let the real games begin!

Selasa, 16 Maret 2010

Getting ready part N..

I've made my cat pack. I've built new tethers, the only thing left on my list is re zero the one vane I had to take apart and do final electronics checkout. In the next day or so I'll modify the software to match what I'm flying in simulation.

I'll probably leave for FAR Friday night and do a tethered flight very early Saturday. I've done a lot of simulations and a flight to the 1200 ft limit of G airspace. (1000 ft to give me some margin) and back to the pad is easily within the most pessimistic performance parameters. So if the tether flight goes without problems I'll make that attempt on Saturday.

Higher than that and I'll need FAA authorization to enter controlled airspace. (Which they are unlikely to grant me until I actually stop being lazy and formally ask for it. )

When I get that I'll try the flight to 11K ft and back to beat DCX. With out some aerodynamic drag on the way down it has ~3% margin. As a result I've ordered a parachute from Fruity Chutes (blue of course) and I will setup to deploy the drogue at apogee and basically fall back to 1200 ft or so before powering up to land. The purpose of the chute is to keep the vehicle upright and limit the speed to 60mph or so. This will either require a very calm day or compensation for winds aloft. I need to mdoel this. I can just use forecast winds, or I have to study the FAA rules to learn what I need to do to release a small balloon to measure the winds right before launch.
(A small Xbee transmitter and GPS cost less than $100 and is very light so I can actually fly a small instrumented balloon.)

Rough calculation says 11K ft to 1K ft at 60mph takes 113 seconds. So a 10mph wind would cause 1600 ft of displacement. I'll need to be very close on the wind calcs to land back on the pad. I might be better off to fly from the lake bed near FAR.

Nick, My Family and I Thank You

Thanks everyone who sent Nick their best wishes. The posted comments and many emails were really wonderful. There were too many for me to be able to respond to individually so please accept this posting as my response. I am a believer in karma and I am certain all the expressions of good thoughts from all of you will help Nick in his battle.

This news is not something I would normally share so publically but I felt a responsibility to those who are relying on the blog and you should know why your questions are now not answered in a timely manner.  Old school values.

As you know, this is not the first time my family has been touched by the dark shadow of cancer and it makes me more determined to help stamp out or control this invisible predator in my small way.

I am continuing business as usual, as I find my routines are helpful in keeping me together. As a side note, writing this blog for Kiki has had a benefit for me - my trading has improved. My win rate is higher. I don't know whether it's the extra focus with people watching over my shoulder - greater accountability. Whatever it is, I want to keep it up for not only that reason but also because I have seen the difference it has made to quite a few of you. Not many of us have the priviledge of seeing something they do, providing a significant direct benefit to others.

P.S. - Never underestimate the power of going over your daily trading charts.

Thank you again.

Today's trades are for the US T-Bonds, a market I traded in the early 1980s when it had the largest volumes of any future market, about 300,000 contracts a day. Of course it was pit traded as there were no electronic markets. Customers phoned orders to a broker and often waited 10 minutes to find out of they had been filled.

This is still a great market. Look how smoothly it trades. Yesterday was more profitable than today but, hey, $700+ is not bad.


click to enlarge

Senin, 15 Maret 2010

The Wizard In OZ, Nick and the FloBot

A more serious note. The real reason I am here in Oz is because my son, Nick, was diagnosed with Hogkins Lymphoma about a week ago.  We are now at the staging phase of his treatment where they decide how progressed the disease has become and what type of treatment will work the best.  Here in Oz the life is slower and quieter, giving me a lot of time to think about the many things you do when something like this happens.

Having said that, the blog will be taking on a different flavour.  I have said before I don't trade when I am emotionally not 100% but I have to keep working as I will not be able to cope just sitting here....

So..........this leads me to the FloBot

I have been very quiet about the FloBot lately. as you may have noticed. The initial work that Kiki put into the project showed high win rates and profitability, I was amazed.  She tested it on so many markets using identical logic, and the EL orderflow method worked on them all, by only making one basic choice: the range bars that fit the rhythm of that market, and the stops. Because of these results on testing, I've decided to throw some real extra programming resources at it to bring out its full potential.

As I said early in the blog, I have about 18 setups I use. You have seen about 20% of these as Kiki progressed to CP.  Kiki's work convinced me that we should go the way of technology. The power of volume delta added to the setups and context I have developed means that a trader can now trade a large number of markets at a time, taking only the best trades.

I have seen a huge change in the role that traders have had in the markets over the last 30 years.  It seems that the trader's role now is to develop a robust methodology and let the technology do the manual labour, leaving the trader to concentrate on the brainwork. (Kind of like a prop room with computers doing the trading). I turned 64 recently and have realised I cannot keep my focus at 100% one hundred percent of the time, especially now with Nick being ill. On the other hand, I did develop an expert system where I worked at 100% capacity for a couple of months to create it and then can work at a much lower level of concentration while I let the technology execute my EL methodology. BTW, this isn't counting the 30 years of experience and several hundred thousand dollars of losses it took me to get where I now am.

We are in the final testing mode of the EL FloBot logic and I will be showing its trades in this blog. I have included a significant number of the 18 setups and will gradually add more, probably on a continuous basis over several months. There is both entry and exit logic as well as looking at context. The context logic is the most challenging as you will see in the entries taken.

For the next couple of months, while Nick is going through chemo, the blog will show the FloBot logic entries and exits plus some additional manual exits where me, as the trader, exited the trade manually for reasons I will set out. This will be the logic tweaking part of the project with the view to use these manual exits to further enhance the FloBot rules.

I'll also be adding my own comments and thoughts as posts and I will still give explainations on the trades as before. It's my same methodology you have been seeing everyday, only automated. I'll still be answering your questions, maybe not as quickly as before but I'll do my best.

The trades will cover a number of markets that we follow. I will try and pick the most interesting market every day and it will cover the whole 23 hour trading day if that market trades that long. FloBot never sleeps.

I will do my posts after the RTH close every day after 4.15 pm New York time which is now 9.15 pm London time and 8.15 am Sydney time (at this time of the year). I will also show the P and L of the day.
Tom

Here are the trades for the Ides of March. FloBot logic looks robust for the ES. I'll show other markets as the days go on. The last trade was the usual ES opposite trade which is the timeframe traders getting out before the close


Click to enlarge