The government's index of leading indicators declined by 1.8 percent in October, the third consecutive monthly drop, the Commerce Department reported yesterday. Meanwhile, two major banks lowered their prime lending rates to 15 1/2 percent, the lowest level in more than a year.

As the recession has taken hold, private demand for credit has fallen and brought interest rates down. In addition, the Federal Reserve has recently succeeded in speeding up the growth of the money supply. Yesterday the Fed announced that the narrow M1-B measure, which includes cash and checking accounts at all thrift institutions, rose by $1.7 billion to $437.4 billion in the week ending November 18.

In a separate release, the Commerce Department said yesterday that the nation's trade deficit widened substantially in October to $5.3 billion from September's $2.6 billion. The trade gap so far this year totals $34 billion, and government analysts believe the deficit for 1981 as a whole could top last year's $36.4 billion by "several billions."

A strong rise in the value of the dollar has contributed to the worsening trade picture this year. Exports dropped by 3.1 percent in October to $19 billion, yesterday's report showed. Meanwhile the recession has not yet had the expected effect of cutting into import demand. In October there were across-the-board increases in non-oil imports, which pushed the total up by 9.4 percent to $24.3 billion.

Commerce Secretary Malcolm Baldrige commented on the trade figures that "the sharp rise in non-oil imports of $2 billion was in part the result of temporary factors. Foreign car imports climbed by $425 million, reflecting increased shipments at the beginning of the model year."

However, he said the economic slowdown will "serve to reduce imports, and this effect should be more evident in coming months."

October's decline in the leading indicators was less than the revised 2.2 percent decline recorded for September, but suggests that the recession still has some way to run. The Commerce Department's chief economist, Robert Ortner, said yesterday the decline indicates "the recession is for real and it's continuing." However he added that he hoped the slowdown "will be reviewed as a relatively moderate one."

Many analysts think the economy is still worsening this quarter, but that the fall in output in the early months of 1982 will be less than that for this quarter.

Of the 10 indicators included in the October leading index, six contributed to the decline. A sharp increase in the layoff rate contributed the greatest decline, the Department said. The other five depressing the index were: new orders, after allowing for inflation; speed of delivery to companies from vendors; contracts and order for plant and equipment, after allowing for inflation; building permits; and change in total liquid assets.

Although the recession has now become widespread, the housing and construction industries--which led the decline--have been the hardest hit. A construction expert said yesterday, however, that the worst could be over for that industry.

George A. Christie said while contracts for new construction were down one percent in October from the previous month, October may have marked the bottom of this year's steep decline in building activity. Christie, vice president and chief economist at the F. W. Dodge division of McGraw-Hill Information systems, said that contracts in October totaled $12.3 billion.