Open tschm opened 15 hours ago
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.
/Users/thomasschmelzer/projects/investment-funnel/funnel/models/ScenarioGeneration.py:46: RuntimeWarning:
invalid value encountered in scalar divide
[2024-12-04 22:34:55,042] ERROR in app: Exception on /_dash-update-component [POST] Traceback (most recent call last): File "/Users/thomasschmelzer/projects/investment-funnel/.venv/lib/python3.12/site-packages/flask/app.py", line 1473, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/thomasschmelzer/projects/investment-funnel/.venv/lib/python3.12/site-packages/flask/app.py", line 882, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/thomasschmelzer/projects/investment-funnel/.venv/lib/python3.12/site-packages/flask/app.py", line 880, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/thomasschmelzer/projects/investment-funnel/.venv/lib/python3.12/site-packages/flask/app.py", line 865, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/thomasschmelzer/projects/investment-funnel/.venv/lib/python3.12/site-packages/dash/dash.py", line 1376, in dispatch ctx.run( File "/Users/thomasschmelzer/projects/investment-funnel/.venv/lib/python3.12/site-packages/dash/_callback.py", line 507, in add_context raise err File "/Users/thomasschmelzer/projects/investment-funnel/.venv/lib/python3.12/site-packages/dash/_callback.py", line 496, in add_context output_value = _invoke_callback(func, *func_args, *func_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/thomasschmelzer/projects/investment-funnel/.venv/lib/python3.12/site-packages/dash/_callback.py", line 43, in _invoke_callback return func(args, kwargs) # %% callback invoked %% ^^^^^^^^^^^^^^^^^^^^^ File "/Users/thomasschmelzer/projects/investment-funnel/funnel/dashboard/app_callbacks.py", line 298, in plot_backtest opt_table, bench_table, fig_performance, fig_composition = algo.backtest( ^^^^^^^^^^^^^^ File "/Users/thomasschmelzer/projects/investment-funnel/funnel/models/main.py", line 692, in backtest targets, benchmark_port_val = get_mvo_targets( ^^^^^^^^^^^^^^^^ File "/Users/thomasschmelzer/projects/investment-funnel/funnel/models/MVOtargets.py", line 72, in get_mvo_targets (budget / len(tickers)) * (1 + test_dataset_benchmark.loc[w, :])
ZeroDivisionError: division by zero
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.
/Users/thomasschmelzer/projects/investment-funnel/funnel/models/ScenarioGeneration.py:46: RuntimeWarning:
invalid value encountered in scalar divide
[2024-12-04 22:34:55,042] ERROR in app: Exception on /_dash-update-component [POST] Traceback (most recent call last): File "/Users/thomasschmelzer/projects/investment-funnel/.venv/lib/python3.12/site-packages/flask/app.py", line 1473, in wsgi_app response = self.full_dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/thomasschmelzer/projects/investment-funnel/.venv/lib/python3.12/site-packages/flask/app.py", line 882, in full_dispatch_request rv = self.handle_user_exception(e) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/thomasschmelzer/projects/investment-funnel/.venv/lib/python3.12/site-packages/flask/app.py", line 880, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/thomasschmelzer/projects/investment-funnel/.venv/lib/python3.12/site-packages/flask/app.py", line 865, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/thomasschmelzer/projects/investment-funnel/.venv/lib/python3.12/site-packages/dash/dash.py", line 1376, in dispatch ctx.run( File "/Users/thomasschmelzer/projects/investment-funnel/.venv/lib/python3.12/site-packages/dash/_callback.py", line 507, in add_context raise err File "/Users/thomasschmelzer/projects/investment-funnel/.venv/lib/python3.12/site-packages/dash/_callback.py", line 496, in add_context output_value = _invoke_callback(func, *func_args, *func_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/thomasschmelzer/projects/investment-funnel/.venv/lib/python3.12/site-packages/dash/_callback.py", line 43, in _invoke_callback return func(args, kwargs) # %% callback invoked %% ^^^^^^^^^^^^^^^^^^^^^ File "/Users/thomasschmelzer/projects/investment-funnel/funnel/dashboard/app_callbacks.py", line 298, in plot_backtest opt_table, bench_table, fig_performance, fig_composition = algo.backtest( ^^^^^^^^^^^^^^ File "/Users/thomasschmelzer/projects/investment-funnel/funnel/models/main.py", line 692, in backtest targets, benchmark_port_val = get_mvo_targets( ^^^^^^^^^^^^^^^^ File "/Users/thomasschmelzer/projects/investment-funnel/funnel/models/MVOtargets.py", line 72, in get_mvo_targets (budget / len(tickers)) * (1 + test_dataset_benchmark.loc[w, :])