Nano-project exploring ways of extracting USD-BRL exchange rates to calculate income taxes for money received from abroad.
Brazil has a very interesting way to tax money received from abroad. You have to convert the amount received to US dollars (regardless of the currency the money you received is in), and then you can convert it to BRL using the exchange rate for the last business day of the first fortnight of the month prior to the payment month.
The USD-BRL exchange rate is a challenge in itself: one cannot simply Yahoo finance it. The exchange rate needs to use something called "Ptax Closing Rate", which is the average of the rates Bid and Offer of the bulletins of the day.
- FAQ by the Brazil government (Portuguese only). The conversion to BRL topic is under the "156" title, page 81.