m12t/straddle — reverse-engineered prompt
Reverse engineered prompt
Build me a Python educational trading bot for a long volatility straddle strategy. It should watch the underlying price, find the nearest expiration at the money options, track the straddle price, and use a simple buy signal model that I can swap out later for my own logic.
I want it to connect to Interactive Brokers through IB insync, log underlying and option data very frequently, keep records of buy signals, trades, open positions, and position updates in a local database, and manage multiple open positions at the same time. It should have clear modules for pricing, validation, monitoring, transactions, database access, and the main algorithm runner.
Please include safe defaults and make it obvious this is for education and backtesting style learning, not live trading advice. Add basic tests, useful logging, and instructions for setup, running, shutdown, and how I could automate launch with cron or launchd. Look up current IB insync and IBC docs online if needed.
Want more depth? Deep Reverse