(Adds details on data, graphic)
By Jamie McGeever
BRASILIA, June 25 (Reuters) - Brazil's balance of payments position with the world improved again in May, central bank figures showed on Friday, as the second consecutive monthly current account surplus shrank the rolling 12-month deficit to its smallest in more than 13 years.
Latin America's largest economy also attracted a combined $7.2 billion of foreign direct investment and portfolio inflows into its domestic stock and bond markets in the month, the figures showed.
The narrowing current account deficit and consistent capital inflows recently have helped propel a rapid rise in the exchange rate, with the dollar now trading below 5.00 reais for the first time in a year.
Central bank figures show that Brazil posted a $3.8 billion current account surplus in May, slightly less than the $4 billion median forecast in a Reuters poll of economists.
That was largely thanks to a goods trade surplus of $8.1 billion in the month. Exports jumped 54.4% from the same month last year to a record $27.2 billion, outstripping a 31.9% increase in imports.
In the 12 months to May, the current account deficit totaled $8.4 billion, or 0.55% of gross domestic product, which was the smallest since February 2008. The deficit a year earlier stood at almost 4% of GDP.
On Thursday, the central bank raised its 2021 current account surplus forecast slightly to $3 billion from $2 billion. That would be the country's first annual surplus since 2007.
On the capital flows side, foreign direct investment in May totaled $1.2 billion, the central bank said. That was less than the $2.5 billion forecast in the Reuters poll.
Based on partial data already in for June, the central bank said it expects a current account surplus of $6.5 billion and FDI inflows of $2.5 billion in the month.
Investors plowed a net $6 billion into Brazilian stocks and bonds in May. Stocks saw a $2.9 billion inflow and debt securities attracted $3.1 billion, the central bank said.
On Thursday, the central bank more than doubled its 2021 portfolio inflows forecast to $21 billion from $10 billion. Net inflows in the 12 months through May totaled $41.8 billion, the central bank said.
($1 = 4.91 reais)
(Reporting by Jamie McGeever Editing by Paul Simao)