Democrats are optimistic about the future. They may have gotten pasted in 2014, but they expect great results in the next decade based on favorable trends in the population.

"The Republican party is in a death spiral," Democratic pollster Stanley Greenberg warns in his new book America Ascendant. It is in a "pitched fight" with what Greenberg calls the "new American majority," which is composed of "African Americans, Hispanics, Millennials," who "will constitute 54 percent of the electorate in 2016." If one includes "seculars with no religious affiliation," then this group amounts to 63 percent of the electorate that is sympathetic to the Democrats.

Greenberg’s claim is merely the latest version of an argument that Celinda Lake and other Democratic pollsters as well as analysts from the Center for American Progress have been making for the past three or four years. The heart of the argument is that the groups in the population that are likely to vote for Democrats are growing, while those that are likely to vote for Republicans are shrinking as a percentage of the electorate. As a result, Democrats will inevitably win political majorities.

This argument is at least half-wrong. Democrats could eventually reclaim the majorities they won in 2008 or enjoyed earlier in the past century, but it won’t happen simply because of demography. Republicans have rising groups of their own that could counter or nullify these trends. Considered merely on that basis, the parties are at a standoff. Which party wins the coming elections will depend on politics — what kind of candidates the parties nominate, what they campaign on, and what they do in office.

Some worrying demographic trends for Democrats

Greenberg and other Democratic writers concede that Republicans will continue to win the white working-class vote — composed, roughly speaking, of whites who do not have four-year college degrees. In 2012, President Obama won only 36 percent of these voters against Republican Mitt Romney; in 2014, Democrats won just 34 percent of these voters in House races.

Though these voters are a declining proportion of the electorate —from about 65 percent in 1980 to about 35 percent today — they still hold the balance of power in the Deep South and in swing states like Iowa, Wisconsin, Ohio, Minnesota, and New Hampshire.

Republicans also have two other groups that, unlike the white working class, are increasing in size: voters with a four-year, but not an advanced, college degree, and senior citizens.

Initially, these four-year college grads were torn politically between Democrats and Republicans. They backed Bill Clinton in 1992 and 1996, but George W. Bush in 2000 and 2004. In 2006 they moved back to the Democrats, and in 2008 they supported Barack Obama and Democratic House candidates, but since then they have been gravitating back into the Republican fold and could stay there. Republican Mitt Romney won this group by 51 to 47 percent in 2012, and Republican House candidates won them in 2014 by 54 to 44 percent.

This phenomenon is especially concentrated among whites in this group, who occupy a comparable rung in the occupational ladder now to the working-class Reagan Democrats of 1980, share similar worries and resentments, and have been squeezed economically during the past 15 years. In 2008, according to the American National Election Studies (ANES), Republican John McCain won these voters against Barack Obama by 54 to 42 percent. But by 2012, the margin had widened to 57 to 38 percent — a 7-point swing that is comparable to the margins by which Romney won the white working class.

And there’s a surprising subset of this trend: While African-American support for Democrats doesn’t vary by income or occupation, there is now, according to the ANES surveys, a gap opening up between Hispanics with a high school diploma or less, who supported Obama by more than 70 percent, and those with some college or an associate degree, who supported him by just 55 percent. Based purely on current demographic trends, one could reason that in a generation, as more Hispanics get college degrees, they could become almost as tough a sell for the Democrats as white college graduates are now.

And there’s an added consideration. Sociologist Richard Alba argues in the current American Prospect that the very census categories upon which political predictions about a majority-minority country rest are highly suspect. The census this year found that more than half (50.2 percent) of the children under 5 were ethnic minorities — a clear sign that nonwhites would eventually outnumber whites in the US. But it turned out that the largest single group of these minorities — 22 percent of the children under 5 — were Hispanics whose parents identified them as white. So in fact at least 72 percent of the children might be raised as and identify politically as "whites."

The other key group that is moving toward Republicans, senior citizens, was once a dependable Democratic vote. Bill Clinton won voters 65 and over twice, Al Gore carried them in 2000, and John Kerry in 2004. But since 2008, seniors have begun tilting Republican. Republicans gained a 6-point advantage over Democrats in 2010. This is at least partly explained by opposition to Obama’s moves on health care and immigration.

According to Pew polls, seniors have been the group most disapproving of Obama’s Affordable Care — 56.5 to 37.9 percent in September 2013. Many seniors appear to have feared that the Affordable Care Act was being financed by reductions in projected spending on Medicare. They saw themselves having to sacrifice their own coverage for the sake of the uninsured.

Seniors have also been the most critical of immigration reform proposals. In December 2014, when Obama issued an executive order allowing some undocumented immigrants to become legal residents, seniors in a Pew poll opposed Obama’s order by 58 to 39 percent. A Brookings Public Religion Research Institute poll in 2013 found that seniors were the only age group in which a greater number believed that growing immigration "threatens American customs and values."

If you count up the percentage of the vote that working-class whites and four-year college grads represent, and add overlapping groups of senior citizens with their unusually high turnout, rural voters, evangelicals, and business owners and managers, you get the same kind of formidable bloc for Republicans. It’s one that could rival the one Greenberg finds for Democrats — even if you throw in professionals with advanced degrees, a group that Greenberg unaccountably omits from his 63 percent.

