Quantcast
Channel: Excel - Smart Fantasy Baseball
Viewing all 59 articles
Browse latest View live

How To Evaluate a Trade Using Standings Gain Points

$
0
0

In this video I’ll show you how to add a Trade Evaluator into your existing rankings spreadsheet.

Here’s an animated image demonstrating the finished product.  This spreadsheet will pull in all the Rest of Season projections for a player, their total SGP to be earned the rest of the season, and the player’s dollar value (provided you’ve added dollar value calculations to your sheets).

TradeEvaluator

I’ll also show you a practical example and explain a few important things to think about when considering trade offers.

The video is roughly 30 minutes long, but keep in mind that just about everything you create by following the guides on this site are long-term in nature.  With a little bit of maintenance, all of these tools can be used all season long AND into future seasons.

The Step-By-Step Process

I start with a spreadsheet that has already been updated with RoS Projections.  I then show you how to add a tab just to evaluate trades and other roster decisions.  We’ll add drop down menus that pull each player’s statistics, dollar value, and SGPs.

This information will enable you to add clarity to all your roster moves.  No more using your gut to analyze a 2-for-3 player trade involving hitters and pitchers.  You’ll be able to see exactly which side of the offer is better.

If you’re new to the site, I would suggest getting familiar with How To Create Your Rankings Using Standings Gain Points.

A Quick Suggestion

WatchVideoDoubleSpeedIf you’re looking for a way speed things up by watching them 1.5 or 2 (double)  speed, cutting down the time it takes to watch significantly.  Just adjust the settings at the bottom of the video player.  Click the cog and change the “Speed to 1.5 or 2.

I also recommend watching the videos in HD.  A lot of the detail in Excel can only be seen well in 720p or higher.

And a Disclaimer

I created this video using Prince Fielder, Jose Abreu, Billy Hamilton, and Ian Kinsler in an example trade.  News that Fielder is facing season-ending surgery came out the next day!  I apologize for this glaring problem with the example, but hope you can still see the power of using a tool like this to evaluate trades and free agency acquisitions.

Here’s The Video

Thanks for Watching

Stay smart.

Questions?  Comments?  Future Video Ideas?

Let me know in the comments below.


The Difficulty In Aggregating Projections

$
0
0

Now that we’ve established that we can benefit from combining multiple projection models into one, let’s take a look at the challenges this presents.

I’ll also give brief explanations of how you can work around these challenges in Excel.  At the end I’ll discuss an Excel template I’m working on that will do these calculations for you automatically and how you can get your hands on it.

I love Your Feedback

If you’re a SFBB Insider you might recall that after you sign up, the very first e-mail I send you asks you to reply with any fantasy baseball topics you’d like to know more about or difficulties you’re having (if you’re not, you can register here.  I like to think it’s worth your while).

Insider

I Read All Of Those Responses

I’ve been fortunate enough to have nearly 500 people register, and I read every single response that comes in from that question.  One of the most frequent areas of interest is how to average, or aggregate, multiple sets of projections into one usable set of information.

More Difficult Than I Originally Thought

These requests started to roll in during the off-season, and I even replied to several people saying that I thought this was going to be easy and that I’d have guidance coming out soon on how to do this.

… And here I sit months later having never written on the topic yet.

In theory, averaging a set of three numbers in Excel is easy.  If one system says 25 HR, one says 30 HR, and another says 35 HR, Excel’s AVERAGE formula can easily respond with the average of 30.

But I quickly ran into some big problems that greatly complicated things.

Problem 1 – Lining Projections Up To Do The Averages

In order to aggregate multiple projection systems into one, we need a method of “lining up” the projections from one system with those of another system.  Perhaps Giancarlo Stanton is projected to hit 20 HR the rest of the season by Steamer and 22 HR by PECOTA.

Giancarlo_Stanton_ROS

I made this information up just to illustrate the concept of “lining up” different projections.

We can use formulas in Excel (e.g. VLOOKUP) to pull Stanton’s Steamer projection and place it next to his PECOTA projection.  But you can run into some complications in doing this.  What if one projection system lists him as “Stanton, Giancarlo” and the other as “Giancarlo Stanton”.

Using names to pull data also opens you up to inconsistencies in the name being used.  Is it Jonathan Singleton or Jon Singleton?  AJ Burnett or A.J. Burnett?

If you have taken on the challenge of creating your own rankings, you know that we’ve dealt with this problem before, but on a smaller scale.  In my rankings spreadsheets I use a consistent playerID to pull information between the different tabs.  I prefer to use the Baseball-Reference playerIDs because you can tell who a player is (Stanton is “stantmi03″ because there were two other Mike Stanton’s before him).

But seemingly every major baseball site has their own player ID system.  Fangraphs says Stanton is “4949”, Baseball Prospectus uses “57556”, ESPN says “30583”, etc.

This is why I maintain the SFBB player ID map Excel file.  The map allows for this translation or “lining up” to happen.  It’s the bridge that can easily help you take Stanton’s projection from one system and place it next to his projection from another.  Giancarlo_Stanton_PlayerID

Problem 2 – Players Not Projected In All Systems

So we have a mechanism to pull different projections systems together for each player, everything should be easy from here on out.  Right?

For a player like Giancarlo Stanton, yes.  Regardless of the projection system you’re using, he’s going to be in it.  But what about more obscure players or players currently in the minor leagues.  Some systems will create projections for them and others won’t.  If you develop your own projections one player at a time, you don’t have time to project into the minor leagues.

How do we deal with this?  If you’re careful about your Excel formulas, you can handle it properly.  Take this example (image below).  There’s a big difference in projecting a player for zero home runs (Hip Minor Leaguer) and not projecting a player at all (Chic Minor Leaguer).
ExcelAverageFormula

You can see that Excel’s AVERAGE formula will exclude an empty cell from its calculation. This is good.  We don’t want the fact that a player is not projected by a system to artificially drag down their aggregate projection.ExcelAverageFormulaShown

If a player is not projected by a particular system, you’ll quickly run into a problem using VLOOKUPs.  If Excel can’t locate a player’s name or PlayerID in the projections, it will return the ugly “#N/A” error.  And the AVERAGE formula won’t know what to do with that either (how do you calculate the average of 10 plus “#N/A”?).

VLOOKUPerror

This brings us to the IFERROR formula, which is a nifty workaround to use when you’re encountering errors like this in Excel.  You can read more about the specifics of using IFERROR here.  But this formula will let us turn all of those “#N/A” error messages into anything we choose.

IFERROR

As we discussed above, we don’t want these “#N/A” messages to turn into zeroes.  We want the cells to be blank (in some scenarios you may want zeroes, in some you may  want blanks, so I demonstrate both in the image above).

To get IFERROR to return a blank cell value we can use “” (double quote, double quote).

Problem 3 – Some Systems Don’t Project Playing Time

Take Oliver for instance.  Every player is projected for 600 PAs.

Oliver_Projections

Image courtesy of Fangraphs.com

We could just ignore Oliver because of this oddity, but we might be missing out on a valuable opportunity. After all, Oliver is a credible system published by Brian Cartwright and the Hardball Times.  It incorporates weighted averages of previous seasons, aging factors, and regression.  But it also uses a different approach for projecting minor league players and does a better job of projecting how those minor leaguers will fare in the Major Leagues.

In the last discussion of why using multiple projection systems is beneficial, one of the key principles behind this is that you use forecasts that have different approaches.  This results in the highest level of accuracy.

So Oliver makes no attempt at projecting playing time.  Some systems (like Steamer) seem to do a good job of incorporating recent news and events into playing time estimates.  And others probably try to project playing time, but don’t go to that same level of effort.

So what are we to do?

Instead of ignoring systems that are bad at it (or don’t try), we can take playing time estimates from those systems that are good at it and use only the Plate Appearance or Innings Pitched estimates from those system.s

Zips_Oliver_Steamer

Then we can convert all the other projections into playing-time-neutral measures (HR/PA, AB/PA, RBI/PA, SB/PA, etc.).  We can then average or aggregate these playing-time-neutral measures and then multiply those measures by our playing time estimate.

For example, let’s assume we have three different projection sets.  We do some math to calculate the per-plate-appearance values for each stat.  And these three systems estimate that Giancarlo Stanton will hit 0.056 HR/PA, 0.060 HR/PA, and 0.060 HR/PA, respectively.  We average these playing-time-neutral numbers together to get 0.0587 HR/PA (or about 35 HR / 600 Plate Appearances).

We can take this 0.0587 HR/PA number and then multiply it by an independently calculated playing time estimate.  This translation process allows us to use any projection system, even if it’s terrible at projecting playing time.

Problem 4 – I Wanted To Input My Own Playing Time Estimates

I have not studied if I’m any good at this or not, but if there’s one part of projecting statistics that I do want control over, it’s the ability to manually override playing time estimates with my own.

A projection may say Troy Tulowitzki will miss more time than I think.  Maybe I want to draft Bryce Harper as though he’ll stay healthy this year.  Perhaps I think a fourth outfielder will find a way into a full-time role early in the season.  Or maybe news comes out that a player will miss three months of the season right before the draft.

I don’t think I can project statistics better than PECOTA, Steamer, or ZiPS.  But I want the ability to put in my own playing time estimates for the situations like those described above.

The great thing is that by putting all the projections in the neutral context described in Problem 3, it’s easy to allow for this.

Let’s assume I’ve set up a rest of season projection for Troy Tulowitzki and it calculates that he’ll get 263 plate appearances the rest of the way.  If I find out he’s come down with a groin injury and is about to hit the DL, I want the ability to override his estimate downward.

Tulowitzki_Projection

I can use Excel’s “IF” formula to detect if I have given a value in the “OVERRIDE PA” column.  If there is no override, I want the average of plate appearances from the other projection systems.  If there is an override, I want the override to be used as my plate appearance estimate.

Plate_Appearance_Formula

Problem 5 – Weighting Systems Differently

When researching the concept of aggregating multiple projections into one, a suggestion I came across was that you should not weight systems differently unless you had a really good reason to do so.  Maybe you studied the different systems over time and you mathematically have found an ideal weighting that you want to use.

I’m probably not going to take my work to that level.  But I could see this as something people would want.  If you’ve ever read an article about the accuracy of baseball projections, the article inevitably will go in this direction and talk about what the ideal weighting would be.

Another interesting application is that some projection systems, like Marcel, are simply different weighted averages of previous seasons.  So by building in a simple weighting system, a projection averaging model could do something like this.

So I sought out to tackle this problem too.  Any projection averaging tool should allow for equal weighting:

Equal_Weighting

Or unequal weighting:

Unequal_Weighting

And then the playing-time-neutral projection calculations would calculate the weighted average based upon these assigned weights.

The Solution…

I have developed an Excel file that addresses the problems above.  You just need to copy and paste Excel or CSV formatted projections into the Excel file, make sure the PlayerID is in the first column of the data, and then enter a few pieces of information:

  • The name of the tabs you brought in (containing your projections)
  • The column range on the tabs you brought in (for example “A:X” if the projection data goes from column A to column X)
  • Provide a weight for the projection (as described above)
  • Answer a Yes/No question on if you want playing time (PA or IP) for each projection included in the average playing time calculation
  • And select the PlayerID for the projections you have brought in (Fangraphs ID, Baseball Prospectus ID, Baseball-Reference ID, etc.)

I think you can realistically have averaged projections in under 10 minutes.  No complicated formulas.  No dealing with the issues above.

There are a few things I think you should know

  • I think you should have at least Microsoft Excel 2010 to use this file.  It may work on Excel 2007.
  • You need Windows.  I don’t think this will work on Excel for Macs.
  • This does not rank or calculate dollar values for players.  You could add your own calculations around the projections though.
  • Depending on the speed of your computer, the file can be slow.  The formulas in the Excel file are complicated and they can take up a lot of your computer’s resources.

 This Sounds Great.  How Do I Get My Hands On It?

Because the formulas in the file are complex, I’m not yet 100% certain (maybe 90-95%) that everything is working correctly.  I’m looking for some help in testing the accuracy, making sure it’s easy to use, and help in identifying things that are confusing or need clarification.

My plan is to e-mail the SFBB Insiders within the next couple of weeks to look for a group of about 25 people interested in seeing this template first.

If you’re not already registered, now would be a great time to sign up!

UPDATE:  The testing has already begun, but you can still sign up and get you hands on the next prototype.

Thanks For Reading

If you have any other ideas for tools you’d like to see or advice on challenges you’re facing, don’t hesitate to contact me.  I may not have an answer right away (like the months it took me to finish this averaging project), but I’ll get there eventually.  Slow and steady…

Stay smart.

How To Pull a Player ID From a Hyperlink in Excel

$
0
0

Maybe you’re trying to build a the next great daily fantasy baseball spreadsheet.  Or maybe you’re attempting to figure out who to start next week.

You’ve got plans to use a powerful projection tool like Razzball’s Hitter-Tron…  but then you see it.  There’s not a player ID to be found!  How can you take data from a site like Razzball and drop it into your existing rankings, dollar value, or trade evaluator spreadsheets?

Giancarlo_Stanton_Ben_Zobrist_Daily_Projection

You Know Me.  I’m Obsessed With PLayer IDs.

They’re the best way to build a reusable spreadsheet that you can just drop projection data in to.  You can have all sorts of valuation formulas, trade evaluators, or daily roster lineup tools ready to go.  You just drop in some projections with player IDs and everything seamlessly links up and calculates.

Look Closely At the Links

Even if you don’t see a player ID at first glance, on many sites you can still get what you need if you look carefully.

Hover over a player’s hyperlink.  Depending on your browser you should somewhere see the web address for the hyperlink (in Google Chrome the destination of the link shows in the bottom left on the status bar).

Evan_Longoria_Razzball

There’s a player ID in there!  9368 for Evan Longoria.  A quick look at the PlayerID Map tells us the 9368 happens to be Evan Longoria’s Fangraphs ID.

Unfortunately, if you paste the Hitter-Tron information into Excel, you don’t get text about the web address.  You’re left with just the hyperlink itself and no reference to player ID #9368.

Zobrist_Longoria_Cruz_BeltreThere’s not even an existing Excel formula we can use to just pull out the web address.  We have to get a little advanced and create our own.

Step-By-Step Instructions

Step Description
1. Start with an Excel file containing hyperlinks within a player’s name, like mentioned above.  If you’re using Razzball as a source, you can use your mouse to select a table of information and then paste it into Excel.  The links should transfer into the Excel file.Zobrist_Longoria_Cruz_Beltre
2. To create our own function we must first save the Excel file in a format that allows for macros.If you’re using a version of Excel earlier than 2007, you don’t need to worry about this.  If you’re using Excel 2007 or later, perform a “Save As”.Choose to save the file as an “xlsm” file type (Excel Macro-Enabled Workbook).  Excel_Save_As_XLSM
3. After saving, hit ALT + F11.  This will load Microsoft Visual Basic, a program that will allow us to create and define our new function.Microsoft_Visual_Basic
4. To begin, click once to select the “Microsoft Excel Objects” folder in the upper left hand corner of the screen.  Then right-click and choose the option to Insert > Module.Insert_New_ModuleThe new module is where we can “code” the new function.  You should notice that a blank white area now appears on the rightportion of the screen.  This is where we will place the code.Blank_Module
5. In this blank area, copy and paste the following text:

Function GetWebAddress(cell_with_link) As String

‘Create a function to pull out the address property of a hyperlink

GetWebAddress = cell_with_link.Hyperlinks(1).Address

End Function

You should notice some changing of colors in the text after you paste it.

GetWebAddress

I won’t get too much into programming methodology, but we just created a function called “GetWebAddress” that we can now use in Excel.  That function requires just one input – the “cell_with_link” or the cell containing the hyperlink we want to extract.

The output of GetWebAddress is the address property of the hyperlink.

6. Click the Save button in Microsoft Visual Basic.  And then exit the program (but leave Excel open).SaveMacro
7. Let’s test out the new function.  I’ll use the BenZobrist hyperlink in my example to illustrate how to use it.  The formula we created requires oneinput.  Thatinput is the cell containing the hyperlink.I added the formula to cell U1 in order to pull the hyperlink from Ben Zobrist’s name in cell B1.  That formula is

=GetWebAddress(B1)

FormulaInputs

8. After the formula is complete, hit Enter.FinalResult_ZobristYou can then copy the formula down to the other rows of data.Zobrist_Longoria_Cruz_Beltre
9. Once you’ve extracted the web address you can use Excel’s LEFT, MID, RIGHT, and FIND functions to pull out just the player ID string.Player_ID_FormulaTIP:  I’m sure there’s an easier way to do it, but the formula I used to get the player ID out of the Razzball addresses is:

=LEFT(MID(U1,FIND(“player/”,U1,1)+7,99),
FIND(“/”,MID(U1,FIND(“player/”,U1,1)+7,99))-1)

That’s Great.  What Can I Use This For?

I get a lot of requests for advice on how to create a spreadsheet for determining the best daily fantasy lineup.  This would be a great place to start.

Razzball puts out daily hitter and pitcher projections that are powered by Steamer’s Rest of Season projections and then adjusted for opposing pitchers, park factors, batting order, and more.

They also have 7 day projections for those of us playing in weekly lineup leagues.  This information is perfect for deciding who to start and who to sit.

You can access these various projections under the Tools>Hitter-Tron menu at Razzball.

Razzball_Hitter_Tron

Where Else Can I Use This Strategy of Pulling Data From Hyperlinks?

Many other sites use this same approach of linking to player pages.  This same formula can be used to extract player IDs from a variety of sites.

All of these player ID systems correspond to the IDs you’ll find in the Player ID map (click here to learn more about player IDs or click here to download the Excel file).

Take a look at links to Jose Abreu on the sites below:

Baseball-Reference

Baseball-Reference

ESPN

ESPN_Jose_Abreu

Yahoo

Yahoo_Jose_Abreu

CBS

CBS_Jose_Abreu

Conclusion

I try to avoid doing VLOOKUPs and similar Excel functions using player names.  You can see above that Jose Abreu might be presented as “Abreu, Jose”, “Jose Abreu”, or “José Abreu”.  Using player IDs takes the guess work out of this.  Creating your own user defined function in Excel will help you get at the underlying player ID on many sites.

And let’s give a special thank you to Fangraphs for just including the player ID in all their downloadable reports!

Stay smart.

Designing Reusable Fantasy Baseball Spreadsheets

$
0
0

Why do your spreadsheets have so many tabs?

When you’re building a rankings spreadsheet, why don’t you just build the calculations right on the projection tab?

Why do you even use this ridiculous Player ID map?  There’s so much useless information on that thing.

Have You Ever Wondered These Things?

I have to say that I haven’t had anyone ask these questions, but I feel the need to address the questions nonetheless.  I don’t mean for them to be overly complicated, but there’s a good chance that the spreadsheets I design can be overwhelming.  So let’s take a closer look at the reasoning behind things.

There Is More Than One Way To Skin a Cat

I don’t think it’s much of a stretch to say that spreadsheet design is a form or art.  There are many different ways to get to the same end goal.  I’m always looking for new ideas and methods to add to my Excel work, and I’m certain there are more efficient and better ways to design things I have done.

With that said, I believe the principles I’m about to talk about are universal.  Whether you like the way I’ve designed things or if you prefer to do things a different way, using these concepts should help you out in the long run.

Why Do Your Spreadsheets Have So Many Tabs?

There are two main reasons for this:

  1. I want all of my spreadsheets to be reusable.
  2. I try to set things up so you only have to enter a piece of information one time.

Reusable Spreadsheets

We’ll take a close look at reusable design in a moment, but think about the different tabs/worksheets I use.  Raw projections, player information, replacement level information, and calculations all on separate worksheets.

By setting these up on distinct areas of a spreadsheet it allows you to easily update one of those components without screwing up the whole model.  Have new projection info?  Just replace the data on the projection tab.  Have a new Player ID Map?  Just copy it over top of the existing one.

This setup makes it much easier for your work to be updated during the season and into future seasons.

Entering Information Only Once

Dollar_Value_InputsIf you’ve read my book on calculating dollar values and in-draft inflation, you’ll recall that we added a “Settings” tab to the rankings spreadsheet.  On that tab we color-coded blue cells to indicate input cells.

These are just basic settings about the league, but by separating them out onto the “Settings” tab you only have to type the information one time.  If we didn’t do this, we would have to embed this information into our calculations for both the hitting and pitching rankings.

Everything is also formula-driven, so if a 13th team is added next year, or if team salary caps increase, or if you want to try a 65% hitting allocation, you can easily change those inputs and all calculations for hitters and pitchers update automatically.

If we didn’t have things set up this way you would have to search deep inside complex formulas on the hitter tab and edit these inputs.  And then you’d have to go do the same thing on the pitcher rankings.

And if you’re in more than one league you can set your rankings up for one league, just change the few settings different between the leagues, and you’ll easily have rankings tailored to each league you play in.

Why Don’t You Just Build Your Calculations Right on the Projections Tab?

Whether you’ve downloaded projections from another website or you’ve created your own, it might seem like I’m over-complicating things by having the projections on one tab and then using formulas to pull the projections to a whole other worksheet where I then calculate rankings, SGP, and dollar values.

If I were to use this spreadsheet one time, I would agree with this line of thinking.  But take a look at this image.

Rankings_Spreadsheet_DesignThis is a very primitive flow-charting model of a rankings spreadsheet.  You have a few sets of raw data as inputs (the blue rhombuses, or is it rhombi?) – the projections, the Player ID Map, and replacement level data.

These inputs then flow into the calculations and the output our rankings and dollar values.

Projection_DataIf you’re not familiar with flow-charting (I’m no expert myself, I had a class in college about 15 years ago about process modelling), there’s something subtle different about the projection data.

The multiple or stacked shapes indicate the spreadsheet can accommodate multiple sets of projection data.  What I’m trying to indicate here is that this spreadsheet is easily reusable with an updated set of projections.

It does take longer to “set things up the right way”.  But I’m hopeful that if you follow this line of thinking, you’ll be able to just drop in an updated set of projections at any point in time.

Set up the spreadsheet once in the preseason.  Add new projections as updated versions come out.  Drop in new rest of season projections once the season starts.  Continue to do that all season long.  Reuse your spreadsheet every season into the future with minimal maintenance required.

If you build your calculations directly next to the set of projections you’ve downloaded it becomes much more complicated to reuse the spreadsheet. It’s no longer as simple as just downloading a new set and dropping them in.

Why Do You Even Use This Player ID Map?

This serves two main functions, the first is that it allows us to bring information from different resources together for things like averaging projections.

The second function, more in line with the topic of spreadsheet design, has much to do with the concept of only entering information once into a spreadsheet.

In addition to having IDs from a variety of systems, the Player ID Map contains a variety of information about each player (position, birthdate, team, etc.).

All of these pieces of information, some which change over time, are pulled and used throughout the Excel files I design.  But by keeping all of this information on one tab, it’s very easy to update the information that does change.

Even for the information that does not change, it’s nice to have all of this in one central spot.  There’s no point in entering Mike Trout’s name, position, and team on every tab.  We can just use his Player ID and easily pull any related information about that player ID.

Do I MIss The Boat?

I’d love to hear from you if you have any suggestions on how I could improve any of the spreadsheets I share on this site (projections, rankings, pitch type comparisons, etc.).

Also, don’t hesitate to e-mail me (smartfantasybaseball at gmail dot com) with any questions about something you’re trying to do in your own baseball spreadsheet work.

If you’d like to be notified when I post new articles, please follow me on Twitter. Stay smart.

How To Add Positional Ranking To Your Spreadsheet

$
0
0

I just came across an interesting use of an Excel formula that will let you easily determine what a player’s ranking is at their given position (1B-1, 1B-2, 1B-3, etc.).

Here’s an explanation that might show what I’m talking about.  You’re scrolling through your huge list of ranked hitters (see image below).  You have them sorted by Total Standings Gain Points (column V) in descending order.

You see Edwin Encarnacion’s name pop up in row #38.  You know he’s a first basemen, and you can pretty easily determine that he must be the #37th ranked player (by showing up on row 38).  But now you want to know where he ranks amongst only other first basemen.

Without_POS_Rank

In this post I’ll show you a formula we can use to get our spreadsheet to look like this (look at column W):With_POS_Rank_Edwin_Encarnacion

I’m a Moron

I got nearly to the end of this post when I started to think it was weird that Encarnacion was ranked #37, Starlin Castro #32, and Paul Goldschmidt #21. Turns out I used a rankings file from the 2013 preseason for all the screenshots…

I decided against starting over because it’s not the player names that are important, we’re mostly looking at a new formula. And I found it pretty interesting and thought provoking to look at these old lists and see names like Nori Aoki and B.J. Upton so high.

Excel Formulas Used In This Post

Using the “&” to Build Text

As you can see from the image above, we’re trying to take each player’s position (e.g. “1B”) and then add a dash and then the player’s positional ranking (e.g. “1B-8″ for Encarnacion).

You can use the ampersand (would you know what that was called without “Wheel of Fortune”?), in an Excel formula to add text from different columns.

A real practical application of this is to build a player’s full name (e.g Billy Hamilton) from their first name and last names being in separate columns.  Here’s an example:

Billy_Hamilton_Jose_Altuve_Craig_Kimbrel_Madison_Bumgarner

I did leave something important out of this formula.  Look what happens:No_Space

Just appending the two fields together leaves out a space between the first and last name.  So to revise the formula, we can add a space between the names like this:Formula_With_Space

We’re now putting three pieces of information together.  Cell B2 plus a space (” “) plus A2.  And you can continue adding on information with more “&” symbols.Spaces_Billy_Hamilton_Jose_Altuve_Craig_Kimbrel_Madison_Bumgarner

You may be familiar with Excel’s CONCATENATE function which does the same thing, but I just find this easier to use.

COUNTIF

The COUNTIF formula will count the number of cells in a specific column (or other range) that meet a specified condition.

In plain English, our goal is to have Excel count the number players that have the position of first basemen (1B) in column E.
COUNTIF

As you can see from the function wizard above, this formula requires two inputs:

COUNTIF( Range , Criteria )

  1. Range – This is the block, column, or area of cells we want to count from.  “Excel, look in Column E and count the cells that meet this condition I’m about to tell you about in bullet #2.”
  2. Criteria – This is what we are evaluating the cells for.  “Count the cells in Column E that show ‘1B’ as the position.”

More About The RANGE We Want In The COUNTIF Formula

I simplified things above.  Thinking more closely about this, we don’t really want to count the total number of “1B” in Column E.  For Albert Pujols, the very first “1B” in the column, we only want him counted.  For Prince Fielder, the second “1B”, we want only him and Pujols counted.  For Paul Goldschmidt, the seventh “1B”, we want him and all those before him.  And so on.

To accomplish this we need the range of cells we’re looking in to change as we move down the player list.

Here’s a graphic of the range we want for Pujols.  Check out the highlighted cells.  We would want to count the number of 1B in cells E2 through E5.Albert_Pujols

And here’s one for the range we want for Paul Goldschmidt.  We would want to count from E2 to E22.Paul_Goldschmidt

So the range the we want needs to be able to expand as the formula moves down the column.  The way to do this in Excel is with the concept of absolute and relative cell references.

We want the “E2″ part of the range to be frozen  in place.  But we want the second part, “E5″ (in “E2:E5″) or “E22″ (in “E2:E22″) to move.

To do this, we will specify to Excel that the first cell in our range is “absolute” and that the second cell is “relative”.

We do this by putting a dollar sign in front of the row number of the absolute cell.  You can put the dollar sign in front of the column if you don’t want the column to change as the formula moves.

E$2:E5

As the formula is moved down the column, the dollar sign tells Excel not to move the E2 reference.

Enough Concepts.  What’s the Formula?

Step Description

1.

I’m going to build this formula in pieces.  First, create a new column to hold “POS RNK”. And we’ll start with just the COUNTIF formula for now.

2.

I think it will be helpful to start the formula with about the fourth or fifth player in the sheet and not the first player.

In my example, I typed “=COUNTIF(” in cell W5.  I then used my mouse to select from cell E2 to E5 (because my position is in column E).

Pujols_Range

3.

Now place your mouse cursor and click in front of the “2” in the formula we’ve started.  Then type the “$”.Absolute_Cell_Reference

That finishes the “Range” part of the formula, and now we can move to the “Criteria”.

4.

Type a comma after the “E$2:E5″ argument, and then click on cell E5.  Then close the parentheses on the formula.  The criteria is the position of any given player.  For Paul Goldschmidt, we want to count him and also the number of 1B above him in the rankings so we can determine where he falls in the rankings.

If you’re using an Excel “Table”, like I frequently use on the site, the formula probably came out as something like this:
With_Structured_Reference

If not, it probably came out with a reference to cell “E5″ like this:Without_Structured_ReferenceThey both work.  Hit enter to save the formula.  You should see the counting take place. Spot check that it’s working by picking a player and a position to count.  In my example, I can see that Pujols is the first 1B, Fielder is second, Votto is third, and Rizzo is fourth.Anthony_Rizzo

5.

Now we can add in the text part of the positional rankings to turn each of these into the “1B-1″, “1B-2″, and “1B-3″ format.

Be careful to note that now I’ve switched up to editing the formula in cell W2 (for Mike Trout).  

Click your mouse between the equals sign and the “COUNTIF” part of the existing formula.  Our goal is to add the “1B-” part of the formula using the ampersand to build the text.

My final formula if you are using an Excel Table is:

=[@POS]&”-“&COUNTIF(E$2:E2,[@POS])

Final_With_Structured_Reference

If you’re not using Table References:

=E2&”-“&COUNTIF(E$2:E2,E2)

Final_Without_Structured_Reference

Hit Enter.  We’re done!Final_Excel_Formula_Output

Have Other Questions About How To Do Things Like This?

If you have questions about making an awesome rankings or draft spreadsheet, let me know.  You can comment below or e-mail me at smartfantasybaseball at gmail dot com.

If you’re interested in similar articles in the future, following the site on Twitter or registering as an Insider are the best ways to keep up-to-date.

 

An Even Better Positional Ranking Formula

$
0
0

In my last post about how to calculate positional rankings in your player spreadsheet (link), I realized a weakness in the approach I outlined.  I’m here to fix that with a slightly more complex formula. Final_Excel_Formula_Output

The Weakness In The First Approach

The problem with the first approach is that it is entirely dependent upon how the file is sorted.  If the file is sorted by dollar value or standings gain points in descending order, then the rankings work.

But if you sort the file by home runs, stolen bases, or player name, then the rankings fall apart.  The player with the most home runs (or the most stolen bases or the first name alphabetically) becomes the top ranked player.

The COUNTIFS Excel Function

Instead of the COUNTIF function, we’ll use the COUNTIFS function this time.

You might remember from the last post that the COUNTIF function will count the number of cells in a specific range that meet a specified condition (e.g. “Hey Excel, count all the players in this column that have a ‘POS’ of ‘OF’.”).

Well the COUNTIFS function counts the number of cells in a specific range that meet all of the conditions you provide (you can give multiple conditions).

In plain English, our goal is to have Excel count all the players in our list of hitters that have a “POS” of “OF” AND that have a higher projected SGP than our player being evaluated.

We’ll get into the specifics of our formula in a bit, but here’s a screenshot of the Excel formula wizard for our COUNTIFS function.COUNTIFS_FUNCTION

This formula allows for an open-ended number of arguments, but you do need to pieces of information for each set of criteria you want to specify.  Each criteria requires:

  1. Range – This is the block, column, or area of cells we want to count from.  “Excel, look in Column E and count the cells that meet this condition I’m about to tell you about in bullet #2.”
  2. Criteria – This is what we are evaluating the cells for.  “Count the cells in Column E that show ’1B’ as the position.”

If we want to specify three conditions that must be met, then we would need six arguments (three ranges and three criteria: range1, criteria1, range2, criteria2, range3, criteria3).

Step By Step Instructions

Step Description

1.

I’m going to build this formula in pieces.  First, create a new column to hold “COUNTIFS RANK”. To do this, just type the column header to the right of your existing table information.  COUNTIFS_RANK

We’ll start with just the COUNTIFS formula for now.

2.

I’ve hidden a lot of information in my rankings.  For now, we’ll just need the “POS” column and the “TTLSGP” column (or whatever measure you’re using to evaluate players, like maybe total points or projected dollar value).

Click in the first empty cell of your “COUNTIFS RANK” column (cell W2 in my example).FORMULA_EDITOR

Then click on Excel’s “Insert Function” button (fx icon next to the formula editor).INSERT_FORMULA

Search for the COUNTIFS function and hit “Go”.SEARCH_COUNTIFS

 

3.

After you’ve located COUNTIFS, hit “OK”.  OK_FORMULA

The first range we’ll be evaluating is the “POS” column.  In my example file, “POS” is in column E.

To have Excel look through all of column E we can enter “E:E” in the “Criteria_range1″ field.
RANGE1

4.

Mike Trout happens to be atop the spreadsheet right now.  In order to count only players with the same position as Trout, we’ll click in cell E2 (where Trout’s position is located).  POS_CRITERIA

Excel will convert this to it’s Structured Reference notation which is [@POS].  POS_CRITERIA_WIZARDIf you don’t like the Structured Reference notation, you can manually type in “E2″ and get the same result.POS_CRITERIA_E2

5.

The second range we’ll be evaluating is the “TTLSGP” column (or whatever you’re ranking players by).In my example file, “TTLSGP” is in column V.My intention is to have Excel look through all of column V and count players that have higher “TTLSGP” than each given player.  To have Excel look through all of column V we can enter “V:V” in the “Criteria_range2″ field.CRITERIA_RANGE2

6.

Remember, we’re currently building the formula in Mike Trout’s row and we’re trying to find players with greater SGP than him.

We’re essentially trying to put “>[@TTSGP]” (or “>V2″) in this box for “Criteria2″.  The problem is we want Excel to treat the “>” as text but the “[@TTLSGP]” as a structured reference/cell number.

To specify text in Excel you surround it with double quotes.  And you will hopefully recall from the first positional rankings piece that we can build text strings using the ampersand.

So to create this, we want to enter “>”&[@TTLSGP] into the Criteria2 cell.FINAL_COUNTIFS_FORMULA

Or you could use the traditional cell number convention.CELL_NUMBER_COUNTIFS

7.

You’ll know this is working when you see “>11.167″ off to the right (this is a preview of what Excel is thinking).  We want Excel to look for any player with standings gain points greater than 11.167.WORKINGIf you leave this at >[@TTLSGP], you can see that Excel is not able to interpret this.NOT_WORKINGClick “OK” to accept the formula as it is.CLICK_OK

8.

 After you accept the formula you’ll see that we need to tweak it some.  It’s counting players that have greater TTLSGP.  Nobody has a greater SGP than Trout so it’s evaluating to zero.COUNTIFS_RESULTSWe actual want Trout’s rank, not how many are higher than him.  His rank is first.  The second player, Ryan Braun, is evaluating to a 1.  But really he’s the second ranked outfielder.

We want to add a 1 to the result of our COUNTIFS formula.  This will reflect rank instead of count how many players are better.

Edit the existing formula by putting “+1″ at the end.PLUS_ONE

=COUNTIFS(E:E,[@POS],V:V,”>”&[@TTLSGP])+1

You can see this fixes our issue by making Trout #1, Braun #2, etc.PLUS_ONE_RESULTS

9.

In the next step we’ll add in the text part of each player’s position (to make Trout “OF-1″).  Before we do that, wrap our existing formula in parentheses so it doesn’t interfere with the “OF-” part we’ll soon be adding. WRAP_IN_PARENTHESES

=(COUNTIFS(E:E,[@POS],V:V,”>”&[@TTLSGP])+1)

10.

Now we can add in the text part of the positional rankings.

Click your mouse so that it’s between the equals sign and the opening parenthese we added above.  We’re trying to add the position in front of the number rank.

Click on the “POS” column for the row you are editing the formula for.  Then type the following:

&”-“&

This will append the player’s position to the ranking we calculated earlier and put a dash in between.

My final formula is:FINAL_FORMULA

=[@POS]&”-“&(COUNTIFS(E:E,[@POS],V:V,”>”&[@TTLSGP])+1)

11.

 Hit Enter.  We’re done!FINAL_RESULTS

That’s Better

I apologize for sending you down the wrong road with the last post.  This formula is clearly better.

This ranking does not depend on how the file is sorted.  Excel is calculating each players ranks explicitly according to the TTLSGP column.

You might notice it takes a while for your Excel file to calculate now.  The formula we added takes much more resources because it’s comparing every player to every other player in the whole spreadsheet.

Have Other Questions About How To Do Things Like This?

I’m serious.  Ask me!

If you have questions about how to make an awesome rankings or draft spreadsheet, let me know.  You can comment below or e-mail me at smartfantasybaseball at gmail dot com.

If you’re interested in similar articles in the future, following the site on Twitter or registering as an Insider are the best ways to keep up-to-date.

How Do You Account For and Value Players with Multiple Position Eligibility?

$
0
0

Zobrist_Prado_Santana_CarpenterHow do we handle the multi-position players like Ben Zobrist and Martin Prado?  When a player is eligible to be slotted at 2B, SS, and OF, how do we value that player?

This question came up in the comments of my last post on “How to Add Positional Ranking to Your Spreadsheet“, from a reader named Michael (I welcome your questions too).  In this post I’ll take a look at how I handle this and look at a more inticate approach you could take to get the information.

I must warn you that it takes a lot of new formulas and manipulation of your existing rankings spreadsheet to accommodate multiple positions.  To make sure you have something to reference, at the end of this post I’ll provide a download link to an example Excel file you can download.

Assign the Player to the Weakest Position They’re Eligible For

This is what I currently do.  For example, let’s take a player like Ben Zobrist, who in the 2014 season currently qualifies at SS, 2B, and OF.

In the Player ID Map, I attempt to classify each player at the weakest position they’re eligible for.  I do that by determining what replacement level is for a standard 12-team mixed rotisserie league.

Is the “weakest position” going to be the same for every league?  No it’s not.  It’s probably close in most leagues.  Catcher will almost surely be the weakest in any format.  Then Shortstop will generally be the next weakest, followed by 2B, 3B, 1B, and OF.  But positions might change a little in an 8-team league or a 15-team league, in an AL-only league versus a standard league.

That’s a big reason why I started this site.  It’s not always safe to give blanket advice, and I think the best approach is to calculate all of these things for your own league.  You’ll be better off for it.

How Do I Determine the Weakest Positions?

Assuming you’ve done some kind of work to create your own rankings (if not, start here), the weakest position can easily be determined by looking at the replacement level information you’ve calculated (if you want to refresh your memory on replacement level, read this).

Looking back to one of my preseason files for the 2014 season, this is the replacement level information for one of my leagues.
REPL_LEVEL_TABLE

The weaker positions are those with the lowest replacement level.  So in this league it’s C, SS, 2B, and then 1B, 3B, and OF are essentially the same.

Back to Zobrist

Going back to our example of Ben Zobrist who is eligible at SS, 2B, and OF, if we’re trying to assign him to the weakest position he’s eligible for, he would be assigned to SS.

Thinking of Martin Prado who is eligible at 2B, 3B, and OF, he would be assigned to 2B.

Carlos Santana who is eligible at 3B and C would be assigned to C.

Why Do I Only Assign a Player to One Position?

I have two reasons for this.

The main reason is because assigning players to the weakest position they are eligible for gives the player his greatest value.  I’ll demonstrate more on this in a minute.  But if you’re calculating Zobrist’s dollar value, it comes out highest when he’s classified as a SS.

Going along with this, fantasy baseball leagues are becoming more efficient market places.  As we all get better and smarter about playing fake baseball, people generally realize they’re best off putting Buster Posey at catcher and not at 1B.

This won’t always be the case, but for the most part the obvious situations like your Buster Poseys and Carlos Santanas are going to be assigned where they belong.  Because of this, it’s somewhat of a wasted effort to try calculating values for them at 1B or 3B.

The second reason is a technological one.  You run into a lot of trouble having the same player appear multiple times in one spreadsheet (on multiple rows).  Not only does it become confusing to have to remember that Zobrist’s name appears three times in your draft list, but it also greatly complicates (or eliminates) your ability to calculate dollar values.

How Much Does a Player’s Position Affect Their Value?

Is there really a big difference between a SS and an OF?  Let’s take a look.

I am running the exercise below using Steamer’s 2014 preseason projections.  The dollar values assume a 12-team standard mixed rotisserie league with 14 hitters (C, C, 1B, 2B, 3B, SS, CI, MI, OF, OF, OF, OF, OF, UTIL) and 9 pitchers.  The dollar values are calculated using standings gain points and my approach to calculating player values.

Here’s the replacement level information again:REPL_LEVEL_TABLE

Let’s start out with Zobrist.  You can see below that he was projected for 8.73 SGP before adjusting for replacement level.  When you then account for replacement level and figure out his “SGP Over Replacement Level” you see that he becomes much more valuable as a shortstop.  Over $4 more valuable than when he’s classified as an OF!

BEN_ZOBRIST_REPL_LEVEL

Here’s Prado:MARTIN_PRADO_REPL_LEVEL

And Carlos Santana:CARLOS_SANTANA_REPL_LEVEL

Hopefully this also illustrates how much of a difference in value players can have when they qualify for new positions.

I Don’t Care.  It’s Still Nice to Know These Guys are Eligible at Multiple Positions.  How Can I Put This in My Spreadsheet?

I agree with you, it’s helpful to know this.  Even if we’re going to draft Zobrist as a SS, it’s still really helpful to know he’s eligible at 2B and OF too.  You can use this info during the draft when deciding between other players or it may allow you to take a sleeper player you’re interested in.  And I think there is some secret value in the flexibility this gives your roster during the season (perhaps making him more valuable to your team than just the $15.97 he calculates out at).

Here’s The Simple Solution

Because we use “POS” to calculate a player’s value over replacement level, we can’t reflect multiple position eligibility in the “POS” column.  Putting “2B/3B/OF” in the “POS” would screw up all the formulas we use to calculate rankings and dollar values.

So the simplest solution is to insert a new column next to the “POS” column.

Insert_Column

Name it “POS ELIGIBILITY”.  And enter a formula that by default sets it equal to the “POS” column.

=[@POS]

POS_ELIG

Then just type in the position eligibility for the unique players that qualify at more than one position.  For example, type “SS/2B/OF” for Zobrist.

TYPE_OVER_ZOBRIST_POS

I realize this isn’t perfect.  It doesn’t tell you the player’s dollar value if they played one of the other positions.  This solution doesn’t tell you their ranking for the other positions.  But this is as far as I take it in my own spreadsheet.

I just want a way to know who the players are that qualify at multiple positions and this satisfies that need.

If You Want To See Rankings For Other Positions

To do this, we’ll have to change some things in our rankings spreadsheet.  The formulas we’ve set up for RSGP, HRSGP, RBISGP, SBSGP, and AVGSGP have the replacement level adjustment made to each of these categories.  These are then added together, meaning that the TTLSGP column is already adjusted for replacement level.

If we’re going to calculate a player’s SGP over replacement level for multiple positions, we first need to calculate a “Gross SGP” or “Unadjusted SGP” that reflects the player’s standings gain points before accounting for position.  We need to remove this replacement level adjustment so it’s not being made to each category.

ADJUST_REPL_LEVEL_FORMULA

For example, the RSGP formula shown above will just become:RSGP_FORMULA

We’re just removing the “-VLOOKUP(…)” part of the formula.

We then have to add columns for players’ second and third positions (I’m stopping at three positions, I don’t think many qualify for four).  To do this, insert columns for POS2 and POS3 next to your existing POS column.  For Zobrist, you might type 2B in the POS2 column and OF in the POS3 column.POS1_POS2_POS3

Next, we must add a column to determine replacement level for each position (POS, POS2, POS3) and a related column to calculate the SGP over replacement level for each position.  In the screenshot below, I inserted columns Y – AD.
ADDITIONAL_COLUMNS

The formulas for the columns will be as follows (adjust as needed to fit the exact columns and column names of your own spreadsheet):

Column Name Formula
REPL LVL POS 1

=VLOOKUP([@POS],ReplacementLevel_H,
COLUMN(ReplacementLevel_H[REPL LEVEL SGP]),FALSE)

SGP OVER REPL POS 1 =[@TTLSGP]-[@[REPL LVL POS 1]]
REPL LVL POS 2  =IFERROR(VLOOKUP([@POS2],ReplacementLevel_H,
COLUMN(ReplacementLevel_H[REPL LEVEL SGP]),FALSE),””)
SGP OVER REPL POS 2 =IFERROR([@TTLSGP]-[@[REPL LVL POS 2]],””)
REPL LVL POS 3  =IFERROR(VLOOKUP([@POS3],ReplacementLevel_H,
COLUMN(ReplacementLevel_H[REPL LEVEL SGP]),FALSE),””)
SGP OVER REPL POS 3 =IFERROR([@TTLSGP]-[@[REPL LVL POS 3]],””)

The last thing we need to do is convert the “SGP OVER REPL POS #” columns into the positional ranking format I recently wrote about here.

I know we’re getting a lot of columns in this sheet, but we are going to add four more. Add columns for POS RANK 1, POS RANK 2, POS RANK 3, and ALL RANKS.  See columns AE, AF, AG, and AH in the screenshot below.POS_RANK_COLS

We can eventually hide quite a few of the columns that we’ve been adding, but I find it easier and safer to slowly build complex formulas in separate columns rather than building one extremely long formula in only one cell.  It helps me mentally step through the different parts of the calculation.

We’ll follow the same formula discussed in the positional ranking post and add that to the POS RANK 1 column.  As you can see in the POS RANK 2 and POS RANK 3 formulas below, the core part of the formula is the same, but I’ve added an IF clause to the beginning.  This IF clause is just looking to see if the POS2 or POS3 columns are blank.  If blank then the POS RANK 2 and POS RANK 3 columns will be blank as well.

Column Name Formula
POS RANK 1

=[@POS]&”-“&(COUNTIFS([POS],[@POS],[SGP OVER REPL POS 1],”>”&[@[SGP OVER REPL POS 1]])+1)

POS RANK 2 =IF([@POS2]=””,””,[@POS2]&”-“&(COUNTIFS([POS],[@POS2],[SGP OVER REPL POS 1],”>”&[@[SGP OVER REPL POS 2]])+1))
POS RANK 3  =IF([@POS3]=””,””,[@POS3]&”-“&COUNTIFS([POS],
[@POS3],[SGP OVER REPL POS 1],”>”&[@[SGP OVER
REPL POS 3]])+1))
ALL RANKS =[@[POS RANK 1]]&IF([@[POS RANK 2]]=””,””,”, “&[@[POS RANK 2]])&IF([@[POS RANK 3]]=””,””,”, “&[@[POS RANK 3]])

The ALL RANKS column is simply concatenating or stringing all the POS ranks together with a comma and space in between each position.

Here’s an example of what these columns will look like once you’re done.  You can hide the POS RANK 1, POS RANK 2, and POS RANK 3 columns once you’ve completed the steps above.  MATT_CARPENTER_BUSTER_POSEY_CARLOS_SANTANA

If You Want To See Dollar Values For Multiple Positions

If you made it this far and you’ve followed the approach to calculating dollar values for players, there’s not much left to do.

Add columns for $VALUE2 and $VALUE3.DOLLAR_VALUE_COLUMNS

You might recall that we set up a named cell that stores the value representing the dollar value of each hitter standings gain point.  It’s cell B19 from the “Settings” tab of your spreadsheet.  You can see an image below.

We named this cell “Dollar_Value_Per_Hitter_SGP”.DOLLAR_VALUE_PER_HITTER_SGP

The calculation in cell B19 is probably showing an unusual number at this point because we shredded some of our calculations when we started adding columns and changing formulas of existing columns.  The revisions needed are shown in the table below too.

The formulas for $VALUE2 and $VALUE3 are to multiply the SGP OVER REPL for each position (2 and 3) by the named cell.

Just like in some of our other formulas, these will result in errors for players that don’t play multiple positions, but we can work around this by wrapping that simple formula in an “IFERROR” formula.

Column Name Formula
$VALUE2

=IFERROR([@[SGP OVER REPL POS 2]]*Dollar_Value_Per_Hitter_SGP,””)

$VALUE3 =IFERROR([@[SGP OVER REPL POS 3]]*Dollar_Value_Per_Hitter_SGP,””)
USEFULSGP =IF([@RANK]<=Total_Hitters_Drafted,[@[SGP OVER REPL POS 1]],0)
RANK =RANK([@[SGP OVER REPL POS 1]],AB:AB)(where column AB is SGP OVER REPL POS 1)

What Else Can I Help You With?

Whew.  That was a bit of a workout, but a good subject I think worth digging into.  If you didn’t quite follow everything, there’s a link to download an example file below.

Even if you didn’t find that this information applied to you, I challenge you to let me know the other questions you have or difficulties you’re facing.  Use the Contact Me tab at the top of any page on the website or leave a comment below.

Stay smart.

Example Download File:  Displaying Multiple Positions.xlsx

Now in Amazon – Using Standings Gain Points To Rank and Value Players


Analyzing the Last Five Years of Rotisserie Baseball Drafts

$
0
0

How many of the top hitters and pitchers at the end of the year were actually drafted? How many of the top hitters and pitchers were not drafted and were picked up during the season?  Were hitters or pitchers drafted more accurately?  What is the dollar value earned by the players that were picked up during the season?  Is there a position of hitter that’s more reliable than other positions?

Have you ever asked yourself draft analysis questions like these?

What follows is a five year analysis (with colorful graphs and an enormous Excel file!) of how accurately our projections in the preseason depict what has actually happened at the end of the season. How well we drafted.  What positions yield the best returns.  What positions offer the most free loot.  And more.

Assumptions You Should Know

A number of the graphs depend on dollar value earnings for the “top 168″ projected hitters or “top 108″ projected pitchers.  The dollar values are calculated using the approach documented in “Using Standings Gain Points to Rank and Value Fantasy Baseball Players” assuming a 12-team league, $260 team budget, 14 hitters (C, C, 1B, 2B, SS, 3B, CI, MI, OF, OF, OF, OF, OF, UTIL), 9 pitchers, and a 70%-30% hitter-to-pitcher allocation.  That’s a total of 168 hitters and 108 pitchers.

These top projected players in the preseason were determined using Steamer’s preseason projections for that season (I downloaded the historical projections here).

I suppose using ADP results or expert rankings from the given year might give a better picture of the players that were actually drafted, but then you get into the question of what’s good ADP data, where to get it, what experts to use, league differences, lineup differences, etc.

To Be Clear…  The Goal of this Study

The goal of this is not to measure the accuracy of particular experts.  It is to determine which positions can we draft and get the most return on our investment.  To some extent this is a review of Steamer’s accuracy, but that’s also not my intent.  It’s my understanding (tell me if I’m wrong) that there are not significant differences between the top projections systems.  So whether we were looking at PECOTA, Steamer, or Marcel projections, we would see similar results.

How Much of a Return Do We Get For Drafting HItters vs. Pitchers?

People have long been telling us to, “Load up on hitters early in the draft”.

“Don’t overspend on pitching.”

“Wait on pitching until most teams already have one.”

I’ve always heard these things.  They sounded right.  But I can’t say I’ve ever seen the data to support it.

In looking at the chart below it is very clear that we are much better at identifying the top hitters than the top pitchers.  The top 168 hitters in the preseason provide about 70% of the dollars earned at the end of the season.  For pitchers, it’s more in the neighborhood of 40%.

With results like that it’s very easy to see why the hitter-pitcher split is not 50-50.

Hitters are safer investments than pitchers.  We’ve always been told this, but now you can see it.  And things have not changed in the new era of pitching that we’ve been seeing the last few years.  If anything, the gap seems to have widened.

Hitter-Pitcher-Draft-Returns-With-Losses

In a draft and hold environment, the return on investment for drafting hitters fluctuates between 65% and 80%. The return on pitchers is much lower, falling roughly between 30% and 50%.

If you’re curious about the math on this, read this paragraph.  Otherwise, skip on over this one.  Going back to our assumption of a 12-team league where each team has a $260 budget, that gives the league $3,120 to work with.  If 70% of that is earmarked for hitters, that means $2,184 of value is allocated to the pool of 168 hitters and $936 is designated for the 108 pitchers.  The 70% return on hitters means that we projected who the top 168 hitters would be in the preseason and by the end of the season those same 168 hitters were worth about $1,530 ($2,184 * 70%).  So about $654 of value came from hitters that were not drafted.

Why Does That Chart Say “(includes losses)” In The Title?

The calculations above were done in a “draft and hold” scenario, meaning if Cliff Lee is projected as a $20 player prior to the 2014 season and his end of season earnings are a negative $9, he returned a value of -$29.  These “losses” can really affect the calculations.

You’re probably thinking, “But not all pitchers (perhaps none) are held on a roster when they’re having a really bad season”.  And if a pitcher suffers a season ending injury, they would be cut immediately and also would not end with negative earnings for the season.

A bit further down you’ll see charts for scenarios where losses are eliminated.  So instead of negative $9 Lee comes in with just a $0 return.  

This scenario of Lee breaking even is a little too optimistic.  If a pitcher is struggling and on his way to a negative earning season, it can take weeks or months for us to make that determination.  As that time goes by you’ll be accumulating some of those negative earnings on your team.

The true return lies somewhere in between the “no losses” and “includes losses” lines.

How Much of a Return Do We Get at Each Position of Hitters Vs. Pitchers?

We’ve seen that hitters as a group are a greater investment than pitchers.  But what about the individual hitter positions?

Hitter-Position-Pitcher-Draft-Returns-With-Losses

Breaking the hitters into different positions, you see a lot of fluctuation in returns, but it’s very clear that drafting any type of hitter is expected to result in higher return on investment than drafting a pitcher.

There’s a lot going on here, but it’s very clear that any position of hitter is a safer investment than a pitcher.  Outfield appears to be a very consistent producing position. Rarely the highest in a given season, but steady.  SS and 3B fluctuate wildly.

1B might be the overall lowest returning position of all.  Prince Fielder, Joey Votto, Chris Davis, Paul Goldschmidt, Billy Butler, Eric Hosmer, Brandon Belt, Mitch Moreland, Kendrys Morales, and Adam Lind really dragged the return down in 2014, while Albert Pujols, Adrian Gonzalez, Joey Votto, Mike Napoli, and Lance Berkman disappointed in 2012.

We’re a long ways from the glory days of Todd Helton, Jason Giambi, Jim Thome, Carlos Lee, Paul Konerko days when 1B seemed like a lock every season.

But We Don’t Have To Draft and Hold.

As I mentioned above, very few of us play in draft and hold leagues.  We can replace struggling or injured players that appear to be negative earners.

There’s no way to measure exactly when a player will be dropped.  The best we can do is to remove the possibility of a player returning negative earnings.  A replacement level player would have earnings of $0.00.  So assigning a value of $0 to players that would otherwise have negative earnings makes some sense.  If a struggling player is performing at about the same level as available free agents, we would probably hold on to them and hope they can turn it around.

When we remove the possibility of losses, the gap closes.  Pitchers come much closer to the results from hitters.

Part of the reason pitchers return less than hitters is their greater likelihood of suffering season-ending injuries. A pitcher having Tommy John surgery in the first month of the season will surely have negative earnings for the year. But even if we place a restriction that pitcher cannot have negative earnings, they still don’t return as much value as hitters.

Splitting all hitters into separate positions, pitchers are not usually the worst performing position in any given year.  But unfortunately pitchers do look like the worst performing investment

When the group of all hitters is broken into different positions, pitchers are not the lowest performing group each season, but they are still the lowest performing group overall (although outfielders are surprisingly close!).

 The Truth Lies Somewhere in the Middle

We don’t play in draft and hold leagues and there’s not a magic fairy that tells us exactly when to drop a player before he starts earning us negative return.  The actual return we can earn for a hitter lies somewhere between the blue lines below.  The actual return for a pitcher lies somewhere between the red lines.

RETURN-HITTERS-PITCHERS-BOTH

If we place the “no losses” returns on the same chart as the “with losses” returns, pitchers reap a larger benefit than hitters do. But it’s important to keep in mind that not every negative earning pitcher is due to a season ending injury. Some negative earners are easily dropped because of an injury while others just perform poorly and struggle all season long.

How Much of the End of Season Earnings Were Acquired During the Draft?

Let’s shift gears a bit.  Of all the earnings for each position at the end of the year, how much of them were obtained through the draft?

You can see in the chart below that we’re very efficient at drafting all of the earnings from 1B and C.  My guess is that’s not a function of us being better at projecting 1B and C.  It’s more due to the fact that these positions have a greater percentage of MLB starters drafted than other positions.  In a two-catcher league, 24 out of the 30 starting catchers are drafted.  First base is similar in that players are drafted to player first 1B, corner infield, or the utility spot.

So even though we saw above that 1B provides a pretty low return (when we allow for negative earnings), we still end up drafting nearly 90% of the value at 1B.  This implies that there are not a lot of valuable free agent pickups that come along at 1B.

Hitter-Position-Pitcher-Percent-of-Dollar-Values-Drafted

We’re very good at identifying and drafting the value from the 1B position, meaning little value can be acquired once the season starts. We are less skilled at identifying 2B, OF, and 3B. We’re worst at drafting the top pitchers. It is easiest to find valuable 2B, OF, 3B, and P once the season starts.

How Many of the Top Earning Hitters and Pitchers Were Drafted?

Forget about earnings and dollars for a minute.  How many of the top 168 hitters at season’s end were drafted?  How many of the top 108 pitchers?

Hitter-Pitcher-Percent-of-Players-Drafted

Acquiring value is what ultimately leads to success, but what about the actual number of players that are drafted? If we draft 168 hitters, approximately 70-75% (118 – 126) of them will be the “top earners” for the year. Of the 108 drafted pitchers, approximately 60% (65) of them will be among the “top earners”

It’s starting to look like any way you slice it, hitters are a more sound investment.

How Many of the Top Position Players and Pitchers Were Drafted?

Let’s break hitters apart into different positions.

Hitter-Position-Pitcher-Percent-of-Players-Drafted

This chart breaks apart the “Hitters” grouping from the graph above. You can see we draft about 70% of the top earning OF for the season (usually 64-68 OF will be drafted in the top 168), or 45-48 actual players. 3B appears to be a volatile position. Some years we are good at identifying the top earners and others we’re not.

This does support the theory I presented above that we draft more 1B and C than other positions so we have a greater chance of getting more of the top players at the position right.  The more times you toss a coin, the more heads you’re going to land on.

Another thing that jumps out at me is the significant dip for 3B in 2012.  That year we actually did a good job of identifying 3B in the preseason.  Miguel Cabrera, Adrian Beltre, David Wright, and Ryan Zimmerman all earned more than projected.  Chase Headley was pegged as the 11th best 3B and we caught lighting in a bottle when he earned $27.  But we did not see Mark Trumbo, David Freese, Kyle Seager, Pedro Alvarez, Chris Johnson, or Todd Frazier coming.

It’s finally dawned on me why the OF line is so stable in all of these graphs.  It’s simply a numbers game.  When we draft 60-70 OF each season, that denominator stabilizes because of the larger sample of players at that position.  If we were only drafting 14-18 like at 3B, SS, and 2B, the lines would be subject to much greater fluctuation.

How Many Valuable Players Come Into The League Each Season?

This graph is the exact inverse of the  “% of Final Top 168/108 Players Drafted” chart above, but I think it’s helpful to view it from a different perspective.  Instead of thinking, “How good at we are identifying the good players in the preseason?”, we might flip it around and wonder, “How many good players are going to be available through free agency once the season starts?”.

This is the concept of “free loot” that I learned of from Peter Kreutzer’s Rotomansguide website (which I highly recommend checking out if you like thinking of the concepts in this post).

Free-Loot-Not-Drafted

Instead of thinking, “How good at we are identifying the good players in the preseason?”, we might flip it around and wonder, “How many good players are going to be available through free agency once the season starts?”.

 No surprises here.  More pitchers become available through free agency.

Take a serious minute to think about what these numbers mean.  Of the nine pitchers you draft, four of them you’ll be completely wrong on.  They are not even going to be in the top 108 pitchers at seasons end.  Five right.  Four wrong.

Of the 14 hitters on your team, you’ll probably only be wrong on four of those too.  Ten right.  Four wrong.

Free-Loot-Not-Drafted-Positions

What percentage of players at each position are not drafted and end up being available to acquire during the season?

Percentages can be deceiving at times.  So how about the actual number of undrafted players that end up in the top earners.

NUMBER-HITTERS-PITCHERS-NOT-DRAFTED

Percentages are great. But it can be helpful to talk actual numbers. Somewhere between 40-50 positive earning hitters and pitchers will be available through free agency. Keep in mind that this makes pitchers “more likely” to become available because only 108 pitchers are rostered while 168 hitters are.

And by position.

POSITIONS-FREE-LOOT

Somewhere in the neighborhood of 40-50 free agent pitchers will earn positive value during the season. Approximately 20 OFs, five C, and five SS will appear.

I’m not sure there is much to take from this.  But I figure I’ll show it to you anyways.  I think this is largely due to the function of us drafting 108 pitchers, 60-70 OF, and 14-20 players at other positions.

The Data

Unfortunately the Excel file is so large that I can’t post it for you to view online, but you can download the file here (SGP Reliability Research for Download.xlsx).  There are tabs for projections and actual stats for hitters and pitchers for each season from 2010-2014.  The “SGP Charts and Summarized Data” tab summarizes the returns for each position, each year, and also contains all the graphs above.  The “Historical SGP Results” tabs summarize the projection and actual results for each hitter from 2010-2014.Excel_File_Tabs

Conclusions and Takeaways

There is a lot of information to take away from this.  But I now have very easy to understand visual proof as to why you are best off delaying on drafting pitchers.

There’s also no truth to the rumor that because pitching has become more dominating in recent years that you need to draft it any earlier.  Pitching comes out below hitting in nearly every measure in every season.  Even in the “pitcher’s era” we find ourselves in now.

I also realize I need to treat hitters and pitchers with different levels of patience in the season.  Looking back, I’ve found myself trying to practice high levels of patience with underperforming pitchers.  Given the higher level of turnover in the top 108 pitchers than the top 168 hitters, it’s fine to be less patient with pitchers and more patient with struggling hitters.  We’re wrong about four out of every nine pitchers!

Why It’s Important to View Things in Terms of Dollar Values

We don’t all play in auction leagues, but there is still value in converting player statistics into dollar values.  If we don’t convert player statistics into some singular number to rank players, the analysis above is not possible.  We could just use each player’s standings gain points, but there’s something more meaningful about using dollars.  And over time we’ve come to have an understanding of what a $30 or $40 season means.

What Is Left To Be Done?

I’ve answered a lot of questions above.  But this has led me to more questions.  So the return on ALL hitters is about 70% and the return on ALL pitchers is in the neighborhood of 40%.  What’s the return on all $30, $20, and $10 hitters?  Pitchers? What about $20 1B versus $20 OF?  How does the typical $10 SS pan out when compared to the $10 pitcher?  What about 30 year old hitters versus 27 year old hitters?

I’ll get there some day…

What Did I Miss?

Did you see something interesting in the charts above that I didn’t point out or comment on?  Let me know in the comments below.

What Do You Want To Know?

What questions were popping up in your head as you read this?  Let me know in the comments and I’ll attempt to find the answers.

Thanks for reading.  Stay smart.

How Does a Player’s Age Affect Draft Return?

$
0
0

A few weeks back I took a closer look and analyzed the last five years of preseason Steamer projections (what I’m using as my best approximation of the “draft value” of each player heading into the season) and compared them to the actual end of season dollar values earned by those same players.

One of the glaring omissions in that article was some kind of analysis by age.  Are there certain age groups that might be undervalued?  Better yet, are there certain age groups of hitters we can take advantage of and a separate age group of pitchers we can jump on?

If we are trying to decide between a $20 pitcher who’s 23 years old or a $20 pitcher who’s 33 years old, who should we choose?

Quick Reminders

I’d highly recommend reading the first article that started me down this road.  There’s a greater explanation of the approach used.  But for a quick reminder… the dollar values are based on a standard 12-team league using traditional rosters (2 catchers, 14 hitters, 9 pitchers) and the standings gain points approach.

I also calculate return “including losses” and “without losses”.  The best way to think about this is with a pitcher suffering a terrible injury in the first month of the season.  Being injured that early, regardless of how good the pitcher is, will result in negative earnings.  But the “benefit” of an injured pitcher is that you can immediately drop them and not suffer any of those negative earnings.

The flip side of that coin is with a struggling pitcher.  You may decide to stick with a struggling pitcher for weeks or months, hoping for them to turn it around.  In this scenario you are saddled with many of the negative earnings for that player.  So the actual “return” on players lies somewhere between the “including losses” and “without losses” results.

Draft Results By Player Age

Take a look at the “Including Losses” and “Without Losses” charts below.  Does anything jump out at you?

RETURN_BY_AGE_WITH_LOSSES

RETURN_BY_AGE_NO_LOSSES

 

The first thing that jumped out at me is that crazy dip and then spike for 42 and 43-year old pitchers.  That’s Mariano Rivera blowing out his knee shagging fly balls and then coming back a year later to dominate baseball.

We can’t really use that observation to help us.

Young Pitchers Provide Nice Returns

The next thing I notice is that young pitchers really provide a nice return.  Pitchers from the ages of 22 through 26 actually provide better return than hitters of the same age.  It’s really only during that window where pitchers perform better.

When I dive into the players in that 22-26 year old window I see names like Clayton Kershaw (duh), Julio Teheran, Craig Kimbrel, Chris Sale, Madison Bumgarner, Matt Harvey, Mat Latos, Jeremy Hellickson, Patrick Corbin, Daniel Hudson, Aroldis Chapman, Felix Hernandez, A.J. Griffin, David Price, Jordan Zimmermann, Hyun-Jin Ryu, Yu Darvish, Homer Bailey, Johnny Cueto, Matt Cain, Jon Lester, Cole Hamels, and Gio Gonzalez.

I don’t know how those names strike you, but I see a lot of guys in there that I feel like burst onto the scene as young talented pitchers that had elite seasons.

But I have to warn you of the other thing I noticed while digging through the individual seasons.  A lot of negative earning seasons, and even some huge busts, pop up for pitchers in this same age bracket.

In fact, I think the returns we see here are a bit misleading.  I don’t think this suggests that you go out and invest in highly priced young pitchers.

For every huge “burst onto the scene” type season I saw (where they had a low preseason projected dollar value but a very high actual end of season dollar value), I saw a lot of busts (high preseason dollar value and low or negative actual earnings).

If anything, I think this confirms the approach that many of us already use.  Stock up on hitters early.  Take an ace somewhere in the first few rounds and pray he stays healthy.  Then take shots at young, promising, talented, high-upside arms later in the draft.  It seems like that approach is working.  That’s what is driving the high returns for 22-26 year old pitchers.  Those late lottery tickets that pay off.

Aging Hitters Are Something to Target

My next observation is with the big spike in hitter returns at ages 34 and 35.

When I drill down into the individual seasons that caused this spike I see names like Mark Teixeira, Coco Crisp, Matt Holliday, Albert Pujols, Michael Cuddyer, Adrian Beltre, Chase Utley, Victor Martinez, Aramis Ramirez, Jayson Werth, David Ortiz, Nelson Cruz, Jimmy Rollins, Lance Berkman, Paul Konerko, and Carlos Beltran.

I think the take away here is that we don’t need to shy away from guys that are nearing the age of 35.  If I had to guess, there’s even more of a profit opportunity here than just what you see on these graphs.

Remember that I’m using Steamer’s projections as my best estimate of the “fantasy community’s” feelings about players going into each season.  That’s far from a perfect measure.  I do think it’s a reasonable estimate.  The fantasy baseball community is a sharp bunch and if a credible projection system sees big things for a player, you can bet the actual draft results will follow suit.

But back to my point that I am using a projection system and I don’t have actual draft data included in this analysis.  I would guess that fantasy owners are quicker to give up on or avoid 34 and 35-year old players than an objective projection system model is.  

So if this analysis is telling us that projection models might be giving up on older players too soon and if we think fantasy owners would be even more likely to give up on them, there is an opportunity here.

How Many PLayers Did I Look At?

Keep in mind that this covers five years of data.  Going with my assumptions of 168 hitters and 108 pitchers drafted, that’s a total of 840 hitters and 540 pitchers.

My actual data is showing 842 hitters and 538 pitchers.  I’m not sure what the issue is but I think it’s players named “Chris Young” that are screwing things up.

Anyways, here is how the ages actually break down so you know the number of observations included at each age.  Looks like a lot of pitchers get to 30 and hang it up.

PLAYERS_BY_AGE

 The Data

Here’s a spreadsheet containing all the data used to make the charts above.  It contains all my projected and actual dollar value calculations for players from the 2010-2014 seasons.  You can filter or sort the data as you wish.  I’ve also pulled out two separate tabs to show just the hitters aged 34 and 35, as well as pitchers aged 22 through 26.

Conclusions

What I saw when looking at pitchers aged 22 to 26 is a good reminder that you can never view this information in isolation and you often can’t just look at the “big averages” to get the full story.  Those high returns are not from drafting $25 pitchers that end up earning $30.  It was from drafting $1 – $8 pitchers, some of which end up earning $15 – $20.

All of these graphs and charts are simply nuggets of information that are good to know. Learning these things and continuing to study and seek advantages over our league mates all goes in to helping us make better and more informed decisions over the long haul.  You can’t simplify fantasy baseball down to short rules like, “target 27-year old hitters”.  It’s a constant ebb and flow of complicated decisions.

Hopefully these little nuggets help you in the long run.

How to Use Excel to Determine Replacement Level

$
0
0

Who is the replacement level shortstop in a 12-team league that starts one shortstop and one middle infield position?

We know there will be at least 12 shortstops drafted in this scenario.  But will there be 15, 16, 17, 18, or more drafted?  And where does that put the replacement level shortstop at?

This concept of replacement level has always been a little bit of a problem for me.  In my original series about ranking players, I mentioned that in this 12-team scenario, that we would have 36 combined 2B and SS drafted, and to simplify things we could assume that would be 18 second basemen and 18 shorststops.

But that’s not a precise enough answer.

If we’re trying to squeeze every drop of value from our drafts, we should determine precisely who the replacement level player is at each position.  After all, replacement level is a huge driver in the calculation of a player’s value.

So we need to get it right.

What You Can Expect

I’m going to show you a system I’ve started using that will help you identify:

  • The starters at each position (e.g. top 12 1B, top 60 OF, etc.)
  • The corner and middle infielders (the next 12 best 1B/3B and 2B/SS)
  • The 12 utility players (the next 12 best players at any position)
  • The replacement level player at each position

The system is very easy to do.  I was forced to come up with it out of necessity when I was working on my recent analysis of the past five years of draft results.  For that post I had to calculate projected and actual dollar values for each of the last five seasons. So I needed a fool-proof method for determining replacement level 10 times in a short period of time and I also wanted to be able to come back to each set of data and easily be able to tell what group each player fell into.  Thus the color coding.

Replacement_Level

Here’s a little taste of what we’re going to do. I’ll show you a process that will take you only a few minutes to color code and clearly document players into groups of Starters, CI/MI, UTIL, and Replacement Level.

Excel Features You Should Know

There are three pretty neat features of Excel that I used during this process that you may not be familiar with, and they might be able to save you a lot of time:

Format Painter and Double-Clicking Format Painter

Format Painter

Double-click on Format Painter to “lock” it in place. Hit “ESC” when you’re done.

If you aren’t familiar with the Format Painter at all, you’re going to get two tips here. Format Painter will copy all of the formatting from your active cell and paste it into one cell of your choice.

To use it, put select the cell you want to copy the formatting from.  Click Format Painter.  Then click the cell you want to format (paste the formatting to).

The thing many people don’t realize is that you can double-click on Format Painter. When you do this, it “locks” the formatting and you can then click on MANY different cells.  Just keep clicking and it will continue to paste the formatting.  When you’re done formatting, just hit the ESC key to exit.

We’re going to use this to easily copy the shading to a bunch of cells without having to shade cells one at a time and without having to go back to the paint can icon for 168 different players.

Filtering By a Color

Filter_By_Color

I recently learned about this one myself.  You can filter and sort data by color.  When you have the filtering bars active (or if you’re using Tables, like I commonly suggest), clicking on the drop down arrows will give you the ability to filter and sort data.

One of the options in that screen is to “Filter by Color”.

This is very helpful for this example.  At the end, when we’ve placed all our players into groups, we want to get all the Replacement Level players together so we can easily transfer their Standings Gain Points to our Replacement_Level table.  We can easily do this by filtering the data to see all the “red” players.

I can give one more practical example of when this can come in handy.  As I learn of injuries to players during the preseason or if I’m trying to track players that will start the season on the DL (maybe pitchers recovering from Tommy John that won’t be back until mid-season), I will shade these players red so I don’t draft them.  This would be a very easy way to find those injured players in your draft spreadsheet.

Or maybe you want to color code all your “sleepers”.  This would be an easy way to find that list during the draft.

Using Multiple Windows to View Different Tabs in the Same Spreadsheet

Another trick I recently learned (that’s the neat thing about Excel, even if you’ve spent the last 10 years working in it, there’s still more to learn).

VIEW_NEW_WINDOWYou can take an Excel file and open it in a second window, allowing you to look at two separate tabs at the same time.  This works really well if you have dual monitors.  Put one window on monitor A and put a second window on monitor B.  I use this for transferring the replacement level information from my hitter ranks tab to my replacement level information table.

This can also be helpful during a draft if you want to have one window for logging pitchers and one for logging the hitters being drafted.

How To Do It

Thanks for Reading

If you have questions about the video or are simply looking for advice on how to do something fantasy-baseball-related in Excel, please let me know in the comments.

If you would like to know when more “how to” Excel posts come out, be sure to register as a SFBB Insider or follow me on Twitter.

How To Calculate Projected Standings For Your Draft

$
0
0

So you’ve got a great set of projections, rankings, and dollar values.

This is great for draft preparation. But how do you take this information and use it during the draft?  Is there a way to monitor the progress of the draft and see if you’re lacking in power compared to the others in the league?  Do you need speed?  Are you lacking in strikeouts?

You don’t need to buy draft software or a special draft spreadsheet.  You can easily add a few more things to your Excel files and have a very powerful draft tool that can help you make these assessments.

I wrote about how to track drafted players in a spreadsheet last January.  If you haven’t read that yet, please do.  The instructions that follow pick up where that post leaves off.

Here’s how to calculate projected standings during your draft.

Prerequisites

I’ll be using Excel 2013 to create the projected standings.  I think you’ll be able to follow a very similar process in Excel 2010 and Excel 2007.

Teams_DraftedAs I mentioned, this post assumes you have already added the named range and data validation drop down listing to select the team that has drafted a player.

This is how you will be tracking the draft selections during your draft.  As each player is taken, you’ll locate them on your rankings/projections lists and select the team that drafted them.

I realize it’s a little early to be thinking about draft spreadsheets, but it’s top of mind for me now because I am participating in a mock draft that was coordinated by Bryan Curley of BaseballProf.com.  I wanted to see how the draft is going and how teams stack up after the first few rounds.  Not to mention you can set this up in your spreadsheet now and have it read to roll when we finally get closer to the season.

You can see the list of those participating in the mock draft in image above.  As selections are being made in the draft, I’m marking them off in drop down I created in the “TAKEN” column.TAKEN

 

You may want to make several “fake” selections in your Excel file, just to have some data to work with.  You will want to test that your projected standings are working prior to the draft…  That’s the last thing you need to be monkeying on draft night.

Excel Functions and Features We’ll Be Using

There are a variety of ways to do this, but I’ll show you how to use a pivot table in this example.  If you’ve never created a pivot table before, don’t worry.  They’re a lot easier to work with than most think.

The pivot table will help us to quickly accumulate every team’s offensive stats (R, RBI, HR, SB, BA).  Once we have the statistics accumulated in one nice table, we’ll then use the RANK formula to calculate the standings.

Pivot Tables

Pivot tables are very useful for taking a lot of lines of data (like we have on our “Hitter Ranks” tab) and combining or summarizing that data into more easily or digestible parts.

For example, your listing of all hitters and their projections is probably hundreds of rows of information.  If you were to select 14 hitters for each of the 12-teams in your league, that would be 168 hitters.  Sorting all of those players into teams and then calculating the totals for five different categories for each team might seem like a daunting task.

The good news is that creating a pivot table can be done in only a few clicks of the mouse and within minutes you can have a table that looks just like this:

Pivot_Table_Projected_Standings

Rank (or RANK.EQ) Formula

These two formulas are essentially the same; however, RANK was discontinued in Excel 2010 and was replaced by RANK.EQ.

If you’re using Excel 2010 or later, either one should work. But if you are using Excel 2007 or earlier, you must use RANK (RANK.EQ didn’t exist then).

These formulas will interpret a list of numbers and return the ranking of a specified item in the list.  We can use this to analyze the entire list of player SGPs and give us a ranking for each player (e.g. Mike Trout is #1).

The formulas require three inputs:

RANK(Number, Ref, Order)

RANK.EQ(Number, Ref, Order)

  1. Number – This is the specific number you want ranked. If your goal is to figure out where your team ranks in total home runs, you would select the individual cell containing your team’s projected home runs.
  2. Ref – This is the range of data, or the list of data, to calculate the ranking from. Continuing with the total home runs example, you would select the entire listing (or range) of projected home runs for all teams in the league.
  3. Order – Technically this is not a required part of the formula, but using it can make our lives a little easier. If you leave this part out of the formula, Excel would return a “1” for the team with the most home runs and a “12” for the team with the least home runs. You can see we don’t really want to know our “Rank”. We’re looking for “Rotisserie Points”. We would like the top team in home runs to show a “12”. The “Order” parameter in the RANK function is looking for a zero or a one. If you leave it blank or put in a zero, the RANK function gives a “descending” ranking. This is the typical ranking where “#1″ is the best or highest possible ranking. We are looking for an “ascending” ranking, where a “12” is the best result. To do this, just put a one in for this piece of the function.

Step-by-Step Instructions

Don’t be intimidated by the number of steps here.  You should be able to perform them pretty quickly.

Step Procedures
1. To guard against theoff chance that something goes wrong, create a backup copy of your projections/rankings spreadsheet.Do this by performing a “Save As…” or copying your existing file and putting another copy somewhere for safe keeping.
2. Click on a piece of data on your “Hitter Ranks” tab, where you have the projected stats for each player and where you are tracking the drafted players.HITTER_RANKSThen click on the “Insert” tab.  Finally, click on the “Pivot Table” button.INSERT_PIVOT_TABLE
3.

The “Create PivotTable” menu will pop up.  If you’ve set your rankings up in a table (another reason I love using tables!), Excel should recognize this and select the whole table for the “Table/Range:” input.

If Excel isn’t recognizing your data, click the button on the “Table/Range:” input and select your data using your mouse.

CREATE_PIVOT_TABLE

Choose the option to create the PivotTable on a “New Worksheet”.

Click “OK”.

 

4.

 You should now see the placeholder for a PivotTable.EMPTY_PIVOT_TABLE

Right-click on the newly created sheet and choose to “Rename” it. Call this new tab “Projected Standings”.

RENAME_SHEET

5.

PIVOT_TABLE_FIELDSToward the right of your screen, you should see the list of all fields in your data.

Then toward the bottom right of the screen you’ll see four areas labelled “FILTERS”, “COLUMNS”, “ROWS”, and “VALUES”.

Setting up a Pivot Table is as easy as dragging fields into one of those four areas.  It’s simply clicking and dragging to build a table to fit what you want to see.

6.

At this point, it’s helpful to have a vision of what you’re trying to produce. We all know what the rotisserie standings look like:

Pivot_Table_Projected_Standings

Now it’s simply an exercise of clicking and dragging items.  We want our “ROWS”  to be the team drafting the player.  That information is stored in the “Taken” column of my example file.TAKEN_FIELD

To accomplish this, click and drag the “TAKEN” field from the “PivotTable Fields” section and drop it onto the “ROWS” area.

7. If you have populated any “fake data” in the “Taken” column, you will see those names populate into the Pivot Table.ROWS_PIVOT_TABLE
8.

FILTER_UNDRAFTED_PLAYERSNotice how the listing of teams also has a “(blank)” item?  This would represent any player with nothing in the “Taken” column.  Or undrafted players.

We don’t want that messing up our standings data, so we need to filter it out.

Click on the drop down arrow in the cell that says “Row Labels”.  This will show you the filtering menu you may be familiar with on the other tables we’ve worked with in the past.

Scroll down to the end of the listing and uncheck the “(blank)” item.

Click “OK”

 

9. Think again about what our projected standings will look like. We want the sum of all AB, H, HR, R, RBI, SB, and a calculation of Batting Average to appear.Pivot_Table_Projected_StandingsTo get the sum of these statistics, we want to drag them from the listing of all fields and drop them onto the “VALUES” area.VALUESWhen you drop them, you should see Excel label them as “Sum of [category]” (for example, “Sum of AB”).  If you see “Count of [category]”, be patient.  We’ll fix that shortly.

Click the drop down arrow on the “Sum of [category]” label and choose the “Value Field Settings…”
VALUE_FIELD_SETTINGSThis screen is where you can customize the description of the column (“Sum of AB” is not a sexy column name) and change from “Count of” to “Sum of”, if necessary.VALUE_OPTIONSNote that you cannot name the column “AB” because that’s the name of a field in the table.  That’s why I labelled mine “At Bats”.  Sure beats “Sum of AB”…

10. Repeat step 9 in order to add H, HR, R, RBI, and SB.

Then let’s clean up the formatting.  Use your mouse to select all the numbers in the table.SELECT_DATACOMMA_STYLEThen click the “Comma” number style and decrease the decimals two times (to remove the decimals).DECREASE_DECIMAL

11. The last piece of information we need is batting average, which you probably realize is a calculation of the “At Bats” and “Hits” columns we just added.To add a calculated field, first select any cell within your Pivot Table. Then notice the “PIVOTTABLE TOOLS” menu that appears on the Excel ribbon.

If you’re in Excel 2013, click on the “ANALYZE” tab (I believe it’s “OPTIONS” in Excel 2010).  Then click the “Fields, Items, & Sets” drop down.  Finally, click the “Calculated Field…” option.CALCULATED_FIELD

12. Once the “Insert Calculated Field” dialog pops up, replace the “Name:” field with “Average”INSERT_AVERAGE_FIELDIn the “Formula:” field, replace the “=0″ with our calculation of batting average, “=H/AB”.  Instead of typing the formula, I recommend double-clicking on the field names for “H” and “AB” (you can type the “=” and “/”).AVERAGE_CALCULATIONMake sure to click “Add” when you’ve given the name and formula calculation.
13. Excel added this as a “Sum of Average” column for me.  So again, I need to go into the “Value Field Settings…” for this and rename it to “Batting Average”.FIX_SUM_OF_AVERAGEThen select the values in this column and increase the decimals three spots so it looks like an actual batting average.INCREASE_DECIMALS
14. We’ve created our vision!  But you’re probably thinking, “That’s a projected statistics table, but it isn’t showing me the projected standings…”We will now add a second block of formulas below this table to convert the statistics into “standings”.

But first, we need to adjust a setting on the Pivot Table we just created.  Use your mouse to select any cell in the Pivot Table and then click on the “PIVOTTABLE TOOLS>ANALYZE” tab (or PIVOTTABLE TOOLS>OPTIONS” in Excel 2010).ANALYZEOnce on this tab, click on the “Options” drop down menu all the way to the left of the ribbon (underneath the “PivotTable Name” area). Make sure the “Generate GetPivotData” option is UNCHECKED.

There may be ways to get this to work with it checked, but I find it confusing and don’t like the way things work when this is checked.GENERATE_PIVOT_DATA

15. Copy the headers from the Pivot Table for “Home Runs”, “Runs”, “Runs Batted In”, “Stolen Bases”, and “Average”.COPY_HEADERSPaste the headers below the Pivot Table.  Leave a column to the left of the headers (I pasted them in column B, leaving column A open).PASTE_HEADERS
16. Now copy the team names from the Pivot Table (skip the “Row Labels” and the “Grand Total” items). Paste the team names along the side of the headers pasted in the last step.STANDINGS_STATISTICS
17.

INSERT_FUNCTIONYour Pivot Table may be positioned slightly different than mine. I’m now going to add a formula to cell B20 (in the image above). Add your formula so that it will calculate the “Home Runs” for the first team.

After you’ve selected the cell, click the “Insert Function” button on the Excel toolbar.

Search for the “RANK” formula.  Select it from the list and hit “OK”.RANK_FORMULA

18.

Again, your Pivot Table may not be located exactly where mine is. Here’s my exact location so you can translate the formulas to the location of your Pivot Table.TABLE_LAYOUTAnd here are the inputs into the formula.RANK_FUNCTION_ARGUMENTSRecall from the explanation of the RANK formula, at the beginning of the post, that the “Number” argument is the specific item you want a ranking for. In this case, I want to rank the number of home runs for my team (“Bell”).  My homers are listed in cell D4, so that becomes my entry into the “Number” field.

The “Ref” argument is the range or grouping of every team’s home runs.  That range is from cell D4 to cell D15.  We will eventually be dragging this formula to all the other teams and columns in the projected standings are we are creating.  We know that the “range” for each category will always be in cell rows 4 through 15.  We don’t want that range to move as the formula is copied, so we use the “$” to convert this to an absolute cell range (D$4:D$15).

Finally, we want our ranking to be given in descending order so that the team with the most home runs gets a “12” instead of a “1”.  To accomplish this, we put a “1” in the “Order” field.

Click “OK” to accept this formula.  My completed formula (yours may differ slightly if you created your tables in different spots) is:

=RANK(D4,D$4:D$15,1)

19.

After the formula is completed, click once to select the cell containing your formula.  Then hover your mouse over the black box in the lower right corner of the cell.  You should see the cursor change to a plus sign.FORMULA_DRAGGER

Click the black box and drag it so that the formula copies to all teams in your list (TIP:  double-clicking on the black box will also copy it down to the end of the column and you won’t need to click and drag).

DRAG_FORMULA

Look over your rankings to make sure they seem appropriate.

ALL_HOME_RUNS

 

Then click the black box again and now drag it to the right, in order to copy the rankings formulas to each stat category.

ALL_RANKINGS

20.

 The final step is to calculate the total points for each team.  Create a “Total” column header next to the “Batting Average” column.

Below this column header, use the “SUM” formula to add across for each team. In my specific example, the formula for the first team is:

=SUM(B20:F20)

TOTAL_COLUMN

21. Copy this formula down (using the black box).  You’ve now got projected standings (for hitters at least).DRAG_TOTAL
22.

The last thing to keep in mind is that Pivot Tables do not automatically update like most other Excel formulas. If you continue to mark additional players as drafted, you won’t see the updated standings immediately.

To update a Pivot Table, right-click on any cell inside the table and click the “Refresh” button.REFRESH_PIVOT_TABLE

Wrapping Things Up

If this is your first foray with Pivot Tables, hopefully you’ve realized “they’re not that bad”.  They intimidated me for a long time, but once you get the hang of it, it’s very easy to find interesting information.

They could be used to calculate the effect of a trade in the middle of the season.  Or to simply view the combined effect of a multi-player deal.  If you’re evaluating a 4-for-4 trade, you could calculate the total statistics for each side very quickly.

The hardest part of this whole exercise wasn’t creating the Pivot Table!  You can do that in a few mouse drags.

The Mock Draft

The steps above will work for any draft in any season, but if you’re interested in following the results of this early mock draft as you prepare for the 2015 season, you can see the live draft room here or see the team-by-team results here.

Thanks For Reading

If you’d like more tips and step-by-step instructions like this, please sign up as a Smart Fantasy Baseball Insider in the registration box below. I won’t flood your inbox.  I send about one e-mail each month. It might include a rankings spreadsheet, a how-to article, and a summary of what’s new at the site since the last newsletter.

Or if e-mail’s not your thing, please follow me on Twitter to get notified of new postings.

Are Hitter SGPs Directly Comparable to Pitcher SGPs?

$
0
0

I recently got an e-mail from a reader of the site (thanks Brad!), asking an interesting question. He was working through creating his own standings gain points rankings and tailoring them for his custom league.

How do I bring Losses into the SGP calculation? If I do make losses a negative, how would I make the pitcher and hitter SGP numbers apples-to-apples?

You might realize that he actually has the correct answer, but it didn’t make sense at first because he wanted to keep hitter and pitcher SGP comparable.

Losses Are an Inverse Category

Losses, like ERA and WHIP, is a category where the goal is to have the lowest total. So the answer is to make the SGP factor a negative number.  If you think about how we calculate SGP factors, we’re really trying to find the slope, or line of best fit, to our historical standings data.

Stolen_Bases_SGP

Example SGP slope calculation.

Traditional categories like Ws and Ks have a line with a positive slope (slanting up and to the right on your high school math class x- and y-axis).  The higher the number of Ws on the x-axis, the more points you get in the standings on the y-axis.

The slope of a graph plotting out Losses would be downward sloping.  The more Ls on the x-axis, the lower the standings points reflected on the y-axis.

So Brad had the right answer, but he was afraid that adding in another inverse pitching category was going to destroy his ability to compare hitter and pitcher SGPs.

The Real Reason We’re Here

I realize you didn’t come here for me to take you back to basic math class.  The real question is, can you take a pitcher who is projected for 4 SGP and say he’s a better draft selection than a hitter projected for 3.8 SGP?

You Can’t!

Unfortunately, it’s not that simple. Hitter and pitcher standings gain points are not directly comparable.

Analogy time. You’re 33 years old. Have two young daughters. You’ve been saving for retirement ever since you started working, but now it’s time to get serious (<= that’s me).

You’re trying to make an investment decision between a stock that you project will earn 8% in the long run and a bond that you project will return 7% in the long run.

You go with the stock, right?

It would seem like that’s the correct choice. Even though these are two different types of investments, we’ve boiled their long-term performance down to a consistent measure in “rate of return”, right? So it’s a simple decision between 8% or 7%, isn’t it?

Not quite. A bond and a stock are two very different types of investments. The average return on stock investments over time is nearly 10%. The average bond is something like 5% or 6%. So you’re looking at an above average bond and a below average stock.

And arguably a bigger problem in comparing a bond to a stock is that you invest in these vehicles for very different reasons. It’s important to diversify an investment portfolio. Of course everyone would pour all their money into stocks, and their 10% return, if it were just that simple.

Diversification

A proper investing strategy diversifies risk and allocates your investing resources into different buckets.  Maybe it’s 60% stocks, 30% bonds, and 10% cash.

That’s exactly the strategy employed in valuing fantasy baseball players.

You’ve seen me mention the 70%-30% split, right?  That’s what we’re doing. We’re saying that we want to allocate 70% of our resources to hitting investments and 30% of our dollars into pitching investments.

There are many arguments about why the split is necessary and what the ideal split is. I am not going to go down that road too far, but some of the reasons are:

  • We draft 14 hitters and only 9 pitchers (in a standard league, at least)
  • We can better predict hitter performance
  • Pitchers get severely injured more frequently, making investments in pitchers more dangerous
  • And you can see that hitters outperform pitchers in the long run

How Do We Make Hitters and Pitchers Comparable?

So you can’t just take that pitcher projected for 4 SGP and decide he’s better than the hitter projected for 3.8.  But we need some method of deciding how to compare hitters and pitchers.

This is where converting SGPs into dollar values becomes very important.

Dollar values are not just for auction leagues.

Converting projected stat lines for every player into a dollar value allows you to make direct comparisons between hitters and pitchers because it takes the 70-30 split into account.

Taking a pitcher SGP and comparing it directly to a hitter SGP is inherently putting you at a disadvantage because you’re more or less using a 50-50 split.

How Do You Calculate Dollar Values?

At a high level, here’s how:

  • Determine the league spending budget for your league (number of teams multiplied by each team’s individual budget).
  • Determine your desired split (65-35, 67-33, 70-30, etc.) and divide the league spending budget into a hitting pool of money and a pitching pool of money.
  • Determine the total number of hitter SGPs over replacement level available
  • Determine the total number of pitcher SGPs over replacement level available
  • Determine the number of hitters to be drafted
  • Determine the number of pitchers to be drafted
  • Set aside $1 from the league spending budget for each hitter and pitcher that will be drafted (e.g. that might be $168 set aside for hitters and $108 for pitchers)
  • Calculate the remaining hitting budget and the remaining pitching budget
  • Calculate the dollar value of each hitter SGP and each pitcher SGP (e.g. remaining hitting budget / total number of available hitter SGPs over replacement level)
  • Calculate each player’s dollar value as [$1 + (the player’s SGP over replacement * value of one hitter/pitcher SGP)]

That’s a lot of things for you to determine. And again, that’s why I started this site and why I wrote “Using SGP to Rank and Value Fantasy Baseball Players”.  That bulleted list is about the best description I could ever find on the topic and I needed more explanation.

Along those lines, I somehow managed to turn that bulleted list above into four chapters and 70 more pages. So I think there were some details left out…

Just like I do in the free “Create Your Own Rankings Using Standings Gain Points” series posted on this site, I have detailed step-by-step instructions, screenshots, and example files to download in the Amazon Kindle edition of “Using Standings Gain Points to Rank and Value Fantasy Baseball Players“.

Once You Have Dollar Values…

Every decision you make becomes clearer. Whom to draft? Is this pitcher better than that hitter? Is this 2B more valuable than that OF? Which free agent to pick up? Is this trade beneficial to me? Should I keep this player or that player?

All of those answers are at your finger tips.

If you’re looking for a challenge this off season and want that kind of clarity in your decision making, converting projections into dollar values is your ticket. If you want to see a little more about what’s included in the book, click here.

One Last Thought

If you have a “how to” type question you’d like answered, please e-mail me at smartfantasybaseball at gmail dot com. I can’t guarantee I’ll have the answer, but I’ll try.

Stay smart.

How To Calculate Rankings for a Points League: Part 1 – Download Projection Data and Player ID Map

$
0
0

Welcome to the first part of a series in which we’ll go step-by-step through the process of using Microsoft Excel to calculate your own rankings for a fantasy baseball points league (as opposed to rotisserie or head-to-head rotisserie).

Whether you’re in a standard points league at a major site like ESPN or a more advanced Ottoneu league at Fangraphs, this process will help you develop customized rankings for your league.  These instructions can be used for a season-long points league or a weekly head-to-head points league.

If you’re looking for info on how to rank players for a roto league, look here.

In this first part of the series we’ll start a new Excel file and download projection information.

Why I Created This Series

Points leagues seem to be like fingerprints and snow flakes. Each one is a little different than the others. I’m a big believer that in order to be a strong fantasy player, you need to create your own rankings and dollar value calculations that are tailored specifically to the league(s) you play in.

I’ve also felt that nobody takes the time to explain exactly how to create your own rankings. If you look hard enough you might find an article that gives a quick bullet point list.  Maybe something like:

  • Download projections
  • Multiply projections by your point system
  • Adjust for replacement level
  • You’re done!

I’m going to be a little more thorough than that.

In Part 1

In this first part of the series we’ll download hitter and pitcher projections, take a look at and download player ID information, and bring all of this information into one Excel file.

ABOUT THESE INSTRUCTIONS

  • The projections used in this series are the Steamer 2015 preseason projections from Fangraphs.  If you see projections that you disagree with or that appear unusual, it’s likely because I began writing this series in December 2014, still early in the off-season.
  • For optimal results, you will want to be on Excel 2007 or higher.  Some of the features used were not in existence in older versions.
  • I use Excel 2013 for the screenshots included in the instructions.  There may be some subtle differences between Excel 2007, 2010, and 2013.
  • I can’t guarantee that all of formulas used in this series will work in Excel for Mac computers.  I apologize for this.  I don’t understand why Excel operates differently and has different features on different platforms.

Where To Get Projections

There are many solid projection systems available for download.  Some very fine projections are available at membership sites like Baseball Prospectus or Baseball HQ.

But if you’re like me, when I started out on the adventure of calculating my own rankings, I wasn’t looking to pay for something I wasn’t sure I’d be able to translate into fantasy success.  It’s great to have accurate projections, but how do you use them if you can’t take the next step to rank and value those projections?

For that reason, I’m partial to the Steamer projections.

They’re available in easy-to-use Excel downloads (specifically CSV) at Fangraphs. There are also daily rest-of-season updates, meaning on any day you can see the projections for the remainder of the season for any player.  Steamer does a good job of projecting playing time (if a player gets hurt, they try to estimate the effect on playing time).

And they’re free.

Use Whatever Projection System You Prefer

I’ll be using Steamer in this example.  But you can use the system of your choice.  Just try to pick a system that uses some form of player ID system.

What is a Player ID?

Just like you and I are identified by Social Security Numbers or employee IDs (at work), most of your major fantasy or MLB websites use some form of an ID number that is unique to each player.

Using an ID is a more reliable way of identifying a player than a simple name.  Two players can have the exact same name (think Chris Young and Alex Gonzalez) which could cause big problems when ranking players.

And players can go by different name variations (Mike and Michael, Jon and Jonathan, JP and J.P., AJ and A.J.) or even change their name (Mike to Giancarlo Stanton, Fausto Carmona to Roberto Hernandez).

Here’s a quick look at some player IDs for various systems:

Player ID Source Mike Trout Clayton Kershaw Giancarlo Stanton
Baseball Reference troutmi01 kershcl01 stantmi03
Fangraphs 10155 2036 4949
MLB 545361 477132 519317
CBS 1739608 1221725 1630093
ESPN 30836 28963 30583

If you’re wondering how to determine someone’s player ID, visit their player page on a particular website.  You can usually find the player ID in that web page’s URL.  For example, here’s Mike Trout’s MLB.com player page:

MIKE_TROUT_PLAYERID

In looking at that table above, you can see here that there is not one universal numbering system.

To alleviate this problem, I maintain a “Player ID Map” (click here to download in Excel).  The Player ID Map lists out all “fantasy-relevant” players and their ID for each of the major systems (Fangraphs, Baseball Reference, Baseball Prospectus, Yahoo, ESPN, etc.).

PlayerIDImage

I stumbled across the concept of the player map from Tim Blaker at Crunchtimebaseball.com and tailored it to meet my needs.  This provided me with an excellent starting point.  Tim maintains his own version and updates his more frequently than I do.  I only maintain my own because I’ve wanted to add some new columns.

On this site I will typically work with the Baseball Reference ID.  I like those IDs more than the others because I can look at an ID and usually determine who the player is (troutmi01 is Mike Trout).  Most other sites use a straight ID number that has no inherent meaning (10155 or 545361).

If you’re familiar with Excel and using VLOOKUPs, Player IDs are the item we’ll be matching upon to start pulling information around our Excel rankings file.  If you have no idea what I just said, don’t worry.  We’ll get there soon.

STEP-BY-STEP INSTRUCTIONS

Step Description
1. Open Excel and save a blank new file to hold our points league rankings.Points_Rankings_Excel
2. Download the pitching and hitting projections of your choice.  For this example I will be using the Steamer projections available at Fangraphs.  Hitter_Pitcher_ProjectionsBe sure to download both the hitter and pitcher projections.To download the data from Fangraphs, click the “Export Data” link.Fangraphs_Export_CSV_ProjectionsThis will download a CSV file to your computer.
3. Locate the downloaded hitter and pitcher projections.MULTIPLE_FANGRAPHS_REPORTSAs you download more and more reports from Fangraphs they will be sequentially numbered (1), (2), etc.Open the hitters file in Microsoft Excel first. Right click on the tab and select the option to “Move or Copy…”.FANGRAPHS_PROJECTIONS_1At the next menu, click the drop down menu. Choose your rankings Excel file (created above) from the drop down list.  Then hit “OK”.MOVE_OR_COPY_EXCELRepeat this step for the pitcher projections.
4. Right-click on your hitter and pitcher projection tabs and choose the “Rename” option.RENAME_STEAMER_HITTERSIt will be important to name your spreadsheet tabs with meaningful names so you can easily keep track of what each of the spreadsheet represents.I will name my tabs “Steamer Hitters” and “Steamer Pitchers”.Named_Tabs
5. Download and open the SFBB Player ID Map (click that link and it should begin to download).  Right-click on the “PLAYERIDMAP” tab.Move_PlayerID_MapIn the “Move or Copy” menu, select your rankings spreadsheet in the “To book:” drop down menu (we’re copying the Player ID Map into the Rankings file).PLAYER_ID_MAPChoose to move the PLAYERIDMAP to the end of the rankings file and click “OK”.
6. You’re going to be looking at this spreadsheet for a significant amount of time, so you should spend a minute on the aesthetics. Right click on the tabs and choose the option to add some color to this thing (“Tab Color”).
Rankings Part 1-13If you’re interested, Smart Fantasy Baseball Blue is custom color 17R, 137G, 183B on the RGB scale.Worksheet_Tabs
7. We’re done. Save the file.

WRAP UP

At this point we have downloaded some powerful hitter and pitcher projections and incorporated a listing of player IDs.  In the next part of this series we’ll use Excel’s “Name” feature to create a Settings tab where we will document the scoring settings for your league.

Do you have any questions?

If you have questions, it would be great if you can ask them in the comments below so others can benefit from the discussion.

If you’d like to know when I put out the next post in the series or similar posts in the future, click below to follow me on Twitter.

 LINK TO DOWNLOAD FILE:  Points League Rankings – Part 1.xlsx

How To Calculate Rankings for a Points League: Part 2 – Set Up League Scoring Settings

$
0
0

Welcome to the first part of a series in which we’ll go step-by-step through the process of using Microsoft Excel to calculate your own rankings for a fantasy baseball points league (as opposed to rotisserie or head-to-head rotisserie).

Whether you’re in a standard points league at a major site like ESPN or a more advanced Ottoneu league at Fangraphs, this process will help you develop customized rankings for your league.  These instructions can be used for a season-long points league or a weekly head-to-head points league.

If you’re looking for info on how to rank players for a roto league, look here.

I recommend going through all the parts of the series in order. If you missed Part 1 of this series, where we downloaded hitter and pitcher projections and started to set up the rankings Excel file, you can find it here.

About These Instructions

  • The projections used in this series are the Steamer 2015 preseason projections from Fangraphs.  If you see projections that you disagree with or that appear unusual, it’s likely because I began writing this series in December 2014, still early in the off-season.
  • For optimal results, you will want to be on Excel 2007 or higher.  Some of the features used were not in existence in older versions.
  • I use Excel 2013 for the screenshots included in the instructions.  There may be some subtle differences between Excel 2007, 2010, and 2013.
  • I can’t guarantee that all of formulas used in this series will work in Excel for Mac computers.  I apologize for this.  I don’t understand why Excel operates differently and has different features on different platforms.

In Part 2

In this second part of the series, we’ll create a new tab in our Excel file to document our league’s scoring settings.  We’ll use Excel’s “Name” feature so we can calculate projected points for all players and easily make changes to the scoring system in the future.

Excel Functions and Formulas In This Post

Below are the Excel functions and formulas used in this part of the series.  If you’re already familiar with what these are, you can skip ahead.

Named Cells (or Named Ranges)

Excel has a feature called “Names”, where you can give a cell, a group of cells, or an entire table a name.  After giving a cell a name, you can then use the name in calculations.

In this part of the series we’ll give names to the point values of each scoring category for our league. Let’s assume each HR for a hitter is worth 9 points.All_Point_Values

We can name this point value as “H_PTS_HR”.

If we’re later trying to determine how many points Javier Baez will earn from home runs, we can multiply Baez’s projected home runs by “H_PTS_HR” instead of multiplying by 9 or by cell B7 (in the image above).
Javier_Baez_HR

If you’re familiar with the basic concepts of computer programming, setting the point value of home runs equal to a name is like using a variable.

The benefit of this is that we can later change the 9 to a different value. This is especially useful if we play in multiple leagues or if the scoring format changes.

It becomes very easy to change the scoring system without having to search within complex formulas. And we also don’t need to flip back and forth and remember that the HR point value was in B7 (as opposed to B6 or B8).

Using a name also gives the formula “meaning”.  It’s a lot easier to understand this:

= B2 * H_PTS_HR

than it is to understand this:

= B2 * B7

Another helpful benefit is that Excel makes all of your Names available through a type-ahead feature.  So if you know you have a series of Names that start with “H_PTS_”, you can see all of them by typing out part of the name. This works no matter what tab of the Excel file you are on, meaning you don’t have to flip back and forth to figure out the exact cell holding the point value.

List_Of_Names_H

Using Cell Shading To Indicate Meaning

As we continue to build a spreadsheet that will eventually be quite complex, it can be helpful to indicate which cells are “input” cells and which ones are “calculated” (formula) cells. An easy way to denote this is by using cell shading (or coloring).

An “input” cell would be facts or assumptions that will later be used in formulas for calculating projected points and player rankings.  For example, the number of points for each home run hit or the number of teams in the league.

A “calculated” cell will obviously be some kind of formula we enter in Excel.

The color coding will help remind you what cells you can change in the future (inputs) and what cells you should leave alone (formulas, calculations).

You can use your own color scheme, but for the rest of the series I will shade cells blue if they are “input” cells and a light red if they are “calculated” cells.

Not to mention that color coding your spreadsheets also offers a nice intimidation factor to your opponents at the draft table.  Who knows, someone might just think twice about getting in a bidding war with you if you’ve got a kick ass spreadsheet on-screen.

Adjust For Your League’s Scoring Settings

The example league I’m using to create these rankings for is loosely based on a scoring system suggested for Fangraphs Ottoneu leagues.  It is likely very different than the scoring system in your league.  Accordingly, you will need to use judgment and tailor the steps below to fit your league’s specific scoring system.

STEP-BY-STEP INSTRUCTIONS

Step Description
1. Add a new sheet to your Excel file.A keyboard shortcut to add a new sheet is SHIFT + F11 at the same time.  Excel_New_Sheet
2. Right-click on the blank sheet and choose the option to “Rename”.  Rename_SheetName this sheet “Scoring Settings”.
3. Visit your league’s settings page and locate the list of point values for each stat category.League_Scoring_SettingsOn your “Scoring Settings” sheet, create a list of the various scoring categories and the point value for each.Scoring_Excel_Table
4. In order to apply the concept of shading cells discussed above, I first place a border around the cells to point value cells.

In my example file, I want to format cell B2. To do this click once on cell B2 and select the “Borders” drop down menu on the Ribbon.  Then choose the “Outside Borders” option.Add_Borders

5. Cell B2 will be an input cell that should be shaded blue.  So while you still have B2 selected, click the “Fill Color” drop down arrow (the paint can icon) and click on the desired shade.Shade_Input_Cell
6. To quickly format the other input cells, while still selected on cell B2, double-click the “Format Painter” icon (looks like a paint brush).

Format Painter allows you to copy all formatting from one cell to the next selected cell.  If you double-click on it, you can continue to click on many cells and they will all take on the formatting (a lot of people who know about Format Painter don’t know about the double-click option!).

We’re going to use Format Painter to make all the other point values blue and outlined. Format_Painter_ExcelWhile the Format Painter is still active (you can tell it’s active when you see the paint brush icon next to your cursor), simply click in all the other cells containing scoring point values.  Multiple_Cells_Format_PainterAfter you have selected all the point value cells, hit your ESC key to exit the Format Painter.

7. In order to calculate projected points for all players, we will need to reference and use these scoring values in future formulas.To make it easier to reuse these figures, we will set them up as Named Cells.  To do this, first click on one of your hitter point values (I’ll use B2 from my example).Cell_B2Then click on the “Formulas” tab of the ribbon and select the “Define Name” button.Defined_Name
8. In the window that pops up, enter a meaningful name that you’ll later be able to recognize.  For example, to name the point value for At Bats, I chose the name “H_PTS_AB”.This will indicate this is the point value for hitter at bats.Click OK to save this name.New_Name
9. Repeat this process for all of your hitting and pitching point values.I used these names for my hitting categories:
  • H_PTS_AB
  • H_PTS_H
  • H_PTS_BB
  • H_PTS_2B
  • H_PTS_3B
  • H_PTS_HR
  • H_PTS_SB

I used these names for my pitching categories:

  • P_PTS_IP
  • P_PTS_K
  • P_PTS_BB
  • P_PTS_HA
  • P_PTS_SV
  • P_PTS_HD
  • P_PTS_HRA

Note that Excel will not allow you to start a Name with a number (so you couldn’t name your cell “2B_PTS_H”).

It may be a good idea to view the list of all names in your Excel file when you’re done.  To do this, click on the “Name Manager” button of the “Formulas” tab.  Name_ManagerLook over your list of names and make sure you haven’t missed anything.List_Of_Names

10. We’re done. Save the file.

Wrap Up

At this point in the process we have a file with projections, player IDs, and our league scoring settings.  In the next part of this series we’ll start pulling the projection information into new sheets where we can begin to calculate each player’s projected points for the season.

Do You Have Any Questions?

If you have questions, it would be great if you can ask them in the comments below so others can benefit from the discussion.

If you’d like to know when I put out the next post in the series or similar posts in the future, click below to follow me on Twitter.

Link To Download File:  Points League Rankings – Part 2.XLSX


How To Calculate Rankings for a Points League: Part 3 – VLOOKUP, Excel Tables, and Structured References

$
0
0

Welcome to the third part of the “How To Calculate Rankings For a Points League” series in which we’ll go step-by-step through the process of using Microsoft Excel to calculate your own rankings for a fantasy baseball points league (as opposed to rotisserie or head-to-head rotisserie).

If you’re looking for info on how to rank players for a roto league, look here.

I recommend going through all the parts of the series in order. If you missed an earlier part of this series, you can find it here:

ABOUT THESE INSTRUCTIONS

  • The projections used in this series are the Steamer 2015 preseason projections from Fangraphs.  If you see projections that you disagree with or that appear unusual, it’s likely because I began writing this series in December 2014, still early in the off-season.
  • For optimal results, you will want to be on Excel 2007 or higher.  Some of the features used were not in existence in older versions.
  • I use Excel 2013 for the screenshots included in the instructions.  There may be some subtle differences between Excel 2007, 2010, and 2013.
  • I can’t guarantee that all of formulas used in this series will work in Excel for Mac computers.  I apologize for this.  I don’t understand why Excel operates differently and has different features on different platforms.

IN PART 3

In this part of the series we’ll use Excel’s VLOOKUP and IFERROR formulas as well as Table and Structured Reference features to pull hitter information and projections from other areas of the spreadsheet in order to create our hitter rankings tab.

EXCEL FUNCTIONS AND FORMULAS IN THIS POST

Below are the Excel functions and formulas used in this part of the series. If you’re already familiar with what these are, you can skip ahead to the step-by-step instructions.

VLOOKUP

One of the most powerful Excel formulas, in my opinion. And it’s easier to use than you might think.

This formula searches the first column of a table for a desired value (a player ID) and then returns a value that is in the same row but in a separate column. For example, we might tell Excel to go into a table of projection data, locate the player ID for Billy Hamilton (10199), and give us back the number in the fourteenth column (column N, which holds the number of SBs).

BILLY_HAMILTON_PROJ_SB

This formula requires four inputs:

VLOOKUP(lookup_value, table_array, col_index_num, range_lookup)VLOOKUP

  1. Lookup_value – This is the value we want to search for in the table of data (e.g. Billy Hamilton’s player ID 10199). In the rankings spreadsheet, we’re mostly going to use player IDs for this. “Hey Excel, go look for this player ID”.
  2. Table_array – This has to be two or more columns of data. Excel will look for the Look_up value in the first column in the set of data. You do not necessarily need to include the first column on a spreadsheet tab (you don’t have to use Column A of a sheet, the first column of your table could be Column G). But Excel is going to look through the first column you provide. “Hey Excel, here are fifteen columns of data for you, look through everything in the first column for the Lookup_value.”
  3. Col_index_num – This is the column number that of the Table_array that contains your desired information. This has to be a number and it has to be within the Table_array you provided. For example, if your table_array only has five columns, but you put a six for Col_index_num, you’ll have a problem. “Hey Excel, the fourteenth column has projected stolen bases. After you find Billy Hamilton’s player ID, tell me how many stolen bases are in that fourteenth column.”
  4. Range_lookup – This input can be either “TRUE” or “FALSE”. If you use “TRUE”, Excel will look for an approximate match of the lookup_value (PLAYERID). If you enter “FALSE”, Excel will only look for an exact match. This is an optional input, but I feel very strongly that it must be used and that “FALSE” is the option selected. You may otherwise get the wrong projections showing up for players.

TABLES (NAMED RANGES, Structured References)

Similar to how we named individual cells in the last part of our series, Excel has functionality that allows you to convert a block of data (player projections) into a named table. There are quite a few benefits to using tables:

  1. Tables have names.  This is great for the Table_array input in the VLOOKUP formula. We can give the projection sheet the name “STEAMER_H” (for Steamer Hitters projections) and use that instead of traditional way of selecting data in Excel (something like’Steamer Hitters’!A1:W500).  Not only is this a huge time saver (using your mouse to scroll and select 20 columns and 500 rows takes a long time), but it gives your formulas meaning.  When you look back at your VLOOKUP formula and see “STEAMER_H”, you’ll easily be able to remember that you’re looking up projected Steamer hitter information.
  2. Columns have names. I have a hard time remembering what column projected HRs are in. But I don’t need to if I know that the column name is “HR”. If you don’t use a table, you’re stuck trying to remember things like, “were HRs in column G, H, or I?”. And then you have to figure out if column I is column number 8, 9, or 10?  When referring to a column, use the following convention – TABLENAME[COLUMNNAME]. The column name is surrounded in brackets.
  3. Formula consistency. In a table, all formulas within a column are identical. When you change the formula in one cell of a column, the rest of the column automatically updates too. No more editing a formula in one cell and having to copy it to hundreds of other cells in the same column.
  4. Easy sorting and filtering. As easy as clicking a drop down arrow.EXCEL_TABLE_SORT

COlumn

This function returns the column number of a cell or range of data. The function only requires one input; the cell or range to be evaluated:

COLUMN(TableName[ColumnName])

Let’s use a real example to illustrate:

COLUMN(STEAMER_H[SB])

This formula will look for the stolen bases column in the Steamer Hitter Projections and will return the column number.  If SB are in column N, this formula calculates to 14.

IFERROR

The IFFERROR function allows us to control what happens when another formula being used is calculating out to an error.

The image below is a great example of this. In this spreadsheet we have a series of VLOOKUP formulas that instruct Excel to go find Kendrys Morales’ player ID (moralke01) in the “Steamer Projections” tab.

You may recall that during the 2014 season Morales remained an unsigned free agent until well into the season, so he was not included in the Steamer projections. Because he was not included, the VLOOKUP formula could not find his player ID and could only calculate to this “#N/A” error message.

IFERROR-Excel-Formula

The IFERROR function will allow us to replace the error message with any value of our choice. It essentially works by telling Excel, “If this other formula I’m using comes back with an error, use this instead”.

Using IFERROR we could instead make Kendrys Morales line look like this:

KENDRYS_MORALES_IFERROR

The formula requires two inputs:

IFERROR(value,value_if_error)

    1. Value – This represents the formula or calculation we want Excel to perform. In our example above it will be the same VLOOKUP formula we already have entered.
    2. Value_if_error – This represents the value or message we want Excel to return if the first argument, “Value”, happens to be an error. In our example above we don’t want the default “#N/A” error message that turns up if Excel cannot locate Kendrys Morales in the RoS projections. Instead, we could just ask for Excel to return zeroes for his projected stats.

STEP-BY-STEP INSTRUCTIONS

Step Description
1. Go to the “Steamer Hitters” tab of your Excel file.We will convert this to a “table” in Excel in order to make the data easier to work with.

Click anywhere within the projection data. Then locate the “Home” tab in the Excel menu system (“the ribbon”).Click once on the “Format as Table” drop down, and then select your desired color scheme.Format_As_TableYou will then be prompted to verify the range of cells in the table and that your table has a header row (e.g. Name, AB, H, HR, etc.).

You might notice that my example projection data goes out to column AC. Yours may have more or less columns. I believe the Steamer downloads contain additional information at certain times of the year, but if you look closely at the information in the rightmost columns, they’re things we don’t care about for fantasy (wRC+, WAR calculations, etc.).

As long as you have the main offensive categories and the “playerid” column, you’re good.EXCEL_FORMAT_AS_TABLECheck “My table has headers”. Click OK.

After accepting this, your bland looking data will transform into a nicely formatted table.EXCEL_FORMATTED_TABLE

2. We’ll later be pulling information from this table into other worksheets. To make the pulling of data easier we need to move the Fangraphs player ID to be the first column (you can use VLOOKUP if the player ID is in the first column, otherwise you’re stuck using more difficult and/or multiple formulas). Right-click on the top of the fangraphs player ID column (I right clicked on the “AC” column header) and Cut it.CUT_PLAYERID
3. Now right-click on the top of the player name column (column header “A”) and select “Insert Cut Cells”.INSERT_CUT_CELLS
4. Before we finalize this table, we should give it a name we can refer to in the future. Go to the “Formulas” tab on the Excel ribbon and click on the “Name Manager” button.Name_Manager
5. Because we created named cells in Part 2 of the series, it might be helpful to filter the Name Manager to only show table names. Do this by clicking the “Filter” drop down menu in the top right of the window. Then choose “Table Names”.Filter_Table_NamesExcel will give very generic names to a table, like “Table2″. It’s more helpful to give meaningful names to your tables. As you get more tables in a spreadsheet, it can become very difficult to remember the difference between “Table2″ and “Table3″. Note how there is already a table named “PLAYERIDMAP”. I previously set up this table before you inserted it into your Excel file in Part 1of this series.Table2Select your table from the list (it will probably be named “Table2″) and click on the “Edit…” button.
6. Give the table a meaningful name. I chose “STEAMER_H” to indicate these are the Steamer Hitter projections. STEAMER_H_TABLEClick “OK” to close the “Edit Name” menu. Then click “Close” to exit the “Name Manager”.
7. We now have two tables ready to pull hitter information from, PLAYERIDMAP and STEAMER_H.I’m going to pull from these two tables into a new tab where I’ll calculate the hitter rankings.

If you’re wondering why I’m going through all of this trouble to set up multiple tabs and to keep all of this information separated, it’s because I want this whole spreadsheet to be usable in future seasons.

By keeping the PLAYERIDMAP in one area, projections in another, and rankings in another, we’ll be able to easily update each of those components at later times.

This spreadsheet can be used in the middle of the season to drop in Rest of Season Projections.  It can easily be tweaked a little and used next year.

You can read more about my design philosophy here.

8. Right click on the “PLAYERIDMAP” tab and select the option to “Insert…”. Insert_New_SheetChoose the “Worksheet” option and click “OK”. Insert_Worksheet
9. Right click on the new sheet tab and choose to “Rename”. Call this sheet “Hitter Ranks”.Hitter_RanksAfter you’ve renamed the sheet, type “PLAYERID” into cell A1. This will be a column header for our next step.PLAYERID_CELL_A1
10. As we talked about in the first part of this series, I like to use Baseball-Reference player IDs as the main ID system in my spreadsheets.  That’s because I can usually look at an ID and know who the player is (e.g. encared01 is Edwin Encarnacion).

So we want the first column of this new sheet to contain the Baseball Reference player ID and we only want hitters at this time. The PLAYERIDMAP sheet has a list of all fantasy-relevant players (for standard rotisserie leagues, at least). However, this sheet contains pitchers also. Because this sheet is an Excel table, it’s easy to filter out those pitchers.

Click on the drop down arrow on the “POS” column. You’ll be presented with a list of all the positions. Uncheck the“P” value (for pitchers). Click OK to apply the filter.Filter_POS

The Player ID Map will now list only hitters.

11. Starting at the first player and ending with the last, click and drag within the “IDPLAYER” column (first column) and select all players (or select the first player and then use the keyboard shortcut SHIFT + CTRL + Down Arrow). Only select from this first column.

Note, I also added a dummy player name “Last Player”.  You don’t need to grab him, but it won’t hurt if you do.Player_ID_Hitters

12. Copy this selected data. Return to the “Hitter Ranks” sheet. Then paste the data into cell A2.Hitter_Ranks_ID
13. Now that we’re starting this new sheet, we should convert it to an Excel table. We will essentially repeat step 1 above, but for this new worksheet.

Click once to select any player ID. Then locate the “Home” tab in the ribbon).

