Opportunity cost. That's an economist's term for what you lose when you divert your investments and attention to something less profitable. It's also a good term for the losses Donald Trump has incurred in the last six days — 6 percent of the 101 days between the close of the conventions and the election in November.

Trump has spent much of that time attacking the father and mother of a Muslim U.S. serviceman killed in Iraq. He has made a point of refusing to support Paul Ryan or John McCain in their upcoming primaries. He accepted someone else's Purple Heart and said that his business investments amounted to "sacrifices."

Even if you think Trump's remarks were defensible, you should be able to see how a hostile press would depict them in the most damaging way. The mainstream media inevitably slants things against Republicans. You may not like it, but if you're a rational adult you take it into account.

The opportunity cost for Trump and for his party is that he failed to direct attention to what he could have made Hillary Clinton's glaring weaknesses.

One was highlighted by the weak gross domestic figures announced Friday, showing very tepid growth this year. Clinton, as the candidate of the incumbent party, had to promise to continue and extend its macroeconomic policies. The GDP figures make a powerful case against that.

Another was Clinton's performance on the Sunday talk shows. FBI Director James Comey "said that my answers were truthful," Clinton said. Of course Comey said the opposite, that repeated Clinton statements about her emails were untrue. Washington Post fact-checker Glenn Kessler gave her a maximum four Pinocchio's for her statement to the contrary.

She also said that the multiple family members of those slain in Benghazi who said, back then and now, that she attributed the attacks to protests at a video must have been mistaken about what they heard. Sure.

Trump thus had plenty of fresh raw material to fill multiple campaign days discussing the mendaciousness of "Crooked Hillary." He might even have raised the more unnerving possibility that, surrounded as she typically has been by a sycophantic coterie, she actually believes what she said. No one wants a president who is delusional.

The third opportunity cost for the Trump campaign is time missed attacking Clinton for the most leftward party platform and agenda ever, as Ross Douthat argued in his New York Times column.

For nearly 40 years abortion has been allowed but not subsidized by taxpayers. Clinton now wants taxpayer funding. Large majorities of Americans disagree.

Voters don't want to see all 11 million illegal immigrants deported immediately. But they also don't want Clinton's policy of deporting no one but convicted felons — an open border policy that incentivizes illegal immigration for decades to come.

Clinton also promises to crack down on fracking, which has vastly reduced gas and utility prices, and to put restrictions on gig economy services like Uber. Not much to like here for drivers and Millennials.

Plus, she wants to amend the First Amendment to allow government to restrict and prohibit political speech and, in a breathtaking non sequitur, argues that this will stimulate economic growth. She may feel the need to argue that, inasmuch as almost none of her other policies would.

In other words, the nominee of the challenger has a target-rich environment here. But instead he launches a Hatfield vs. McCoy-type feud against two Gold Star parents.

So Trump is strengthening rather than weakening Democrats' argument that he is too erratic, impulsive and ignorant (does he know Russia annexed Crimea?) to be president.

The media now are buzzing with speculation that Trump backers like Newt Gingrich and Rudy Giuliani are plotting an intervention and that Trump might drop out or be forced out of the race. That's not likely. He knows he won't increase his chances of winning by withdrawing. But does he understand that he'd increase them by concentrating on attacks on a vulnerable opponent?

Even free-market economists admit there are market failures in the real world. In the political marketplace this year we've seen market failures galore. A weak Democrat pre-empted her party's nomination, and the incentives in a multi-candidate field prevented opponents from deconstructing a weak front-runner.

Now Trump's eccentricities threaten to elect as president a congenital liar who is way to the left of the public. Lots of opportunity cost all round.