I tried to get your project to work but sadly I could not run it on my machine. I did set the Quandl API-Key but got the following error:
$ python vixutil.py -r
DEBUG:root:
Reading URL https://ww2.cboe.com/publish/scheduledtask/mktdata/datahouse/vixcurrent.csv lines_to_discard 1
DEBUG:root:
Reading URL https://ww2.cboe.com/publish/scheduledtask/mktdata/datahouse/vvixtimeseries.csv lines_to_discard 1
DEBUG:root:
Reading URL https://ww2.cboe.com/publish/scheduledtask/mktdata/datahouse/vix9ddailyprices.csv lines_to_discard 3
DEBUG:root:
Reading URL https://ww2.cboe.com/publish/scheduledtask/mktdata/datahouse/vix3mdailyprices.csv lines_to_discard 2
DEBUG:root:
Reading URL https://ww2.cboe.com/publish/scheduledtask/mktdata/datahouse/vix6mdailyprices.csv lines_to_discard 2
DEBUG:root:
Reading URL https://ww2.cboe.com/publish/scheduledtask/mktdata/datahouse/gvzhistory.csv lines_to_discard 1
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): data.nasdaq.com:443
DEBUG:root:
Reading URL https://ww2.cboe.com//publish/scheduledtask/mktdata/datahouse/RVOL_History.csv lines_to_discard 1
DEBUG:root:
Reading URL https://ww2.cboe.com//publish/scheduledtask/mktdata/datahouse/RVOL3M_History.csv lines_to_discard 1
DEBUG:root:
Reading URL https://ww2.cboe.com//publish/scheduledtask/mktdata/datahouse/RVOL6M_History.csv lines_to_discard 1
DEBUG:root:
Reading URL https://ww2.cboe.com//publish/scheduledtask/mktdata/datahouse/RVOL12M_History.csv lines_to_discard 1
DEBUG:urllib3.connectionpool:https://data.nasdaq.com:443 "GET /api/v3/datasets/CHRIS/CBOE_VX1/data?order=asc HTTP/1.1" 400 None
DEBUG:root:Elapsed time 0.9928695 for add_columns_d (1,)
DEBUG:root:Elapsed time 0.7521585 for add_columns_d (2,)
DEBUG:root:Elapsed time 0.7462510999999998 for add_columns_d (3,)
DEBUG:root:Elapsed time 0.7608498999999997 for add_columns_d (4,)
DEBUG:root:Elapsed time 0.7459508999999995 for add_columns_d (5,)
DEBUG:root:Elapsed time 0.7462115000000002 for add_columns_d (6,)
DEBUG:root:Elapsed time 0.7460955 for add_columns_d (7,)
DEBUG:root:Elapsed time 0.7728456999999995 for add_columns_d (8,)
DEBUG:root:Elapsed time 0.7422424000000003 for add_columns_d (9,)
DEBUG:root:Elapsed time 7.010064 for concat (<generator object vix_futures_trade_dates_and_settlement_dates.<locals>.<genexpr> at 0x00000221C6D3
DEBUG:root:Elapsed time 0.016347099999999948 for pivot_on_contract_maturity ( Contract Month ... Days to Settlement
Trade Date ...
DEBUG:root:Elapsed time 7.034779800000001 for vix_futures_trade_dates_and_settlement_dates ()
Rebuilding data files from Quandl and CBOE
Traceback (most recent call last):
File "F:\OneDrive\ProgrammSpeicher\PycharmProjects\StockAPI\vix_utils\vixutil.py", line 264, in <module>
main()
File "F:\OneDrive\ProgrammSpeicher\PycharmProjects\StockAPI\vix_utils\vixutil.py", line 238, in main
timeit(logging.INFO)(asyncio.run)(vutils.rebuild())
File "C:\Users\Luecx\AppData\Roaming\Python\Python39\site-packages\vix_utils\futures_utils.py", line 21, in timed
result = method(*args, **kw)
File "C:\Program Files\Python39\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 642, in run_until_complete
return future.result()
File "F:\OneDrive\ProgrammSpeicher\PycharmProjects\StockAPI\vix_utils\vixutil.py", line 78, in rebuild
(cash_vix, _, wide_vix_calendar) = await asyncio.gather(ch, download_quandl_coro, wide_vix_calendar_coro)
File "C:\Program Files\Python39\lib\asyncio\threads.py", line 25, in to_thread
return await loop.run_in_executor(None, func_call)
File "C:\Program Files\Python39\lib\concurrent\futures\thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "C:\Users\Luecx\AppData\Roaming\Python\Python39\site-packages\vix_utils\vix_futures_term_struture.py", line 305, in download_quandle_data
for m, df in zmvix:
File "C:\Users\Luecx\AppData\Roaming\Python\Python39\site-packages\vix_utils\vix_futures_term_struture.py", line 304, in <genexpr>
zmvix = zip(months, (method(a) for a in qc))
File "C:\Users\Luecx\AppData\Roaming\Python\Python39\site-packages\quandl\get.py", line 48, in get
data = Dataset(dataset_args['code']).data(params=kwargs, handle_column_not_found=True)
File "C:\Users\Luecx\AppData\Roaming\Python\Python39\site-packages\quandl\model\dataset.py", line 47, in data
return Data.all(**updated_options)
File "C:\Users\Luecx\AppData\Roaming\Python\Python39\site-packages\quandl\operations\list.py", line 15, in all
r = Connection.request('get', path, **options)
File "C:\Users\Luecx\AppData\Roaming\Python\Python39\site-packages\quandl\connection.py", line 38, in request
return cls.execute_request(http_verb, abs_url, **options)
File "C:\Users\Luecx\AppData\Roaming\Python\Python39\site-packages\quandl\connection.py", line 50, in execute_request
cls.handle_api_error(response)
File "C:\Users\Luecx\AppData\Roaming\Python\Python39\site-packages\quandl\connection.py", line 114, in handle_api_error
raise klass(message, resp.status_code, resp.text, resp.headers, code)
quandl.errors.quandl_error.AuthenticationError: (Status 400) (Quandl Error QEAx01) We could not recognize your API key: This is not a valid quandle key F:\OneDrive\ProgrammSpeicher\PycharmProjects\StockAPI\vix_utils\vixutil.py. Please check your API key and try again. You can find your API key under your account settings.
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x00000221C59C8DC0>
Traceback (most recent call last):
File "C:\Program Files\Python39\lib\asyncio\proactor_events.py", line 116, in __del__
self.close()
File "C:\Program Files\Python39\lib\asyncio\proactor_events.py", line 108, in close
self._loop.call_soon(self._call_connection_lost, None)
File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 746, in call_soon
self._check_closed()
File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 510, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x00000221C59C8DC0>
Traceback (most recent call last):
File "C:\Program Files\Python39\lib\asyncio\proactor_events.py", line 116, in __del__
self.close()
File "C:\Program Files\Python39\lib\asyncio\proactor_events.py", line 108, in close
self._loop.call_soon(self._call_connection_lost, None)
File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 746, in call_soon
self._check_closed()
File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 510, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x00000221C59C8DC0>
Traceback (most recent call last):
File "C:\Program Files\Python39\lib\asyncio\proactor_events.py", line 116, in __del__
self.close()
File "C:\Program Files\Python39\lib\asyncio\proactor_events.py", line 108, in close
self._loop.call_soon(self._call_connection_lost, None)
File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 746, in call_soon
self._check_closed()
File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 510, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x00000221C59C8DC0>
Traceback (most recent call last):
File "C:\Program Files\Python39\lib\asyncio\proactor_events.py", line 116, in __del__
self.close()
File "C:\Program Files\Python39\lib\asyncio\proactor_events.py", line 108, in close
self._loop.call_soon(self._call_connection_lost, None)
File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 746, in call_soon
self._check_closed()
File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 510, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x00000221C59C8DC0>
Traceback (most recent call last):
File "C:\Program Files\Python39\lib\asyncio\proactor_events.py", line 116, in __del__
self.close()
File "C:\Program Files\Python39\lib\asyncio\proactor_events.py", line 108, in close
self._loop.call_soon(self._call_connection_lost, None)
File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 746, in call_soon
self._check_closed()
File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 510, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x00000221C59C8DC0>
Traceback (most recent call last):
File "C:\Program Files\Python39\lib\asyncio\proactor_events.py", line 116, in __del__
self.close()
File "C:\Program Files\Python39\lib\asyncio\proactor_events.py", line 108, in close
self._loop.call_soon(self._call_connection_lost, None)
File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 746, in call_soon
self._check_closed()
File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 510, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x00000221C59C8DC0>
Traceback (most recent call last):
File "C:\Program Files\Python39\lib\asyncio\proactor_events.py", line 116, in __del__
self.close()
File "C:\Program Files\Python39\lib\asyncio\proactor_events.py", line 108, in close
self._loop.call_soon(self._call_connection_lost, None)
File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 746, in call_soon
self._check_closed()
File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 510, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x00000221C59C8DC0>
Traceback (most recent call last):
File "C:\Program Files\Python39\lib\asyncio\proactor_events.py", line 116, in __del__
self.close()
File "C:\Program Files\Python39\lib\asyncio\proactor_events.py", line 108, in close
self._loop.call_soon(self._call_connection_lost, None)
File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 746, in call_soon
self._check_closed()
File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 510, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x00000221C59C8DC0>
Traceback (most recent call last):
File "C:\Program Files\Python39\lib\asyncio\proactor_events.py", line 116, in __del__
self.close()
File "C:\Program Files\Python39\lib\asyncio\proactor_events.py", line 108, in close
self._loop.call_soon(self._call_connection_lost, None)
File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 746, in call_soon
self._check_closed()
File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 510, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x00000221C59C8DC0>
Traceback (most recent call last):
File "C:\Program Files\Python39\lib\asyncio\proactor_events.py", line 116, in __del__
self.close()
File "C:\Program Files\Python39\lib\asyncio\proactor_events.py", line 108, in close
self._loop.call_soon(self._call_connection_lost, None)
File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 746, in call_soon
self._check_closed()
File "C:\Program Files\Python39\lib\asyncio\base_events.py", line 510, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed