QuantLib icon indicating copy to clipboard operation
QuantLib copied to clipboard

Fractional Brownian Motion

Open kaiboy05 opened this issue 3 years ago • 15 comments
trafficstars

Hi,

I am currently doing a project about simulation of fractional Brownian motion (fbm). My project supervisor told me that it will be a good if I could contribute something about it to the QuantLib library.

Currently, I have implemented four methods for generating fbm, and two methods for generating multivariate fbm, and they are written in python. The repository: https://github.com/kaiboy05/fbm An example usage on the RFSV model: https://github.com/kaiboy05/fbm/blob/master/notebooks/RFSV.ipynb

If the QuantLib Team is interested in it, I am very happy to make some contribution to QuantLib in this area.

Thank you very much! Chester

kaiboy05 avatar May 09 '22 01:05 kaiboy05

Thanks for posting! It might take a while before we look at your issue, so don't worry if there seems to be no feedback. We'll get to it.

boring-cyborg[bot] avatar May 09 '22 01:05 boring-cyborg[bot]

Hi Chester, your contribution would be very welcome in this area. Do you feel comfortable translating your python code to C++? If so, then you can look under ql/processes and ql/experimental/processes for examples of how to add this new process.

If you're not comfortable in C++ then you can leave this issue open and see whether somebody else can pick it up.

sweemer avatar May 09 '22 03:05 sweemer

Thank you very much! I can write in C++. I will leave this issue open first, in case I have any problem.

kaiboy05 avatar May 09 '22 08:05 kaiboy05

Hello, Chester, and thanks! I would also suggest reading this post and the ones that follow; they describe the framework we have in place for stochastic processes, in which your code would have to fit.

lballabio avatar May 09 '22 16:05 lballabio

@lballabio What would be the best way to help contribute towards the blog? Looks like some parts need a bit of updating, such as the examples that use Disposable, and some of the Boost dependencies that may no longer be needed.

sweemer avatar May 09 '22 22:05 sweemer

Hi, may I know is there any stochastic process that is not only depending on the current x, but also depends on the whole path simulated before? In other words, is there any example process that is not semi-martingale like the fBm?

I can see that the evolve function takes the Real dt as a parameter, does that mean that the evolve function can take any dt without restriction, like is there a minimum value for dt to be? As I am thinking that it will be very computationally expensive to simulate a very fine sample paths.

Thank you very much!

kaiboy05 avatar Jun 01 '22 03:06 kaiboy05

Hi, may I know is there any stochastic process that is not only depending on the current x, but also depends on the whole path simulated before? In other words, is there any example process that is not semi-martingale like the fBm?

Doesn't look like this has been tried yet in QuantLib, though I'm not an expert in all the various implemented processes so I can't say for sure. You might want to ask on the quantlib-users mailing list whether anyone has implemented this in their application; and if so, how.

It's very possible that a new kind of path generator will be needed in QuantLib to support this case to e.g. pass in the full path to the evolve function instead of just the current value on the path.

I can see that the evolve function takes the Real dt as a parameter, does that mean that the evolve function can take any dt without restriction, like is there a minimum value for dt to be? As I am thinking that it will be very computationally expensive to simulate a very fine sample paths.

The value of dt used in the path generator comes from the TimeGrid class - see this post for more details and you can experiment with different values to see how it affects your results.

In general finer paths will of course take longer to compute, but I would recommend staying focused on correctness first and performance later once the code works as you expect.

sweemer avatar Jun 11 '22 06:06 sweemer

Hi, Chester and y'all! I'd love to co-work on the translation of fbm into C++! Are you possibly interested? Kind regards, Wojciech

WOJCIECH-CZERNOUS avatar Jun 21 '22 08:06 WOJCIECH-CZERNOUS

Hi Wojciech, I am very interested! How should we communicate? Chester

kaiboy05 avatar Jun 22 '22 06:06 kaiboy05

Hi Chester,

thank you very much for your kind reply. I am available under the temporary address: @.*** @.***>

Wojciech

Wiadomość napisana przez kaiboy05 @.***> w dniu 22.06.2022, o godz. 08:09:

Hi Wojciech, I am very interested! How should we communicate? Chester

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

WOJCIECH-CZERNOUS avatar Jun 22 '22 09:06 WOJCIECH-CZERNOUS

Hi Wojciech,

Is it my problem? I only saw a series of asterisks and some dots. Am I supposed to send email to this "address"?

Thanks, Chester

kaiboy05 avatar Jun 22 '22 13:06 kaiboy05

Hi! Sorry for that! I haven't expected this feature of our forum.

I have added a README file to my GitHub profile:

https://github.com/WOJCIECH-CZERNOUS/WOJCIECH-CZERNOUS/blob/0da6754cc0c584ff3ee856524ddbb46b6b4042dc/README.md

-which contains my address.

WOJCIECH-CZERNOUS avatar Jun 22 '22 17:06 WOJCIECH-CZERNOUS

Hi! What are the rules of recognizing a contribution to QuantLib? Is it automatically derived from the git authorship?

I am asking because we are considering a two-authors joint contribution, with the scheme being: author A has written the thesis and a prototype and the author B would be the C++ coder

Does such a scheme give both authors a place on the list of contributors?

Best regards, Wojciech

WOJCIECH-CZERNOUS avatar Aug 13 '22 20:08 WOJCIECH-CZERNOUS

Yes, no problem.

lballabio avatar Aug 27 '22 08:08 lballabio

Thank you very much!

Kind regards, Wojciech Czernous

Wiadomość napisana przez Luigi Ballabio @.***> w dniu 27.08.2022, o godz. 10:43:

 Yes, no problem.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

WOJCIECH-CZERNOUS avatar Aug 27 '22 09:08 WOJCIECH-CZERNOUS

This issue was automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in two weeks.

github-actions[bot] avatar Oct 27 '22 02:10 github-actions[bot]

This issue was automatically marked as stale because it has been open 60 days with no activity. Remove stale label or comment, or this will be closed in two weeks.

github-actions[bot] avatar Dec 27 '22 01:12 github-actions[bot]

This issue was automatically closed because it has been stalled for two weeks with no further activity.

github-actions[bot] avatar Jan 10 '23 02:01 github-actions[bot]