With the trade deadline 22 days away, we’re starting to reach the point where deals could come together pretty quickly. The standings are beginning to sort out the contenders from the pretenders, and teams have mostly completed their internal evaluations of what they need for the stretch run. Over the next few weeks, the focus will turn to getting deals done, and for every team looking for a big deadline upgrade, two names will be at the front and center of those discussions: Johnny Cueto and Cole Hamels.

They’re not just the two best pitchers on the market; they’re probably the two best overall players as well. Both are high quality starters with long track records of success, and each could upgrade an acquiring team by something like a couple of wins over the remainder of the season, plus the upgrade of adding a frontline starter to their postseason rotation. Both players are going to be in high demand, and will likely return a significant haul for their organizations.

But which one should a team prefer? Let’s compare the pros and cons of each, and look at whether contenders should be willing to pay more for either pitcher.

Performance wise, both are pretty similar. Here are their numbers over the last three calendar years, so July 8th of 2012 through July 8th of 2015.

Name IP BB% K% GB% HR/FB LOB% BABIP ERA- FIP- xFIP- WAR RA9-WAR Johnny Cueto 520.1 6% 24% 47% 11% 80% 0.249 68 87 87 9.8 14.7 Cole Hamels 635.1 6% 24% 45% 10% 78% 0.293 80 83 87 13.4 14.1

Because Cueto missed most of the 2013 season, Hamels has thrown 100 more innings over this time frame, and he’s certainly avoided the dings and scratches that have caused Cueto to miss starts here and there. If a team is primarily looking for durability above all else, Hamels is the pretty easy choice. But Cueto did throw 244 innings last year, and is among the league leaders in innings pitched again this season, so we’re not talking about Erik Bedard here. There’s more health risk with Cueto than Hamels, but Cueto’s issues aren’t nearly serious enough to scare contenders away.

And what he might lack in quantity, he has made up for with quality. On the core metrics of walks, strikeouts, and groundballs/home runs, the two are quite similar; Cueto’s home run rate is a little bit higher, but HRs can be pretty fickle, and that difference goes away if you look at their career numbers. By things like FIP or xFIP, there’s no real difference between the two pitchers.

But while measures that ignore BABIP and sequencing are the better choice when dealing with smaller samples, both pitchers have thrown more than enough innings to establish themselves as pitchers who can sustain performances better than these ERA estimators would suggest. Over the past 10 years, Cueto is #4 in FDP-Wins (+8.2), while Hamels checks in at #24 (+4.7), as both pitchers have run well below average BABIPs over their careers. For both pitchers, FIP/xFIP understate their value, as these two also add value by allowing a lower-than-average rate of hits on balls in play.

But while both seem to possess some skills in this area, Cueto is clearly better at it. Since the start of the 2011 season, when he broke out as as a frontline starting pitcher, he’s allowed just a .256 BABIP over 791 innings, the lowest mark of any starting pitcher in baseball during that stretch. Hamels has allowed a .283 BABIP over 966 innings during the same time period, so he’s racked up those non-FIP wins more by being a little better than average over a larger number of innings. While it’s easier to run better rate stats in smaller innings totals — which means we have to regress Cueto’s BABIP back towards the mean more than Hamels — this does seem to be an area where Cueto has an advantage. Both induce weak contact, but Cueto does so more often, and to a larger extent.

So on a per-innings basis, you’d prefer Cueto, especially given the way he’s trending. By getting his strikeout rate up to 25% over the last year and a half, he’s really cemented himself as a legitimate #1 starter. Meanwhile, Hamels strong career track record of outperforming his FIP is mostly based on the early part of his career, and he’s pitched much closer to the ERA estimators over the last three and a half years. While Cueto has run a 66/85 ERA-/FIP- split since the start of the 2012 season, Hamels is at 81/83 over that same time period.

Of course, that’s nothing to sneeze at, and both marks still put Hamels clearly among the better pitchers in baseball. But Cueto’s rate stats are just a little bit better, and he has a stronger argument for being in the top tier of Major League pitchers right now; since the start of the 2012 season, in fact, only Clayton Kershaw has posted a lower ERA-. On a runs allowed basis, Cueto has been better than Chris Sale, Felix Hernandez, Max Scherzer, or David Price. Hamels hasn’t quite cracked that tier, though he’s very solidly established in the next one.

So Cueto is probably the slightly better pitcher at this point, but Hamels comes with reduced health risk. If you only want to maximize your upside and try to add as many 2015 wins as possible, you probably want Cueto, but if you’re looking to make sure you get the upgrade you’re paying for, perhaps taking the higher floor with Hamels isn’t a bad idea. Picking which one you’d rather have on the mound for the rest of the year is mostly a matter of risk tolerance.

Of course, that’s only focusing on 2015, and trade value is not just expected performance over the remainder of the season. Contract status matters, and the largest difference between Hamels and Cueto isn’t on the field, but on the books. Cueto is in the last season of his contract, so he will be eligible for free agency this winter, where he’s likely to land a deal somewhere in the general range of Jon Lester’s 6/$155M contract. Hamels, meanwhile, is under team control for at least the next three seasons at a total of $74 million, with the possibility that his fourth year option will either vest or be picked up as part of the trade, which would push his remaining guarantee to $92 million over the next four years.

If we give Cueto the Lester deal, then the future expected cost difference between the two is something like $65 million over the last two years of the deal. Cueto is a slightly better pitcher and two years younger than Hamels, but adding something like 2/$65M on to the end makes it more possible that Hamels provides a better return on the investment going forward. As good as Cueto is, I don’t think we can project him to be worth more than $10 or $15 million per year in those last couple of years, creating something like $30 or $40 million in negative value in those extra seasons, and Cueto would have to be a full win per year better than Hamels in the first four years of the deal to make up for that likely dead money at the end of the contract.

And, of course, Cueto’s deal could end up north of Lester’s 6/$155M. Maybe he’s gets 7/$175M instead, pushing up towards Max Scherzer’s price based on his level of recent dominance. The acquiring team also isn’t guaranteed to re-sign him even if they’re the high bidder, so there’s some value in the certainty of having Hamels versus the potential of bidding on Cueto. Even with Cueto being the better pitcher at the moment, the extra years of team control may provide enough 2016-2019 value to make Hamels the better acquisition for a team not just focused on 2015.

But it isn’t clear cut one way or the other, especially because we didn’t touch on the $6 million difference in remaining salary for the rest of this year. The Phillies could very well pick up the difference for any team deciding between the two, but they’re unlikely to want to keep $6 million on their 2015 books for nothing, and will likely ask for a better return in any deal where they’re picking up some of the remaining salary. And while 3/$74M or 4/$92M is a below market deal for a pitcher of Hamels quality, some teams might prefer to pay a little more in years five, six, or seven to get a better pitcher in the short-term.

So, in the end, I don’t know that it’s clear that either one has significantly more trade value than the other. To a team solely focused on 2015, or a team uninterested in adding a big salary to their books going forward, they should pay a little more for Cueto. To a team that is trying to balance winning both this season and next year — and has the financial capability of adding a big salary to the books next year — Hamels is probabably worth a slight premium over Cueto.

When the dust settles, I’d bet they command very similar returns, with both pitchers bringing back multiple quality prospects to their organizations. What might those packages look like? We’ll tackle that tomorrow.