Tag Archives: betfair

Week ending 10-01-16

After the previous week ended with a loss due to an error, I wasn’t expecting much last week but was surprised with the outcome. I changed the settings on the UK dogs to the same as the Aus horses. I expected a difference in the trading but not this. Here’s the chart for the last two weeks, showing the loss and then the events afterwards.

01 2 week

I could tell a story about how I’d programmed a recovery process to be performed after an unpredictable loss. That’s not the case though. From the point of the loss, an almost constant winning streak happens until the position is recovered to the common trend, followed by results I would expect with the tighter settings in place. I can’t explain this other than a massive coincidence. I keep seeing peaks and troughs in the chart and think it strange how these results are spread out, sharp gains followed by sharp losses or vice versa, almost like I’m riding the actions of other bots. Not sure, I tend to think this is just how it is and trying to make too much out of it will lead nowhere.

Anyway, beyond that, the UK chart is otherwise slightly better than previous weeks. The AUS chart is below previous weeks but not too far so no tweaking is needed.

Work on data collection has moved a little, recording is ok but analysis/formulas need work.

160110weekAus160110week

Week ending 03-01-16

I spent as much time as I could working on the data collection idea but it wasn’t as straight forward as I’d hoped. Not because of the coding, it was the working out what I wanted to do bit that exercised my mind. So collecting data in an array and then storing (printing to an excel sheet) selected parts from around trades is something I can do. But the amount of data is quite large. For instance, if I want to store data from 10 seconds before a trade to 10 seconds after, refreshing at 0.2 secs, will give 100 data sets. Sometimes the out trade can happen 30 seconds or more later – 200+ data sets. And to have a full view of the market, that’s 1200 rows (if printing one line to a row) for UK dogs (6 runners). Some events can have 40 or more bets placed so thousands of rows for one race.

The next thing I thought was “what am I actually going to do with this data?” Well, perform calculations on it to give indications of movement, highs, lows and quantities prior/post trade, I guess. Here’s my solution – collect data in array; perform calculations on data in array; only print out results to sheet. Cracked it. But what calculations? Oh dear, I’m down the road of calculus, a subject I’ve worked with in the past and something I should have remembered more of than I have. I am enjoying this, not despite the challenge but because of the challenge. May take longer than a few evenings.

On to the charts. UK dogs not doing too bad until a big loss. This started as a rogue lay bet placed by the software, no explanation why. My bot has three goes at trading out before the off with more unfavourable odds each attempt. The third attempt went unmatched at market suspension, leaving me exposed on one runner, now known as the winner. This is a steamroller event, however as it didn’t wipe my bank, I’m thinking of it more as a wacker plate event. These things happen. Occurring on Saturday afternoon, this went unnoticed by me until the evening, so trading  had stopped. I looked into it but forgot to restart the link and then missed AUS trading on Sunday. Fixed this Sunday and have now set UK dogs to AUS settings to see what happens.

AUS chart is on trend with previous weeks, the increased activity is probably due to Christmas.

160103week

Aus160103week

 

Stake as a percentage of bank

The other day I changed the stake on the Aus markets from £2 to 7% of bank. This started staking at £2.21, two days later it’s up to £2.32, a 5% increase, with profit over those two days on trend. It’s a good example of the impact of moving to a staking plan that makes use of the profits.

Stakes can’t be increased forever as at some point the impact on market activity will alter the previous behaviour the bot was edging on. I’ll monitor it for now but at some point will cap it, obviously hoping it continues to be profitable.

Week ending 27-12-15

Here’s last week’s charts. Again there is a decline at the start of the week, reversing around Wednesday mid-afternoon. Not sure if this can be any sort of indicator but one to keep an eye on.

Aus markets are continuing a nice trend. I am going to change the staking on these markets to a percent of bank. To keep it simple for now I will start with 7%, which is roughly £2, keeping it similar to existing to start with.

151227week

Aus151227week

Week ending 20-12-15

A bit late with the seasonal distractions and all. The first chart, UK dogs, saw a general decline to around the 180 point which is Thursday afternoon. The rest of the week sees a recovery, ending with a small loss.

The Aus chart continues with a positive trend. If it wasn’t for the planned changes, I would probably use the same settings for the UK dogs but keeping things the same for now will hopefully enable a better understanding of any new programming that is used later.

151220week

Aus151220week

 

Betdaq test