By sheer demographic calculation, you can’t plausibly predict which party will capture Washington over the next decade or two. What finally makes the difference in overall election results is not demographics but politics.

How politics can determine which party’s coalition wins out in elections

Democrats maintained majorities from 1932 to 1964 because voters identified them as the party of the "common man." During that period, Democrats regularly commanded the support of the lower three-fifths of the income pyramid. But with the shift of white working-class Democrats to the Republican Party that began in the 1960s during the conflict over civil rights, and with the arrival in the Democratic Party of upscale professionals, the party coalitions no longer mimicked differences in class and income.

Yet — and here is where politics comes in — many state and most national elections are still won by the party that can claim the mantle of the "common man" — translated now into the "middle class" — and lost by the party that becomes identified with its "special interests." So the trick for a party and a candidate is to maintain a base of heterogeneous special interests, while still appearing to be the champion of the ordinary American.

Even after the civil rights reforms of the 1960s won wide acceptance, Democrats continued to hemorrhage support among working- and middle-class whites. One reason was that the Democrats championed reforms that were seen as primarily aiding minorities and the poor but that were funded by, or required sacrifices from, the white working class and middle class — and not to the same measure by the upper class.

That’s what the early battles over busing and affirmative action were about, and what the outcry over welfare and taxes and big government has been about. It’s also at the heart of negative reaction to the Affordable Care Act, which — leaving aside ongoing quarrels among experts — was widely seen as forcing the already insured to pay for the uninsured.

Democrats have also suffered when they have become identified too closely with the social or cultural agenda of groups within their coalition. Democrats’ support for abortion hurt candidates in the South and West; support for same-sex marriage — which is now widespread — initially damaged Democrats in the 2004 election.

Democrats’ identification with Black Lives Matter protests against the police — no matter how justified — could also cost them in the coming election. In a special election last May in a Staten Island and Brooklyn congressional district that voted for Obama in 2008 and 2012, where Democrats enjoy a 16-point edge in voter registration, the Republican district attorney who had failed to secure an indictment against the cop who killed Eric Garner routed a Democratic opponent who had been critical of his handling of the case.

In these instances, Democrats have lost votes not simply because they backed measures favored by their base, but because they became identified primarily with those measures to the exclusion of a more generalizable appeal on economics and national security — the kind that got Bill Clinton elected in 1992 and Barack Obama in 2008.

Perhaps the most vivid example in 2014 was the Texas gubernatorial election. Democrats nominated Wendy Davis, an outspoken proponent of abortion rights, as their candidate against Lt. Gov. Greg Abbott. Davis’s field operation was run by Battleground Texas, which hoped to use the race to increase Latino participation in Texas politics. But a candidate chiefly identified with abortion rights was the last person to be able to do that among Latino voters. Davis got slaughtered. Only 17 percent of Latinos turned out, and Davis won just 55 percent of them.

Republicans, of course, have a similar problem. When they run candidates who too closely identify with one part of their coalition — whether it is the uncaring rich (Mitt Romney in 2012) or the evangelical or nativist right (Richard Mourdock and Todd Akin in 2012) — they can lose state and national elections. And that’s exactly what is worrying former Bush operative Karl Rove and other establishment Republicans as they contemplate the party’s prospects in the 2016 presidential election.

What all this means for the 2016 election

Even though Bernie Sanders appears to be surging in Iowa and New Hampshire, it’s still fairly likely that, barring a major scandal, Hillary Clinton will be the Democratic nominee for president this November. Clinton lacks Bill Clinton’s personal touch and Obama’s charisma. She will also have to bear the burden of voters’ accumulated grievances against the Obama administration. The final outcome will very much depend on whom the Republicans nominate to face her.

If they nominate a candidate who can move to the center and retain the party’s base — as several Republican Senate and gubernatorial candidates did effectively in 2014 — then the Republicans stand a good chance of winning. With their advantage in congressional races, they could dominate Washington the way Republicans did during George W. Bush’s administration.

But if the party nominates a hard-right candidate like Ted Cruz who cannot move sufficiently to the center, they could easily lose. Or if the Republicans select a maverick firebrand like Donald Trump, they could split their own vote while invigorating the Democratic base, especially among women and minorities. If Hispanics, whom Trump has already alienated, give three-quarters of their vote to a Democrat and turn out around 55 percent, a Republican president candidate will have difficulty winning an election. The United States could become post-1994 California writ large.

If the national Republican Party were then to remain mired on the populist or hard right, Greenberg’s prophecy of a new American majority could turn out to be correct — not as a result of demographics, but because the Republicans would have become identified with only one part of their coalition. But it’s more likely that Republicans would take their defeat to heart, and nominate more acceptable candidates in 2018 and 2020, as they did in 2014 after suffering defeats in 2012.

In that case, what political scientist W.D. Burnham called the "unstable equilibrium" between the two parties would persist, and the key to winning elections would continue to lie not in census figures, but in which party could run the best candidates and campaigns.