Natural log problem divide by zero problem for stock/fx contributions The Stock Price move from 100 (p_1) to 150 (p_2) and the FX rate moves from 1.2 (c_1) to 0.8 (c_2). therefore the base currency value stays the same. I am looking for the fx vs stock contribution over the day using the natural log. Usually I can use the following formula, but in the above case I get a divide by zero error. stock contribution: (p_2c_2 - p_1c_1)/(1 + (ln(p_2/p_1))/( ln(c_2/c_1))

pighead73283r

pighead73283r

Answered question

2022-11-07

Natural log problem divide by zero problem for stock/fx contributions
The Stock Price move from 100 ( p 1 ) to 150 ( p 2 ) and the FX rate moves from 1.2 ( c 1 ) to 0.8 ( c 2 ). therefore the base currency value stays the same.
I am looking for the fx vs stock contribution over the day using the natural log.
Usually I can use the following formula, but in the above case I get a divide by zero error.
p 2 c 2 p 1 c 1 1 + l n ( p 2 / p 1 ) l n ( c 2 / c 1 )
fx contribution = p 2 c 2 p 1 c 1 1 + l n ( c 2 / c 1 ) l n ( p 2 / p 1 )
Any obvious solutions?

Answer & Explanation

motylowceyvy

motylowceyvy

Beginner2022-11-08Added 19 answers

With an obvious notation,
S := p 2 c 2 p 1 c 1 1 + ln ( p 2 p 1 ) ln ( c 2 c 1 ) = c 1 p 1 c p 1 1 + ln ( p ) ln ( c ) = c 1 p 1 ln ( c ) c p 1 ln ( c ) + ln ( p ) .
Then by L'Hospital,
lim c 1 / p c p 1 ln ( c ) + ln ( p ) = lim c 1 / p p 1 c = 1 ,
and
S = c 1 p 1 ln ( c 2 c 1 ) .

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?