Saturday, August 18, 2007

First kick at the can

I've been working on a mechanical trading system, using amibroker and IO for back testing. I think I have a good handle on amibrokers programming language, I'm a self taught programmer with my start in basic, fortran and a few years ago, perl. Since it is so easy to add new indicators and buy / sell conditions, I find myself testing ideas quickly. To weed out good from bad ideas I look for two things, CAR and % winners. I look at these results for a small handful of symbols, to see what changed with my tweak. Well, I've gone almost full circle, deleting allot of the tweaks in the past few days.

Here is where I'm at. The chart shows green BUY arrows, and red SELL arrows, long positions only for now. There is also a channel shown. This is a 13 day MA of the highs and lows that clearly shows when the stock is trending, of course only after the trend has started. The Blue line is the stop.
Now, we all know that beck testing doesn't guarantee future results, but either does guessing, right! Software makes it easy for us to invent systems, test, tweak, modify... The system needs more work in terms of the results it spits out on the screen. I'll be running some more back tests once I have the stops worked out, looking to maximise CAR, minimise loser, and get the Sharpe ratio up there. More on this later.
To the naked eye, this system looks like it is coming along just fine. What happens during sideways action? This...I'll be attempting to fix this by killing buy signals as soon as the sideways is detected. More accurately, I have tried several things but I'm not satisfied yet. Perhaps a trade delay if Buy/Sell signals are too close together? The work continues..... But more importantly, I want to improve the stops. Looking at the chart, I know what I would do, by experience, judging how I have positioned stops in the past. I'd like to program the back tester to do some things that would give me a more accurate picture of what the capabilities of this system are.
The next step will be to turn off the BUY and SELL signals and turn ON the SHORT and COVER signals, separately. Then, all the signals will be turned on the see if we have any interference issues.

I am focusing on a basket of stocks for now. Next, I'll test by price and volume, screening for liquid stocks probably more than 2 dollars. I'm not worried about exiting in terms of liquidity, I just don't like the choppiness of these types of stocks that trade under 100K per day.

The last part of this system will be to look at the markets for clues, to switch the BUY and SHORT signals ON and OFF.

In building any complex system, it is best to test all the small components of the sub-system separately first (Buy and Sell). Then test them as a whole system (Buy, Sell, Short, Cover). Then test that system together with other systems (markets, QQQQ, SPY, SPTSE, etc).

No comments:

Post a Comment

Let's hear what you have to say!

Disclaimer

The information presented on this site is for educational and entertainment purposes only. This site contains no suggestions or instructions that you must follow, do your own research and due diligence before committing your cash to the markets. Your on your own.