Convert datetime back to date when looking up the profit from the backtest table
This commit is contained in:
parent
e64357bcd4
commit
02cfa6d7cc
@ -1,7 +1,6 @@
|
||||
from database.backtest import backtest_results
|
||||
from database.procedures import backtest_profit, most_recent_trade_date
|
||||
from database.trades import trades
|
||||
from datetime import datetime
|
||||
|
||||
symbol = 'SPX'
|
||||
strategy = '10 Delta Iron Condor'
|
||||
@ -49,4 +48,4 @@ for _, backtest in backtest_data.iterrows():
|
||||
print(f' Backtest Long Strike: {long_leg["Strike"]}, Type: {long_leg["Type"]}')
|
||||
print(f' Backtest Opening Price: {open_price}')
|
||||
|
||||
print(f'Backtest Profit: {backtest_profit(datetime.combine(trade_date, datetime.min.time()))}')
|
||||
print(f'Backtest Profit: {backtest_profit(trade_date)}')
|
Loading…
Reference in New Issue
Block a user