Strategy Development: Modelling

A place to discuss anything.
Post Reply
User avatar
ruthlessimon
Posts: 2094
Joined: Wed Mar 23, 2016 3:54 pm

spreadbetting wrote:
Wed Oct 25, 2017 1:36 pm
I love the way people seem to assume punters are lined up in an orderly queue to place their bets at set times
Although modelling how money arrives in a pre-race market could easily prove that statement false.
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

1second price data, for say the top 4 from -10min to post time, for about 6 months is a LOT of data I simply don't have.

I found things in the 200 races I collected but it didn't continue, just not enough data to slice and dice effectively.
User avatar
Orixian
Posts: 78
Joined: Sun Sep 06, 2015 12:36 am

northbound wrote:
Mon Oct 23, 2017 2:58 pm
Interested.

In fact, having started six months ago to trade preplay horses manually every day and NOT having become profitable yet, I’m in the process of building models to learn how certain preplay market setups traded in the past and see if I can find patterns that repeat.

Early signs are encouraging.

I gotta say that I worked as a software developer for 10+ years. Not sure how easy it would be for a non-developer to build models.
Well as a non software developer I can say it is incredibly easy to collect data about markets using betangel as an interface. I taught my self basic VBA earlier this year but I've a data logger that can capture data using nearly all standard excel code (really only needs a few lines of vba). If you didn't want to build your own logger though you could just download them off the forum here there's plenty of great ones about. The hard part is building a data base you can query. I know what I want to look for in the data but the idea of building a VBA data base is quite daunting and I don't know where to begin at present.
User avatar
northbound
Posts: 737
Joined: Mon Mar 20, 2017 11:22 pm

Orixian wrote:
Wed Oct 25, 2017 7:38 pm
Well as a non software developer I can say it is incredibly easy to collect data about markets...
Agree.

In fact I recently coded a (non-Betangel) bot that collects data, but it will take a while to have enough historical data for backtesting. To accelerate the process, there's the option of purchasing 6 months' worth of Betfair historical data, but it's very expensive...
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

Peter, in your video "How to be a profitable trader" https://www.youtube.com/watch?v=JXSMXwaCH44 you discus how you score a market when you're live trading. You mention an "x out of 10" way to rate your confidence. Are there actually 10 things you look for in combination and if so, roughly how long does it take you to assess them? I guess once you know what the 10 things are you can do it pretty quickly. I also wondered if the figure of 10, being nice and round, slightly disguised or simplified what you actually do?

...and do you keep repeating the whole process while you have an open position? That must be tricky as the tendancy is to get tunnel vision on your selection plus just 1 or 2 other things once the chips are down.
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

northbound wrote:
Wed Oct 25, 2017 9:04 pm
Orixian wrote:
Wed Oct 25, 2017 7:38 pm
Well as a non software developer I can say it is incredibly easy to collect data about markets...
Agree.

In fact I recently coded a (non-Betangel) bot that collects data, but it will take a while to have enough historical data for backtesting. To accelerate the process, there's the option of purchasing 6 months' worth of Betfair historical data, but it's very expensive...
How much do you consider is 'enough'? I've always thought you would need at least 2 or 3 years.

Collecting the data is one thing, organising it and building a framework that will allow many things to be tested without re-writes and re-coding for every brainwave is the hard bit.
User avatar
northbound
Posts: 737
Joined: Mon Mar 20, 2017 11:22 pm

ShaunWhite wrote:
Fri Oct 27, 2017 5:07 am
How much do you consider is 'enough'? I've always thought you would need at least 2 or 3 years.

Collecting the data is one thing, organising it and building a framework that will allow many things to be tested without re-writes and re-coding for every brainwave is the hard bit.
Regarding the “enough” question: the more the merrier. But perhaps, for a relative newbie like myself, even just 6-12 months of data could provide, not definitive answers, but at least some pointers on ideas that sound bright but in fact are no better than 50/50.

It could serve as an additional tool that, combined with observing market flow every day, can accelerate my understanding of the markets.

Regarding organising data and building a framework: you’re right, the best way is to build different “abstract” algorithms (time consuming) and then only having to configure signal values for every idea you want to test (really quick).
LinusP
Posts: 1873
Joined: Mon Jul 02, 2012 10:45 pm

ShaunWhite wrote:
Fri Oct 27, 2017 5:07 am
How much do you consider is 'enough'? I've always thought you would need at least 2 or 3 years.

Collecting the data is one thing, organising it and building a framework that will allow many things to be tested without re-writes and re-coding for every brainwave is the hard bit.
You would be surprised, following on from the Peter's advice (Webb and Le) a few years ago, my process is the following:
  1. Have a bad day, shit all my strategies are crap
  2. Load up my MySQL db combined with Tableau and Jupyter notebooks (python)
  3. Look for a pattern or something that looks like it could be automated
  4. Create strategy and start backtesting
  5. After 20/30 markets, get bored of backtesting, if its in profit or hovering around £0 push to UAT
  6. Test for at least a week, normally multiple variations with the programs storing entry points / triggers
  7. Review profit at the end of the week filter on the entry points, triggers, course etc
  8. Go back to 6 or wait for another bad day

