Charting highs and lows …
It’s a week and a bit into my time off between jobs, and I’ve been loving the break, the first few days found myself sleeping in until about 9:30, playing XBOX over breakfast and then setting some objectives for the day.
I guess I should explain the unusual departure from an over saturated photo above – a graph of ICAP vs the “Support Service” sector. In the last day and a bit I’ve built a little sandbox for testing trading algorithms in Perl.
I have to say I love Perl – for those who don’t know, think of it as the programming language equivalent of a crazy old Scottish uncle who has purple hair, a ginger beard, a kilt – and probably nothing on underneath it.
Despite being a bit weird but powerful, sometimes it leaves you in the midst of a communications breakdown asking “what a hee haggis jimmy ock a’ whoo?” and you’re at loggerheads trying to describe something quite simple in a set of seemingly random symbols that look like you’ve bashed both fists on the keyboard, while at the same time making a gesture with your hands that looks like two upside down spiders.
Despite getting into a few 2 hour discussions about haggis, I’ve pulled in the history of the FTSE 100, all the related sector information and the history of the FTSE All Share index and coded up a simple algorithm to look through history for temporary dips in UK stocks to backtest the following idea:
- Look for a UK stock, where the stock, it’s related sector & the market (FTSE) as a whole are increasing
- Wait for the stock to hit a temporary dip as long as the above is still satisfied
- Wait for the stock to recover, then enter trade
..and graph anything found with the suggested entry (buy) point of the trade. The graph illustrates one of many resulting “opportunities” flagged and output into a fairly minimal looking graph. This is also the first real experience I’ve had using MySQL, coming from Sybase – and I have to say what a great little database it is. Considering it’s running on a VMWare image the query/result caching is so good it chomps through all 100 stocks in a matter of seconds.
So basically, if you’d piled some monies into ICAP back in Dec ’04 you’d have made more money than you could get at a night out at Walthamstow dog track, I can’t say that all the other graphs look as favourable …. yet, but that’s half the point, I’m going to carry on tweaking until I get something that fits, and some would argue even when you have something that fits (a back-tested model that picks more wins Vs losses) it’s not to say it will continue to do so in future.
Previous performance isn’t indicative of future returns, you may not get back the money you invested, always bet on the dog with the longest tail ..etc (which is all good advice).
