#159 RQuantLib EuropeanOption with Expiry = 0

open
nobody
None
5
2012-12-29
2012-12-29
Anonymous
No

Hi,

This is an error I have come across in the R version of QuantLib (RQuantLib). I emailed Dirk Eddelbuettel and he tells me it is an issue he cannot fix and I should submit a bug report. The error is this:

I have been using your RQuantLib package to price options and I noticed a bug when pricing an option with time to expiry = 0. An option with spot price at 80, strike price of 100 and time to expiry of 1 day correctly returns a price of 20:

> EuropeanOption("put", 80, 100, 0, 0, 1/252, .3)$value
[1] 20

But if the option now has 0 time to expiry, it returns 0:

> EuropeanOption("put", 80, 100, 0, 0, 0/252, .3)$value
[1] 0

I think it should return the intrinsic value of 20 instead of 0.

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks