-
Notifications
You must be signed in to change notification settings - Fork 577
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
SABR calibration #58
Comments
found the issue, you need to pass only call or put options to the function, with a mix of both it does not work. so if you want to use the code, just replace: |
Hi @Macfly, Thanks for reporting. I can see that your prices have Nan values. Can be fixed with something like Now, calibration fails again. Feel free to file a bug for a more detailed calibration output. Basically, volatility calibration is performed and the underlying volatility fails to compute. You can try setting The fit to the data is very poor. I am guessing that there are some issues with the input data. You should be able to compute implied volatilities with I am looking at
I see that the price is in BTC but the strike is in USD. You should convert Please let me know if I understood the data correctly. Best, |
thanks a lot for your help. But if I take call and put, it is not converging with volatility_based_calibration. However it is working with price_based_calibration convergence but the fit is not that great: I'll file a bug report to try to understand why the volatility calibration fails for the puts. Regards, |
As I mentioned above, there is arbitrage in your data. In this case implied volatility is
I think that this really indicates that you should include transaction fees in your pricing. You need to make sure that the function above does not produce Please let me know if this makes sense. |
Just played a bit with the colabs. The fit is not perfect, but if you include fee into the quoted price (I read fee to be 3% from the website) as
then volatility based calibration should work for both call and put options. |
As a side comment, if you are willing to run this for streaming data, consider wrapping calibration function into a |
EDIT: I was making a mistake and taking the wrong mid price (las_price instead of mark_price), now the fit is not bad. thanks a lot again for the help! The other thing I am not a fan of is to get the option prices sequentially, I haven’t found a way to get a snapshot yet. |
Hello,
I'm trying to use the SABR calibration with real BTC option prices but it stops right away without any error message (is_converged is False).
If anyone could help to see what is wrong with this pretty simple code:
Colab notebook (created a wheel with the latest code)
The text was updated successfully, but these errors were encountered: