Fresh dollar selling by exporters and some banks also helped rupee close in the positive terrain even though fears of capital outflows persisted, forex traders said.
At the Interbank Foreign Exchange market, the domestic currency commenced higher by 62.37 from last close of 62.43.
It later moved in a narrow range of 62.19 and 62.44 before settling at 62.22 against dollar, a rise of 21 paise or 0.34 per cent over Monday. Today's 21 paise gain is rupee's best since 59-paise spurt on January 28. The closing of 62.22 is also the highest since 61.93 versus dollar on January 23.
The deficit was at USD 18.9 billion in January, 2013.
More From This Section
The dollar index was down by 0.13 per cent against a basket of six rivals, as global investors awaited Yellen's first testimony as new Federal Reserve chair later in the day.
Pramit Brahmbhatt, CEO, Alpari Financial Services, (India) said: "Better than expected trade data numbers helped rupee to appreciate. Investors are now focusing on Yellen's testimony, which will affect the emerging markets position."
Forward dollar premiums fell on fresh export receipts.
The benchmark six-month forward dollar premium payable in July eased to 242-246 paise from last close of 244-246 paise.
Far forward contracts maturing in January also declined to 484.5-486.5 paise from 488.5-490.5 paise.
The RBI fixed the reference rate for the dollar at 62.4390 and for the euro at 85.2813.
The rupee recovered against the pound to end at 102.20 from 102.37 and also moved up to 85.01 per euro from 85.10 previously. It bounced back to 60.70 per 100 Japanese yen from 61.10.