Log-linear version of the uncovered interest rate parity I am trying to derive the log-linear version of the uncovered interest rate parity under complete asset markets.

I know that the UIP condition is given by

$$(1+i_t)=(1+i^*_t)\frac{S_{t+1}}{S_t}$$

I have seen in papers that the log-linear version is simply given by

$$\hat{i}_t-\hat{i}^*_t=\hat{S}_{t+1}-\hat{S}_t$$

but I cannot see how this is derived. According to me, the log-linear version should be

$$\frac{i}{1+i}\hat{i}_t-\frac{i^*}{1+i^*}=\hat{S}_{t+1}-\hat{S}_t$$

Could someone please write down all steps to obtain the log-linear version of the UIP?

Thank you very much
It’s derived as follows. First start with original equation.

$$(1+i_t)=(1+i^*_t)\frac{S_{t+1}}{S_t}$$

Take natural logs of both sides:

$$\ln(1+i_t)=\ln(1+i^*_t)+\ln(S_{t+1}) -\ln(S_t)$$

Now you just use the following:

$$s_t=\ln(S_t)$$

And use the well known fact that for small values of $i$ the following approximation holds:

$$\ln(1+i)\approx i$$

And rearrange to get 

$$\hat{i}_t-\hat{i}^*_t=\hat{s}_{t+1}-\hat{s}_t$$

PS: Also actually the equation you derived is not log-linearized as it’s not linear in its log parameters