Monday, 30 July 2007

To System or Not to System...

I was looking at how I trade on Betfair and realised that even though I thought I was following a system, I keep going off piste and making trades that look like they may work. I just wondered what you guys did. Do you have a system that you follow or do you go on hunch/experience?

Friday, 27 July 2007

Bots without the Betfair API

If you want to write your own Betfair bot or an application that is driven from Betfair data and you don't want to use the API, then you could try screen scraping. The API is the fastest and safest way to go, but it is a bit pricey (£100-£200 per month). You could, of course, use the heavily throttled free version (60 updates a minute of prices from one market and then having to decode the information sent to you) but it is quite hobbled. Screen scraping is a free option but if the web page layout changes, you may need to revisit your code.

So, what is screen scraping? Well, basically, it is just automated web site reading. You tell your computer to go to a web site and look for specific bits of information and then return them to your program, every second or so. The Betfair web site is quite "busy" (it has lots of tables, images, etc on it), but there is another web site provided by Betfair that just has the essentials and this is much easier to screen scrape. The site is and is intended for mobile users. The nice people at Betfair have also provided some sample code, in the form of an Excel spreadsheet, which contains all the code you need to get started. Have a look at the Excel Tracking worksheet at:

Good luck!

Thursday, 26 July 2007

More thoughts on Bet Trader Pro software

I've been using Bet Trader Pro some more. I must admit, now I'm getting used to using a different interface, it is proving itself to be better than what I was previously using (initially Bet Angel Basic, the Betfair Direct and the Bet IE). With Bet Trader Pro you get to see all the prices across all the runners on one screen and using the ladder interface makes place trades on easily. The best bit is the speed that it fetches and displays the prices. You can see when the price is going to move, as it flickers between the one above or below. I havn't used many of the trading tools but I didn't initially like the way they were set up and have left looking at them till later. So far it is well worth the try. I am currently using the free trial minutes but would have to consider whether the current fee is good enough value. I'll see how I go.

Wednesday, 25 July 2007

Losing unconsciously

The more trading I do, the more I appreciate the advice about having a system, framework or set of trading rules to stick to. Successful trading is more than just being clever and knowing how to use your trading software, it is mainly psychology. By psychology, I mean it is about knowing your mind and taking control/managing your in-built natural reactions that, if followed, spell trading disaster. What in-built reactions?

We are wired to respond to the fear of loss and the threat of pain in a much more profound way than the potential for gain.

The mind is like an ice berg. Above the surface is the conscious mind. It’s the conscious mind we use every day for planning, analysis and making logical choices. The unconscious mind is like the larger part of the ice berg that lurks below the surface. Some people use the term subconscious mind or autonomic nervous system to refer to the unconscious mind. The unconscious handles a multitude of jobs which keep us alive and generally out of danger.

Have you ever been driving along at night? You’re zooming along, your mind mulling over the thoughts of the day, when WHOAH! Another car has pulled out in front of you. You don’t think, plan or analyse, you just turn the wheel and swerve. You come to a stop, safe, your heart is beating like a drum in your chest and your breathing is short and sharp. All those reactions were handled by your unconscious mind. If you had to think about it consciously, you’d be busy flying through the windscreen before you had decided to turn the wheel. The conscious mind is slow and deals with only one thing at a time, taking up to a half second to react. The unconscious mind handles a plethora of information simultaneously and instantaneously. The only problem is that this rapid response comes at a price.
Sometimes the automatic unconscious response is the wrong one in certain situations. In days gone by, feeling under threat and having adrenaline kick into your system and your body prepare for flight or fight would have saved your life. Nowadays, having to make a presentation in front of people can trigger the same response, leaving you feeling on edge, sweating and ready for combat! The same thing happens when trading, not that you necessary feel ready for combat but, our pre-disposed aversion to loss can make us let loses run.
The first step in getting around this is knowing why it happens. Using automated stop-losses can help, as it removes you from the equation (although I've not yet found any easy to set up and use stop-loss solutions in the software I have used). Other solutions involve tweaking the unconscious response in the context of trading, this would involve using an unconscious based technology, such as NLP or hypnosis. Another way would be to frame the trading situation in such a way that every trade is about protecting your bank (rather than making a profit), so the aim is always to focus on cutting losses. Working on the assumption that if the price swings away from you, it will keep moving away. Once you have closed the trade, then putting the last loss out of mind (so if the price suddenly bounces back, you don't start regretting following the system). The price will occasionally bounce back but in the long run, relying on that to happen is gambling of the worst kind and will lead to an empty bank.

