Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Greek calculation with "CrankNicolson" #158

Open
matthewgson opened this issue Sep 20, 2021 · 6 comments
Open

Greek calculation with "CrankNicolson" #158

matthewgson opened this issue Sep 20, 2021 · 6 comments

Comments

@matthewgson
Copy link

Hi,

I'm new to this package, and I was wondering if I'm missing something to see the full estimate of greeks in AmericanOption() function.
Documentation says When “CrankNicolson” is selected, then at least delta, gamma and vega are available., but when I run the example given in the documentation, I only see value, delta and gamma.

> AmericanOption("put", strike=100, volatility=0.4, 100, 0.02, 0.03, 0.5, engine="CrankNicolson")
Concise summary of valuation for AmericanOption 
  value   delta   gamma    vega   theta     rho  divRho 
10.9168 -0.4358  0.0140      NA      NA      NA      NA 
> AmericanOption("call", strike=100, volatility=0.4, 100, 0.02, 0.03, 0.5, engine="CrankNicolson")
Concise summary of valuation for AmericanOption 
  value   delta   gamma    vega   theta     rho  divRho 
11.3597  0.5580  0.0138      NA      NA      NA      NA 

I'm wondering what causes the vega missing, and what specifications should add to see full estimates of greeks.

@matthewgson matthewgson changed the title Greek calculation with "CrankNicholson" Greek calculation with "CrankNicolson" Sep 20, 2021
@eddelbuettel
Copy link
Owner

Howdy. It a galaxy far way and many moons ago this had values there (under at least some engine). Then QL changed and I never 'shrunk' the display. I think your best bet now is numerical approximations.

And we had discussions about this ... but I am also unsure where. Maybe the old mailing list? Maybe here in old tickets?

@matthewgson
Copy link
Author

I'm doing great, and thanks for your prompt answer. Haha - surprised that it was that old.. Good thing that it still provides delta and gamma. Thank you for suggestion, and I'd like to be consistent with the package when I do approximation. Do you mind if I ask which incremental value was used for delta, gamma? like, plus and minus h=0.01?

@tleitch
Copy link
Contributor

tleitch commented Sep 20, 2021

Vega is pretty well behaved in these products except at short time to expiration. You can use any size you want because it goes into the denominator and scales with the output of the valuation, but a vol point wide is usually pretty good (ie +/- .005).

@matthewgson
Copy link
Author

@tleitch @eddelbuettel Thank you for your suggestion. Should this be closed then?

@tleitch
Copy link
Contributor

tleitch commented Sep 23, 2021

I'll fix vega calc this weekend and update docs. Have to rebuild my environment first. Will need to add flag to avoid calc as optional as it will slow everything down.

@matthewgson
Copy link
Author

matthewgson commented Sep 23, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants