Skip to content

Visualize net-results for total point / spread wagers

Notifications You must be signed in to change notification settings

JBLarson/net-return

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Net Return Model

Enter score, risk, and odds for 4 wagers: over, under, favorite, dog.
Calculate net-result for 144 total point / spread pairings (12x12).
Display 3D surface plots with spread(x-axis), total-points(y-axis), and net-result(z-axis).

nrAnimation

netret_examples/four_surf.png

requirements

nr_input.py

1a) Define lambda function 'g' for calculating 'win' for each wager.
1b) Enter input variables (score/odds/risk) for each wager.
1c) Create variables to define ranges for total point / spread axis'.
1d) Calculate 'win' values with lambda function 'g'.
1e) Print score, risk, and win for each wager. (toggle on/off with 'disp' variable)

nr_results.py

2a) Import nr_input, Create spread and total point DataFrames, add step 1c range variables to each df.
2b) Create lists of monetary results for each wager.
2c) Add lists from step 2b to df's from step 2a, calculate net-spread and net-total-points.
2d) Create simple lists of net-spread / net-total-point values.
2e) Create 12 x 12 Numpy array of net-return (net_map).

nr_surf.py

3a) Import nr_input & nr_results, create matplotlib figure, add 4 subplots displayed 2x2.
3b) Create 'x' and 'y' variables; assign values from range variables (in step 1c) to 'x' and 'y'.
3c) Use 'x' and 'y' to create Numpy meshgrid 'X, Y'. Assign net_map (step 2e) to 'Z'.
3d) Create colormap 'mycmap'. For each axis: add titles and create surf-plot.
3e) Assign view angle to each axis using 'view_init(elevation, azimuth)'
3f) Display matplotlib figure with 'plt.show()'

About

Visualize net-results for total point / spread wagers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages