Opponent wFPA App

Just like NBA and NFL, we must consider the strength of opponent of players in MLB DFS - think of this application as the baseball version of our NBA OVP app. But for baseball, measurement of strength of opponent offers a number of issues that don't exist for basketball. Position (at least for the purposes of this app) doesn't really matter in baseball: there are really only two positions - batter and pitcher. Not all game environments are equal - certain ballparks have higher and lower baseline fantasy production levels. And lastly, equal outcomes don't always carry equal fantasy value - a double is worth more than just a double if there are runners on base or if the batter scores a run in the subsequent at bat. wFPA stands for "weighted fantasy points allowed", it is a measure of the average fantasy points allowed by a batter or pitcher to opposing pitchers or batters, scaled to the aforementioned variable factors.

App User Guide

  1. Site input: Select site scoring scheme to compare players over. DraftKings, FanDuel, or Yahoo only, can't select multiple.
  2. Batter(s) input: Select the batters whose wFPA you want to consider. The input is defaulted to show "All" batters and the "League Average". When selected, the "League Average" will appear as the first row in the output to the right. As it suggests, this is the average wFPA of all players' (including hitting pitchers) plate appearances. To compare specific hitters, delete "All" and add desired players to the input. Keep in mind that the wFPA for batters are the weighted pitching fantasy points they allow to pitchers per plate appearance.
  3. Pitcher(s) input: Select the pitchers whose wFPA you want to consider. This input operates identically to (2), but for pitchers, displaying the average weighted batting fantasy points they allow opposing hitters per plate appearance.
  4. Minimum plate appearance threshold: The application is defaulted to show the wFPA of all batters and pitchers who have registered a plate appearance (or batter faced in the case of pitchers). Small sample size players can sometimes display extreme and unreliable wFPA metrics. In this input, you can set a minimum plate appearances (or batters faced) threshold for players to appear in the output to the right.
  5. Date range input: In this input you can control the date range for which you want the data output to reflect. Changing the date range will affect players' wFPA and the league average wFPA. At the moment you can only view back to the 2018 season.
  6. Raw data download button: This download button will download play-by-play logs for the specified date range. Not all "plays" will factor into the wFPA metrics, as the dataset does contain steals, wild pitches, pickoffs, etc. The wFPA column in the output is a by-pticher of by-batter mean of the "batter_SP_PS_[DKP/FDP/YHP]" (for pitcher wFPAs) or "pitcher_SP_PS_[DKP/FDP/YHP]" (for batter wFPAs). The "SP" and "PS" stand for "sequence-projected" and "park-scaled" fantasy point totals, which we will discuss in (7).
  7. wFPA column: This column is the key metric in for the application. In short, it is a measure of the average pitching fantasy points allowed to pitchers by hitters per plate appearance or the average batting fantasy points allowed to hitters by pitchers per plate appearance/batter faced. We say in short, because it is not just a simple average fantasy points allowed by pitchers or hitters. As mentioned above, equal outcomes carry variable fantasy value based on sequencing (prior and future outcomes). The first fantasy value transformation we apply to all plate appearance outcomes is to determine the amount of "sequence-independent" fantasy points associated with that outcome. In the case of hitting outcomes, this is just the value of the hit type according to site scoring scheme. Home runs imply an additional fantasy bonus for the run scored and RBI that a hitter automatically registers by hitting the home run. Sequence-independent fantasy points ignore additional fantasy bonuses due to RBIs, subsequent stolen bases, or runs scored (with the exception being the implied RBI and run scored from home runs). We then add a linear regression estimation of the average "sequence-dependent" fantasy points associated with each outcome on top of the sequence-independent fantasy points, to create a uniform "sequence-projected" fantasy value for all plate appearance outcomes. Next we, scale this sequenced-projected fantasy value by a park factor. The idea being that, in a vacuum, the true strength of opposition of a pitcher who frequently plays at, say Coors Field, is deflated by not scaling back their sequence-projected fantasy points allowed. We use FanGraphs "Park Factors" - in short, these are percentage scales: 100 is an average park, a park factor of 105 means that there are 10% more run scored at this ballpark, a park factor of 98 means that there are 4% fewer runs scored at this ballpark. The next transformation that we impose on fantasy value of a plate appearance is a park factor scaling, resulting in a sequence-projected, park-scaled fantasy value associated with each outcome. The goal of metric, which we call wFPA or "weighted fantasy output allowed" is to report the the propensity of hitters and pitchers to allow fantasy points to the opposition, independent of sequencing or the park in which an outcome occurred.
  8. Batters & Pitchers output tabs: These tabs allow you to toggle between wFPA of pitchers and hitters. Keep in mind that hitters' wFPA is fantasy value allowed by hitters to pitchers, pitchers' wFPA is fantasy value allowed by pitchers to hitters.