# Software for decomposing structured products into plain vanilla products

Nowadays structured products (or packages) with complex payoff diagrams are omnipresent.

Do you know of any software, add-ons, apps, code whatever, that enables you to enter a payoff diagram or a cashflow profile which gives you the basic building blocks like the underlying, zero coupon bonds and esp. all the option components with their different strikes to replicate this payoff?

EDIT: Because some people asked what the input of such a tool could be, have a look at this example - I am asking for a software that is able to do this kind of decomposition automatically: http://www.risklatte.com/Articles_new/Exotics/exotic_28.php

• What would the input to this software be? – barrycarter Mar 29 '11 at 14:12
• @barrycarter: e.g. the kinks of the payoff diagram by strike and payout level – vonjd Mar 29 '11 at 14:20
• I cannot get, how they can plot $\frac{169}{S}$ like a linear function. Edited: they even cover it with a put. Wow. It's a kind of magic. Edited: "This payoff exactly replicates the payoff of the structure." Indian mystery... – Ilya Mar 30 '11 at 12:40
• I can't think of a piece of software per se, but if you look at the payoff diagram, every discontinuity is a binary option and every linear payoff is a vanilla option. Do you have a more complex example? Once you have a uniform input format, I don't think it'd be hard to write software that does this. – barrycarter Apr 6 '11 at 15:51

## 4 Answers

I do not know such a software - but we can think about the code. There are tow points which you have to define properly:

1. which assets (correspondently, payoffs) are you allowed to replicate the complicated option?
2. as barrycarter has already asked - what should be the form of the input?

Further procedure should be quite easy. You are trying to find a linear combination $\lambda$ of basic assets $s_1,s2_,...$ (because in practice this is the only possibility for you to "combine" it) which fits the complex payoff $\gamma$. It's just a peace-wise affine optimization problem. Once you minimize the difference $|\lambda - \gamma|$ you have either zero (so you have found the replication formula) or smth greater than zero (which means that there is no replication formula which perfectly covers this complicated payoff).

Once you will determine the points I've mentioned - I believe I will be able to help you to solve this problem.

Edited: Let us call your payoff $P(S)$ and simple payoff functions are $P_1(S,\theta_1),P_2(S,\theta_2),...$, where $\theta$ are parameters, e.g. strike for Call or Put.

Then you would like to check if there exist $a_1,a_2,...$ such that $$P(S) = \sum\limits_i a_i P_i(S,\theta_i).$$

You can solve this problem by defining $$J(a,\theta) = ||P(\cdot) - \sum\limits_i a_i P_i(\cdot,\theta_i)||$$ where you can use any norm - and in fact due to the structure of payoffs, this norm should be defined only on some finite interval $[0,S']$. Then you solve $$J(a,\theta)\to \min$$ and if the extremum value is $0$ - you can cover your exotic payoff with simple ones, if non-zero - you cannot cover it perfectly, but the obtained values of $a,\theta$ will be optimal.

If you need more details about the solution of optimization problem -just tell me.

P.S. I think the paper you have refereed to is not correct - the payoff is not peace-wise affine while they plot it (and considered it) as peace-wise affine function.

• @Gortaur: Thank you - I edited the question to qualify what I mean exactly. – vonjd Mar 30 '11 at 12:16
• @vonjd - it was clear. Ok, so we should talk about two questions which I left in my answer. If I can leave here my e-mail, or there are private messages? – Ilya Mar 30 '11 at 13:19
• @Gortauer: 1. underlying, zero coupon bond, call, put: any number long/short, 2. see my editing the question for an example. I would appreciate it if you could edit your answer to incoporate the solution - so everybody can learn from your expertise - thank you! – vonjd Mar 30 '11 at 17:53
• @vonjd - I don't want to hide anything - just I thought it can be more convenient to discuss it by e-mails. – Ilya Mar 31 '11 at 14:41
• @vonjd - I've edited my answer. – Ilya Mar 31 '11 at 14:49

There are already quite a lot of softwares that do that. Quite expensive however for most of them. Then it depends whether you're interested into a trading software (trade capture and stuff) or a pricing engine.

Trading softwares : murex, misys summit, calypso ... provide tools to structure deals and value them. Then they are processed front to back. Pricing engines : NumeriX, Pricing partners ... are able to define payoff scripts and value them.

disclaimer : I used to work for one of these vendors, but I don't think my answer is biased.

the example uses an european payoff. every european payoff can be decomposed by call and put combinations. just hold for each strike a qtty = to the 2nd derivative of the payoff....

in the general case, that is non european payoff, there is not always a perfect hedge.

This sounds like a perfect application for genetic algorithms to me.

• Thank you - I don't think that you need a random component for that, a deterministic algorithm should do the job just fine! – vonjd Mar 31 '11 at 14:28
• Could you elaborate? This answer isn't very helpful on its own. For example, just how would someone apply GA to the problem described in the question? – chrisaycock Mar 31 '11 at 15:51