8
$\begingroup$

Hi everyone, I'm programming in MATLAB and I have the following optimization problem in calibrating several nested specifications of pricing models.

Summary: I have two pricing models ($1$ and $2$, $1$ is nested in $2$, i.e. model $2$ reduces to model $1$ if a particular configuration of its parameters is considered) and two sets of derivatives ($A$ and $B$). I calibrate each model on the two sets of instruments AT THE SAME TIME, minimizing pricing errors. That's fine. The problem arises in the nesting request: I want model $2$ to produce lower pricing errors on BOTH instruments sets SEPARATELY and I'm wondering if can define a loss function that automatically achieves this task, i.e. I want that this consistency condition holds: \begin{equation} \left\{ \begin{aligned} error_{A}[2] \leq error_{A}[1] \\ error_{B}[2] \leq error_{B}[1] \end{aligned} \right. \end{equation} and NOT ONLY $$ error_{A}[2] + error_{B}[2] \leq error_{A}[1] + error_{B}[1] $$ end of summary.

I'm considering two sets of derivatives I would like to price, say $A$ and $B$. In the class $A$, there are $i=1,...,N$ instruments, with market prices denoted as $a^{i}_{MKT}$, and in the other one there are $j=1,...,M$ instruments, whose market prices are denoted with $b^{j}_{MKT}$.

I start with a model $1$, depending on a set $\{x\}$ of parameters. Under this model, model prices for instruments $A$ and $B$ are denoted as $a^{i}_{mdl}(x)$ and $b^{j}_{mdl}(x)$.

The simple idea is to calibrate model parameters $\{x\}$ minimizing the pricing error. For example minimizing the Sum-of-Squared-Errors loss:

\begin{equation} \begin{aligned} loss(x) &= loss_{A}(x) + loss_{B}(x) \\ &= \sum^{N}_{i=1}\left|a^{i}_{MKT} - a^{i}_{mdl}(x) \right|^2 + \sum^{M}_{j=1}\left|b^{j}_{MKT} - b^{j}_{mdl}(x) \right|^2 \end{aligned} \end{equation}

In this way, the optimal parameters $\{x_{opt}\}$ will be those minimizing $loss(x)$. Let it be: \begin{equation} \begin{aligned} loss(x_{opt}) &= loss_{A}(x_{opt}) + loss_{B}(x_{opt}) \\ &\stackrel{def}{=} error_{A}[1] + error_{B}[1] \end{aligned} \end{equation}

Now my problem: I'm considering a model $2$ which is a generalization of the model $1$, In the sense that model $2$ depends on the extended parameter set $\{x,y\}$. Model $2$ produces model prices $\hat{a}^{i}_{mdl}(x,y)$ and $\hat{b}^{j}_{mdl}(x,y)$. For the sake of exposition you may think that model $2$ reduces to model $1$ if $y=0$, i.e. $\hat{a}^{i}_{mdl}(x,0) = a^{i}_{mdl}(x)$ and $\hat{b}^{i}_{mdl}(x,0) = b^{i}_{mdl}(x)$.

Now if I keep using the above SSE $loss$ to calibrate model $2$, I will minimize \begin{equation} \begin{aligned} loss(x,y) &= loss_{A}(x,y) + loss_{B}(x,y) \\ &= \sum^{N}_{i=1}\left|a^{i}_{MKT} - \hat{a}^{i}_{MDL}(x,y) \right|^2 + \sum^{M}_{j=1}\left|b^{j}_{MKT} - \hat{b}^{j}_{mdl}(x,y) \right|^2 \end{aligned} \end{equation} Optimized parameters for model $2$ will be $\{x_{opt},y_{opt}\}$ and correspondingly we define: \begin{equation} \begin{aligned} loss(x_{opt},y_{opt}) &= loss_{A}(x_{opt},y_{opt}) + loss_{B}(x_{opt},y_{opt}) \\ &\stackrel{def}{=} error_{A}[2] + error_{B}[2] \end{aligned} \end{equation} Now the above calibrations produce the following nesting relation for sure: $$ error_{A}[2] + error_{B}[2] \leq error_{A}[1] + error_{B}[1] $$ but NOT NECESSARY \begin{equation} \left\{ \begin{aligned} error_{A}[2] \leq error_{A}[1] \\ error_{B}[2] \leq error_{B}[1] \end{aligned} \right. \end{equation} that is what I want. For example, model $2$ may highly improve pricing of $A$ derivatives, but slightly mis-pricing on the set $B$, w.r.t. model $1$. What I want is that model $2$ improve pricing w.r.t. to model $1$ on BOTH $A$ and $B$ sets!

Can anybody suggest me a loss/calibrating procedure/whatever achieving this goal. Thank you in advance for your time and attention.


Technical note: my procedure is performed with lsqnonlin, in the Matlab optimization toolbox.

$\endgroup$
0

1 Answer 1

4
$\begingroup$

It seems that implicitly you have a multi-objective optimization in mind, hence of course it may happen that you are not able to achieve all the objectives simultaneously. Let's say that output of a more general model is $f(x,y)$ so that the output of the first model is $f(x,0) = f_0(x)$. Denoting market prices by $m_k$ which in your case means $m_1 = A$ and $m_2= B$ you perform the following optimization: $$ (x',y'):=\arg\min \sum_k d(f,m_k),\qquad x'':=\arg\min \sum_k d(f_0,m_k), $$ where $d$ denotes an appropriate distance function ($L_2$ norm in your case). Now, if you want to satisfy additional constraints $d(f(x',y'),m_k) \leq d(f(x'',0),m_k) \;\forall k$, you shall just include them in your optimization. I would outline the steps as follows:

  1. Compute $x''$ just by fitting the first model into the market data.

  2. Use constraints with $x''$ obtained in the previous step to find optimal $(x',y')$ for the second model.

The detailed implementation of the second step depends on the structure of the model, but essentially it only makes the procedure that you used more complex since now you have to take constraints into account, so that the optimal solution may lye on the boundary described by one of the constraints. For example, if you used gradient descent before, now you can also use it but disregarding the direction that leads you outside of constraints: in that case just move along the constraint in the desired direction.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.