finmath / finmath-lib

Mathematical Finance Library: Algorithms and methodologies related to mathematical finance.
Apache License 2.0
488 stars 168 forks source link

Consider unification of models #45

Closed AlessandroGnoatto closed 5 years ago

AlessandroGnoatto commented 6 years ago

Hi Christian, I have a suggestion:

Let us compare net.finmath.fouriermethods.models.BlackScholesModel.java and net.finmath.montecarlo.assetderivativevaluation.BlackScholesModel.java

These two classes provide model specific information to different numerical methods, but a BlackScholes model is a BlackScholes model. The one in our Fourier methods package is merely providing the characteristic function. So I think that these two functionalities could be unified in a unique BlackScholes model class that provides:

public CharacteristicFunctionInterface apply(double time)

plus all other method from net.finmath.montecarlo.assetderivativevaluation.BlackScholesModel.java

If you consider the case of the Heston model, you have then a nice feature, we can calibrate our Heston model to a book of vanillas and then we can directly send the calibrated clone to the Monte Carlo engine to price exotics.

AlessandroGnoatto commented 5 years ago

I believe that this issue is now addressed by the hierarchy of products and model descriptors. I am closing it.