If people are interesting I can provide some data, i.e. last weeks racing, and go through the process of setting up a database, loading, querying etc.
User avatar
megarain
Posts: 2049
Joined: Thu May 16, 2013 1:26 pm
Contact:

I am sure a lot of people would be v grateful for this process.

Its a lot of work, starting from scratch, with learning curves, in a few areas.

There are some free databases etc, but, u can run into limits .. (SQL for example, has a 10 TB maximum database size, for 2016 server).

Cleaning the data, (if u buy it), then storing it in the right fashion, with the right fields need a fair amount of thought - so then u can query it
usefully.

I would be most interested, in the process of back testing. The data I have, has been bought from the historical data site .. so, I cannot share. It may be best, for this excercise, to collect your own etc, and not fall foul of betfairs rules.
welshboy06
Posts: 165
Joined: Wed Mar 01, 2017 2:06 pm

LinusP wrote:
Sat Oct 28, 2017 9:00 am
ShaunWhite wrote:
Fri Oct 27, 2017 5:07 am
How much do you consider is 'enough'? I've always thought you would need at least 2 or 3 years.

Collecting the data is one thing, organising it and building a framework that will allow many things to be tested without re-writes and re-coding for every brainwave is the hard bit.
You would be surprised, following on from the Peter's advice (Webb and Le) a few years ago, my process is the following:
  1. Have a bad day, shit all my strategies are crap
  2. Load up my MySQL db combined with Tableau and Jupyter notebooks (python)
  3. Look for a pattern or something that looks like it could be automated
  4. Create strategy and start backtesting
  5. After 20/30 markets, get bored of backtesting, if its in profit or hovering around £0 push to UAT
  6. Test for at least a week, normally multiple variations with the programs storing entry points / triggers
  7. Review profit at the end of the week filter on the entry points, triggers, course etc
  8. Go back to 6 or wait for another bad day

If people are interesting I can provide some data, i.e. last weeks racing, and go through the process of setting up a database, loading, querying etc.
Ive started collecting data and also use python and ipython notebooks for analysis. But my process is tedious and not very creative.
So it would be amazing if you did have time to provide the above! Im sure it would benefit a lot of people here too!
User avatar
northbound
Posts: 737
Joined: Mon Mar 20, 2017 11:22 pm

LinusP wrote:
Sat Oct 28, 2017 9:00 am
[*]After 20/30 markets, get bored of backtesting, if its in profit or hovering around £0 push to UAT
Does it mean that you backtest your strategy on 20/30 markets only?

Or do you have an algorithm that, after setting your strategy’s signals, can backtest thousands of markets in a couple of seconds?
User avatar
mjmorris335
Posts: 180
Joined: Mon Jun 06, 2016 11:29 am

LinusP wrote:
Sat Oct 28, 2017 9:00 am

If people are interesting I can provide some data, i.e. last weeks racing, and go through the process of setting up a database, loading, querying etc.
This would be hugely beneficial and very gratefully received.

I did have an opportunity to work with SQL on an old VAX system 25 years ago. I remember it being a royal pain in the arse setting up the tables but incredibly powerful when querying the database. No doubt things have marched on a pace by now.

Mike
LinusP
Posts: 1873
Joined: Mon Jul 02, 2012 10:45 pm

Megarain, yep backtesting is the hard part and can be very high on CPU especially when using high level languages like python.

Northbound, at present it takes around an hour for me to backtest 30 racing markets end to end when not runnng concurrently (serverless reduces this to 2ish minutes). But as mentioned by Peter any results should not be taken as golden and more as a guide in potential. To be honest backtesting is more of a integration test for me so that I can see expected order count and if the strategy is going to do anything silly.

However having data gives you a starting point so that you can implement something and start iterating, making profit on version 1 isn’t going to happen.

Might see if here are any companies still around where I can load a market and go through the basics in SQL, mode analytics used to do this I think. As you guys are right, the time consuming part is data quality and loading. Is sql express really 10tb? I thought it was 2gb?
User avatar
northbound
Posts: 737
Joined: Mon Mar 20, 2017 11:22 pm

LinusP wrote:
Sat Oct 28, 2017 1:29 pm
But as mentioned by Peter any results should not be taken as golden and more as a guide in potential
Agree
User avatar
megarain
Posts: 2049
Joined: Thu May 16, 2013 1:26 pm
Contact:

Might see if here are any companies still around where I can load a market and go through the basics in SQL, mode analytics used to do this I think. As you guys are right, the time consuming part is data quality and loading. Is sql express really 10gb? I thought it was 2gb?
There are different flavours of SQL .. and cost etc. The free version of 2014 - Microsoft SQl server, , has a 10gb database size limit.

2005/8 express was 4gb.
Post Reply

Return to “General discussion”