Hi group,
Have any one have piece of code to compute implied volatility ? I tried ql.q (got from kx website) but getting stack error.
I used following code.
bls[impl]:{ [x] p::
type_ _x;
? ? www:{ 1e-10< abs p[price]-.ql.bls p,(
type_vola)!(
bls;x) ?};
? ? ?/ww:{ abs p[price]-.ql.bls p,(
type_vola)!(
bls;x)};
? ? { x+(p[`price]-.ql.bls p,(`type_`vola)!(`bls;x)) ?% .ql.bls p,(`type_`vola)!(`vega;x) }/[www;0.65]
? ? };
Thanks for any help.
I can help.<o:p></o:p>
<o:p> </o:p>
Do you have a piece of code to reproduce the error?<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 Prashant Singh
Gesendet: Mittwoch, 2. Oktober 2013 14:07
An: personal-kdbplus@googlegroups.com
Betreff: [personal kdb+] ql.q<o:p></o:p>
<o:p> </o:p>
Hi group,<o:p></o:p>
<o:p> </o:p>
Have any one have piece of code to compute implied volatility ? I tried ql.q (got from kx website) but getting stack error.<o:p></o:p>
<o:p> </o:p>
I used following code.<o:p></o:p>
<o:p> </o:p>
bls[impl]:{ [x] p::
type_ _x;<o:p></o:p>
www:{ 1e-10< abs p[price]-.ql.bls p,(
type_vola)!(
bls;x) };<o:p></o:p>
/ww:{ abs p[price]-.ql.bls p,(
type_vola)!(
bls;x)};<o:p></o:p>
{ x+(p[`price]-.ql.bls p,(`type_`vola)!(`bls;x)) % .ql.bls p,(`type_`vola)!(`vega;x) }/[www;0.65]<o:p></o:p>
};<o:p></o:p>
<o:p> </o:p>
Thanks for any help.<o:p></o:p>
<o:p> </o:p>
–
Submitted via Google Groups
The code attached is not the original one from kx repository. I uploaded the newest version to the repository which now works with the latest kdb+ version.<o:p></o:p>
<o:p> </o:p>
Can you update your local repository and give it a try?<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 Kim Kuen Tang
Gesendet: Mittwoch, 2. Oktober 2013 14:53
An: personal-kdbplus@googlegroups.com
Betreff: AW: [personal kdb+] ql.q<o:p></o:p>
<o:p> </o:p>
I can help.<o:p></o:p>
<o:p> </o:p>
Do you have a piece of code to reproduce the error?<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 Prashant Singh
Gesendet: Mittwoch, 2. Oktober 2013 14:07
An: personal-kdbplus@googlegroups.com
Betreff: [personal kdb+] ql.q<o:p></o:p>
<o:p> </o:p>
Hi group,<o:p></o:p>
<o:p> </o:p>
Have any one have piece of code to compute implied volatility ? I tried ql.q (got from kx website) but getting stack error.<o:p></o:p>
<o:p> </o:p>
I used following code.<o:p></o:p>
<o:p> </o:p>
bls[impl]:{ [x] p::
type_ _x;<o:p></o:p>
www:{ 1e-10< abs p[price]-.ql.bls p,(
type_vola)!(
bls;x) };<o:p></o:p>
/ww:{ abs p[price]-.ql.bls p,(
type_vola)!(
bls;x)};<o:p></o:p>
{ x+(p[`price]-.ql.bls p,(`type_`vola)!(`bls;x)) % .ql.bls p,(`type_`vola)!(`vega;x) }/[www;0.65]<o:p></o:p>
};<o:p></o:p>
<o:p> </o:p>
Thanks for any help.<o:p></o:p>
<o:p> </o:p>
–
Submitted via Google Groups
I see. Thanks a lot. Let me try.