Some great books on how the unconcious mind works are:

A book that goes into detail about how the unconscious mind has its beliefs installed and how to change them is (it can be pretty heavy going, so be prepared. It is very interesting and worth the read though):

The classic book on how our unconscious processes are used aginst us by marketers and advertisers and how to protect yourself:

Tuesday, 24 July 2007

How does Bet Trader Pro measure up?

I downloaded Bet Trader Pro on Sunday and gave it a try out tonight. What did I think of it? Well, one thing I can say is that it is fast. I had been using Bet IE recently and Bet Trader Pro leaves it standing speedwise. I was wondering how I kept missing so many market moves and now I can see. Running Bet IE and Bet Trader Pro side by side and you can see the numbers whizzing by and the price moving so much quicker on BTP. I'm not quite used to the interface and the tools on BTP yet and was reluctant to make many trades, but the two I did were matched. I didn't like the BTP stop loss feature very much as, unless I misunderstood how to use it, it seemed a bit slow to set. I would have liked to be able to preset my stop loss tick size and whether it is trailing or not and for it to be enabled with a checkbox when placing a trade. I guess I'm just lazy. I'll feedback more, when I've had more time to use it.


An off topic post but one that people might find interesting and/or useful.

Did you know that a monitor uses more power when displaying white than when displaying black? In January 2007 a blog post titled Black Google Would Save 750 Megawatt-hours a Year proposed the theory that a black version of the Google search engine would save a fair bit of energy due to the popularity of the search engine. That is where Blackle comes in. It is a version of the google search engine but in black rather than white. It also keeps a running tally of how much energy has been saved by using it opposed to the normal google front page. So, if you are carbon conscious and want to save some energy, give Blackle a try.
Go to Blackle

Sunday, 22 July 2007

The right direction

My trading is improving, although not as quickly as I would like. I still am getting caught by the market swinging against me quickly, but at least now I am getting out. I think I have learnt that lesson now. Although it is hard to take a definite loss rather than hang on to hope that the price is turning around, it is safer over all. I need to assume that if the price turns against me then it is going to keep on moving against me and so getting out is the only option. It is better to take a scratch trade (back and lay at the same price) than to take a loss. As long as I am not moving backwards, in the long run, I am heading towards my goal. At least now my bank should grow rather than get a hammering!

Friday, 20 July 2007

Trading Software

This is a post I intend to keep updating and have as a perma-link.

I am going to list any bet trading software I come across, may be adding reviews in later.

Initially I will list the freebie ones and will expand the list when I get the chance. Please let me know of any good ones you can recommend.

Free Bet Trading Software

  1. Bet Angel Basic
  2. Betfair Direct
Commercial Bet Trading Software
  1. Racing Traders
  2. Bet Angel PRO

Thursday, 19 July 2007

Freeing my mind

I had a bit of an epiphany last night. It should have been obvious, but often, you don't notice things about yourself as easily as you do in others. I'll tell you what it was in a minute.

Those of you who have heard of NLP (neuro linguistic programming) will know that it is being used in the business world and in the sporting world to help people really boost their performance and blast through limitations. You see, most of the limitations we have are due to limiting beliefs that we carry around in our unconscious minds (I call it the unconscious mind, some people call it the subconscious). We have two minds, effectively. Our mind is like an ice berg. On the surface is the conscious mind and below is the unconscious mind. The conscious mind is used day to day for analysing, planning and making logical choices. The unconscious mind handles everything else, from keeping us breathing to managing our emotional responses. So, the unconscious mind is pretty powerful. Most of us think we make our decisions rationally, but in most cases, they are driven by emotions and urges from the unconscious mind and then justified by our conscious mind. How many times have you gone out, bought something you didn't need, either on a whim or because you got "sold" on it and then justified it to yourself afterwards (usually with a paper thin excuse)? How many people would really continue smoking if the choice was a purely conscious one? We all know how damaging smoking is, but the urge to smoke comes from the unconscious (I can explain why, if anyone is interested), so it is a hard one to continuously resist. Changing unconscious behaviour by using will power (conscious mind effort) is really difficult. It is like trying to explain quantum physics to someone who speaks a different language. NLP and hypnosis give us a way to change things at the unconscious level.

