It's a good thing for Ronald Reagan that he doesn't work at the Commerce Department. He might have found himself out of a job yesterday.

The president may have violated government rules when he told a nationally televised press conference Wednesday night that "a little good news ... tomorrow morning is going to be released, with regard to the economy."

Just as Reagan predicted, Commerce announced yesterday at 8:30 a.m. that the economy expanded at a healthier rate in the final three months of 1987 than a previous report had indicated.

Reagan is one of a handful of officials who are allowed access to government economic indicators before they're released. Those officials aren't supposed to reveal the information to anybody because the figures can affect the stock, bond and currency markets.

A document titled "Statistical Policy Directive No. 3," issued by the Office of Management and Budget, decrees that "all employees of the executive branch" who receive confidential economic data "are responsible for assuring that there is no release prior to the official release time."

Commerce takes that rule seriously. When the department announces economic indicators, it allows reporters to peruse the figures in advance only on condition that they be locked in a room for half an hour so that they can't phone their news desks until the exact moment of release.

In June 1986, Commerce fired three employees for using their advance knowledge of economic statistics to play the market. The department found that no criminal statute existed to cover the situation, so it submitted legislation to Congress making it a felony for government officials to use confidential data for personal gain. The proposed law, which set prison terms and stiff fines for violations, hasn't yet been acted on by lawmakers.

The president, to be sure, didn't reveal any precise numbers at his press conference. Nor, presumably, did he act out of desire for pecuniary gain -- only political mileage.

But Commerce officials acknowledged that a department employee who had access to an economic statistic and divulged even a vague hint about it would be in hot water.

Different rules apply to presidents, however -- especially Teflon ones. "He did something naughty, but not very grave," said one Commerce official.

Ironically, Reagan may have caused traders to be disappointed when the actual statistics were released yesterday morning. Many economists had predicted that the figures would show the economy grew at a robust 5 percent annual rate in the fourth quarter of 1987, and Reagan's statement fueled those hopes. Instead, the report put the figure at 4.5 percent.