Weight games

Sondrelarsen

New Member
Joined
Jul 7, 2022
Messages
11
Office Version
  1. 2019
  2. 2016
  3. 2013
  4. 2011
Platform
  1. Windows
Hello! im building a betting model, and right now im stuck and not sure how to proceed. Im getting to the point where im happy with how the model is looking. I am now trying to add weight to each result. Example one team did really well last year, but doesnt play that good this season. the odds will be calculated from every result i type in, but i want the latest games to count more than the ones from last season. I think what is needed to calculate this is moving average. If anything is unclear, write me :)
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
One of the best ways of doing that is to use an exponential moving average, I have written a function which calculates the exponential moving average which i used for calculating the moving average of stock prices that were updated daily.
Assuming your list of number is in column. Put 5 in B1 and then put this equation in B2 and copy it down;
Excel Formula:
=ema(B$1,B1,A2)
This gives you the exponentila moving average with the period being 5 rows. if you change the value in B1 to 10 you can see that the averages change.
the ema function code is:
VBA Code:
Function EMA(Period, Lasttime, Drive)
If Not (IsNumeric(Period)) Then
  EMA = "This functions calculates the Expontial Moving average, it has three parameters: Period (days), The last time Value of the EMA, the latest value of variable"
Else
    TC = 2 / (Period + 1)
    EMA = Lasttime + TC * (Drive - Lasttime)
End If
End Function
One really big advantage of the exponential moving average is that is much less dependent of large changes that happened some time ago. a standard moving average changes as much when big value drops out of the moving average as it does when it enters the moving average.
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,901
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top