I want to calculate the IRR manually (as in writing the algorithm) by using the method that is described on Wikipedia. It says I can use the secant method to numerically compute the value.
For the secant method I need to initial values but I'm not yet able to understand how to get them. Wikipedia says:
$$r_1 = \left( A / |C_0| \right) ^{2/(N+1)} - 1$$
$$r_2 = (1 + r_{1})^p - 1$$
where
$$A = \text{ sum of inflows } = C_1 + \cdots + C_N$$
$$p = \frac{\log(\mathrm{A} / |C_0|)}{\log(\mathrm{A} / \mathrm{NPV}_{1,in})}$$
where (according to Wikipedia) $\mathrm{NPV}_{1,in}$ refers to the NPV of the inflows only (that is, $\mathrm{C_0 = 0}$). But it doesn't say how to calculate $\mathrm{NPV}_{1,in}$. I thought I have to use the secant method to calculate NPV, so how can the secant method take as an argument the NPV? Can anyone explain to me how that is meant?
This answer provides an example:
$$ 0=-156000 + \frac{57080}{(1+x)^1} + \frac{81080}{(1+x)^2} + \frac{176480}{(1+x)^3} + \frac{213680}{(1+x)^4} + \frac{190280}{(1+x)^5} $$
Here, $C_0=156000$. If I set it to 0, there is no way that I can solve the formula (and I would need the secant method anyway to calculate it):
$$ \mathrm{NPV}_{1,in}=\frac{57080}{(1+x)^1} + \frac{81080}{(1+x)^2} + \frac{176480}{(1+x)^3} + \frac{213680}{(1+x)^4} + \frac{190280}{(1+x)^5}=0 $$
What do I miss? And btw, maybe there is another way to find both initial values? Wikipedia doesn't explain why the above formulas are given and what they mean (and I don't understand the meaning of these formulas).
What you're missing is that NPV$_{1,in}$ is computed based on the initial guess $r_1$, i.e. for your example
$$\mathrm{NPV}_{1,in}=\frac{57080}{(1+r_1)^1} + \frac{81080}{(1+r_1)^2} + \frac{176480}{(1+r_1)^3} + \frac{213680}{(1+r_1)^4} + \frac{190280}{(1+r_1)^5} = 144704 \; ,$$
with
$$r_1 = \left( A / |C_0| \right) ^{2/(N+1)} - 1 = 0.6638757 \; .$$