Okay, so I've gone a bit off track, let me tie it together. Last night I was looking at the trades I had been making. Each session I would start really well and then just before the end I would do something silly that would wipe out my winnings and about 10% more. Even if I did something daft and let a bet run and it came in, at the end of the session I would do something to lose it. Now, if I heard this about someone else, I would immediately look at it from an NLP perspective and suggest that perhaps there is a limiting belief in place that is causing the underlying behaviour, i.e. not following the system and doing things that cause the loss. I never thought to apply that thinking to myself, until yesterday. I believe that if I just topped up my bank and started again, I would keep doing the same things wrong. I need to fix the root cause, the limiting belief.

So, first off, I did a couple of NLP techniques, one, called a parts integration, seemed to instantly help. I will top up my bank again and try again. How will I know I have made the necessary changes? I will take sticking to the system as evidence. I'll feedback on whether my quick NLP intervention has made a difference or if I need to do more. This might be useful to others out there that are going through the same thing.

I can explain more about how beliefs influence our decisions and how we can realign them if anyone is interested, in another post.

Wednesday, 18 July 2007

Last bite

One thing that has caught me out several times which I have finally noticed is the switch in market direction that tends to happen in the last minute or two before the off, when trading on a horse race.

There could be an easy to follow trend from over 10 minutes out, but in those last couple of minutes it nearly always swings the other direction. Now I've noticed this, I can use it. Too many times, I've built up several good trades throughout a race and then been stung right at the end. I now trade up to the last couple of minutes and then when (if) the market swings the other way, I am ready to ride the wave. Anyone else noticed this, or am I giving too much weight to the last few races I traded? Anyway, this technique has helped me avoid getting bitten during the last few trades.

Start again?

Well, my bank is down enough that I can only use tiny stakes, which is frustration. I now need to decide whether to once again start again back at £100 or to keep on plugging away with the bank I have. I started off well trading today and made a few quid but the time it will take to get my bank back to £100 without just letting bets run is demoralising. Bringing in £2.40 or 0.15p after a hectic set of trades on a race does not inspire. Admittedly, percentagewise it is not too bad but valuewise it's not inspiring. I'll think about it. Any thoughts out there?

Tuesday, 17 July 2007

Cognitive bias

In behavioural finance, they talk about cognitive bias. These are reasons why normally smart people do daft things when investing/trading, etc. One of these that I keep falling for is called, "the disposition effect". This is where you try to lock in gains but let losses run. I'm okay at letting gains run, so thats half the battle but I still let losses run, rather than cut them off at my planned stop loss point.

There are several other cognitive biases which are quite interesting. Amongst these are:
  • Loss aversion - where we'll do more to avoid loss than make a gain (see

  • The sunk cost effect - money spent is given more value than future money

  • Disposition effect (just mentioned)

  • Outcome bias - ons by outcome rather than quality of decision at time it was made

  • Recency bias - where recent information/experience is weighted more strongly than earlier infomation/experience.

  • Anchoring - Relying too heavily on readilly available information

  • The band wagon effect - Believing things because many other people do.

If anyone is interested in these, I can go into more detail in a future post.

A good book that covers these is:

Crashing and burning

Last couple of days I did some good trades, building my bank back up and then I make a big mistake and lose what I've made and more. My current bank is down to £52. I need to get the stupid mistakes out. I don't mind (well, I do) if the market turns against me, that's not down to me (unless I back against an obvious strong trend), but I am not impressed when I don't do what I intend. Just before each trading session I say I am not going to repeat the mistakes of the last one. Learn from them and get better. Each session I then go and repeat the same mistakes. I keep saying I'll mechanise my stop losses and never have. I then hit the stop loss and think, hmm, it looks like over the long run the market will turn back. How do I know this? I don't. Sometimes it does but mostly it doesn't. I've saved myself by closing an open trades during in-play time and getting out with a minor loss, but I shouldn't need to be doing that.

If I don't get my head in gear, I'm going to run out of cash!

Monday, 16 July 2007

Recommended Reading

I thought I'd set up a list of books that I have read and can recommend. I'll keep this page updated and have a link from a perma-link to it.

