3
$\begingroup$

I'm trying to model an exchange rate to test for extreme values. However, I have percentage changes from day to day. Given some changes are negative, I can't take the logarithm. Any idea how I could go about log transforming my data set?

I know I need to log transform and then take negatives as I'm interested in large falls, but it is the log transform that I'm stuck on - Would appreciate any help.

$\endgroup$
3
$\begingroup$

Although percentage changes may be expressed as negative numbers, except for $-100\%$ they reflect positive ratios. You can take the logarithm of such a ratio--indeed, it should be a default procedure for analyzing such data.

Here are the mathematical specifics. Let $x$ be the first number, $y$ the second, and $p$ the percentage change from $x$ to $y$. Thus, by definition,

$$p = \frac{y-x}{x}\times 100.$$

Equivalently,

$$y = x\left(1 + \frac{p}{100}\right).$$

Therefore the ratio is

$$\frac{y}{x} = 1 + \frac{p}{100}.$$

Provided $p\ge -100\%,$ this ratio is positive: take its (natural) logarithm. Thus,

$$\log(y/x) = \log\left(1 + \frac{p}{100}\right).$$

An attractive feature is that when $-10\% \le p \le 10\%$ the approximation

$$\log\left(1 + \frac{p}{100}\right) \approx \frac{p}{100}$$

is accurate to a couple of decimal places, which makes the log eminently interpretable, as well as demonstrating that the log transform leaves your smaller values essentially unchanged and affects only the extreme ones, which is the desired effect.

$\endgroup$
  • $\begingroup$ Thank you - appreciate it ! $\endgroup$ – Jackson12 Dec 5 '19 at 13:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.