Bot4 has been running on Betdaq for the purpose of testing. It was trading UK and IRE horse racing win markets. I’ve stopped it now as, in its current form, it isn’t looking profitable. Saying that, the chart I’ve produced (see below) shows a good level of consistency which I think can be worked on to turn a profit. I’m not going to set it going again with only minor changes, this is one that will definitely benefit from my planned data collection and optimization work.

Despite the loss, I am pleased with the level of activity on Betdaq and the close back lay prices, without this my bot wouldn’t trade. It suggests to me that Betdaq is more than a mirror of Betfair and that there is an alternative exchange to participate in. When I get round to upgrading and running Bot1, I’ll restart Bot4 with the same capabilities.

151216BetdaqTest

Missed events

It’s happened twice now where I’ve looked at the bot in the morning and it hasn’t traded the Aus markets and is still on a race from around 2am. I knew there was a possibility of a conflict in the code where the markets list refreshes if it’s already monitoring a market. Usually this wont happen because Betfair don’t include tomorrow’s Aus races at 2am the previous morning. However they must do it now and again which leaves my bot in a position where it is already on a market that is chosen when the list is refreshed. As the code uses “this market name” and “last market name” to navigate through the list without hiccup, it interferes with the process when re-selecting the market it’s on that has already passed its off time. It would be easy to look at the off time to see if it’s a negative value, however, negative values are provided in text format, not numeric.

It’s not a common occurrence but as it has happened I’ve added code to select next race in list after a period of 30 mins following the time value turning from numeric to text. The reason for 30 mins is to stop it constantly selecting next race from last greyhounds to first Aus market. Also, if the code is needed, it’ll miss a couple of the first Aus races which are usually less active markets.

SCC2

 

 

Week ending 13-12-15

Although I didn’t have much time to spend on the bots, I did manage to set one trading on Betdaq. It went for 4 and a bit days before hitting min account balance stop. In that time it achieved 1564 settlted bets. The problem I have now is downloading the betting history from Betdaq; I’ve tried on Chrome and IE but nothing happens.

From my own data it seems to be trading quite well with the main losses coming from multiple repeat trades when one trade is open. I’m going to prevent this from happening and run it some more. I’m happy for losses at this point if there is progress to be made. As with all my bots, I think the work planned on improved data collection and more dynamic trading will have a positive impact on returns.

Below are last weeks charts. UK dogs was a bit roller-coaster. Aus horses performed better but still room for improvement.

151213week

Aus151213week

One day in

The Betdaq bot ran through all UK horse races yesterday without any errors. Although it finished at a loss, it was within the acceptable range of Bot1. As such I’ve allowed it to continue for now. With only a small sample of trades it’s hard to pick out any patterns of loss (or profit). I noticed a couple of times where multiple trades on one selection in a short amount of time resulted in loss and also only one lay-then-back trade was made, which was a loss. These are areas to watch but without more data I won’t make any adjustments. I’m quite pleased with the number of trades, around 150, as I’d thought that if the market had mirrored Betfair but with a few tick spread, my bot would just place into the spread and never get filled. As it did get filled I’m guessing the market is quite active and either independent of, or tightly following, Betfair.

Week ending 6-12-15

The number of people viewing my blog has shot up since getting mentioned by Betfair Pro Trader, so a big thanks to him.

Below are the charts for last week. The UK dogs has performed pretty consistently for the last three weeks without much interference from me. The chart looks like it had a slow start but the % return is similar to previous weeks. The Australian markets did ok with non of the errors experienced last week (the API error was down to Betfair but I’m still waiting for answers on the others). The chart has a more consistent trend than the UK dogs but return is similar.

The UK dogs is trading with more open settings than the Aus horses except for the odds range. I reduced the upper odds limit but may reduce it some more as trades over 5.00 are less frequent and they don’t appear to give any net gain. I wont change it yet though as it’s not costing at the moment and further analysis may give more detail.

Having three full months of trading completed, I feel happier letting the bot run, which is one of the main benefits of automated trading for me. The only thing I need to do once a week is save and clear my logging sheet as it can run to over 20000 rows. Bot3 has a macro to save a page as an individual file with a unique name (includes date) once a day and means that it runs with no input from me at all. A little bit of work can get that code in to Bot1 but I’ll tie it in with improving the data collection which should move me forward with optimization.

151206week

Aus151206week