Way of the Turtle

A book I keep referring to. This book gives a great insight into the world of trading by one of a select group of millionaire traders. Although it is focussed on the financial markets, e.g. options trading, futures trading, etc, there is so much that can be applied to bet trading.
The sections on Behavioural finance and the work of Kahnman and Tversky are worth reading. The book covers the methods the turtle group used to make millions. The methods are simple and seem mainly concerned with building mechanical trading systems that remove the emotional side. Having just lost pretty heavilly (in terms of proportion of bank) due to these very issues (not being mechanical enough), I can only relate to it more.

The New Market Wizards

This was the book that lead me to the "Way of the Turtle". In this book, author Jack Schwager, interviews some of America's top traders. Not just those who have brought in the most money, but those who have performed consistently over the years (see next book, to discover why just basing on most money is not a valid reason).
A really interesting book and one that hammers home the same points about getting away from emotional trading and escaping from the herd mentality.

Fooled by Randomness

This was a real eye opener to me. The premise of this book is that we (including many mathematicians, statisticians, business people, me, you, pretty much most people), just don't really understand randomness and make wrong assumptions, that can have real bad repercussions. The author talks a lot about traders (as this is also his background) who after making a lot of money "blew up" and lost all they had made and lots more due to what the deemed were unprobable events. Written in a very conversational tone and with personality. An eye opener and a must read for anyone involved in an area that involves randomness.

Deflated bank

Bank: £62

I'm not a happy bunny. My bank is down to nearly half. What happened?

I took two £19 losses and made some little gains and a little loss (which could have been nasty, but I turned it around, just).

My first trade looked very promising. I got in early on an obvious trend. I was quite pleased with myself and was letting it run, when the moment of horror struck. I hadn't checked the software I was using properly before starting and had left on some automatic settings. Each of the backs I had put on had been getting automatically generated lays put on. I checked the matched/unmatched queues and saw several unmatched entries. I was rather exposed and after kicking myself for not paying enough attention I had to go full out to avoid a bad loss. I pulled it back but still made a small loss.

Next up, I did a couple of trades and made some small gains, then I had another bad one. I had put on a lay and was watching the price slowly rising, ready to get out if it turned against me when suddenly, in the blink of an eye, the price dropped a huge amount, at least ten ticks and I was suddenly losing. I sat in shock a couple of seconds, double taking the numbers I was seeing. Time was running out and I needed to take a fair loss and get on, but I didn't. I fell into the trap again. I sat there thinking it'll turn back. It didn't. I ended up letting the bet run and I lost. Stupid. £19 down on that. Okay, not a huge sum, but in proportion to the bank, it is almost 20%.

The final loss was again me getting myself in trouble by not understanding the software. I was making multiple trades on a race and had a few quid in the green. I allowed myself 3 ticks stop loss, which I was handling manually (mistake, I will do this automatically in future). The price moved against me and I hesitated, letting it roll passed my self imposed stop loss trigger (always stick to your rules. Lesson hopefully learnt (again)). After the price moved around, going up and down, with my heart rate matching it, it finally returned to my stop loss value and I tried to get out. I thought I had done it but when I looked at the stake, it was only half what it should have been. I had left the auto hedge fature on (changes the stakes so that you automatically get green ups) whilst having an unmatched back in the queue from earlier. It used the unmatched amount as part of its stake calculation. The price had then moved on again and I was still exposed. For some reason, when I make a silly mistake like this I act like the system no longer applies and once again I let the bet run and I lost.

Lots of lessons to take on board. One big one is that I can't always be trusted to stick to the rules I have set myself. How weird is that. When it comes down to it, in certain circumstances, I feel "above the law"! I hope now that I have noticed this, I can fix it. It's funny but all these reactions are covered in some of the books I have recently read, so it's not like it is new stuff (behavioural finance, kahneman/tversky, etc). It's just different reading and understanding it and then doing it. I hope this lesson is finally learnt. I think I will try and mechanise the process more, using software driven stop losses etc.

Friday, 13 July 2007

Bank reloaded and back

Now I'm back from honeymoon and good to go, my bank is set to £100 and I'm ready to trade again. Unable to do it today, but roll on tomorrow.

Thursday, 12 July 2007

Too much emotion!

