Utilize new daily data retrieval in swing trading dashboard

This commit is contained in:
moshferatu 2024-11-11 09:38:43 -08:00
parent 54ee48af3b
commit a4fe44ad2c

View File

@ -3,13 +3,13 @@ import dash_bootstrap_components as dbc
from dash import Dash, dcc, html from dash import Dash, dcc, html
from dash_ag_grid import AgGrid from dash_ag_grid import AgGrid
from dash_bootstrap_templates import load_figure_template from dash_bootstrap_templates import load_figure_template
from datetime import datetime, timedelta from datetime import datetime
from pandas import DataFrame, Series from pandas import DataFrame, Series
from typing import Callable, List, Dict from typing import Callable, List, Dict
from ohlc import ohlc
from plotting import CandlestickChart, figure_with_subplots from plotting import CandlestickChart, figure_with_subplots
from daily_data import get_daily_data
from strategies import cumulative_rsi from strategies import cumulative_rsi
from strategies import double_5s from strategies import double_5s
from strategies import down_days_in_a_row 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} {'strategy': 'VIX RSI', 'function': vix_rsi.signals}
] ]
symbol = 'SPY' data = get_daily_data('SPY')
today = datetime.today()
data = ohlc(symbol = symbol, start_date = today - timedelta(days = 365), end_date = today)
def calculate_signals(days: int = 12) -> DataFrame: def calculate_signals(days: int = 12) -> DataFrame:
signal_data = [] signal_data = []