mirror of
https://github.com/Xe138/AI-Trader.git
synced 2026-04-01 17:17:24 -04:00
fix: use 'no_trade' action type for initial position
Changed action_type from 'init' to 'no_trade' in _initialize_starting_position() to comply with database CHECK constraint that only allows 'buy', 'sell', or 'no_trade'. Fixes sqlite3.IntegrityError during position initialization.
This commit is contained in:
@@ -334,7 +334,7 @@ class ModelDayExecutor:
|
|||||||
)
|
)
|
||||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||||||
""", (
|
""", (
|
||||||
self.job_id, self.date, self.model_sig, 0, "init",
|
self.job_id, self.date, self.model_sig, 0, "no_trade",
|
||||||
initial_cash, initial_cash, session_id, created_at
|
initial_cash, initial_cash, session_id, created_at
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user