3 ms·
This is how I think about it. Imagine you have a block box that calculates a interest rate futures convexity adjustment. That is for an OTC forward you have o
by artsrc 15y ago
This is how I think about it.
Imagine you have a block box that calculates a interest rate futures convexity adjustment. That is for an OTC forward you have one fair value and for a future you have a different fair value because the future is has margins and the function calculates the difference between the two.
Now you have some useful code that works out margin payments for various trajectories of prices for the future/forward based on some model for price movements and and another model for interest payments/reciepts on the margin calls.
Now you have a simple change where some exchange changes way they do margin calls.
One way to resolve this is that convexity adjustment function takes in a margining function as a parameter. But if it was not known that this was needed from the start maybe another part of the model was parameterized rather than this.
In practice in this case assumptions about the margining are baked into the mathematics of the black box, and handling arbitrary margining systems is not done and you write a whole new function.
- nightski 15y agoI still see that as a composition problem and not one of abstraction.