Click once on the “Format as Table” drop down and then select your desired color scheme.Format_As_Table

14. You will then be prompted to verify the range of cells in the table and that your table has a header row. EXCEL_FORMAT_AS_TABLE_HITTERSCheck “My table has headers”. Click OK.
15. Repeat steps 4-6 in order to give the table a more meaningful name. In my example, Excel defaulted the table name to “Table3″. I renamed mine to be “MYRANKS_H” (to indicate hitter ranks, because we’ll also be ranking pitchers).Name_Manager_Table3
16. Now for the fun part… pulling data from the other tabs. I’ll first add “Player Last Name” to the table.

To expand your table, simply type into column B and hit Enter (I typed into cell B1). Excel should automatically pull this new column into your table. I’m going to name my column “LNAME”.

LNAME

17. Your table shading may look like this instead of the image from step 16:TABLE_SHADINGIf so, click once in the area between the Column “A” header and the Row “1” header (the top left corner of all cells), to select all cells in the entire sheet.Then click the “Fill Color” icon (looks like a paint can) drop down arrow and choose the “No Fill” option.NO_FILLYou should now see the proper alternating color scheme.LNAME
18. Our goal in Column B is to instruct Excel to take the PLAYERID from column A (e.g. “abreujo01″), go into the first column of PLAYERIDMAP, find the matching PLAYERID, and then pull back the corresponding LASTNAME. You can see in the image of the PLAYERIDMAP below that LASTNAME is in the fifth column (column E).PLAYERIDMAP_LNAME

To start building the formula, click in cell B2 of your Hitter Ranks tab. Then click the “fx” button of the formula bar to launch Excel’s formula wizard. We’ll use the wizard the first time through to better explain this function in Excel.INSERT_FUNCTION

19. Type “vlookup” into the search bar and click “Go”. When the function appears, make sure it is selected and hit “OK”. You should then see the different arguments, or components, needed for the formula to work. VLOOKUP_ARGUMENTS
20. The “Lookup_value” is the value on the “Hitter Ranks” sheet that we want to locate (or match to) in the “PLAYERIDMAP”.

Click once in the “Lookup_value” field. Then click on the value in cell A2 (“abreubo01″).

Excel will convert this to [@PLAYERID]. This naming convention is referred to as a “Structured Reference” or a “Table Reference” and can be used when you have converted your data into an Excel table. Structured_Reference

21. The “Table_array” field is the table (or array, or block of data) in which to go look for the matching PLAYERID. Because the PLAYERIDMAP sheet was previously set up as a table, we can take advantage of this.

Click once in the “Table_array” field. Simply type “PLAYERIDMAP” (no quotes). Again, this is another benefit of using Excel tables. It’s much easier to type in the table name than it is to flip tabs in Excel and select a giant range of data.

PLAYERIDMAP_ARRAY

You’ll know you got this right if you see part of the PLAYERIDMAP populating to the right of the Table_array field.DAVID_AARDSMA

22. The “Col_index_num” field wants to know the number of the column in the PLAYERID map table to retrieve data from.

Again, our goal is to retrieve LASTNAME from the PLAYERIDMAP table, which is column 5 in that table. You could manually flip back and forth between tabs to determine the column number. You could then just type a “5” in for “Col_index_num”.

This takes time and can be difficult if you start getting into column X (do you know what number letter of the alphabet that is?).  It’s also a problem if you later add a column that would push LASTNAME into column number 6.  

For these reasons, I prefer to use the COLUMN formula.  When this is entered into the Col_index_num field, it will calculate the location of the LASTNAME column.  We don’t have to flip back and forth and if LASTNAME gets shifted to another column, this formula will adjust automatically.

The formula below will determine that LASTNAME is the fifth column in the PLAYERIDMAP table.

COLUMN(PLAYERIDMAP[LASTNAME])

Enter this equation into the Col_index_num field.COLUMN_LASTNAME

23. Finally, we have the Range_lookup argument. I always enter “FALSE” for this in order to ensure Excel only locates exact matches for a PLAYERID. I don’t want Excel to return an approximate match if the exact PLAYERID cannot be found.  Giving me Bobby Abreu’s projection instead of Jose Abreu’s would not be helpful…VLOOKUP_FALSE
24. Before hitting “OK” to accept the formula, you can preview the output. In this case we are dealing with “abreubo01″, or Bobby Abreu, and can see the formula appears to be working (look at the tip of the mouse pointer below). ABREU

Click OK to accept the formula.

Once the formula is entered, it should automatically copy to the remaining rows of the table.LNAME_COL_COMPLETED

25. We will use the VLOOKUP formula to pull additional data, and the majority of the formula will remain the same.

To add a FNAME column, type the “FNAME” into cell C1. Copy the formula from cell B2. Don’t click and drag it.  Actually right-click on B2 to copy it or use the CTRL + C shortcut.  

Paste the formula into cell C2.  When you copy and paste the formula this way you should end up with two columns displaying player last names.  That’s what you want for now!

TWO_LAST_NAMESThen simply double click in cell C2 and change the column name (remember column names are surrounded in [brackets]. So change [LASTNAME] to [FIRSTNAME].).CHANGE_COLUMN_NAME

Nerdy Excel talk here, but dragging formulas within tables does not work very well because there’s no way to make the formulas absolute (they want to stay relative as you move them).  That’s why I suggest copying and pasting the formula, even if it duplicates and you then need to change part of it.

26. Repeat step 25 to pull TEAM, POS, and IDFANGRAPHS from the PLAYERIDMAP tab.

