Hi there,
I’m currently implementing an options price calculator in q, and so far I’ve completed calculation for European options using Black Scholes.
I was wondering if one of you may be able to share with me how to implement American and Arithmetic Asian options calculations.
Thank you,
Zak
http://thesweeheng.wordpress.com/2009/12/09/american-binomial-model-in-q/<o:p></o:p>
<o:p> </o:p>
HTH,<o:p></o:p>
Kim<o:p></o:p>
<o:p> </o:p>
Von: personal-kdbplus@googlegroups.com [mailto:personal-kdbplus@googlegroups.com] Im Auftrag von Zak Oudrhiri
Gesendet: Mittwoch, 22. Oktober 2014 02:06
An: personal-kdbplus@googlegroups.com
Betreff: [personal kdb+] American and Asian options<o:p></o:p>
<o:p> </o:p>
Hi there,<o:p></o:p>
<o:p> </o:p>
I’m currently implementing an options price calculator in q, and so far I’ve completed calculation for European options using Black Scholes.<o:p></o:p>
<o:p> </o:p>
I was wondering if one of you may be able to share with me how to implement American and Arithmetic Asian options calculations.<o:p></o:p>
<o:p> </o:p>
Thank you,<o:p></o:p>
<o:p> </o:p>
Zak<o:p></o:p>
–
Submitted via Google Groups
Hi Kim,
Thank you for that, works like a charm! Do you happen to have also for Asian options? These are more relevant to me
Thanks,
Zak
https://github.com/kimtang/ql.q.git<o:p></o:p>
<o:p> </o:p>
Check file asian.q<o:p></o:p>
<o:p> </o:p>
HTH,<o:p></o:p>
<o:p> </o:p>
Kim<o:p></o:p>
<o:p> </o:p>
Von: personal-kdbplus@googlegroups.com [mailto:personal-kdbplus@googlegroups.com] Im Auftrag von Zak Oudrhiri
Gesendet: Mittwoch, 22. Oktober 2014 16:50
An: personal-kdbplus@googlegroups.com
Betreff: Re: [personal kdb+] American and Asian options<o:p></o:p>
<o:p> </o:p>
Hi Kim,<o:p></o:p>
<o:p> </o:p>
Thank you for that, works like a charm! Do you happen to have also for Asian options? These are more relevant to me<o:p></o:p>
<o:p> </o:p>
Thanks,<o:p></o:p>
<o:p> </o:p>
Zak
Hi Kim,
Thanks for the help. In the end I decided to implement Turnbull Wakeman formula for Asian options and Bjerksund Stensland for American options, both in kdb on top of your ql.q library. I have also extended your ql library to include Black’s 76 model
I will clean up the code and post it on github.
Thanks,
Zak
Hi Zak,<o:p></o:p>
<o:p> </o:p>
Happy to hear that the ql library was useful and please let me know when you have implemented the two formulas. We should compare the results using the monte carlo method and the approximation formula.<o:p></o:p>
<o:p> </o:p>
If you come to the kx meetup in London tomorrow we can have a quick/long chat.<o:p></o:p>
<o:p> </o:p>
Kim<o:p></o:p>
<o:p> </o:p>
<o:p> </o:p>
Von: personal-kdbplus@googlegroups.com [mailto:personal-kdbplus@googlegroups.com] Im Auftrag von Zak Oudrhiri
Gesendet: Dienstag, 18. November 2014 19:30
An: personal-kdbplus@googlegroups.com
Betreff: Re: [personal kdb+] American and Asian options<o:p></o:p>
<o:p> </o:p>
Hi Kim,<o:p></o:p>
<o:p> </o:p>
Thanks for the help. In the end I decided to implement Turnbull Wakeman formula for Asian options and Bjerksund Stensland for American options, both in kdb on top of your ql.q library. I have also extended your ql library to include Black’s 76 model<o:p></o:p>
<o:p> </o:p>
I will clean up the code and post it on github.<o:p></o:p>
<o:p> </o:p>
Thanks,<o:p></o:p>
<o:p> </o:p>
Zak<o:p></o:p>
On Wednesday, 22 October 2014 13:29:40 UTC+1, kuentang wrote:<o:p></o:p>
https://github.com/kimtang/ql.q.git<o:p></o:p>
<o:p></o:p>
Check file asian.q<o:p></o:p>
<o:p></o:p>
HTH,<o:p></o:p>
<o:p></o:p>
Kim<o:p></o:p>
<o:p></o:p>
Von: personal…@googlegroups.com [mailto:personal…@googlegroups.com] Im Auftrag von Zak Oudrhiri
Gesendet: Mittwoch, 22. Oktober 2014 16:50
An: personal…@googlegroups.com
Betreff: Re: [personal kdb+] American and Asian options<o:p></o:p>
<o:p></o:p>
Hi Kim,<o:p></o:p>
<o:p></o:p>
Thank you for that, works like a charm! Do you happen to have also for Asian options? These are more relevant to me<o:p></o:p>
<o:p></o:p>
Thanks,<o:p></o:p>
<o:p></o:p>
Zak
Sounds good to me! I will be there yes, so see you tomorrow
Zak
Hi Kim (and others)
I’ve uploaded a library for calculating American, Asian and European options. For American and Asian, I am not using MC paths but instead using approximation formulas
https://github.com/zakoud/options
Enjoy
Zak