joseprupi / quantraserver

Distributed QuantLib
https://quantra.io
BSD 3-Clause "New" or "Revised" License
11 stars 7 forks source link

QuantLib evaluation date #3

Open suhasghorp opened 3 years ago

suhasghorp commented 3 years ago

Hi Josep,

How are you handling QuantLib's evaluation date limitations? As far as I understand, you can not have multiple evaluation dates in one QuantLib process. Multiple http requests are served in one QuantLib process, those requests might come in with different evaluation dates which can cause problems. There is a discussion of this at StackOverflow

Thanks, Suhas

joseprupi commented 3 years ago

Hi @suhasghorp,

Sorry for my late response.

It is not intended to be run as a multithread application but with multiple processes/servers, and in quantra the http server is being used that way (see crow documentation). That is actually one of the goals of quantra, being able to skip the multithread limitations of QuantLib to be able to execute parallel computations.

Besides that, I would say that compiling QuantLib with the proper flags and as long as you don't use structures with the observer/observable patterns it should be fine, also you can take a look to crow documentation if you want it to serve calls with multiple threads. Some of the functionalities from quantra though use the observer/observable pattern such as the multiOptionPricing