FORTUNE — Wall Street obsessively monitors Capitol Hill, and with good reason: the slightest tweak in a bill’s language can boost–or bludgeon–corporate profits. But investors often struggle to predict how government actions will impact stocks. Take, for example, the Affordable Care Act. Market sentiment towards the bill oscillated wildly in the months leading up to its passage. Some investors are still confused about whether the law will benefit drug makers, medical device companies, and insurers.
Most bills are complicated, and it isn’t always easy to anticipate whether they will help or hurt stocks. But a new study from the National Bureau of Economic Research by Lauren Cohen, Karl Diether, and Christopher Malloy offers a simple solution. The researchers posit that investors can forecast the effect that legislation will have on a sector by looking at the Congressmen who are voting for it. If the bill has garnered support from senators who hail from states where the relevant industries have a strong presence, then you should buy those industries after it passes. If the same senators oppose the bill, short the sector.
The researchers analyzed votes cast by senators on approximately 6,000 bills between 1989 and 2008. They singled out the industries that were mentioned in each bill, and then classified senators as “interested” if those industries were concentrated in their home states. If the ratio of “interested” senators voting in favor of the bill was greater than the ratio of “uninterested” senators, they bought the sector and held it for a month. If the ratio of “interested” senators voting against the bill was high and it passed, they shorted the sector.
Their strategy worked. The basic long-short portfolio they created generated risk-adjusted returns of 11% a year over the course of two decades. The S&P 500 returned about 8.3% a year in that time.
The researchers found that, if they honed in on the voters in the Senate with the greatest industry representation in their states, the outperformance was even more dramatic. When they tracked senators who voted on behalf of their home states’ biggest–and most economically important–industries, they achieved risk-adjusted returns of 12.6% a year. If they focused only on legislators who represented industries that were the most impacted by legislation, their annualized returns rose to 15.6% a year.
The authors’ decision to look at senators seems circuitous at first; why not just examine the bills themselves to see which sectors benefit? But when the researchers focused on the text of the bills, their results were less impressive. If they bought sectors that were mentioned in bills that were passed, the portfolios they built performed on par with the index. When they invested in sectors that received positive mentions in bills, they achieved similarly average results.
As it turns out, the votes of senators with vested interests are much better indicators of future stock returns. “Just looking at the behavior of these people who are interested is incredibly powerful,” says Lauren Cohen, one of the paper’s co-authors.
It isn’t surprising that senators push for bills that benefit the industries that dominate their home states. But the strength of the correlation between their votes and stock returns suggests that elected officials not only have strong incentives to support certain pieces of legislation, but also strong insights into corporate activity. The fact that they successfully advocated for bills that supported their respective industries in the market suggests that they based their votes on prescient information, no doubt gleaned from the industries they represent.
And they’re getting better at it. According to the study, the magnitude of the “interested senator” effect has increased by as much as 20% in recent years. In other words, senators are increasingly adept at picking bills that support their vested interests–and investors would be wise to track their votes.