Database Handicapping Software- JCapper

JCapper Message Board

          JCapper 101
                      -- Mathematical computations

Home Register
Log In
By Mathematical computations
pabennett
7/3/2010
5:28:15 PM
Does anyone know if it is possible to perform mathematical computations (add, subtract, multiply, divide, etc) on two or more factors in sql mode and testing these in the data window?

Patrick

Reply
jeff
7/3/2010
7:40:46 PM
Absolutely possible - and it can work very well too.

query start: 7/3/2010 4:29:18 PM
query end: 7/3/2010 4:29:20 PM
elapsed time: 2 seconds
`
Data Window Settings:
Divisor = 999 Odds Cap: None
`
SQL: SELECT * FROM STARTERHISTORY
WHERE ((VALF07 + VALF01 + VALF03) / 3) >= 95
`
`
Data Summary Win Place Show
Mutuel Totals 1696.00 1580.10 1528.70
Bet -1756.00 -1756.00 -1756.00
Gain -60.00 -175.90 -227.30
`
Wins 233 392 494
Plays 878 878 878
PCT .2654 .4465 .5626
`
ROI 0.9658 0.8998 0.8706
Avg Mut 7.28 4.03 3.09
`
`
By: JPR Rank
`
Rank Gain Bet Roi Wins Plays Pct Impact
1 9.60 650.00 1.0148 115 325 .3538 1.3334
2 -40.20 446.00 0.9099 58 223 .2601 0.9801
3 -90.70 302.00 0.6997 29 151 .1921 0.7237
4 36.90 216.00 1.1708 19 108 .1759 0.6629
5 0.40 92.00 1.0043 8 46 .1739 0.6553
6 -12.60 34.00 0.6294 2 17 .1176 0.4433
7 38.60 14.00 3.7571 2 7 .2857 1.0766
8 -2.00 2.00 0.0000 0 1 .0000 0.0000


In the above query, I'm adding the value of three factors and dividing by 3. If the result is >= 95 the sql expression flags the horse. If the result is < 95 the sql expression ignores the horse.

Many of my own UDMs use expressions like the above.

The one obvious "gotcha" to avoid is creating expressions that result in errors - such as dividing by zero.


-jp

.

Reply
jeff
7/5/2010
11:53:09 AM
See related thread here:
http://www.jcapper.com/messageboard/TopicReader.asp?topic=669&forum=JCapper%20101


-jp

.

Reply
busseb
9/18/2017
10:06:44 PM
Jeff = Since we can multiply factors, can I create
USERFactor1 as:

(RankF23 * RankF31)

Haven't tested multiplying values or gaps, but
multiplying ranks has definite possibilities.

ElPaso


Reply
jeff
9/25/2017
2:27:05 PM
As you pointed out: I created Behaviors 14 and 15 -- which enable you to create groupnames based multiplication of factor numeric value and factor gap.

But I never did create a behavior for multiplying factor rank.

FYI, that decision was intentional.

Before reaching that decision:

I did evaluate it by building some databases that included UserFactor and UPR groupnames created around the idea of multiplying factor ranks together...

And unlike groupnames based on multiplying factor numeric value and factor gap together -- which clearly showed potential...

I didn't see enough potential with groupnames based on multiplying factor ranks together to justify spending programming hrs on that.

That said --

I last looked at this in 2013...

Have you seen potential in multiplying factor ranks together? (Or more potential in multiplying factor ranks than multiplying factor numeric value and/or factor gap?)




-jp

.

~Edited by: jeff  on:  9/25/2017  at:  2:27:05 PM~

Reply
jeff
9/25/2017
6:49:26 PM
Expanding on my previous post a bit...

The first and second posts at the top of this thread have to do with math in sql expressions to drive SQL UDMs.

The fourth and fifth posts in this thread deal with math/multiplication in UPR Tools when creating groupnames for UserFactors and/or UPR.

Note that math in UPR Tools requires using Behaviors that are programmed into JCapper...

And that this is a very different thing than using math in a sql expressions as the basis for UDMs.

It's actually pretty easy to multiply factor ranks together in a SQL UDM.

Example -- here I've created a JPR rank = 1 UDM with an additional constraint that rankf19 (Early Consensus) multiplied by rankf07 (Form Consensus) be less than or equal to 4:

query start: 9/25/2017 4:33:19 PM
query end: 9/25/2017 4:33:20 PM
elapsed time: 1 seconds

Data Window Settings:
Connected to: C:\JCapper\exe\JCapper2.mdb
999 Divisor Odds Cap: None
SQL UDM Plays Report: Hide

SQL: SELECT * FROM STARTERHISTORY
WHERE RANKJPR=1
AND (RANKF19 * RANKF07) <= 4

AND [DATE] >= #09-01-2017#
AND [DATE] <= #09-24-2017#
ORDER BY [DATE], TRACK, RACE


Data Summary Win Place Show
-----------------------------------------------------
Mutuel Totals 3565.80 3636.30 3492.40
Bet -3898.00 -3898.00 -3898.00
-----------------------------------------------------
P/L -332.20 -261.70 -405.60

Wins 585 969 1178
Plays 1949 1949 1949
PCT .3002 .4972 .6044

ROI 0.9148 0.9329 0.8959
Avg Mut 6.10 3.75 2.96



Compare the above results set to a rankJPR = 1 UDM with the converse constraint that rankf19 (Early Consensus) multiplied by rankf07 (Form Consensus) NOT be less than or equal to 4:


query start: 9/25/2017 4:39:56 PM
query end: 9/25/2017 4:39:57 PM
elapsed time: 1 seconds

Data Window Settings:
Connected to: C:\JCapper\exe\JCapper2.mdb
999 Divisor Odds Cap: None
SQL UDM Plays Report: Hide

SQL: SELECT * FROM STARTERHISTORY
WHERE RANKJPR=1
AND NOT (RANKF19 * RANKF07) <= 4
AND [DATE] >= #09-01-2017#
AND [DATE] <= #09-24-2017#
ORDER BY [DATE], TRACK, RACE


Data Summary Win Place Show
-----------------------------------------------------
Mutuel Totals 2153.10 2438.70 2430.20
Bet -2924.00 -2924.00 -2924.00
-----------------------------------------------------
P/L -770.90 -485.30 -493.80

Wins 352 648 844
Plays 1462 1462 1462
PCT .2408 .4432 .5773

ROI 0.7364 0.8340 0.8311
Avg Mut 6.12 3.76 2.88



So while you can't do factor rank multiplication in UPR Tools... You absolutely can do factor multiplication in SQL UDMs.



-jp

.







Reply
Reply

Copyright 2008 JCapper Software              back to the JCapper Message Board              www.JCapper.com