12. (Creating Stochastic Differential Equations, Brainstorming) The approach in Section 6.9 seems to be relatively new and...
Question:
12. (Creating Stochastic Differential Equations, Brainstorming)
The approach in Section 6.9 seems to be relatively new and innovative. We have asked several quant developers for their opinions on how useful it is as a competitor to their current design style.
We reproduce the answer from one user:
Question: Is this approach to polymorphism ‘better’ than e.g. subtype polymorphism?
Answer: I would say that the benefit of this kind of scheme is that there is only one class (OneFactorProcess) instead of one base class (which is nothing more than abstract interface) and several implementation classes. The drift and diffusion coefficients can be built outside the OneFactorProcess class. I see that by using this scheme we can increase flexibility on how the actual SDE
(drift and diffusion coefficients) will be built. I think this is one of the strongest arguments for using this kind of scheme. Finally, it feels like a modern way to do things – at least for myself.
Incidentally, we use the alias:
template
using OneFactorProcess = Sde
Question: Does this approach lead to more maintainable code?
Answer: I would say yes.
Question: Does the approach scale to larger systems?
Answer: Well, if you consider my own path generator as a larger system, then yes. I see no reason why this schemewould not be implementable for any system, despite its complexity, as long as all interfaces between components are well designed.
Answer the following questions:
a) What would your answers be to these questions?
b) Read Section 6.9 again. Based on that short discussion is the approach a viable competitor to the traditional object-oriented programming style?
c) Consider an application that you created in the past. How would the design approach in Section 6.9 resolve possible maintenance issues that you had with the code?
Step by Step Answer: