diff --git a/dashboard.py b/dashboard.py index 0e65c84..77ef1a7 100644 --- a/dashboard.py +++ b/dashboard.py @@ -3,13 +3,13 @@ import dash_bootstrap_components as dbc from dash import Dash, dcc, html from dash_ag_grid import AgGrid from dash_bootstrap_templates import load_figure_template -from datetime import datetime, timedelta +from datetime import datetime from pandas import DataFrame, Series from typing import Callable, List, Dict -from ohlc import ohlc from plotting import CandlestickChart, figure_with_subplots +from daily_data import get_daily_data from strategies import cumulative_rsi from strategies import double_5s from strategies import down_days_in_a_row @@ -44,9 +44,7 @@ signal_functions: List[Dict[str, SignalFunction]] = [ {'strategy': 'VIX RSI', 'function': vix_rsi.signals} ] -symbol = 'SPY' -today = datetime.today() -data = ohlc(symbol = symbol, start_date = today - timedelta(days = 365), end_date = today) +data = get_daily_data('SPY') def calculate_signals(days: int = 12) -> DataFrame: signal_data = []