About this template
This bot is basically the same as the bot below, now with buttons and bot-level inputs for scanner/monitor automations.
https://app.optionalpha.com/community/member/jdraket/post/spy-1-dte-daily-syn-ic-credit-target-ratio
Explanation:
Every day, this bot opens a skewed (and potentially ratioed) 1 DTE synthetic IC @ 11:30 am hoping to capture theta decay and let the positions expire worthless. I'm using credit targeting to open positions for the IC. The approximate targets are a -10 delta short put and a 5 delta short call. Because you'll take in less premium on the call side, the bot could potentially open 2 SCS contracts to only 1 SPS contract - the ratio. The idea here is to try and balance the credit received on both sides of the IC but stay further away on the call side, since markets tend to drift higher.
Scanners:
There are 2 scanners to open positions - one for the call side and another for the put side. Each scanner begins checking the available position opportunities for the "Min Bid Price" beginning with the short strike above/below $15 of the underlying. If the bid on the spread is >= "Min Bid Price", then it will send an order to open a new position. If not, it tries the short strike above/below $14 of the underlying and so forth all the way down to $3 above/below the underlying.
Open SPS w/ Min Bid Price (1 DTE Syn IC) Settings:
Open SPS Position: Toggle to "On" to open new SPS positions.
Max SPS Positions: 2 positions. Leave this setting at 2 positions.
Open New Positions Anytime: Off (default, to allow positions to be opened at 11:30 am). Set the "Open New Positions Anytime" to "On" to allow positions to be opened anytime. If an order is not filled, it will try again at the next scan interval.
Ticker: SPY (default). Can be changed to your preferred ticker.
DTE: 1 day
Long Put: $7 below short put leg
Min Bid Price: $0.13 (default value). I have found that this puts me close to the -10 delta mark these days (may change in the future based on volatility?).
Amount: 1 contract
Open Price: 100% of b/a spread using Fast SmartPricing. Change this to your preference if using other tickers.
Exit Options: None. Change this according to your preference, i.e. if you want to close at a certain profit target or S/L.
Open SCS w/ Min Bid Price Var Amount (1 DTE Syn IC) Settings:
Open SCS Position: Toggle to "On" to open new SCS positions.
Max SCS Positions: 2 positions. Leave this setting at 2 positions.
Open New Positions Anytime: Off (default, to allow positions to be opened at 11:30 am). Set the "Open New Positions Anytime" to "On" to allow positions to be opened anytime. If an order is not filled, it will try again at the next scan interval.
Ticker: SPY (default). Can be changed to your preferred ticker.
DTE: 1 day
Long Call: $4 above short call leg
Min Bid Price: $0.06 (default value). I have found that this puts me close to the 5 delta mark these days (may change in the future based on volatility?).
Max Bid Price / Amount High: $0.07 (default). If the spread it finds is less than or equal to this amount, it will open "Amount High" # of contracts; else, it will open "Amount Low" # of contracts. This it the "ratio" part of the syn IC. You could potentially have 2 SCS contracts to only 1 SPS contracts for your syn IC.
Amount High: 2 contracts (should be double the number of SPS contracts)
Amount Low: 1 contract (should match number of SPS contracts)
Open Price: 100% of b/a spread using Fast SmartPricing. Change this to your preference if using other tickers.
Exit Options: None. Change this according to your preference, i.e. if you want to close at a certain profit target or S/L.
Monitor:
On expiration day:
Before 1:00 pm, if the Reversal Risk Close switch is On, the monitor will set EOs to the Reversal Risk Exit Options, which are 90% PT w/ a 3% trail. This is to hopefully prevent a position that is way OTM from turning against you. If the Reversal Risk Close switch is Off, Default EO will be applied to positions.
After 1:00 pm, if the Nearing Expiration Position Management switch is On, the monitor will check position returns against a min profit target and 3 profit target tiers. If a position return is below Min PT, it will set the EOs to Min PT EOs. If it is below Mid PT 1, it will set the EOs to Mid PT 1 EOs, and so forth through the Mid PT 3 tier. If the position is above all profit target tiers, and the Reversal Risk Close switch is enabled, the monitor will set EOs to the Reversal Risk Exit Options to hopefully prevent a position that is way OTM from turning against you. If the Nearing Expiration Position Management switch is Off, or if the Reversal Risk Close switch is Off, Default EO will be applied to positions.
At market close and at 3:45 pm (or 12:45 pm on early close days AND Early Close switch is On), or if the Tradier Close switch is turned on and it is 3:00 pm or later (or 12:00 pm or later on early close days AND Early Close switch is On), AND the EOD Close switch is On, the bot send a closing order for any position:
- Position return < "Profit Target EOD Exp Close (%)"
- Short leg chance of ITM > "Chance of ITM EOD Exp Close (%)"
- Short leg OTM amount < "OTM EOD Exp Close ($)"
1 DTE Syn IC Monitor Settings:
Tradier Close: Off. Toggle "On" to close positions @ 3:00 pm on expiration day according to above logic.
Early Close: Off. Toggle to "On" on days when market closes at 1:00 pm ET.
EOD Close: On. Toggle to "Off" if you want to hold positions through expiration (like for XSP).
Profit Target EOD Exp Close (%): 75% (default). Change according to your preference.
Chance of ITM EOD Exp Close (%): 15% (default). Change according to your preference.
OTM EOD Exp Close ($): $1.00 (default). Change according to your preference.
Exp EOD Close Price: 100% of b/a spread using Fast SmartPricing (default). Change this to your preference.
EOD Expiration Exit Options: Expiration 2 hours, 100% of b/a spread using Fast SmartPricing (default). Change this to your preference.
Reversal Risk Close: Off. Toggle On to apply Reversal Risk EOs to positions on expiration day
Reversal Risk Exit Options: 90% / 3% trail
Nearing Expiration Position Management: Off. Toggle On to enable position management after 1:00 pm on expiration day
Nearing Expiration B/A Spread: 0.1
Min PT: -100%. Apply Min PT EO to positions w/ return < this value after 1:00 pm on expiration day
Min PT EO: 5% PT
Mid PT 1: 30%. Apply Mid PT 1 EO to positions w/ return > 0, < this value after 1:00 pm on expiration day
Mid PT 1 EO: 30% PT / 10 % trail
Mid PT 2: 50%. Apply Mid PT 2 EO to positions w/ return > 0, < this value after 1:00 pm on expiration day
Mid PT 2 EO: 50% PT / 10% trail
Mid PT 3: 70%. Apply Mid PT 3 EO to positions w/ return > 0, < this value after 1:00 pm on expiration day
Mid PT 3 EO: 70% PT / 10% trail
Default EO: none
Allocation:
With the default settings, this bot should use a maximum of $3000 in maintenance (1 SPS at $700 risk + 2 SCS at $400 each, $700 + 2 x $400 = $1500. The bot will hold 2 days worth of positions, so 2 x $1500 = $3000. If you increase the number of contracts, plan accordingly.
Bot Safeguards:
Daily Positions: 2 per day. Don't change this.
Position Limits: 4 at once. Don't change this.
Cautions:
The premise of the bot is not to take stop losses and to hold positions until the last hour or so on expiration day, assuming that they will expire worthless. If running LIVE, please beware that you may find yourself with a position that needs to be closed but the order won't fill because the long legs has no buyers. There is assignment risk because of this! In this case, you'll have to close the short leg manually on OA or on the broker side. As such, this bot should not be considered a bot that can be fully unattended. You should definitely check in on it at the EOD. When/if Option Alpha gives us the ability to close the short legs of positions, I will update the monitor.
PTD Friendly:
If run with default settings, this bot is PTD friendly and OK to run in small accounts.
Performance:
I have a version of this bot running in paper for 3 months now. Here is its performance.