All posts by Trader247

A black swan event…

… well actually, it’s a black swan.

Last week beat any trading results – our second child was born, a healthy little boy, all good.

Today was the first proper trip out, to Lotherton Hall. They have a large collection of birds there, from the small finches to a huge Condor. Anyway, half way round I spot this black swan. I’m going on about it, taking pictures, whilst everyone else is watching the Condor show off its massive wingspan. It’s a real life, living, breathing black swan. I’ve seen one. Here’s a picture I took.

(This trading lark changes you.)

img_20160606_194428.jpg

 

Weeks ending 29-05-16

These charts cover a two week period. The obvious feature in the UK chart was reported here. It was a loss of £58.51 on a losing Lay bet placed in error. The interesting thing is that for the period, the overall return only amounts to -0.078% of turnover. As a single event, it takes the greyhounds “bank” back to where it was on the 29th April. It could be worse.

160529week

The Aus markets performed well generally. Again there is a, relatively, large loss. I hadn’t noticed this until I did the chart but after what happened on the greyhounds I thought I’d look into it. The events leading to the loss of £5.70 were identical to those above. The trend without this is good though.

Aus160529week

The US markets have not done too well but I am not giving up on them just yet. They haven’t traded since the loss on the dogs due to a minimum balance limit being different for the US, which I hadn’t noticed. I’m going to make some fine adjustments to the entry triggers before restarting.

US160529week

Oscar has returned

After a short holiday caused by this event, Oscar is now back at work, emotionless but committed.

Mike suggested using the Take-SP option to avoid missing trading out.

BPT commented he’d previously used Back at 1.01 and Lay at 1000 to catch the best available odds.

As a way of getting the bot going again, it was quite easy to replace the 2nd-next-best-price with 1.01 and 1000, so this is what I’ve done for now. This is only a temporary fix as the greening is still calculating one refresh behind.

As I improve the greening code, I will include the Take-SP as a last resort. I think this is better as, although the odds may be off, it is taken straight away without entering the market directly. With the code improved, the use of this should be less often anyway.

Back off hols

Oscar needs a holiday

A large loss occurred today as a result of a bet placed in error. Although I’ve seen this before, the size of the loss made me investigate the problem.

Nearing the off time my bot stops trading and then there’s a break of 10 seconds to allow any bets placed to be matched. Then a greening algorithm runs 3 times, first to green at the available odds, then at 1 tick worse than available odds, finally at 2 ticks worse than available odds. The idea is to reduce any risk of leaving a bad position open.

On today’s event the first attempt placed a lay in error. This left 2 attempts to hedge out. Unfortunately both failed. Looking over my code, the greening part is probably the oldest. A quick look on the Gruss forum and the example code has been updated a few times, without me keeping up. The code I use is greening on old data. The most recent code greens on current data.

As the possibility of a similar error exists, I’m not prepared to carry on trading until I’ve fixed this code. Due to the amount of change required and testing I need to do, I’ve stopped Oscar and his American brother for now. Hopefully the coming Bank Holiday weekend will provide some opportunity to make the fix.

Hols bot

 

Trading mistakes

In reply to this post by Betfair Pro Trader, here are some mistakes I’ve made (I’ll keep it to trading else this could be quite long).

When I first started manual trading, there were the usual mistakes, jumping in after the move, trading just to be “in”, letting losers run, going in-play and the rest. My greatest (most costly) mistake was, after slowly building a decent bank, thinking that there must be something to the in-play markets. So off I went, both feet and brilliant, more money in one race than ever before. Then the next race, again big win. This was the way. I was writing my notice to my boss, booking a test drive and browsing the Seychelles. Next up, crash bang broke. How did I let this happen? Well, like Homer retrieving cans from a power line, surely doing the same thing again will result differently. It didn’t. After not making it to in-play millionaire status I returned to the less violent arena of pre-off trading, where I still dwell. The move to automation was due to an interest in coding, lack of time during the trading period and an idea that it would produce better consistency.

The mistakes in automation have been less costly. Usually due to rushing code into service or, early on in this adventure, making changes after only a few results. The way for me now is to code efficiently, test thoroughly and implement in stages. No rush for the long term.

There’s an easier way

When I download the bet history from Betfair, the “Bet placed” data is only to the minute and I need to know to the second to have any chance of matching up with the bet entry data. This is why I’ve been testing some new code trying to handle the MyBets data which seems to come in different on each update. It’s recording some rows of data multiple times which I can’t figure out but am sure is due to the jumbled nature in which it’s received.

But then, that little voice reminded me that when I view bets on my mobile, it does include the second it was placed. So I had a look at Betfair, again, and there it is, in My bets. Easily downloadable and workable.

This is how I was getting data from Bet History –

BetHistory mins

 

And this is how it comes from My bets, a bit more accurate –

BetHistory secs

 

I’ll try matching this with my bet entry data, only problem I can see is Betfair’s time and my time being different but I might be able to offset it. Something for another day now.

 

Week ending 15-05-16

The UK dogs are continuing on as previous weeks. The P&L isn’t rising with Traded Volume, suggesting  improvements in other areas are needed to bring greater return.

160515week

A nice chart from Aus markets with no great losses.

Aus160515week

The US bot is still missing most markets but I haven’t managed to included a start time update yet. I’m not sure my current method of scraping is the most efficient, although if I can get it working in a fashion, it’ll be a start.

US160515week

VPS – a guide

Tony asked about where to start with a VPS so I thought I’d do a short guide to getting the set-up I have.

Here are  some previous blog posts on the subject-

VPS – includes Mike’s contribution

VPS active – My initial VPS package and MSOffice

Api delay testing – The improvements measured

From VPS to Cloud Hosting – Another step forward

To get the cloud VPS, go to Tagadab and choose what spec you want by moving the slides This is what I selected –

VPS slides

Then on the next page, I choose Windows server 2012. I don’t know what the difference is between 2008 and 2012 but 2012 sounds better to me. There are some other options on the page but I didn’t select any. This gives a monthly price of £15 including VAT.

VPS choice

Click on the “Create Virtual” button and on the next page, check everything and click “buy”. You’ll get the emails telling you they’re on with it and then one telling you it’s ready. My VPS took about 15 mins to be ready, on a bank holiday. Log into your account on-line and click on your server icon –

Cloud panel

Then click on the green connect tab –

VPS connect tab

In the pop-up you can download the RDP file which makes connecting to your server a doddle. This puts an icon on your desktop. Just open it like any other icon and away you go.

You can open IE to download apps. Files can be transferred by simple copy/paste as the clipboard is shared between your PC and the VPS

Here’s a short video of connecting to the VPS Opening VPS from desktop. Hope this helps.

Code cleaning

My intention was to improve data collection but as I struggled along, I decided  there needed to be some housekeeping.

Ever since moving all the calculations to VBA I’ve been unable to view any sheets other than Sheet1  whilst running, as the code contained a series of sheet.select lines. This was done initially to overcome lazy referencing.

So where I had Cells(10, 1), I now have Worksheets(“Sheet1”).Cells(10, 1).

I’ve also got rid of some sheet.select-copy-sheet.select-paste-sheet.select routines by simply using full references.

Although this has taken a bit of time and testing, it will result in faster code execution.