Smartgambler
Pro-Punter

Go Back   OZmium Sports Betting and Horse Racing Forums > Public Forums > General Topics
User Name
Password
Register FAQ Search Today's Posts Mark all topics as read

To advertise on these
forums, e-mail us.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 6th November 2014, 10:30 AM
Rinconpaul Rinconpaul is offline
Banned
 
Join Date: Feb 2013
Posts: 755
Wink % Change excel query

I'm after some help on applying a formula to a database, that returns the % change in Odds from Open to Close. Maybe walkermac, Excel Cup 2014 winner, could help?

From the attachment, you have varying numbers of fluctuations for each runner.
For example:
Golden Sally Open = 5.3, Close 8. Therefore % change = 150%
Nuclear Power Open = 9.8, Close = 14. Therefore % change = 143%

I could put the database into a pivot table but there's no standard function to carry out this calculation, only Sum, Count, Average, Max, Min, Product, Stdev & Var.

This new function if possible (hopefully not in VBA) would allow me to quickly scan large databases and look for correlations in steamers/drifters and their strike rates.

Thanks in anticipation.
Attached Files
File Type: xlsx % Change Query.xlsx (12.7 KB, 1246 views)
Reply With Quote
  #2  
Old 6th November 2014, 12:47 PM
Toil Toil is offline
Member
 
Join Date: Nov 2010
Posts: 89
Default

Hi Rinconpaul,

I know this gives you a percentage change =(A1/B1)-1

But probably not what your after.

Shaun or someone would definitely be able to help you I'm sure.
Reply With Quote
  #3  
Old 6th November 2014, 12:52 PM
Rinconpaul Rinconpaul is offline
Banned
 
Join Date: Feb 2013
Posts: 755
Default

Quote:
Originally Posted by Toil
Hi Rinconpaul,

I know this gives you a percentage change =(A1/B1)-1

But probably not what your after.

Shaun or someone would definitely be able to help you I'm sure.


Thanks Toil. Yes it's easy enough to work out on a case by case basis, the difficulty is the number of rows for each runner is forever changing, so the formula needs to be intuitive and know when it's a different runner and be able to count back to the beginning to find out what the first odds value was. It needs to be automatic, as tens of thousands of entries to assess.
Reply With Quote
  #4  
Old 6th November 2014, 01:22 PM
Toil Toil is offline
Member
 
Join Date: Nov 2010
Posts: 89
Default

Yer, like I said probably not what your after
Reply With Quote
  #5  
Old 6th November 2014, 02:20 PM
jazzy jazzy is offline
Member
 
Join Date: Nov 2010
Posts: 49
Default

If you can get MS Query to work (I tried but it doesn't want to play nice) you could do this using SQL - something like:

SELECT MAX(course), MAX(event), (MAX(odds) / MIN(odds)) FROM [table_name]
GROUP BY event_id, selection

--------------

Or you could import the spreadsheet into a database and then run the query.

Last edited by jazzy : 6th November 2014 at 02:23 PM.
Reply With Quote
  #6  
Old 6th November 2014, 02:28 PM
jazzy jazzy is offline
Member
 
Join Date: Nov 2010
Posts: 49
Default

Just re-read your question. the above won't do what you asked...

I'd need to have a think whether a single SQL statement will do it.
Reply With Quote
  #7  
Old 6th November 2014, 10:34 PM
The Ocho The Ocho is offline
Member
 
Join Date: Aug 2010
Posts: 1,037
Default

Quote:
Originally Posted by Rinconpaul
I'm after some help on applying a formula to a database, that returns the % change in Odds from Open to Close. Maybe walkermac, Excel Cup 2014 winner, could help?

From the attachment, you have varying numbers of fluctuations for each runner.
For example:
Golden Sally Open = 5.3, Close 8. Therefore % change = 150%
Nuclear Power Open = 9.8, Close = 14. Therefore % change = 143%

I could put the database into a pivot table but there's no standard function to carry out this calculation, only Sum, Count, Average, Max, Min, Product, Stdev & Var.

This new function if possible (hopefully not in VBA) would allow me to quickly scan large databases and look for correlations in steamers/drifters and their strike rates.

Thanks in anticipation.

Since when do % changes equal what you say here? Surely they are 50% and 43% changes. A 100% change would be double the price, wouldn't it? Or am I missing something?
__________________
Never give up on a dream just because of the time it will take to accomplish it. The time will pass anyway.”

― Earl Nightingale
Reply With Quote
  #8  
Old 7th November 2014, 12:46 AM
walkermac walkermac is offline
Member
 
Join Date: Nov 2013
Posts: 600
Default

Like last time, an inelegant solution; but it doesn't use arrays or SQL or anything fancy.

In cell S2 (and down), if this is the close price, display the percentage difference between the opening price and the closing price:
=IFERROR(IF(ROW()=T2,INDIRECT("j"&T2)/INDIRECT("j"&U2),""),"")

In cell T2 (and down), we store the row number of the horse's opening price:
=IFERROR(IF(H2="","",IF(NOT(H2=H1),ROW(),T1)),"")

In cell U2 (and down), we store the row number of the horse's closing price:
=IF(T2=T3,U3,ROW())


So in cells S2 through to U2, it displays the following values:
1.509433962 2 23

Last edited by walkermac : 7th November 2014 at 12:47 AM. Reason: reword for clarity
Reply With Quote
  #9  
Old 7th November 2014, 02:33 AM
Puntz Puntz is offline
Member
 
Join Date: Jan 2012
Posts: 291
Default

Golden Sally

5.3 Cell:J23
8 CellJ2


=(J2-$J23)*100/$J23

50.94%


'I think

Last edited by Puntz : 7th November 2014 at 02:38 AM.
Reply With Quote
  #10  
Old 7th November 2014, 05:08 AM
Rinconpaul Rinconpaul is offline
Banned
 
Join Date: Feb 2013
Posts: 755
Thumbs up

TO and Puntz, you're right in what you say, but the reason behind it is that when you have a steamer, the answer would be a negative %. This way anything under a 100% is a steamer and over a drifter. As long as the user is aware, but very observant and I'm glad you're paying attention in class," up the back there"...lol

I've added an example of a steamer to the spreadsheet.

Walkermac, thanks mate, you're a true artisan of the excel craft, and your champion crown remains intact, without challenge

Case closed, many thanks.
Attached Files
File Type: xlsx % Change Query.xlsx (17.3 KB, 842 views)
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump



All times are GMT +10. The time now is 03:54 AM.


Powered by: vBulletin Version 3.0.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
©2008 OZmium Pty. Ltd. All rights reserved . ACN 091184655