Retrieve strategy name from trade results table

This commit is contained in:
moshferatu 2024-02-17 05:56:42 -08:00
parent aedbedc40f
commit cfdfb1421f

View File

@ -3,13 +3,14 @@ from database.procedures import backtest_profit, most_recent_trade_date
from database.trades import trades from database.trades import trades
symbol = 'SPX' symbol = 'SPX'
strategy = '10 Delta Iron Condor'
trade_date = most_recent_trade_date() trade_date = most_recent_trade_date()
print(f'Trade Date: {trade_date}') print(f'Trade Date: {trade_date}')
trade_data = trades(trade_date) trade_data = trades(trade_date)
strategy = trade_data['Strategy'].iloc[0]
traded_entry_times = set() traded_entry_times = set()
for _, trade in trade_data.iterrows(): for _, trade in trade_data.iterrows():
entry_time = str(trade["Entry Time"])[-8:] entry_time = str(trade["Entry Time"])[-8:]