Demonstration has no installation instructions. Creating and running this in Spyder throws all kinds of errors !!
I am running this demonstration in Spyder, in its own virtual environment using Python 3.8.5.
I see the requirements.txt file says to use Python 3.6.1 or higher.
The link for instructions jumps to a totally irrelevant Plotly marketing page, not installation instructions.
_ It is very frustrating for new Plotly developers trying to assess the business value of Plotly and Dash._ When demos are not maintained, it says a lot about the Plotly company. Do they actually care about people who are (not yet?) customers. Why can't Plotly maintain their finance demos?
Is there an updated version of this demonstration somewhere that works? Can someone please provide some pointers to get this working? I cannot spend a ton of time debugging these out of date Plotly core packages.
For purposes of this demonstration, it would be best to include some CSV data files that work, rather than trying to maintain it by chasing data providers' deprecated APIs. What other free option data sources are there besides the broken Yahoo API?
Thanks for an interesting example. I hope it gets updated soon.
Richard
File "C:\ProgramData\Anaconda3\envs\topss2\lib\site-packages\_plotly_future_\__init__.py", line 43, in _chart_studio_error
raise ImportError(
ImportError:
The plotly.plotly module is deprecated,
please install the chart-studio package and use the
chart_studio.plotly module instead.
The data_fetcher module provided by Plotly is broken and throws an error saying a package is missing.
from tickers import tickers
from data_fetcher import get_time_delta, get_raw_data, get_filtered_data
Traceback (most recent call last):
File "", line 2, in
from data_fetcher import get_time_delta, get_raw_data, get_filtered_data
File "C:\Users\richadmin\OneDrive!0-MyPyFi!0-Options-Pricing-Visualizers\Volatility_Surface_Plotly\data_fetcher.py", line 7, in
from py_vollib.black_scholes_merton.implied_volatility import *
ModuleNotFoundError: No module named 'py_vollib'
**After installing py_vollib, I get another error.**
The data_fetcher module is broken without a replacement being made available for the Yahoo data API.
Using the get_raw_data() function to test data function reveals the problem.
get_raw_data("AAPL")
Traceback (most recent call last):
File "<ipython-input-21-b1c3c9faa76c>", line 1, in <module>
get_raw_data("AAPL")
File "<ipython-input-18-74c509ec8be0>", line 2, in get_raw_data
tape = Options(ticker, 'yahoo')
File "C:\ProgramData\Anaconda3\envs\topss2\lib\site-packages\pandas_datareader\data.py", line 692, in Options
raise ImmediateDeprecationError(DEP_ERROR_MSG.format("Yahoo Options"))
ImmediateDeprecationError:
Yahoo Options has been immediately deprecated due to large breaks in the API without the
introduction of a stable replacement. Pull Requests to re-enable these data
connectors are welcome.
########################################################
After figuring out that the demo needs the py_vollib
package, and executing app.py, the following error is thrown .
Traceback (most recent call last):
File "<ipython-input-15-c2cd5e9a5814>", line 161, in <module>
dcc.Checklist(
File "C:\ProgramData\Anaconda3\envs\topss2\lib\site-packages\dash\development\base_component.py", line 366, in wrapper
return func(*args, **kwargs)
File "C:\ProgramData\Anaconda3\envs\topss2\lib\site-packages\dash_core_components\Checklist.py", line 69, in __init__
super(Checklist, self).__init__(**args)
File "C:\ProgramData\Anaconda3\envs\topss2\lib\site-packages\dash\development\base_component.py", line 107, in __init__
raise TypeError(
TypeError: The `dash_core_components.Checklist` component (version 1.3.1) with the ID "graph_toggles" received an unexpected keyword argument: `values`
Allowed arguments: className, id, inputClassName, inputStyle, labelClassName, labelStyle, loading_state, options, persisted_props, persistence, persistence_type, style, value
runfile('C:/ProgramData/Anaconda3/envs/topss2/lib/site-packages/dash/development/base_component.py', wdir='C:/ProgramData/Anaconda3/envs/topss2/lib/site-packages/dash/development')
Reloaded modules: tickers, trading_calendar, data_fetcher
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\topss2\lib\site-packages\dash\development\base_component.py", line 6, in <module>
from .._utils import patch_collections_abc, _strings, stringify_id
ImportError: attempted relative import with no known parent package