Tokyo — For years Japan has had to battle foreign suspicion that it manipulates the value of its currency to gain an unfair competitive trade advantage. By deliberately keeping the yen weak, it is argued, the Japanese have been able to absorb rising production costs and keep the price of products cheaper in foreign markets, thus promoting the national export drive. Conversely, of course , a weak yen means higher prices for imports, discouraging the Japanese from buying anything foreign but the basic raw materials needed by industries.
The United States, certainly, has been a persistent critic of an undervalued yen. But the Tokyo government finally seems to have been acquitted of the charge.
In its annual report to Congress in early February, President Reagan's Council of Economic Advisers said the actual behavior of the Japanese balance of payments and exchange rate did not support the idea of deliberate manipulation.
In fact, any government intervention actually tended to strengthen the currency, it said, noting that ''Japan has attempted to isolate its domestic capital market from world capital markets (which) has tended to limit capital outflow rather than inflow, supporting rather than weakening the yen.''
This, of course, is what the Japanese have been saying for years.
In the past 10 years there has been considerable ''internationalization'' of the yen, but the amount of yen traded internationally is still small compared with the dominant dollar. Officials reckon the dollar has an 80 percent share of the world currency trade market, against 5 percent for the yen.
Paradoxically, to allow the yen a greater role now would lead to further weakness, exacerbating trade frictions with the US and Europe, according to Finance Ministry officials.
There is considerable agreement among Japanese and foreign economic analysts that the realities of the world economic picture demand an exchange rate of about 180 yen to the dollar. At one point last year, the rate plunged to 278 yen. Currently it is hovering around 240 on various major foreign exchange markets.
But this is seen in Tokyo as due to an unnaturally strong dollar rather than a genuinely weak yen.
The Bank of Japan, the nation's central bank, claims to be powerless to do anything about this, insisting the solution lies with President Reagan through a further lowering of interest rates.
The Japanese central bank would dearly love to cut its central rate further - already at an internationally low level of 5.5 percent - to encourage a domestic economic revival, but it finds this difficult while other nations' rates are so much higher.
Last May, the Finance Ministry eased restrictions on yen-denominated loan recipients and yen loan uses. As a result, there has been a swarm of financially strapped foreign governments and companies seeking long-term funds through Tokyo capital markets.
Invariably the resulting funds are converted by the recipients into their own currencies. This prompted the Bank of Japan to issue a public warning that such activities were contributing to the yen's weakening.
The outflow of long-term capital last year reached a record $28 billion, compared with $23 billion in 1981 and only $11 billion in 1980, when controls were much stricter. But the Finance Ministry is in an awkward position. If it restricts this use of the yen by nonresidents, it exacerbates trade friction. If it does not, the yen weakens, which also provokes complaint.
A leading foreign analyst summed up the quandary thus: ''If the Japanese allowed foreigners free access to their capital markets, higher interest rates abroad would suck out huge amounts of money, which would render much more expensive the financing of the appalling government budgetary deficits.
''With domestic financial institutions already choking on the forced diet of government bonds issued to cover revenue shortfalls, and the public resisting tax increases, the country is in a no-win situation.''