If you can’t remember the exact name of a column, once you have entered a table name, like PLAYERIDMAP, and the opening “[” bracket, a helpful type ahead box will display all the column names in the PLAYERIDMAP table.

You can use the mouse to double-click on the column name in the type ahead list or select a column name and hit the Tab key to add it to your formula.

TYPE_AHEAD

The exact formulas you want are:

TEAM:

=VLOOKUP([@PLAYERID],PLAYERIDMAP,
COLUMN(PLAYERIDMAP[TEAM]),FALSE)

POS:

=VLOOKUP([@PLAYERID],PLAYERIDMAP,
COLUMN(PLAYERIDMAP[POS]),FALSE)

IDFANGRAPHS:

=VLOOKUP([@PLAYERID],PLAYERIDMAP,
COLUMN(PLAYERIDMAP[IDFANGRAPHS]),FALSE)

27. We’ve now pulled all the relevant information from PLAYERIDMAP and can begin pulling in hitter projections from our STEAMER_H table.

Add column headers for where we can pull plate appearances (PA), at bats (AB), hits (H), home runs (HR), runs (R), runs batted in (RBI), walks (BB), strikeouts (SO), stolen bases (SB), and any other counting stat categories used in your league’s scoring system (e.g 2B, 3B, CS, etc.).STAT_CATEGORIES

There will be some tweaks to the VLOOKUP formula we used earlier. First, the Steamer projections use Fangraphs ID numbers. So we will be using the IDFANGRAPHS column as the Lookup_value.

Second, we must specify to pull from the Steamer Hitters projections (STEAMER_H table name).

And finally, the COLUMN formula will change to determine what statistic to pull.PLATE_APPEARANCES_STEAMER

Your final Plate Appearance formula should be:

=VLOOKUP([@IDFANGRAPHS], STEAMER_H,
COLUMN(STEAMER_H[PA]), FALSE)

28. After you accept the formula above, you may encounter a situation where the VLOOKUP formula will return “#N/A” for certain players.

This error means that Excel could not find the value you told it to look up. In this example image below, Garrett Atkin’s player ID was not found in the projections (probably because he’s retired).GARRETT_ATKINS_PA

These errors can cause big problems with the rankings. It would be better to have the PA, HR, and RBI for a player to be zero or blank.

To accomplish this, we can use the “IFERROR” formula and wrap it around our original VLOOKUP formula.

This is the original formula in the cell:

=VLOOKUP([@IDFANGRAPHS],STEAMER_H,
COLUMN(STEAMER_H[PA]),FALSE)

Now surround the VLOOKUP formula with the IFERROR formula. The original VLOOKUP formula will remain exactly as is. I will just put “IFERROR(” in front of it. And behind the existing formula I will put “,0)”.

=IFERROR(VLOOKUP([@IDFANGRAPHS],STEAMER_H,
COLUMN(STEAMER_H[PA]),FALSE)
,0)

You can see the edits I made in the red bolded font. That’s all you have to do. Excel will now perform the exact same calculation as before, but if a player cannot be located in the VLOOKUP, Excel will put 0 instead of #N/A.

I recommend using a 0, but if you want it to be a blank instead of a zero, use this:

=IFERROR(VLOOKUP([@IDFANGRAPHS],STEAMER_H,
COLUMN(STEAMER_H[PA]),FALSE)
,””)

29. The formulas for AB, H, 2B, 3B, HR, R, RBI, BB, SO, and SB are shown below.AB:

=IFERROR(VLOOKUP([@IDFANGRAPHS],STEAMER_H,
COLUMN(STEAMER_H[AB]),FALSE)
,””)

H:

=IFERROR(VLOOKUP([@IDFANGRAPHS],STEAMER_H,
COLUMN(STEAMER_H[H]),FALSE)
,””)

2B:

=IFERROR(VLOOKUP([@IDFANGRAPHS],STEAMER_H,
COLUMN(STEAMER_H[2B]),FALSE)
,””)

3B:

=IFERROR(VLOOKUP([@IDFANGRAPHS],STEAMER_H,
COLUMN(STEAMER_H[3B]),FALSE)
,””)

HR:

=IFERROR(VLOOKUP([@IDFANGRAPHS],STEAMER_H,
COLUMN(STEAMER_H[HR]),FALSE)
,””)

R:

=IFERROR(VLOOKUP([@IDFANGRAPHS],STEAMER_H,
COLUMN(STEAMER_H[R]),FALSE)
,””)

BB:

=IFERROR(VLOOKUP([@IDFANGRAPHS],STEAMER_H,
COLUMN(STEAMER_H[BB]),FALSE)
,””)

SO:

=IFERROR(VLOOKUP([@IDFANGRAPHS],STEAMER_H,
COLUMN(STEAMER_H[SO]),FALSE)
,””)

SB:

=IFERROR(VLOOKUP([@IDFANGRAPHS],STEAMER_H,
COLUMN(STEAMER_H[SB]),FALSE)
,””)

30. don’t pull batting average or any other rate statistics (OBP, SLG, etc.) directly from the projections. I prefer to recalculate them with a formula after the underlying statistics have been pulled.

To do this, type “BA” in as a column header. Then enter the formula to calculate batting average (=[@H]/[@AB]).BA_Formula

If you’re not exactly sure of the convention for the formulas you can always use your mouse to click on the values in the “H” and “AB” columns and Excel will translate it into the =[@H]/[@AB] format for you.

Repeat this step for any other rate statistics you desire (OBP, SLG, OPS, etc.).

You might notice that these rate formulas can also result in errors if a player does not have a projection (dividing by 0 causes an error). You can use the IFERROR formula around the calculation to clean this up.

Here are the formulas I use for AVG, OBP, and SLG:

AVG:

=IFERROR([@H]/[@AB],0)

OBP:

=IFERROR(([@H]+[@BB]+[@HBP])/([@AB]+[@BB]+[@HBP]),0)

SLG:

=IFERROR(([@H]+[@2B]+2*[@3B]+3*[@HR])/[@AB],0)

31. Most statistics don’t need formatting, but AVG and the other rate statistics will. In my file, AVG is located in column “S”.  

Click on the “S” column label (or whatever column AVG is in) to select the entire AVG column. Then on the Home tab of the ribbon, click on the comma number format.Comma_Style

Finally, click on the symbol to increase the decimal places from two to three (the standard batting average format).Increase_Decimal

32. Save the file.

You’ve now successfully combined hitter information and projected hitting stats into one table.

WRAP UP

At this point we have pulled the hitter projections into our rankings tab that we will eventually calculate each player’s projected points on.

In the next part of the series we will follow these exact same steps with pitchers in order to develop our pitcher rankings worksheet.

DO YOU HAVE ANY QUESTIONS?

If you have questions, it would be great if you can ask them in the comments below so others can benefit from the discussion.

If you’d like to know when I put out the next post in the series or similar posts in the future, click below to follow me on Twitter.

LINK TO DOWNLOAD FILE:  Points League Rankings – Part 3.XLSX

How To Calculate Rankings for a Points League: Part 4 – Pitcher Rankings

$
0
0

Welcome to the first part of a series in which we’ll go step-by-step through the process of using Microsoft Excel to calculate your own rankings for a fantasy baseball points league (as opposed to rotisserie or head-to-head rotisserie).

Whether you’re in a standard points league at a major site like ESPN or a more advanced Ottoneu league at Fangraphs, this process will help you develop customized rankings for your league.  These instructions can be used for a season-long points league or a weekly head-to-head points league.

If you’re looking for info on how to rank players for a roto league, look here.

I recommend going through all the parts of the series in order. If you missed the beginning of this series, you can the earlier parts here:

ABOUT THESE INSTRUCTIONS

  • The projections used in this series are the Steamer 2015 preseason projections from Fangraphs.  If you see projections that you disagree with or that appear unusual, it’s likely because I began writing this series in December 2014, still early in the off-season.
  • For optimal results, you will want to be on Excel 2007 or higher.  Some of the features used were not in existence in older versions.
  • I use Excel 2013 for the screenshots included in the instructions.  There may be some subtle differences between Excel 2007, 2010, and 2013.
  • I can’t guarantee that all of formulas used in this series will work in Excel for Mac computers.  I apologize for this.  I don’t understand why Excel operates differently and has different features on different platforms.

IN PART 4

In this part of the series we will again use Excel’s VLOOKUP and IFERROR formulas as well as Table and Structured Reference features, but this time to pull pitcher information and projections to create our pitcher rankings tab.

EXCEL FUNCTIONS AND FORMULAS IN THIS POST

This is where I normally give detailed explanations of each Excel feature and formula used in the instructions below; however, we’re not introducing anything new in Part 4. If you would like more background on the features and formulas used below, please refer to Part 3 or ask questions in the comments area below.

STEP-BY-STEP INSTRUCTIONS

Step Description
1. Go to the “Steamer Pitchers” tab of your Excel file.We will convert this to a “table” in Excel in order to make the data easier to work with.

Click anywhere within the pitcher projection data. Then locate the “Home” tab in the Excel menu system (“the ribbon”).

Click once on the “Format as Table” drop down, and then select your desired color scheme.FORMAT_AS_TABLE_PITCHERSYou will then be prompted to verify the range of cells in the table and that your table has a header row (e.g. Name, W, L, ERA, etc.).

You might notice that my example projection data goes out to column T. Yours may have more or less columns. I believe the Steamer downloads contain additional information at certain times of the year, but if you look closely at the information in the rightmost columns, they’re things we don’t care about for fantasy (WAR calculations, etc.).

As long as you have the main pitching categories needed for your league’s scoring system and the “PLAYERID” column, you’re good.

TABLE_DATA_PITCHERS

Check “My table has headers”. Click OK.

After accepting this, your bland looking data will transform into a nicely formatted table.PITCHER_NAMES

2. We’ll later be pulling information from this table into other worksheets. To make the pulling of data easier we need to move the Fangraphs player ID to be the first column (you can use VLOOKUP if the player ID is in the first column, otherwise you’re stuck using more difficult and/or multiple formulas). Right-click on the top of the Fangraphs player ID column (I right-clicked on the “T” column header) and Cut it.CUT_PLAYERID_PITCHER
3. Now right-click on the top of the player name column (column header “A”) and select “Insert Cut Cells”.INSERT_CUT_CELLS_PITCHERS
4. Before we finalize this table, we should give it a name we can refer to in the future. Go to the “Formulas” tab on the Excel ribbon and click on the “Name Manager” button.Name_Manager
5. Because we created named cells in Part 2 of the series, it can be difficult to locate the tables in the Name Manager.  I find it helpful to filter the Name Manager to only show table names. Do this by clicking the “Filter” drop down menu in the top right of the window. Then choose “Table Names”.Table_Name_FilterExcel will give very generic names to a table, like “Table2″. It’s more helpful to give meaningful names to your tables. As you get more tables in a spreadsheet, it can become very difficult to remember the difference between “Table2″ and “Table3″.Select your table from the list (it should be the only one named “Table#”) and click on the “Edit…” button.NAME_MANAGER_PITCHERS
6. Give the table a meaningful name. I chose “STEAMER_P” to indicate these are the Steamer Pitcher projections.EDIT_NAME_PITCHERSClick “OK” to close the “Edit Name” menu. Then click “Close” to exit the “Name Manager”.
7. We now have two tables ready to pull pitcher information from, PLAYERIDMAP and STEAMER_P.I’m going to pull from these two tables into a new tab where I’ll calculate the pitcher rankings.
8. Right click on the “PLAYERIDMAP” tab and select the option to “Insert…”. Insert_New_SheetChoose the “Worksheet” option and click “OK”. Insert_Worksheet
9. Right click on the new sheet tab and choose to “Rename”. I’ll call this sheet “Pitcher Ranks”.PITCHER_RANKSAfter you’ve renamed the sheet, type “PLAYERID” into cell A1.  This will be a column header for our next step.PLAYERID_CELL_A1
10. As we have talked about before, I like to use Baseball-Reference player IDs as the main ID system in my spreadsheets. This is so I can look at an ID and know who the player is (e.g. kershcl01 is Clayton Kershaw). To make it the main ID we want the first column of this new sheet to contain the Baseball Reference player ID and we only want pitchers at this time. The PLAYERIDMAP sheet has a list of all fantasy-relevant players  (for standard rotisserie leagues, at least) and their Baseball Reference IDs. However, this sheet contains hitters also. Because this sheet is an Excel table, it’s easy to filter out those hitters. Click on the drop down arrow on the “POS” column. You’ll be presented with a list of all the positions. Check the “(Select All)” box until all the positions below become unchecked.  Then check the “P” box.  Click OK to apply the filter.
Pitcher_FilterThe Player ID Map will now list only pitchers.
11. Starting at the first player and ending with the last, click and drag within the “IDPLAYER” column (first column) and select all player (or select the first player and then use the keyboard shortcut SHIFT + CTRL + Down Arrow). Only select from this first column.Pitchers_Only_List
12. Copy this selected data. Return to the “Pitcher Ranks” sheet. Then paste the data into cell A2.Pitcher_IDs
13. Now that we’re starting this new sheet, we should convert it to an Excel table. We will essentially repeat step 1 above, but for this new worksheet.

Click once to select any player ID. Then locate the “Home” tab in the Excel menu system (“the ribbon”).

Click once on the “Format as Table” drop down, and then select your desired color scheme.Format_As_Table

14. You will then be prompted to verify the range of cells in the table and that your table has a header row. VERIFY_PITCHER_RANGECheck “My table has headers”. Click OK.
15. Repeat steps 4-6 in order to give the table a more meaningful name. In my example, Excel defaulted the table name to “Table6″. I renamed mine to be “MYRANKS_P” (to indicate pitcher ranks, because we already ranked hitters).Name_Manager_Table6
16. Now let’s begin pulling data from the other tabs. I’ll first add “Player Last Name” to the table. To expand your table, simply type into column B and hit Enter (I typed into cell B1). Excel should automatically pull this new column into your table. I’m going to name my column “LNAME”.LNAME_P
17. Your table shading may look like this instead of the image from step 16:BAD_TABLE_SHADINGIf so, click once in the area between the Column “A” header and the Row “1” header (the top left corner of all cells), to select all cells in the entire sheet.SELECT_ALL_CELLS_PITCHERThen click the “Fill Color” icon (looks like a paint can) drop down arrow and choose the “No Fill” option.PITCHERS_NO_FILLYou should now see the proper alternating color scheme.TABLE_PITCHER_SHADING
18. Our goal in this column is to instruct Excel to take the PLAYERID from column A, go into the first column of PLAYERIDMAP, find the matching PLAYERID, and then pull the corresponding LASTNAME. You can see in the image of the PLAYERIDMAP below that LASTNAME is in the fifth column (column E).PLAYERIDMAP_LNAME

To start building the formula, click in cell B2 of your Pitcher Ranks tab. Then click the “fx” button of the formula bar to launch Excel’s formula wizard. We’ll use the wizard the first time through to better explain this function in Excel.Insert_Function_P

19. Type “vlookup” into the search bar and click “Go”. When the function appears, make sure it is selected and hit “OK”. You should then see the different arguments, or components, needed for the formula to work. VLOOKUP_ARGUMENTS
20. The “Lookup_value” is the value on the “Pitcher Ranks” sheet that we want to locate (or match to) in the “PLAYERIDMAP”.

Click once in the “Lookup_value” field. Then click on the value in cell A2 (“aardsda01″).

Excel will convert this to [@PLAYERID]. As we talked about in Part 3, this naming convention is referred to as a “Structured Reference” or a “Table Reference” and can be used when you have converted your data into an Excel table.LOOKUP_VALUE_P

21. The “Table_array” field is the table (or array, or block of data) in which to go look for the matching PLAYERID. Because the PLAYERIDMAP sheet was previously set up as a table, we can take advantage of this.

Click once in the “Table_array” field. Simply type “PLAYERIDMAP” (no quotes). TABLE_ARRAY

You’ll know you got this right if you see part of the PLAYERIDMAP populating to the right of the Table_array field.TABLE_ARRAY_PITCHERS

22. The “Col_index_num” field wants to know the number of the column in the PLAYERID map table to retrieve data from.

Again, our goal is to retrieve LASTNAME from the PLAYERIDMAP table, which is column 5 in that table. You could manually flip back and forth between tabs to determine the column number. You could then enter a “5” in for “Col_index_num”.

This takes time and can be difficult if you start getting into column X (do you know what number letter of the alphabet that is?).  It’s also a problem if you later add a column that would push LASTNAME into column number 6.

For these reasons, I prefer to use the COLUMN formula. When this is entered into the Col_index_num field, it will calculate the location of the LASTNAME column.  We don’t have to flip back and forth.  And if LASTNAME gets shifted to another column, this formula will adjust automatically.

The formula below will determine that LASTNAME is the fifth column in the PLAYERIDMAP table.

COLUMN(PLAYERIDMAP[LASTNAME])

Enter this equation into the Col_index_num field. COL_INDEX_NUM_P

23. Finally, we have the Range_lookup argument. I always enter “FALSE” for this in order to ensure Excel only locates exact matches for a PLAYERID. I don’t want Excel to return an approximate match if the exact PLAYERID cannot be found.RANGE_LOOKUP_P
24. Before hitting “OK” to accept the formula, you can preview the output. In this case we are dealing with “aardsda01″, or David Aardsma (fantasy stud), and can see the formula appears to be working (you can see the end result of this formula is {“Aardsma”}.AARDSMA

Click OK to accept the formula.

Once the formula is entered, it should automatically copy to the remaining rows of the table.P_RANKS_LNAME

25. We will use the VLOOKUP formula to pull additional data, and the majority of the formula will remain the same. To add a FNAME column, type the “FNAME” into cell C1. Copy the formula from cell B2.Don’t click and drag it.  Actually right-click on B2 to copy it or use the CTRL + C shortcut.  Paste the formula into cell C2.  When you copy and paste the formula this way you should end up with two columns displaying player last names.  That’s what you want for now!COPY_FNAME_PITCHERSThen simply double click in cell C2 and change the column name (remember column names are surrounded in [brackets]. So change [LASTNAME] to [FIRSTNAME].).EDIT_FNAME_PITCHERSNerdy Excel talk here, but dragging formulas within tables does not work very well because there’s no way to make the formulas absolute (they want to stay relative as you move them).  That’s why I suggest copying and pasting the formula, even if it duplicates and you then need to change part of it.
26. Repeat step 25 to pull TEAM, POS, and IDFANGRAPHS from the PLAYERIDMAP tab.

If you can’t remember the exact name of a column, once you have entered a table name, like PLAYERIDMAP, and the opening “[” bracket, a helpful type ahead box will display all the column names in the PLAYERIDMAP table.

You can use the mouse to double-click on the column name in the type ahead list or select a column name and hit the Tab key to add it to your formula.TYPE_AHEAD_PITCHERS

The exact formulas you want are:

TEAM:

=VLOOKUP([@PLAYERID],PLAYERIDMAP,
COLUMN(PLAYERIDMAP[TEAM]),FALSE)

POS:

=VLOOKUP([@PLAYERID],PLAYERIDMAP,
COLUMN(PLAYERIDMAP[POS]),FALSE)

IDFANGRAPHS:

=VLOOKUP([@PLAYERID],PLAYERIDMAP,
COLUMN(PLAYERIDMAP[IDFANGRAPHS]),FALSE)

27. We’ve now pulled all the relevant information fromPLAYERIDMAP and can now begin pulling in pitcher projections from our STEAMER_P table.

Add column headers for where we can pull wins (W), games started (GS), saves (SV), innings pitched (IP), hits (H), earned runs (ER), home runs (HR), strikeouts (SO), walks (BB), fielding independent pitching (FIP), and any other counting stat categories used in your league’s scoring system (e.g. L).PITCHER_COLUMN_HEADERS

There will be some tweaks to the VLOOKUP formula we used earlier. First, the Steamer projections use Fangraphs ID numbers. So we will be using the IDFANGRAPHS column as the Lookup_value.

Second, we must specify to pull from the Steamer Pitchers projections (STEAMER_P table name).

And finally, the COLUMN formula will change to determine what statistic to pullVLOOKUP_P_WINS

Your final Wins formula should be:

=VLOOKUP([@IDFANGRAPHS], STEAMER_P,
COLUMN(STEAMER_P[W]), FALSE)

28. After you accept the formula above, you may encounter a situation where the VLOOKUP formula will return “#N/A” for certain players.This error means that Excel could not find the value you told it to look up. In this example image below, Chris Carpenter’s player ID was not found in the projections (probably because he’s retired).CHRIS_CARPENTER

These errors can cause big problems with the rankings. It would be better to have the W, ER, and SO’s for a player to be zero or blank.

To accomplish this, we can use the “IFERROR” formula and wrap it around our original formula.

This is the original formula in the cell:

=VLOOKUP([@IDFANGRAPHS],STEAMER_P,
COLUMN(STEAMER_P[W]),FALSE)

Now surround the VLOOKUP formula with the IFERROR formula. The original VLOOKUP formula will remain exactly as is. I will just put “IFERROR(” in front of it. And behind the existing formula I will put “,0)”.

=IFERROR(VLOOKUP([@IDFANGRAPHS],STEAMER_P,
COLUMN(STEAMER_P[W]),FALSE)
,0)

You can see the edits I made in the red bolded font. That’s all you have to do. Excel will now perform the exact same calculation as before, but if a player cannot be located in the VLOOKUP, Excel will put 0 instead of #N/A.

I recommend using a 0, but if you want it to be a blank instead of a zero, use this:

=IFERROR(VLOOKUP([@IDFANGRAPHS],STEAMER_P,
COLUMN(STEAMER_P[W]),FALSE)
,””)

29. The formulas for GS, SV, IP, H, ER, HR, SO, BB, andFIPare shown below.GS:

=IFERROR(VLOOKUP([@IDFANGRAPHS],STEAMER_P,
COLUMN(STEAMER_P[GS]),FALSE)
,””)

SV:

=IFERROR(VLOOKUP([@IDFANGRAPHS],STEAMER_P,
COLUMN(STEAMER_P[SV]),FALSE)
,””)

IP:

=IFERROR(VLOOKUP([@IDFANGRAPHS],STEAMER_P,
COLUMN(STEAMER_P[IP]),FALSE)
,””)

H:

=IFERROR(VLOOKUP([@IDFANGRAPHS],STEAMER_P,
COLUMN(STEAMER_P[H]),FALSE)
,””)

ER:

=IFERROR(VLOOKUP([@IDFANGRAPHS],STEAMER_P,
COLUMN(STEAMER_P[ER]),FALSE)
,””)

HR:

=IFERROR(VLOOKUP([@IDFANGRAPHS],STEAMER_P,
COLUMN(STEAMER_P[HR]),FALSE)
,””)

SO:

=IFERROR(VLOOKUP([@IDFANGRAPHS],STEAMER_P,
COLUMN(STEAMER_P[SO]),FALSE)
,””)

BB:

=IFERROR(VLOOKUP([@IDFANGRAPHS],STEAMER_P,
COLUMN(STEAMER_P[BB]),FALSE)
,””)

FIP:

=IFERROR(VLOOKUP([@IDFANGRAPHS],STEAMER_P,
COLUMN(STEAMER_P[FIP]),FALSE)
,””)

30. don’t pull ERA or other rate statistics, like WHIP, directly from the projections. I prefer to recalculate them with a formula after the underlying statistics have been pulled.

To do this, type “ERA” in as the next column header. Then enter the formula to calculate ERA  (=([@ER]*9)/[@IP]).

ERA_FORMULA

If you’re not exactly sure of the convention for the formulas (with the brackets and @ symbols) you can always use your mouse to click on the values in the “ER” and “IP” columns and Excel will translate it into the =(@ER]*9)/[@IP] format for you.

Repeat this step to add WHIP and any other rate statistics you desire (K/9, K/BB, B/9, etc.).

You might notice that these rate formulas can also result in errors if a player does not have a projection (dividing by 0 causes an error). You can use the IFERROR formula around the calculation to clean this up.

Here are the formulas I use for ERA and WHIP:

ERA:

=IFERROR(([@ER]*9)/[@IP],0)

WHIP:

=IFERROR(([@BB]+[@H])/[@IP],0)

31. Most statistics don’t need formatting, but ERA and WHIP will. In my file, ERA is located in column “Q”. Click on the “Q” column label (or whatever column ERA is in for you) to select the entire ERA column. Then on the Home tab of the ribbon, click on the comma number format.Comma_StyleRepeat this same step for WHIP (column R in my example file).
32. Save the file.

You’ve now successfully combined pitcher information and projected pitching stats into one table.

WRAP UP

We have now completed setting up our hitter and pitcher worksheets that will be used to rank those players and we also have our league scoring settings set up.

In the next part of the series we’ll pull the scoring settings to the rankings sheets and calculate projected points for each player.

DO YOU HAVE ANY QUESTIONS?

If you have questions, it would be great if you can ask them in the comments below so others can benefit from the discussion.

If you’d like to know when I put out the next post in the series or similar posts in the future, click below to follow me on Twitter.

LINK TO DOWNLOAD FILE:  Points League Rankings – Part 4.XLSX

How To Calculate Rankings for a Points League: Part 5 – Calculating Projected Points

$
0
0

Welcome to the first part of a series in which we’ll go step-by-step through the process of using Microsoft Excel to calculate your own rankings for a fantasy baseball points league (as opposed to rotisserie or head-to-head rotisserie).

Whether you’re in a standard points league at a major site like ESPN or a more advanced Ottoneu league at Fangraphs, this process will help you develop customized rankings for your league.  These instructions can be used for a season-long points league or a weekly head-to-head points league.

If you’re looking for info on how to rank players for a roto league, look here.

I recommend going through all the parts of the series in order. If you missed an earlier part of this series, you can find it here:

ABOUT THESE INSTRUCTIONS

  • The projections used in this series are the Steamer 2015 preseason projections from Fangraphs.  If you see projections that you disagree with or that appear unusual, it’s likely because I began writing this series in December 2014, still early in the off-season.
  • For optimal results, you will want to be on Excel 2007 or higher.  Some of the features used were not in existence in older versions.
  • I use Excel 2013 for the screenshots included in the instructions.  There may be some subtle differences between Excel 2007, 2010, and 2013.
  • I can’t guarantee that all of formulas used in this series will work in Excel for Mac computers.  I apologize for this.  I don’t understand why Excel operates differently and has different features on different platforms.

IN PART 5

In this part of the series we will use the named cells created in Part 2 along with our projection information on the “Hitter Ranks” and “Pitcher Ranks” sheets to calculate total projected points for each hitter and pitcher.

EXCEL FUNCTIONS AND FORMULAS IN THIS POST

We’ll just be doing some basic addition and multiplication.  We won’t be adding in any new features, but we will be doing this basic math using the named cells for your league’s scoring settings that we created in earlier parts of the series.  All_Point_ValuesTo refresh your memory and to see the complete list of named cells, access the “Formulas” tab of the Ribbon and then click the “Name Manager” button.Name_Manager

The list will display all named cells/ranges and named tables.  To view only named cells, click on the “Filter” drop down menu and choose “Defined Names”.Defined_Names

STEP-BY-STEP INSTRUCTIONS

Step Description
1. Go to the “Hitter Ranks” tab in the Excel file.In the first open column next to the table data (e.g. cell  V1), type in “PROJ PTS” as the column header.  Excel should expand the table to include this new column.PROJ_PTS_HITTERS
2. Recall from looking at our named cells above that we named our hitting point values using a “H_PTS_” prefix followed by the abbreviation for the statcategory.In my example league, the hitting point values have the following names in Excel:
  • H_PTS_AB
  • H_PTS_H
  • H_PTS_BB
  • H_PTS_2B
  • H_PTS_3B
  • H_PTS_HR
  • H_PTS_SB

Follow the steps below using the scoring categories and named cells that you set up.  Follow these steps with your league in mind. 

We’ll now use those names to build a formula to calculate projected points.

In my example league, the first hitting scoring category is At Bats (H_PTS_AB).

In the first empty cell below the “PROJ PTS” header (e.g. cell V2), type an “=” and then click on the corresponding stat for the player in this row.

My first player is Bobby Abreu (wow!).  So I clicked in cell H2, the projected ABs for Abreu. PROJ_PTS_AB

3. While still editing this formula we’ve started, we must now multiply the projected AB for Bobby Abreu by the point value for AB.Type the sign for multiplication (the *, or SHIFT + 8).  Then begin to type “H_PTS_”.Building_PROJ_PTSExcel should recognize the name you’re typing and present you with a list of named cells which follow that pattern.  Once you see this list you can double-click on the desired name, use your arrow keys to select “H_PTS_AB” and hit TAB to choose it, or just continue typing the full name.Type_Ahead_Proj_PtsIn my scoring system, I want “H_PTS_AB”.  Hit enter to save the formula at this point.My completed formula at this point is:

=[@AB]*H_PTS_AB

You may need to use the “Number” format options on the “Home” tab of Excel’s menu system to adjust the appearance of your points.NUMBER_FORMATTING

4. Review the output of the “PROJ PTS” column at this point to make sure it seems to be working correctly.FORMATTED_POINTSThe league I play in has an unusual scoring system that penalizes for outs (just like in real baseball, an out is a bad thing).  That’s where the negative value for an AB comes in.
5. Repeat steps 2, 3, and 4 above in order to add in the other hitting scoring categories of your league. Just begin at the end of your original “PROJ PTS” formula, add a “+” sign, and add in the next scoring category and point value.It may be a good idea to build the formula one stat category at a time so that you can do a quick reasonableness check.

For example, building on the formula I started above, to add points for hits, I would edit my “PROJ PTS” formula to be:

=[@AB]*H_PTS_AB+[@H]*H_PTS_H

Continue until you have added in the points for each category.Formula_Part_2My final formula is:

=[@AB]*H_PTS_AB+[@H]*H_PTS_H+[@BB]*H_PTS_BB+[@2B]*H_PTS_2B+[@3B]*H_PTS_3B+[@HR]*H_PTS_HR+[@SB]*H_PTS_SB

Final_H_Formula

6. The accountant in me really really wants you to double check the formula you just created.

Make sure it seems consistent and that the [@AB] argument is paired with “H_PTS_AB”, and all other categories align with their point value name).After all, it probably only took you a couple of minutes to create this formula.  It will probably only take another 30 seconds to review it closely…  And your WHOLE fantasy season depends on it!

7.

If the formula looks good, you can give it one more great check by sorting the “Hitter Ranks” tab by “PROJ PTS” to see who the best players are.

To do this, click the downward pointing filter arrow on the “PROJ PTS” column.  Then click on “Sort Largest to Smallest”.SORT_PROJ_PTS_HITTERSHopefully you’ll find that the players come out in an order that seems appropriate given your scoring system (does Mike Trout come out near the top?).  PROJ_PTS_LEADERSNow let’s move on to the pitchers.

8. Go to the “Pitcher Ranks” tab in the Excel file.  In the first open column next to the table data (e.g. cell S1), type in “PROJ PTS” as the column header.  Excel should expand to include this new row.PROJ_PTS_PITCHERSRecall that we named our pitching point values using a “P_PTS_” prefix followed by the abbreviation for the stat category.In my example league, the pitching point values have the following names in Excel:
  • P_PTS_IP
  • P_PTS_K
  • P_PTS_BB
  • P_PTS_HA
  • P_PTS_SV
  • P_PTS_HD
  • P_PTS_HRA

Follow the steps below using the scoring categories and named cells that you set up.  Follow these steps with your league in mind. 

9. Let’s start to build a formula to calculate projected pitching points, starting with the first pitching point category.

In my example, the first pitching category is Innings Pitched (P_PTS_IP).In the first empty cell in the “PROJ PTS” (e.g. S2), type an “=” and then click on the corresponding stat for the player in this row.

My first player is David Aardsma (who at one point in time had fantasy-relevance, so he made it into the PLAYERIDMAP).

To include Aardsma’s IP, I clicked in cell J2 (remember, your columns may be slightly different depending on when you and where you downloaded your projection data from).PROJ_PTS_IP

10. While still editing this formula we’ve started, we must now multiply the projected IP for Aardsma by the point value for IP.

Type the sign for multiplication (the *, or SHIFT + 8).  Then begin to type “P_PTS_”.PROJ_PTS_IP_MultiplierExcel should recognize the name you’re typing and present you with a list of named cells which follow that pattern.  Once you see this list you can double-click on the desired name, use your arrow keys to select “P_PTS_IP” and hit TAB to choose it, or just continue typing the full name.PROJ_PTS_IP_Type_AheadIn my scoring system, I want “P_PTS_IP”.  Hit enter to save the formula at this point.My completed formula at this point is:

=[@IP]*P_PTS_IP

You may need to use the “Number” format options on the “Home” tab of Excel’s menu system to adjust the appearance of your points.NUMBER_FORMATTING

11. Review the output of the “PROJ PTS” column at this point to make sure it seems to be working correctly.FORMATTED_POINTS_PITCHER
12. Repeat steps 9, 10, and 11 above in order to add in the other pitching scoring categories of your league. Just begin at the end of your original “PROJ PTS” formula, add a “+” sign, and add in the next scoring category and point value.It may be a good idea to build the formula one stat category at a time so that you can do a quick reasonableness check.

For example, building on the formula I started above, to add points for strike outs, I edit my “PROJ PTS” formula to be:

=[@IP]*P_PTS_IP+[@SO]*P_PTS_K

Continue until you have added in the points for each category.Completing_PROJ_PTS_PMy final formula is:

=[@IP]*P_PTS_IP+[@SO]*P_PTS_K+[@BB]*P_PTS_BB+[@H]*P_PTS_HA+[@SV]*P_PTS_SV+[@HR]*P_PTS_HRA

Final_P_PROJ_Formula

You might have noticed that my league’s scoring system uses Holds as a pitching category but I’ve neglected to include that in my formula.  I have not been able to find a reliable projection system that projects Holds, so I’ve just ignored it.

I have no research to back this up, but I feel I can largely ignore Holds during the draft.  By studying team depth charts and watching bullpen usage early in the season, I think I’ll be able to identify unexpected sources of Holds during the season.

13. The entire quality of your draft depends on this formula.

Double check the consistency of your formula (check that the [@IP] argument is paired with “P_PTS_IP”, and all other categories align with their point value name).

14.

If the formula looks good, you can give it one more great check by sorting the “Pitcher Ranks” tab by “PROJ PTS” to see who the best players are.

To do this, click the downward pointing filter arrow on the “PROJ PTS” column.  Then click on “Sort Largest to Smallest”.Sort_P_PROJ_PTSHopefully you’ll find that the players come out in an order that seems appropriate given your scoring system (does Clayton Kershaw come out near the top?).  Sorted_P_Pts

15. Save your file.

WRAP UP

We now have total projected points for both hitters and pitchers, and you might be wondering, “What else is left to do?”.

In our next part of the series we’ll add the important adjustment for replacement level. Failing to incorporate replacement level into your calculations can lead to some poor decisions.

DO YOU HAVE ANY QUESTIONS?

If you have questions, it would be great if you can ask them in the comments below so others can benefit from the discussion.

If you’d like to know when I put out the next post in the series or similar posts in the future, click below to follow me on Twitter.

LINK TO DOWNLOAD FILE:  Points League Rankings – Part 5.xlsx

How To Calculate Custom Rankings for a Points League: Part 6 – Replacement Level and Position Scarcity

$
0
0

Welcome to the first part of a series in which we’ll go step-by-step through the process of using Microsoft Excel to calculate your own rankings for a fantasy baseball points league (as opposed to rotisserie or head-to-head rotisserie).

Whether you’re in a standard points league at a major site like ESPN or a more advanced Ottoneu league at Fangraphs, this process will help you develop customized rankings for your league.  These instructions can be used for a season-long points league or a weekly head-to-head points league.

If you’re looking for info on how to rank players for a roto league, look here.

I recommend going through all the parts of the series in order. If you missed an earlier part of this series, you can find it here:

ABOUT THESE INSTRUCTIONS

  • The projections used in this series are the Steamer 2015 preseason projections from Fangraphs.  If you see projections that you disagree with or that appear unusual, it’s likely because I began writing this series in December 2014, still early in the off-season.
  • For optimal results, you will want to be on Excel 2007 or higher.  Some of the features used were not in existence in older versions.
  • I use Excel 2013 for the screenshots included in the instructions.  There may be some subtle differences between Excel 2007, 2010, and 2013.
  • I can’t guarantee that all of formulas used in this series will work in Excel for Mac computers.  I apologize for this.  I don’t understand why Excel operates differently and has different features on different platforms.

IN PART 6

In this part of the series we will discuss the concept of replacement level, prove that it can lead to better decision making, demonstrate how it is an objective measure for making positional scarcity adjustments, and then incorporate replacement level adjustments for each position into our projected point values.

Accounting For Replacement Level

Heading in to the 2015 season, Ryan Braun is projected by Steamer to produce 82 R, 25 HR, 82 RBI, and 13 SB (or 752 points in my example league).   Buster Posey is projected for 69 R, 19 HR, 75 RBI, and 1 SB (681 points).

Braun’s raw production is clearly superior to that of Posey.  But is that all we need to look at to conclude which player is more valuable?  Don’t we need to include some measure of “replacement level” in this calculation?  Isn’t that what WAR is all about?  Wins Above Replacement?

How do I account for the fact that the day after our fantasy draft I can go out to the free agent listing and pick up an OF that would produce 61 R, 10 HR, 47 RBI, and 15 SB (478 points), or a Catcher that would produce 38 R, 9 HR, 45 RBI, and 7 SB (319 points)?

Clearly the replacement catcher is much less productive than the replacement level OF.

Using Points League Settings

You’ve been following me through the creation of a rankings file for an example league. We just finished converting projected statistics into point values for this league, so let’s take a look at comparing Braun to Alejandro De Aza (a hypothetical replacement level OF) and Posey to Christian Bethancourt (a hypothetical replacement level catcher).

Player Projected Points
Ryan Braun 752
Alejandro De Aza 478
Buster Posey 681
Christian Bethancourt 319

Braun is projected for 274 points over the replacement level outfielder and Posey is projected for 362 points more than the replacement level catcher!

That means Posey is roughly 88 points more valuable than Braun, despite having lower overall projected points.

If you’re having a hard time digesting that, think of it this way.  Let’s assume Braun and Posey represent second round draft picks (just go with it, don’t argue) and De Aza and Bethancourt will be last round draft picks (replacement level).

The team that takes Braun in the second round and Bethancourt in the last round would be projected for 1,071 points.  The team that takes Posey in the second round and De Aza in the last round would be projected for 1,159 points.  Again, that’s 88 more points than the Braun/Bethancourt combination!

This is why considering replacement level matters.

Positional Scarcity Adjustments

You have probably come across suggestions or you might have even thought to yourself that you should “bump” a player up your rankings because he plays a weak position.  But is this really appropriate?  How much do you bump him up?

Another great benefit of incorporating replacement level into your rankings is that it makes your positional scarcity adjustments for you!

You just saw how we proved Posey’s 681 points as a catcher are more valuable than Braun’s 752 from the outfield.  Rather than arbitrarily “bumping” Posey in the rankings, we can figure out exactly where he should be ranked by calculating his “Points Above Replacement”.

Let’s look at the top 15 projected hitters in my example points league.PROJECTED_TOP_15

Not a catcher to be found.  But if we presume this league has 24 starting catchers (you need to read this if you play in a two-catcher league), things change significantly when we calculate points above replacement.TOP_15_OVER_REPLACEMENT

Three catchers rocket into the top 10 while OF and 1B are devalued some.  This movement that takes place after you calculate Points Over Replacement Level IS THE POSITIONAL SCARCITY ADJUSTMENT.  Players move exactly the proper amount.  No guesswork.

EXCEL FUNCTIONS AND FORMULAS IN THIS POST

Nothing really new here.  We’ll just be using things we’ve already used in earlier parts of the series.  We will use another VLOOKUP formula, create a table, and use structured references to build some formulas.

STEP-BY-STEP INSTRUCTIONS

Step Description
1. On the “Scoring Settings” sheet, begin to fill out the information you see in columns G and H below.Replacement_Level_Table
2. Click and drag with your mouse to select the area of the table you have started (ignore the “Replacement Level” heading).Highlight_TableOn the “Home” tab of the Ribbon, select the “Format as Table” drop down and choose a color scheme.Format_As_TableMake sure to specify that your table has headers (check the box). And hit OK.Replacement_Has_Headers
3. Just like with all our other tables, we should give this a name. On the “Formulas” tab of the Ribbon, click on “Name Manager”.Name_ManagerWhen Name Manager appears, choose to Filter the list by “Table Names”.Name_Manager_Filter_Replacment_LevelLocate the only unnamed table (mine is “Table4″ in the example below).  Click on the table in the list and then hit the “Edit…” button.Edit_Table_NameChange the name of this to “REPLACEMENT_LEVEL” and hit “OK” to save the name.  Then hit “Close” to exit the “Name Manager”.
Rename_Table
4. Return to the “Hitter Ranks” tab.  HITTER_RANKS_TABUse the drop down arrow on the “PROJ PTS” column to ensure it is sorted in descending order (players with most projected points at the top).  SORT_PROJ_PTS_HITTERSNow click on the downward pointing arrow on the “POS” column. Click/toggle the “Select All” box until all selections are cleared (none are checked).  Then click to select only the “C” position.  Click “OK” to accept this filter.Catchers_Only_Filter
5. Consider your league size and roster rules and developan approximation of how many catchers will likely be drafted.

For example, in a 12-team league in which each team starts two catchers, there likely won’t be any catchers starting at the DH/UTIL spot.  This means that 24 catchers will be drafted.

To determine who the replacement level catcher will be, click once on the “PROJ PTS” value of the first catcher (Posey in my example).  POSEY_CATCHER_PROJ_PTS

Then click and drag to select more players (you can see an image of this below, make sure you are highlighting only one column).HIGHLIGHT_CATCHERS

As you continue to select more players, watch the “Count:” field on the Excel status bar.Excel_Status_Bar_Count

6. Stop highlighting when the count of catchers reaches the number you expectto be drafted (e.g. 24).

The replacement level player is the very next player that falls outside of the top 24.In the screenshot below you can see that the first catcher not to be drafted will be Rene Rivera.  His projected points are 284.CHRISTIAN_BETHANCOURT

7. Return to the “Scoring Settings” sheet.  SCORING_SETTINGS_TABAnd type in the projected points for the replacement level catcher into our “REPLACEMENT_LEVEL” table created earlier (e.g. 284 for Rene Rivera).REPLACEMENT_LEVEL_CATCHER
8. Repeat steps 4 – 7 for eachposition.

If your league has Corner Infield and Middle Infield roster spots, determining replacement level for the infield positions involves some additional work.

The easiest method (it’s a little imprecise) would be to assume 18 1B will be drafted and 18 3B will be drafted (12 1B to play the 1B slot, 6 1B to play CI, 12 3B to play 3B slot, and 6 3B to play CI).3B_and_1B_FilterIf you want to be more precise, set your filters to show both 1B and 3B at the same time.

Then click and drag so you can see the count of the 36 top combined 1B and 3B.

Then manually count to verify there are at least 12 1B and 12 3B (to fill the actual 1B and 3B positions).

36_Corner_Infielders

As long as you have at least 12 1B and 12 3B, nothing else is necessary.  If you don’t have at least 12 3B, take one 1B out of your group and add in the next best 3B.

For example, when I ran through my hypothetical league I found that the top 36 corner infielders were made up of 22 1B and 14 3B.

The very next first basemen and the very next third basemen outside of that top 36 are your replacement level players.

You must follow a similar process to account for the UTIL/DH spot in your roster.  This will push replacement level even further down the list of players.

The UTIL/DH slot is likely going to end up changing who the last 1B and OF are.  Instead of drafting the top 22 1B (in my example), my league will also likely draft even more 1B to put at the UTIL/DH spot.

NOTE:  Explaining how to identify replacement level in writing is very difficult.  It’s probably even harder for you to understand my scattered thoughts.

That’s why I created this video to show a practical approach you can use.  The video is using “Standings Gain Points” instead of “Projected Points”, but the exact same approach can be followed.  If you do follow the approach in the video you’ll have a very easy to understand color-coded result letting you know exactly who the replacement level players are.COLOR_CODED_REPL

In the end, you must verify that your projected pool of draftable players satisfies your league’s roster requirements.  If you are in a 12-team league with traditional roster requirements (where each team drafts 14 hitters), select the top 168 players and verify that at least 24 C, 36 CI, 36 MI, and 60 OF are included.

Provided these limits are met, the replacement level points for each position is very next 1B, 2B, SS, 3B, or OF that fall outside of your pool of draftable players.

REPLACEMENT LEVEL FOR THE UTIL SPOT:  Your UTIL slot is likely to be filled by a variety of positions (1B, 2B, OF, etc.). Because it can be filled by a player of any position, I believe you should make the replacement level points for DH/UTIL equal to the position with the highest replacement level (this is covered in the video too).

9. Follow steps 4-7 to determine replacement level for pitchers.  This should be much simpler because even if your league uses specific “SP” and “RP” spots, you don’t need to determine replacement level for these differently unless your league has a very unique configuration that forces you into drafting relief pitchers to fill spots.

After you have identified all your replacement level players, make sure you’ve filled out the entire REPLACEMENT_LEVEL table.COMPLETED_REPL_LVL

10. Let’s focus just on hitters for a few steps.

We now need to adjust each player’s projected points to reflect their points above replacement level (like we did above in our Braun vs. Posey example).

Go to your “HITTER RANKS” tab.  Make sure you have cleared any position filters.  To do this, click once on a piece of data in the “HITTER RANKS” tab.  Then go to the “Data” tab and click the “Clear” button.CLEAR_FILTERS

Now add a new column header next to your “PROJ PTS” column. This is where we will pull in the Replacement Level points for each player.

Column W is the first unused column in my example file.  So click in cell W1, type “REPL LEVEL”, and hit Enter.REPL_LEVEL_COLUMN

11. To populate this “REPL LEVEL” columnwe want Excel to look at each player’sposition, go find thatposition in the replacement level table we just set up on the “Scoring Settings” tab, and bring back the replacement level point value for that position.

We can do this using a VLOOKUP formula.

Recall that the VLOOKUP formula is used to search in another table for a specific value (look in the replacement level information and find a specific position).

The formula to use for the VLOOKUP in cell W2 is:

=VLOOKUP([@POS],REPLACEMENT_LEVEL,2,FALSE)

You might be wondering why I typed a “2” in for the Col_index_num.

The reason is because the REPLACEMENT_LEVEL table does not start in Column A, like all our other tables have to this point.  The formula “COLUMN(REPLACEMENT_LEVEL[POINTS])” returns an 8 because it’s in column H of my “Scoring Settings” tab.  REPL_LVL_VLOOKUP

Review the output of the formula.  An easy way to see if everything is working properly is to look for a catcher in the list and verify the point value is consistent with your results from step 7 above.REPL_LVL_FINAL

12. Now let’s add a column to calculate points above replacement level for each player.  My first empty column in my example file is column “X”.  So in cell X1, I’ll type “POINTS OVER REPL” as the column header and hit Enter.PTS_OVER_REPLThe formula here will simply be:

=[@[PROJ PTS]]-[@[REPL LEVEL]]

Type the equals sign and then use your mouse to click on the “PROJ PTS” and “REPL LEVEL” columns as needed while building the formula.

13. As we looked at in the introduction to this part, it’s possible that player rankings (especially for catchers) can shift after you take replacement level into account. Sort the “POINTS OVER REPL” column by clicking on the downward pointing triangle over the column.  Then select “Sort Largest to Smallest”.SORT_PTS_OVER_REPL
14. The POINTS OVERREPL column becomes very important if we are to eventually calculate dollar values for players.  It’s important that this column show 0 for the replacement level players in your league.

YOU NEED TO CHECK THIS.

Recall that my example spreadsheet is being built for a 12-team league where each team drafts 14 hitters.  That would be 168 hitters drafted in total.

You can see in my example below that as I approach the 168th player and move into the replacement level players the “POINTS OVER REPL” approach zero.  You should see this same thing!  As you approach the last few drafted players the “POINTS OVER REPL” should approach zero.DOUBLE_CHECK

If you don’t see this type of result, you need to reevaluate replacement level and make adjustments to the “REPLACEMENT LEVEL” table on the “Scoring Settings” tab.

15. Repeat steps 10 – 14 for pitchers.In a 12-team league that rosters 9 pitchers, 108 starting pitcherswill be drafted, leaving the 109th pitcher as “replacement level”.

Adjust this for your own league’s settings.Even if your league has different spots for Starting Pitchers and Relief Pitchers, I do not recommend determining replacement level for RP and SP.

Make sure you perform the same check of your pitchers.  As you approach replacement level, the “POINTS OVER REPL” should move towards 0.  As you move below replacement level, you should see the points go negative.

16. Save your file.  You have now completed your points league hitter and pitcher rankings!

WRAP UP

We have calculated the points over replacement level for each player.  You no longer have to make arbitrary decisions because you’re trying to account for “positional scarcity”.  The points over replacement level factors this in.  It’s not as simply as comparing the points over replacement level for a catcher and comparing them to an outfielder.

DO YOU HAVE ANY QUESTIONS?

If you have questions, it would be great if you can ask them in the comments below so others can benefit from the discussion.

If you’d like to know when I put out the next post in the series or similar posts in the future, click below to follow me on Twitter.

LINK TO DOWNLOAD FILE:  Points League Rankings – Part 6.XLSX

New Excel Tool – SGP Slope Calculator

$
0
0

I can’t believe it took me so long to think of this! In this post I’ll share a new Excel template I created to help calculate your SGP factors (or SGP denominators).

One of the very first posts I wrote on this site was about “Calculating What it Takes to Win Your League”. I’ve then gone on to write many articles about standings gain points and even about an improvement in the process I found by reading Art McGee’s book “How to Value Players for Rotisserie Baseball” (It’s quite expensive at Amazon but Baseball HQ has had it on “Inventory Closeout” for quite a long time).

So after a few years of writing about SGP it finally dawned on me that, “I should create an Excel file that wraps all this together.” So that’s what I’ve tried to do. The “SGP Calculator” asks a few simple setup questions about your league, the amount of history you want to use, and then uses the SLOPE formula to calculate the standings gain points for each of your league’s scoring categories.

Here’s How the “SGP Calculator” Works

The first tab is aptly named “ANSWER THESE QUESTIONS FIRST”. Several of these are very important in determining how the slope calculations are made so don’t skip over this.SGP_SLOPE_SETUP_QUESTIONS

The Excel file can accommodate up to eight different hitting and pitching categories, up to 10 years of standings information, and up to 15 teams. Use the drop down menus on this tab to select your league’s setting.

The next tab in the spreadsheet is “SGP CALCULATIONS”. Let’s skip over that for now and circle back to it.

SGP_CALCULATIONS

The yellow colored tabs are where you will enter your league history of the overall standings and the totals in each individual category. There are tabs for “Historical Final Standings” (where you’ll enter the total ending roto points for each team), “Hitter Stats”, and “Pitcher Stats”.

There are 17 yellow tabs.  One for overall standings and then eight each for hitting and pitching categories.

There are 17 yellow tabs. One for overall standings and then eight each for hitting and pitching categories.

Each yellow tab displays the “Category Name” in the top left (see “Batting Average” example below). You can enter the history for that category in the table below. Because the spreadsheet has been set up to accommodate 15 teams and 10 years of history you may see several rows and columns with labels “DO NOT ENTER DATA”. Just ignore those rows and columns and only enter data for the years and number of teams you have selected.

The image is large but I had to shrink it to fit here.  Click the image to see the full version.

The image is large but I had to shrink it to fit here. Click the image to see the full version.

Now we can return to the “SGP CALCULATIONS” tab, the end result. It displays the average statistics for each scoring category and uses Excel’s SLOPE formula to calculate the SGP factor (denominator) for each category.

Click the image to see the full-sized version.

Click the image to see the full-sized version.

These are the same SGP factors you would then plug into your customized rankings.

Download the File

You can download the file using this link: SGP Slope Calculator Spreadsheet.xlsx

Or check it out at the Smart Fantasy Baseball Tools page with the Player ID Map (and hopefully some additional tools in the future).

Viewing all 59 articles
Browse latest View live