In previous exams there was this question:
In the framework of the Black-Scholes model, valuate the European option that pays the absolute difference between the share price $S_{T}$ at maturity and spot price $S_{0}$. Assume that the stock does not pay dividend. Simplify the formula.
My idea is to use the call-put parity and the Black-Scholes formula for the price of a call function.
I came in this situation: $$f(S_T)=|S_T -k|=S_0(2\Phi(d_1)-1)+ke^{-rT}({1-2\Phi(d_2)})$$
where: $d_1=\frac{log(\frac{S_o}{k})+(r+\frac{1}{2}\sigma^2)T}{\sigma \sqrt{T}}$ and $d_2=d_1-\sigma \sqrt{T}$