"Price movement is a function of the collective perception of buyers and sellers in a market", according to Curtis Faith, in "Way of the Turtle". This definition says to me that the most important aspect of trading is an understanding of the psychology of buyers and sellers. He goes on to say, "Markets are comprised of individuals all with hopes, fears and foibles." and suggests that the trader's edge comes in "seeking opportunities that arise from these human emotions".

The subject of Behavioural Finance is a study of this. The subject is too big to cover in a post but I hope, in this one, to go over some of the factors that affect betting and laying decisions.

People tend to drive their decisions by emotions rather than rational reason. To back this up, an experiment was documented, whereby a man was found, who having had a stroke that damaged the areas of his brain that generated emotion, (so that all his decisions would be rational, reasoned and conscious), was found to be unable to make even a basic decision, constantly too-ing and fro-ing between alternatives. It turns out that emotions are the short cut that help us make quick decisions (and then justify, after the fact, with our rational mind (remember, hindsight has 20:20 vision!)).

Part of the reason people lose money when trading is due to these emotional short cuts, e.g.

  • People are prone to making systematic errors in circumstances of uncertainty
  • Under duress, people make poor assessment of risk and event probability

  • People rarely make completely rational decisions

Some examples of the emotions we encounter when making trading decisions:

  • Hope - "I hope it goes up after I buy"

  • Fear - "I can't take another loss, I'll sit this one out"

  • Greed - "I'm making loads, I'll double my position"

  • Despair - "The market keeps moving against me, whatever I do!"

Underneath these emotions are what are called cognitive biases. These are beliefs and attitudes that also lead us to make bad trading decisions. I'll talk about these in a future post.

Wednesday, 11 July 2007

Just like "Trading Places"

I keep referring back to "The Way of the Turtle: The Secret Methods That Turned Ordinary People into Legendary Traders" book, but it has really got me excited.

I think I need to explain why it is called, "The way of the turtle". Anyone who remembers the movie, "Trading Places", with Eddie Murphy and Dan Ackroyd will remember that the story started when two businessmen made a wager about whether business success was an inborn talent or could be taught. The turtle story is similar.

Two trading gurus, Richard Dennis and William Eckhardt, were arguing about whether trading was a natural talent or whether it could be taught. To find out they (guess what?, that's right!) had a wager. They would put out adverts looking for a group of 23 people that they would interview and choose from to be their trainee traders. They would then give them 2 weeks training and then let them trade using their money. The group were known as the turtles and they were very successful, in fact legendary.

In the book "The New Market Wizards: Conversations with America's Top Traders", there is a chapter called, "The Silence of the Turtles". One of the turtles is interviewed but he says very little. All the turtles were under secrecy and non-disclosure contracts and so had to keep quiet.
With the contract period over, Curtis Faith, one of the most successful and youngest (19 at the time) turtles, now explains their methods and philosophy.

It is really worth a read, just for the parts about Behavioural Finance.

The differences between financial markets trading and bet trading are not so great, other than the amounts of money on the table and so reading this book really is a benefit.

Market states

An interesting part of the "Way of the turtle" book was about market states. One of the guiding turtle principles was to not try to predict which direction the market would move but instead to determine what market state it was in.

The 4 market states are:

  1. Stable and quiet

  2. Stable and volatile

  3. Trending and quiet

  4. Trending and volatile
Obviously, for trend based trading, state 3 is ideal. The market state changes over time, so it needs to be regularly checked.

The level of volatility could be used to decide where to set a stop loss, e.g. if the market state is 4, then having a one tick stop loss would drop you out the trade early.


Totally off topic, but I liked it. This is the best way to pour ketchup from the bottle!

Sunday, 8 July 2007

Back from Honeymoon

Just a quick post. Just got back from our honeymoon. Its been about 24 hours in the same clothes, so pretty jaded and going to hit the hay but just thought I'd pop a quick note up.
Whilst we've been away in Thailand, I've had plenty of time to lounge around and read. Read "Way of the Turtle", which is an excellent book full of great trading info. I'll post up some of the lessons learnt there very soon. Also read another great book about randomness and our perception of it. This one was also written by a trader and it is called, "Fooled by Randomness: the hidden role of chance in life and in the markets", by Nassim Nicholas Taleb. Another good one which I'll be using to make some posts with.
Anyway, I need my bed, so bye for now.