Applying the natural log to a numeric variable reduces skewness and stabilizes variance. It is probably the single most useful mathematical transformation in applied statistics and, for financial and economic data, it is almost the default.
Why does it work? Because the logarithm compresses large values much more than small ones. The distance from 1 to 10 and the distance from 100 to 1,000 are both exactly \ln(10) \approx 2.30 in log units. In a right-skewed variable, that long upper tail — the handful of enormous firms, the few very rich countries — gets pulled in, while the crowded lower range gets spread out. The result is a distribution far closer to symmetric, which is exactly what most statistical methods assume.
Two cautions. The log is undefined for zero and negative values, so it cannot be applied directly to returns, profits, or any variable that can be non-positive. (A common workaround is \ln(1+x), which is well defined down to x > -1.) And the mean of the logs is not the log of the mean — back-transforming a prediction with e^{\hat{y}} gives you a median, not a mean.
The way to get the value of x that satisfies this equality is actually getting the natural log of p:
Next I give an example of the effect of compounding when calculating percentage growth rates
The effect of compounding in calculating percentage growth rates
Here is a simple example:
If I invest $100.00 today (t=0) with an annual interest rate of 50%, then the end balance of my investment at the end of the first year will be:
I_1=100*(1+0.50)=150
If the interest rate is 100%, then I would get:
I_1=100*(1+1)=200
Then, the general formula to get the final amount of my investment at the beginning of year 2, for any interest rate R can be:
I_1=I_0*(1+R)
The (1+R) is the growth factor of my investment.
In Finance, the investment amount is called principal. If the interests are calculated (compounded) each month instead of each year, then I would end up with a higher amount at the end of the year.
Monthly compounding means that a monthly interest rate is applied to the amount to get the interest of the month, and then the interest of the month is added to the investment (principal). Then, at the beginning of month 2 the principal will be higher than the initial investment. At the end of month 2 the interest will be calculated using the updated principal amount. Putting in simple math terms, the final balance of an investment at the end of month 1 when doing monthly compounding will be:
I_1=I_0*\left(1+\frac{R}{12}\right)
We can do the same for month 2:
I_2=I_1*\left(1+\frac{R}{12}\right)^{1}
We can plug the calculation for I_1 in this formula to express I_2 in terms of the initial investment:
I_2=I_0*\left(1+\frac{R}{12}\right)\left(1+\frac{R}{12}\right)
We group the growth factor using an exponent:
I_2=I_0*\left(1+\frac{R}{12}\right)^{2}
We can now see the pattern for the end balance after 12 months of monthly compounding. The monthly interest rate is the annual rate R divided by 12. With an annual rate of 100% and monthly compounding (N=12), the end value of the investment is:
I_{12}=100*\left(1+\frac{1}{12}\right)^{1*12}=100*(2.613..)
In this case, the growth factor is (1+1/12)^{12}, which is equal to 2.613.
Instead of compounding each month, if the compounding is every moment, then we are calculating a continuously compounded rate.
If we do a continuously compounding for the previous example, then the growth factor for one year becomes the astonishing Euler constant e:
Let’s do an example for a compounding of each second (1 year has 31,536,000 seconds). The investment at the end of the year 1 (or month 12) will be:
I_{12}=100*\left(1+\frac{1}{31536000}\right)^{1*31536000}=100*(2.718282..)\cong100*e^1
Now we see that e^1 is the GROWTH FACTOR after 1 year if we do the compounding of the interests every moment!
We can generalize to any other annual interest rate R, so that e^R is the growth factor for an annual nominal rate R when the interest is compounded every moment.
When compounding every instant, we use small r instead of R for the interest rate. Then, the growth factor will be: e^r
Then we can do a relationship between this growth rate and an effective equivalent rate:
\left(1+EffectiveRate\right)=e^{r}
If we apply the natural logarithm to both sides of the equation:
ln\left(1+EffectiveRate\right)=ln\left(e^r\right)
Since the natural logarithm function is the inverse of the exponential function, then:
ln\left(1+EffectiveRate\right)=r
In the previous example with a nominal rate of 100%, when doing a continuously compounding, then the effective rate will be:
\left(1+EffectiveRate\right)=e^{r}=2.7182
EffectiveRate=e^{r}-1
Doing the calculation of the effective rate for this example:
EffectiveRate=e^{1}-1 = 2.7182.. - 1 = 1.7182 = 171.82\%
Then, when compounding every moment, starting with a nominal rate of 100% annual interest rate, the actual effective annual rate would be 171.82%!