A Node.js module to query and analyze SDQL query
npm install sdql --save
The sample program checks the performance of betting on home underdog in the NFL breakdowned by season:
var SdqlService = require('./SdqlService');
let sdqlService = new SdqlService();
let breakdown = 'season';
sdqlService.run('HD', 'NFL', breakdown)
.then(system => {
return sdqlService.analyze(system, 'ON', false, breakdown);
})
.then(analysis => {
console.log(analysis)
});
The analyze
method parameters:
system
: data returned by the run
method call
type
:
ON
: Follow the systemAGAINST
: Fade the systemOVER
: Play on the overUNDER
: Play on the under
includePicks
: include all the picks in the analysis
breakdown
: breakdown the picks by that parameter. For instance setting the parameter to season
will return the performance by season.
Note that you have to specify the breakdown in both the run
and analysis
methods.
By default the odds is -110, but you can override the odd. It's useful to compare the performance of a query with a lower juice (-105).
sdqlService.analyze(system, 'ON', false, breakdown, {value: -105, type: 'US'});
npm test