MEXICO CITY, SEPT. 1 -- President Miguel de la Madrid, addressing the nation as he enters his final year in office, said today that his controversial policies of austerity are starting to pull Mexico out of its most severe modern economic crisis while avoiding a widely predicted social explosion.

"We have confronted the worst economic crisis of our contemporary history with a profound sense of renovation," said de la Madrid, 52, in his nearly five-hour speech on the state of the nation.

De la Madrid said his government had succeeded in modernizing the Mexican economy "in a climate of freedom, social peace, stability and growing solidarity among Mexicans." He added, "The recession shows signs of having reached bottom, and a gradual reactivation has been initiated."

The annual speech, given amid much ceremony to the Congress and televised nationally in this country of 80 million people, is considered the most important policy statement of the year and is watched closely by businessmen, bankers and political leaders at home and abroad for any changes in approach toward Mexico's $100 billion foreign debt and other economic questions.

De la Madrid, citing successes in dealing with an economic crisis that appeared "explosive" and "unmanageable" when he took office in 1982, said he would continue the steady and "disciplined" policies that he credited as having ended the emergency and restored international prestige.

Indeed, for de la Madrid, the speech signifies the preparation of a legacy, a time for taking stock of his administration as he enters the last year of a nonrenewable six-year term. But it also signals the approach of lame duck status and a period of mounting political tension during which he must, in effect, choose his successor.

Expected in the next several weeks is an announcement of the presidential candidate of the ruling Institutional Revolutionary Party, who is virtually assured of election.

The successor is to be chosen from six "precandidates," who attended today's presentation and heard de la Madrid warn Mexicans not to show "disunity" during the presidential election scheduled for July 1988. Some prominent dissidents have called for an open party primary.

The president said it was up to Mexico's citizens and political parties "to make the electoral process a democratic event that strengthens us, not a pretext for sterile struggles." He warned against displays that would discredit the country and expose "disunity among the Mexican people."

After a motorcade through the city in an open convertible amid showers of confetti, de la Madrid appeared before about 2,000 legislators, officials, diplomats and other dignitaries at the Chamber of Deputies.

De la Madrid backed up his optimistic rhetoric with figures indicating a remarkable improvement in Mexico's financial situation, notably a record $14.6 billion in foreign reserves, more than $10 billion higher than the level of a year ago.

After a sharp drop in oil prices last year, he said Mexico's oil exports of 1.3 million barrels a day are bringing in higher than expected revenue this year.

Nonpetroleum exports are up, imports are down, the Mexican stock market has been booming and an estimated $4 billion in capital has returned to the country this year.

De la Madrid cited a trade surplus of $4.76 billion for the first half of the year and a current account of $3.12 billion.

However, de la Madrid's speech failed to answer one of the most pressing economic questions: what his government plans to do with its record reserves. And he offered no clear remedy for dealing with inflation, now running at an annual rate of about 130 percent and a leading cause of discontent, particularly among labor groups.

On the eve of the speech, the powerful Confederation of Mexican Workers issued demands for a "basic revolutionary program" for the 1988-94 period, the term of the next president. Although directed at the eventual presidential candidate, the demands implicitly repudiated the economic policies of de la Madrid and warned of possible "violence, anarchy, dictatorship and social oppression" unless present economic structures were radically changed.

The confederation, led by 87-year-old labor boss Fidel Velazquez, claims 4.5 million members in 11,000 affiliated unions and constitutes a major power base within the all-embracing ruling party.

The confederation seeks a redistribution of the nation's wealth, greater democracy in the party's policy making and major changes in economic policies that the labor group feels have aggravated unemployment and inflation. The statement also warns that Mexico's foreign debt "should not be paid at the cost of the priority interests of the people and the nation."

"In addition to unemployment and decline in purchasing power, the present economic model presents evidence of obsolescence and decay," the confederation's document says.

In his speech, however, de la Madrid rejected in general terms demands for major policy changes, ruling out "experimenting with the destiny of the nation."

"We will not change our current strategy," de la Madrid said in discussing his economic policies. "A responsible government rejects an economic management that only seeks successes and advances that are apparent during its term."