It's easy enough to imagine how an agency like Standard & Poor's rates a company: Look at the books and try to estimate the chances that the company will pay back the money it's borrowing.
But how does S&P rate a country?
It's not an idle question — just ask Greece, Spain or Portugal, all of which have been downgraded by big ratings agencies recently as Europe's debt crisis intensified.
So: To start with, S&P sends two analysts to the country that's being rated. It seems like a small number for a whole country. But Joydeep Mukherji, who is one of the people who rates countries for S&P, says it's enough.
"What we're looking at is fairly narrow," he says. "Can you pay your debt fully and on time? What's your ability and willingness to do so?"
The analysts spend at least a few days meeting with officials at the ministry of finance and the country's central bank. They talk to politicians and business people. They fly home and write up a report.
A group of about five analysts gets together in a conference room and spends a few hours hashing out the details about the country. And then, the big, dramatic moment when the rating is decided amounts to something like a simple vote by a show of hands.
This is a very big deal. Last week, S&P dropped Greece below a dreaded threshold when the agency lowered the country's rating from BBB+ to BB+. That took Greece out of the "investment grade" range and down into what the market calls "junk" status. That has a big impact. Some bond funds will only buy investment grade bonds. Pension funds and banks — voluntarily, or by regulatory requirement — have similar restrictions on what they can buy.
Because of the ramifications of downgrading a country to junk status, Mukherji says, "We think deeper and longer and harder about going across that line."
Still, some critics say the very act of downgrading a country to junk status is harmful. Mukherji disagrees.
"It's not the rating which caused the problem," he says. "The problem was there."