GBERESEARCH / volvisualizer

Extract and visualize implied volatility from option chain data
MIT License
30 stars 9 forks source link

SSL: CERTIFICATE_VERIFY_FAILED #3

Closed igaloly closed 3 months ago

igaloly commented 3 months ago

Hey, I'm getting: urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1007)> In the lines:

imp = Volatility(ticker='^SPX', start_date='2024-7-4', wait=1, monthlies=True, q=0.013)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/volvisualizer/volatility.py", line 93, in __init__
    params = Utils.init_params(inputs)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/volvisualizer/utils.py", line 41, in init_params
    cls.set_interest_rate(params=params)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/volvisualizer/utils.py", line 96, in set_interest_rate
    params['yield_curve'] = DataPrep.generate_yield_curve(r=r)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/volvisualizer/market_data_prep.py", line 731, in generate_yield_curve
    data = pd.read_html(url)[0]
GBERESEARCH commented 3 months ago

Hi, I couldn't replicate your error message but there were a few requirement issues that needed fixing (matplotlib 3.5.3 not compatible with numpy 2 and dependency on yFinance was not included). I've just pushed a new version 1.1.13 and installed that as per the instructions on the README and that ran without issue.

igaloly commented 3 months ago

@GBERESEARCH This is what I needed: https://stackoverflow.com/a/45018725 Thanks for the support and the great work!