Consider the following payoff function:
$$p(S_T) = \begin{cases} 0 & \text{if } S_{T} \leq 70 \\ S_{T}-70 & \text{if } S_{T} \in (70; 100] \\ -S_{T}+120 & \text{if } S_{T} \in (100; 120] \\ S_{T}-120 & \text{if } S_{T} \geq 120 \end{cases} $$
Find portfolio of options which replicates this payoff.
Portfolio is combination of call and put options, which are functions: call - $max\{S_{T}-K_{1},0\}$, put - $max\{K_{2}-S_{T},0\}$, for some constants $K_{1},K_{2}$.
What is a general rule for exercises like this?
Thank you.
You can either do it by trying to match the payoff, i.e. buying and selling certain quantities of calls and puts at the kinks or by a general algorithm, which is explained in this paper (together with some examples):
http://web.archive.org/web/20081203022044/http://longvega.com/Docs/project_paper.pdf
(unfortunately the tool that is being mentioned here is no longer available).