Wouldn't it be great if you knew when a volatile event would impact the market? Unfortunately, we can't predict the future. But we can use automation to automatically hedge our portfolio during an unexpected flash crash and dynamically manage positions based on extensive market research.
In this workshop, we build a single bot that runs three different strategies:
- Strategy 1 (Hedge) = 33% of allocation
- Strategy 2 (Short Put Spread) = 33% of allocation
- Strategy 3 (Iron Condor) = 33% of allocation
The "Flash Crash" Hedge Bot allocates ~1% annually as an insurance policy for your portfolio and tries to protect against a large intraday move lower in the market.
The bot splits scanning and management of each micro strategy into its own automations so you can easily edit strategies inside the same bot.
We based our decisions on detailed research to identify optimal market conditions and position setups.
The text is the output of AI-based and/or outsourced transcribing from the audio and/or video recording. Although the transcription is largely accurate, in some cases, it is incomplete or inaccurate due to inaudible passages or transcription errors and should not be treated as an authoritative record. This transcript is provided for educational purposes only. Nothing that you read here constitutes investment advice or should be construed as a recommendation to make any specific investment decision. Any views expressed are solely those of the speaker and should not be relied upon to make decisions.
Welcome everyone to the live bot workshop. Today we’re going to be doing a “Flash Crash” hedge bot. We’re going to be moving a little bit faster. This is not a total newbie beginner workshop. We’ve got a number of those we’ve done. Last recording for those. We’re going to move a little bit faster because I think it warns it. I think it’s a really cool concept.
We’ve done a lot of research on this, and I’ve also personally spent a lot of time kind of strategizing and trying to put this thing together. I think you guys are really going to enjoy this. I think it’s going to be a fun workshop. It’s going to not only be a cool strategy that you can trade, try to implement, but also kind of shows you how you can do this with bots and with automations and how to make that work.
I call this one “Flash Crash” and hedge profit template because I think there’s going to be a way, where we’re going to build a way that can try to not only just try to protect ourselves a little bit from a flash crash, this large intraday moves, but also using some of the research that our team did, try to put together some sort of strategies around actually profiting from those types of events and tyring to reduce the cost of insurance, which is the entire point of this is a cost of insurance type of strategy.
We know we’re going to outlay capital to try to protect and hedge like buying insurance on your house like you know you’re going to pay for it, you hope you don’t use it all the time, but if they come into play you hope that pays out, right?
So a couple of important notes before we even dive in here. These are really important things I just want to get right across in the beginning. One, this is a brainstorming bot-building session. So I’ve personally gone through a lot of like the strategy and kind of outlining this here myself and using some of the research.
This is not the end-all-be-all to how you can do this. This is one possible scenario of how you can put this thing together. My hope is that we collectively can crowdsource multiple ways to attack this.
As I mentioned in all of our bot workshops, we’re going to be sharing the bot template at the end of the session. So if you guys don’t want to build it, you don’t want to go through it, no problem. We’re going to share that bot template with you. You can modify, rip it apart, add to it, remove from it, whatever you want to do. And I hope we do, like, that would be better for all of us collectively if there’s more way to attack it. If you see something different, please let us know. Share your version, your template, your automation in the community. So we can all kind of benefit from that crowdsource intelligence.
Number two, 99% of staying alive in these market scenarios is being prepared heading into the event. I can’t stress this enough, like this is not going to save you if you are not buckled up and driving 900 miles an hour down to 35 miles an hour road. Like if you’re trading wild and crazy, over-allocated, this is not your saving grace.
This will not save you; this will not protect you. You will not turn those decisions into good decisions. So I always tell like, don’t try to buckle up while the car is flying through the air and making summersaults. That makes sense, right? Like 99% of staying alive is just doing the right things ahead of these events. You cannot possibly do the right things at the last moment.
Number three, the goal overall, broadly, is to allocate roughly 1% to the cost of insurance annually. So this is not something that is- I do not see this personally. This is not something that I see as like a profit center of your portfolio. This should be something that you know you’re going to have as a cost of insurance.
This is something that you’re going to try to curb those tail and events, have something in place potentially for a tail and event. And I say, but also potentially profit using some of the research to reduce the cost of insurance by entering a position, not only before flash crash hopefully happen or potentially happens. It’s not; hopefully, we don’t want it to happen, but potentially happens, but also to enter positions in the middle of it. So like, as it’s happening, how come we enter positions to reduce the cost, the total global cost of the insurance.
Number four, bots and automations, of course, allow us to pre-configure these strategies for the situations as they arise quickly and sporadically throughout the years. We don’t know. As you’ll see here in a second, as we go through the research, we have no idea when these are going to happen. When they do, you definitely don’t want to be caught flat-footed on your back heels. You don’t want to be caught away. So this is the beauty of using bots in our notions. We can pre-configure, build all this stuff into it, let the bots take care of it, and go on from there.
Last thing here, of course, do your own homework and analysis. This is not for small accounts. That’s the second thing, so I’m not telling you to do this. You can choose to do something like this similar to this. This is not advice on how to do it. It’s not. I’m telling you how to do it. This is definitely not something that works for smaller accounts.
So if you’ve got a small account, this is probably not something you would do because the cost of implementing even the smallest potential portion of this strategy is probably too big. You’re better off doing the stuff that we talked about in the last couple of workshops and the last couple of podcasts we’ve done, specifically on allocating to a diversified set of ETFs, keeping cash in the bank like that is going to help you more than doing this.
So I don’t like giving numbers or saying like, oh well, under this amount, but over this amount, it works. You could do it for a smaller account, but I’m telling you if you generally think you have a small account, then it probably is not something that you’re going to want to do is implement some sort of hedging strategy.
All right, so here's the big one here. We had our team go through and pull all the data on SPY in every intraday move going back to basically like 2000. So it has the most complete data set. So they generally worked about the same for most the other index as in ETFs, but this is the distribution of intraday drawdowns and rallies on the S&P going back to 2000.
I think what's very interesting in this chart, to begin with, is the number of days where you had over a 5% intraday drawdown. There were multiple days. If we were to guess right now, if I were to guess, I wouldn't have guessed it was this many days. I thought it would've been significantly lower, but then when you start getting at to like 7-8% drawdown days, yeah, those numbers go down significantly.
So we're looking at a rather-ish decent sample size for everything, you know, 4-5% drawdowns in the middle of the day. Once you get above that, then sample size goes down, so it's a very sporadic environment that we're dealing with. The other thing I notice here is that we don't always have this huge moves to the upside.
So this could be useful later on as we start building out other bot templates, but you know we only have really one day where the market was roughly a 5% intraday move higher. Most of the time, when markets are falling and falling hard, that's where you get those big moves to the downside.
So the whole goal and the whole genesis of doing this type of bot template is to try to either a) protect from those types of environment and b) how do we potentially profit from those types of environments because they don't last all the time.
The other thing that we notice here is that there's a lot of clustering volatility. If you've been any student of ours and listened to podcasts or interviews that we've done, you notice that this is a phenomenon that happens where you have clusters of volatility.
When you have a large day, a large intraday move, they tend to have large intraday moves back-to-back in a short time period. So you are more likely to have a 5% move up or down in the S&P after a day where you've had a 4-5% move. It just kind of makes sense like volatility begets volatility, and it works in both directions. When volatility is low, you tend to have a lot volatility days. When volatility is high, you tend to have a lot of high volatility days.
Here's some stats around this stuff. Okay, so we kind of crunch the numbers on this. And this is where I think we kind of start to get an idea of how we can build our strategy. Now let me say this, and I think that most people get completely lost in this like this concept and framework, right? Is that your trading should be based in a very logical progression around doing research, analyzing strategies, market environments, and then building a trade and strategy around that.
I think a lot of people, they try to do it backwards, particularly new traders. They try to fit a strategy into every scenario, whereas what I'm trying to hopefully show you here is a logical progression of how you should, I hope, be a trader, which is to do the hard grinding, sometimes very painful process of going through research and analysis and try to figure things out, and then try to build the strategy around those market environments and scenarios. Not cramming a strategy into every scenario that works.
And so we start off with the research here because this is so important, and it leads to the decisions that we're going to make later for this bot template. If I didn't show you the research, it probably wouldn't help as much in understanding why we're going to do some of the things we're going to do. N
ow again, this is only one way that I've thought of to look at this. If you want to look at it differently, you have other research. You have other analysis you want to do, of course. That might show you different paths of how you can do it, and let's share ideas, your templates, share strategies back and forth like let's all help each other out. Okay?
First thing that you notice on the left-hand side here is the intraday low. So, in this case, the intraday low return, this is just kind of partitioning the different strategies, the different matrix by the intraday low of 4% or more, 5%, 6%, 7%, 8%. You can see the number of days that we would have the intraday low since January 1st, 2000 and how many days we had that low.
So, for example, there were 37 days that had an intraday low since 2000 of more than 5%. So as you start going further out on the spectrum, the number start going down.
I thought the next column was very insightful, which is the average daily recovery. So even after we saw an average or low of around 4%, we typically got in those environments a daily average recovery of around 2.2%. So that means that for the most part, you saw definitely a rebound off of the lows for the vast majority of these environments that we ran, right? So the average was at 2.2% rebound.
So, okay, that’s telling to me that tells me a new piece of information that maybe I didn’t know before. Maybe if you trade at these environments, you know how quickly they can rebound off of the low, especially intraday flash crash lows, so that’s good.
The next one tells us how many days ended profitable. Again, this was a very insightful one where you saw that after we got these larger and larger and larger moves, the number of days that ended profitable, the greater the move intraday went down, right? So if you have an intraday move of 4%, then obviously, you’re not going to have the high, high, high, high likelihood that the stock rallies. But what actually was that as you got a bigger and bigger intraday low, you might’ve had a slightly higher uptake in the likelihood of ending profitable at the end.
The following day return was super interesting. Again, these are averages, so the following day return after a big down move was typically very positive. So, this, again, not in every scenario. Of course, these are averages, but we’re going to use averages to build out a bot and not try to go for one-off scenario as a trader. This is very insightful information. This tells us that if we get a large move down in the underlying security, that were likely to have a pretty strong rebound the next day or so, right?
Now once we get to the next following seven days, so basically seven days after that low was set, then we have negative return on average. So we see this like, you guys familiar with dead cat bounce, right? So we see this dead cat bounce type of phenomenon start to happen where we get an aggressive hard move off of the lows potentially, but then the markets continue to move lower from there on average, okay?
So this is, again, very interesting. There’s lots of different ways you can play this. We’ll kind of talk through the ways we’re going to play this and build this into our bot template, but we start to like building a pattern here of how like markets behave in these types of environments. Now the 30 day data was, I thought, very interesting.
This was incredibly interesting to me because I did not expect to see the market so flat after 30 days on average. This was very telling that even though we had a strong move lower, maybe a strong bounce, and then the markets flatten, we got to this point where after 30 days, the market were generally neutrals. Particularly the times where the markets were down 4 or 5% intraday, right? We had an almost flat on average time period of market movement for the following 30 days. So that tells us again how we could potentially build our strategy around those environments, okay?
Now the other thing that we saw here was we saw that the percentage of days with lower lows in the following 30 days. This one was the last-minute addition that I had our team made because I personally wanted to know if we had an intraday low of 6 or 7%, what’s- the likelihood that that final low was taken out at any other point in the next 30 days? Now, this is really interesting that, of course, the 4% lows had about 50% chance of being taken out. So at some point in the next 30 days, the markets traded lower than the most recent low, that kind of triggered the analysis. And then, as you’ve progressively got more and more into the deeper and deeper moves, the likelihood that the market had set that move as the low for the next 30 days was pretty strong, right?
We didn’t see a lot of market movement below that low. So, for example, if the market was down 8% on the day, then there’s a 70% chance that that was the low that got set into the actual market that we didn’t see anything greater than that move, that intraday low, that was 8% lower. We didn’t see a price point lower than that 70% of the time in the next 30 days. There’s no one way as this cat, okay? We were talking about cats and dead cat bounces, there’s no way one way is going to be this cat, but the data is very interesting. You could definitely build a case for build a number of different strategies around this.
Second thing, this one takes a little bit of time. So obviously, if we go back here, right? There’s not a lot of days, and I use 5% of this as a benchmark. But there’s about 37 days since 2000 where the market was down intraday more than 5%, okay? That’s a number here on the second row. 37 days since 2000, the market was down more than 5% intraday.
This is the tough part, I think, that nobody goes through or a lot of people don’t go through when building out strategy. It’s just sometimes you require a little bit of look and analyze. So I spent the other morning about 4-5 hours the other morning just literally going through the actual dates. I had our team sent me the actual dates of every move that was 5% or more lower, and I literally looked at the charts and looked at the analysis and looked at technical and looked at market data like everything on those dates for couple hours.
That to me is, I think, by the way, sidebar, that’s where your time should be spent as a trader. I don’t think your time should be spent entering orders or looking at, like, you know, analyzing the current market. No, no, no, no, no. we need to make sure that we have the ability to the time and the energy in the space to go through and analyze because that’s where we get the most bank for our book.
So here’s what I saw. This was, again, what I saw. You might see something different, but it’s shaping my analysis of how I build out this flash crash. So I saw lots of clusters and deserts of volatility, and, again, we’re specifically talking about volatility of big moves basically over 5%. So the first thing; deserts and clusters of volatility. There were six years without a large move. This is actually very interesting. Between 2002 and 2008, there was no move greater than 5%. Let’s pause for a second there, and you think about that for a second, six years without a move larger than 5%. That is a long time period. That’s a long desert of low volatility.
Then there was another period where it’s about four years of no move that was greater than 5%. That was between 2011-2014, and then another four years period between 2015 and 2020. So what is this telling me? This tells me that when we get these large moves, sometimes the next move may not be for 4, 5, 6, 7 years. So that means you might be running a strategy for 4, 5, 6, 7 years as insurance, not knowing that the next move could come. You could run a strategy like this for six years and never have a move.
Does that mean it’s a strategy to run? No, it means that it’s a cost of insurance. I hope I’m saying this a million times, but this is an insurance cost for your portfolio. I look at this as insurance. I look at this as; hopefully, I don’t need it, but if it happens, I want to have something in place to help protect and curb the downside. Maybe not cover all of it but something in place to help and protect the downside.
We also notice, again, as I mentioned earlier, multiple 5% drops close together. In fact, lots of drops happened in the same month or in the same day. So in September 01, October 08, January 09, August of 11, and March of 20, they had multiple days of 5% moves either the same week, either back to back days, or within a week of each other. So when volatility goes crazy, it tends to go crazy in sporadic moves back to back to one another.
I also found that we typically saw the big moves down after an already extended move lower. Now, again, this was not in every case and every scenario, but just looking at a lot of these scenarios going date by date for 37 dates, you saw that the big moves down typically happened after the market was already starting to head lower. So it wasn’t like the market was shooting higher, and then we got this ginormous crazy move lower. Though maybe it might happen once or twice, right? But it wasn’t the case all the time. You typically had the market already rolling over, the market had already put in its tops, the market was heading lower, and then you got this exaggerated blow-off move to the downside, right?
So I think that’s where you get a lot of your potential setups as you get a lot of your setups after an already extended move. Now you can choose to build your flash crash hedge bot without including any type of trend analysis or not. I’m going to include one that does light position and then like a heavy position based on-trend, but that’s what I saw.
The other thing I saw is that roughly half the setup saw overbought technicals 1-2 months ahead of time. Again, this was not like every single time before the market crash. You saw this thing. No. It’s like roughly if you kind of like looked back and like what the market scenario was. Heading into a crash event, you typically saw basically that the technicals at some point were overbought. You got some overbought RSI, CCI, stochastics or MACDs, or whatever. Kinda like lining up across the board.
So you had really overbought markets that then faded and started to move lower and then eventually had some sort of blow-off event at the bottom. Logically as we kind of, like put this thing together. Again, you can look at it differently, and you could be like, I’m going to look at this version of that. I’m going to look at that version of that. But that’s what I kind of saw looking through the data and kind of going day by day for some of these events. Okay? Kinda like the big things that stood out. Not the only things, the big things that stood out.
So here’s the deal. Here’s what we’re going to do. This why I said we’re going to go faster through the actual bot building here. So we’re turning them into this, but here’s the overview over strategy. Usually, I cover this in the first slide, but there’s so much research to go into this and so much background I thought it was important we cover that.
So the goal for me is to build a single bot that runs three different trading strategies around “Flash Crashes.” That’s how I’m approaching it. Again, please, people, I love you all very much. Let’s come together, let’s build some ideas, build some version out of this. You can take my template, rip it apart, build your own, do the research, throw a template back to me. There’s no one way in getting this cat, okay?
I want to try to build a bot that does three different trading strategies around flash crash. And I kind of think about it in my mind as a one-person overall allocation, like that’s how much I might spend at the end of the year. And I’m going to cut that up into 1/3, 1/3, 1/3, right? So 1/3 of that goes to, and you can do this in a bot, and we’ll do this as we build it out, 1/3 goes to the hedging component. So strategy one would be the actual hedge. So entering a set of positions that we try to hedge the market going down, right? Like, build into the strategy when the market gets too high or whatever our indicators are. The actual hedge that tries to profit from that big move before it potentially happens. So that’s one.
Strategy number two is a short put spread component. Again, 33% allocation of whatever you’re allocating to the bot goes into a short put spread strategy. I like this because of the data that we saw around the market rebound. So the market rebounding the following day. That tells me that if we do see a big move lower over 5% that we should try to aggressively try to sell out of the money put spreads at that point. Not only do we see an average daily recovery that’s pretty high, but the following day return is also on average high.
So why don’t we build a strategy that looks for those big intraday drops as part of that? Sells amount of the put spread, tries to capture some premium off of that short term trading opportunity. Now again, that would only happen in a very short window of time, and all of that money would go towards then covering the cost of the hedge.
The third one is an iron condor allocation. This one, again, is very interesting based on this research that we found or the data on the second to last column, which is basically that we’re trying to build also an iron condor strategy where not only do we try to profit from the quick rebound that might happen after a flash crash, but we’re also going to built out a bot template where you are a build-out of component of this bot template that’s going to enter a wide iron condor position about 30 days from expiration. So when market starts crashing, we enter a put spread, we take profits on our hedge potentially, and then we also enter a longer duration short iron condor position because we see in the research, on average, the markets tend to be about flat after the next 30 days.
So hopefully, you can kind of see the genesis of this bot as we’re starting to build it out. We’ve got kind of three different strategies that we’re going to be interweaving into this actual bot template. As I build this out for you, I want to make sure, and I’m just like logically going through this as I was thinking about this strategy, that we split all the scanning and management of each micro strategy into its own particular automations.
Guys, ladies, gentleman, whoever is in here, this to me is the antithesis. This is the reason why we built out Option Alpha the way we did with split automations from management, scanning, and all the stuff. So we can partition all of these different automations for each strategy. So if you look at this and you say, like, Lee is in here, right? So Lee, if you’re in here and you’re like, you know what? I like the hedge and the short put but forget the iron condor. Great. Take the template, clone it and just delete the automations for the iron condor, right?
So that you can dissect it, right? Yeah, Gordon put in here, yep. You can dissect it. You can say, you know what, I like the iron condor, like the hedge, hate the short put spread, great. Go ahead delete that from the template or readd your own. That way, we can kind of keep it easy. So feel free to swap, edit, remove anything inside the bot template as we go, but this is one bot template running three different strategies around this market scenario.
So first thing that we’re going to do here is we’re going to build out the actual shell of the bot. We just call it our flash crash hedge. Choose the actual icon here and choose whatever you want, doesn’t really matter. And then we’re going to tie it to an account. You can just tie it to a paper trading or your live account, whatever you want to do. Then we’re going to give it some allocation. Okay? In this case, we give it something like; I don’t know, $5000.
Now, first thing that we have to do here is we have to set the position limits. For my particular situation, okay, I’m just going to set the limits pretty high, like six positions. That’s because we could have a number of different positions going at any one time. So I don’t mind if all the positions get in on the same day. There’s almost no chance that would happen, but we’re going to start the position limits to daily at six, total six positions that allows us the flexibility to get into all components of this at any one time. Okay? Again, you can make any modifications you want and change yours as you go.
Now we’re going to go over to the automation tab inside of the actual bot template. And we’re going to be starting to build out our first scanner. Now here’s what we’re going to do with the first scanner. There’s going to be a number of scanners that we’re going to add to this particular bot template. The first scanner that we’re going to add is going to be a call spread scanner. Now what I’m going to do and let me just take one step back for a second, make sure you guys understand this. The first component of our bot template that we’re going to build, the first strategy, was a hedge against the market going down. Do you guys agree? Yes.
So here’s how I want to do it inside of the bot. I want to, at the same time or very close together, sell a call spread out of the money when the markets are exhibiting these really overbought characteristics, and I want to use some of the proceeds of that call spread to finance the purchase of an out of the money long put. I want to sell a call spread, and I’m going to use some of the proceeds from the call spread to finance the purchase of a long put option. That is the core setup that I want for the hedge component of the strategy.
Now, it won’t always be the case at that it covers it one for one. I just looked today and using IWM, which we might use for this actual hedge bot itself. It looks like that net cost is about $40. It’s about $40 for like a very narrow spread if you could do that, right? Now it doesn’t mean that’s the risk. That’s the net cost that it would still outlay the risk would still be like $200-$250 on a position, okay? For that hedge component, by you’re selling a far out of the money call spread, and then you’re immediately using the proceeds to buy an out of the money long put option.
You want to get that tail risk exposure with that long out of the money put option, okay? So this is all set up for if the bot is in a market environment where we potentially believe there could be a flash crash or we want to protect from some sort of market move down. Okay?
So the first thing I’m going to do is I’m going to go ahead and click all the buttons to add a brand new scanner, and I’m going to call this flash crash scanner 1, and this is my short call spread entry. I name it whatever I name it. You name it whatever you name it. Doesn’t matter. So again, this is the first component that we’re looking for. For me in particular, here’s what I’m looking for. I am looking for the technicals to be overbought, and then I want to do a decision around the trend, and then I want to choose how I want to get into the position, okay? Like what allocation I want to get into the position.
So here’s how I’m going to build it out. Again, you guys can modify it, edit it, tweak it, adjust it to whatever you want. First thing I want to do is I want to go ahead and make a decision on a particular symbol. Now, in this case, I’m just going to use one symbol for the entire bot. I’m not going to be looping through a bunch of things. No, no, no. I just want to hedge with one particular symbol, whether it is SPY, or IWM, or DIA, or Qs. Whatever works best for you, okay?
And I want to check some technicals on that particular symbol. So instead of actually typing in the symbol like SPY, IWM, or whatever, I want to create a custom input just for this symbol. And I want to call this master hedge ticker symbol. This is going to be a symbol I use throughout the bot, throughout the bot templates, everything. I’m going to use this same symbol, okay? You can use SPY. You can use the calls. You can use whatever you want.
Actually, in this case, looking at pricing, I’m going to use IWM. I’ve been watching IWM for quite some time now. IWM has better pricing for the out of the money put options when you go 60-90 days out. SPY pricing on out of money put option is outrageous. So you can get a roughly equivalent better hedge or equivalent hedge with a little bit cheaper pricing by going to IWM. Now again, your choice. You can do whatever you want. I’m going to use IWM for this one and build it out that way. Okay?
So I have my master ticker symbol in there, and I’m going to check. In this case, I’m going to do 14 day RSI. I’m going to check the intraday value, and I want it to be really, really high, like above 80, okay? Again, you can create any sort of custom inputs for any of these if you want to. It’s up to you. I’m just going to go through and adding them as we go.
So I don’t only want SPYs RSI to be high. I also want to check some other technicals, so some of the other ones that I checked were also CCI. So I want to connect this to the master symbol. I want to check the CCI reading. I think that was like a 21 day or 20 day CCI reading. We want that intraday reading to be above 150. You going to have to switch this back if you want it to like 14 day. It doesn’t matter. So they’re pretty close together, but CCI is another good technical that you can use. Again, we want that intraday reading to be above 150.
Now we've got two technicals that we're checking as we're going. And I want the bot; first, the first, first, first thing that it's going to do as it starts running this particular setup and system is first check and see if we're getting some overbought readings on technicals. That's one way that I want to trade it. So now I'm going to use another one, so I'm just going to keep adding different technicals to this particular setup.
So go down here, and I'll also do the stochastics setup, which is this one. So I want to check stochastics on the same symbol. You can do the standard setup 5-3-3 using an SMA. You can do above a value. So in this case, we're going to do 80, and again, we can set it as an intraday which means that it's going to run and it's going to check that value whenever it pulls the data for that particular symbol. Whenever that automation runs, it checks that information right then, right there at the intraday value.
So, in this case, now, I've got the technicals that I want to use set up. Please, add it, modify, adjust to whatever technicals work for you. So here's my big blob of technicals. So I'm just going to go ahead, and I'm going to edit this and just change the actual captions to do we have an overbought market setup for all technical indicators? There we go. So, do we have an overbought market set up for this particular indicator that we're looking at? There's hedge ticker that we're looking at. Okay? Good.
Next thing that I want to do is I want to add another decision to check and see if the bot already has an existing short call spread. So there's another quick little filter for it like, okay, we've got this market set up that we're going to be potentially selling a short call spread into. So do we already have an existing short call spread position? So what you can do is you can go down here to bot has exactly one position or more than, or whatever, less than, whatever you want to do. We can do the bot already has exactly one position that is any type. We can designate the type that we want, like a short call spread.
So does the bot has exactly one position that is a short call spread? Or, in our case, we'll just change it to exactly 0 positions. We only want the bot to continue down the yes path if the bot has 0 short call spread positions. Basically, don't add another short call spread if we already have a short call spread position. We only ever want one at a time. One hedge in place at a time. This prevents the bot from doing it. So, bot has exactly 0 positions that are short call spread types.
Next thing that we're going to have the bot check is we're going to have the bot check the actual market trend. So we're going to go to our decision, and for my case right here, I want to use a very simple 200 day moving average. Now I'll show you guys why we're going to be doing this as we start to build out the actual entry, but like I said in the beginning, I saw that a lot of scenarios where we had this big market moves down. Not all, but most, happened when the market was already in a downtrend. So let's use some intelligent logic here to check and see if the price of the market right now is currently above or below its 200 day moving average.
So if the price of IWM is above its 200 day moving average, that would designate that the market is generally in an uptrend or, you know, in a long term uptrend vs. if it's down below its 200 day moving average, that means it's having some difficulty that might change the way that we adjust and enter this hedge position. So, we can change the caption here to is the ticker in a long-term uptrend? Okay? Judging by the 200 day moving average. So is the ticker in a long-term up trend? Yes, no. Now we're going to take everything off of the yes and no path from here.
Now here's what we want to do. If the market is in an uptrend, and we go down the yes path. What I want to do is I want to enter a lighter position generally, okay? I want to enter a lighter position generally, which means that I want to enter a position that may be as a little bit further out with a little bit less capital for the hedge. Now you can do it a number of different ways if you wanted to. You could enter a different strike width if you wanted to. You could enter more aggressive position in some cases. It really depends on how you want to do it, but in my case, if the stock is in an uptrend vs. a downtrend. I might want to enter two different types of the hedge, okay? You guys are following along.
So here's what I'm going to do. If the stock is in an uptrend, I want to go ahead and try to open a position because now, think about it, at this point, we're getting some of these technicals that are showing that the market, you know, potentially is overbought. The bot doesn't have a hedge in place, right? Doesn't have a short call spread position that's currently opened right now. So the tickers in the long term uptrend or in a downtrend; however, you want to decide it. So now, we're at the point now where we could start to think about opening the position.
Now what I do is I always build out the position first. So, in this case, I'm going to go ahead and build out the open position action. I'm going to select a short call spread, and then I'm going to go through and select all the different criteria for the short call spread. So first thing I'm going to select is just the master ticker symbol that we're going to be using throughout. That's the easy one. Then my expiration I'm going to set to something around, I would say something more than 60 days. So I'm going to do at least 60 days out, right?
I want to go far out because, again, if the market is really high, if we're getting some overbought technicals, that means that probably volatility is low, means option pricing is probably generally pretty low. But we don't want to step in in front of the steam roller at the same time, right? We want to buy protection for a long time. We certainly don't want to buy it for ten days, that's too short. Can't pin the market in that time period, so we'll go at least 60 days out. You can go longer if you want to. You can modify these as you go into it. We'll go at least 60 days out. That covers us for two months plus some times for monthly expirations as we go out. And we definitely want to do the monthly expirations for sure. We don't want to do any of that weekly in between. We get better pricing, and there's more liquidity in those. So we'll do the monthlys at least 60 days out, that means that could be 70 days, it could be 83 days in some cases, but at least 60 days out. Okay?
Next thing that I want to do is I want to set the short delta here to around a 15 delta or closest. So give me the closest short strike of around 15 delta for the short call. And now this is where I think you can play around with a lot of different stuff. I think here is where you could, if you want to in your template, you could really play around with how you build out this strategy. So here's one example, for example. You could go here, and you could say, all right, I want to do that. I want to make sure that this long call leg is $5 above the short call leg that I'm entering or closest to it.
So if the market is really, really high, we got some high technical, maybe you're willing to go with a wider spread. So you go $5 wide. You could also, in this case, go with the more narrow spread if you want to. So you're like, hey, I don't want to do a lot. So I want to do a short narrow type position where if the market continues to rally, then I don't lose a lot because it's a smaller spread; maybe the cost of entering this on this side is a little bit less risk to do that, right? You could do that if you want to as well.
Here's what I'm going to do. You guys modify this if you want to. Let's cut it in the middle and say we'll go $3 wide, right? And then we can modify it as we go. I actually thought, this is my take; there's no right or wrong answer here. But my take was if you go too wide and the market continues to move higher because, you know, markets have these, you know, if your market is in uptrend sometimes they just keep going, and going, and going, then you get into a scenario where you have the short call spread position that goes into the money pretty quickly. And it goes into the money with a wider spread that doesn't really help you. You just like burn up a lot of capital through the wider spread.
So my first thought was actually to go with a smaller spread when market is in an uptrend and a wider spread when market is in a downtrend, right? Yeah, you can do an IV check, too as well. You could add that in there. That's a good idea. So let's do $3, and let's keep going, okay? So we're going to do $3 wide, and we'll do exactly because we want to control our risk. So we want the contracts that are exactly $3 wide. I don't think we'd have a major issue doing that, but in this case, it wouldn't enter position unless it had strike exactly $3. We don't want it to have the strikes that are like $15 wide and have this outrageously large position, right?
So the first thing that we're going to do is to do a $3 wide strike. And actually, you know, we could actually modify this, and we say or closest. We could do $3 or closest. That's fine. And here's why I'm going to do this because we can actually do some pretty cool stuff with the actual amount that we're trading. So now what we're going to do with the amount is we're going to do up to a certain percentage of the bot's allocation. So, in this case, we'll do 33% of the bot's allocation. So, however, much capital we've allocated to the bot, whatever that represents to our portfolio or how we want to do that, this component, this strategy, basically represents 33% of the bot's allocation. So we want to go ahead and use up all that capital for that allocation as it's calculating.
So we'll do up to 33% of the bot's allocation. We'll go ahead and definitely do patient smart pricing, so as we get into the position, markets are rallying, nothing is crashing right now, markets are certainly not on a down move or in a down market, so let's not be overly aggressive with getting into pricing. We'll do patient smart pricing, and we'll do the bid/ask spread up to about 80%. So that will be that final price will be very patient. It may try multiple times throughout the day to get in. That's okay. We want the bots to do that.
Okay, so we have our first short call spread set up. We add that to the actual automation. So this is the setup. Markets are overbought. We don't have a position, tickers in an uptrend, boom. This is our first component that we add.
Next thing that we're going to do here before we start adding some filters we're going to build out the other side. So if the markets are in downtrend, then we want to also open a position because we're getting some of these overbought. We want to start executing a hedge. We're still going to do a short call spread. Notice we're not going to mimic the same short call spread we had here. We're going to build out a different version of it. So we'll go over here, build out a new short call spread.
This time, we'll go out to, again, we'll do at least 60 days out from expiration. We'll only do the monthly contracts. Again, we'll set up our short call delta at around a 15 delta on the top side or closest. And then the long call, this time what I want to do, is I want to do this one a little bit wider. So I'll do this one a little bit wider. I'll do the $5 above the short call leg or closest. Again, if you want to modify these as you go, feel free to modify them to fit your particular setup as you go.
The amount, we're going to do 33% of the bot's allocation. Okay, that's not 33% of your portfolio. Just so you know, that's only the bot's allocation. Keep that bot allocation something really, really small. 1%, 2%, tops, tops, tops. Okay? And then we'll do pricing. We'll do the patient smart pricing, and again we'll do 80% of the bid/ask spread. So in this setup here, we're doing things a little bit differently. Just based on if the market is in an uptrend or downtrend.
All right, so we got these two potential setups that we're getting into. Last thing that we can do here is we can precede these decisions with some more opportunity filters. Now you guys know I am a sucker for making sure that we do some very simple opportunity filtering. And I think it makes a lot of sense to do it, particularly with this first component because this is the main component. This is where I think most of your risk is going to live where you sell the short call spread the markets rally, they don't fall, and then you're stuck with this position you got to manage, right?
So we're going to precede this with some decisions to go ahead and do some opportunity filtering, right? So all we're doing is we click on the gear icon for the actual order. That's why I build these orders first. Click the gear icon. Then go down to precede with and then you can go up here, and you can move some decisions in front of this. Now that we have order in place, we're going to go down here to the opportunity is available, the rate of return or bid/ask spread, or any of these other opportunity filters that you want to get into, okay? Any of these other opportunity filters that would be appropriate to filter out a potential trading strategy.
We’re going to do; first, the opportunity is available. So we want to make sure that that particular opportunity is available that there’s actually a $3 spread available for us to trade before we actually start submitting an order. So the first one thing that we’re going to do here is check and make sure that the bad opportunity, and again, we’re on this side for this market in an uptrend, that that $3 spread is available.
The next thing that we’re going to do in this block of decisions is we’re also going to check and make sure that the bot has enough capital to enter this position. So it seems like a logical thing to do. You’ve burned up all of your capital in your hedge. You definitely don’t want the bot to keep burning through capital. So does the bot have enough for 33%? Right? That’s what we would do. 33% of the bot’s allocation. Does the bot have that much capital available to enter this position? Again, this makes logical sense as you start thinking about how you’re building out your bots. You want to check and make sure is the actual strategy that I want to trade is it available. And if it’s available, does the bot have enough capital to enter? Both of these have to be true. This and this has to be true in order for us to send a position.
And then we want to add one more. You guys know which one I’m going to add. It’s the most easiest dead simple one to add, which is your opportunity bid/ask spread filter. We’re going to check that same opportunity. We’re going to make sure that the bid/ask spread is fairly narrow. We can do something like 15 cents. We can do something like 20 cents. Whatever it is for you. So I think these are wide out of the money spreads that probably going to be a little bit wider. I don’t know, maybe like 15 cents to start, and then you can kind of go from there and see if you get some fields. You may have to widen it for some tickers. Just depends on how aggressive you want to be.
So now we’ve got a number of different filters that we’re going to add in front of our position. We’re going to check and see if it’s available. Check and see if we have the capital, and then finally check and see if there’s decent liquidity to enter a position. Once we’re good to go here, we hit save. And then we’re going to add this to the yes path of the action. Again, that adds it right here on the screen. Hopefully, you guys can see this right here on the screen. Those are all my opportunity filters. So I’m going to say, does the opportunity clear all my filters? You can just say that if you want to, right? So something you know like that’s where all of your opportunity filters are. Does the opportunity clear all my filters? Yes, go ahead and enter the position. No, don’t do anything.
Now we’re going to do the same thing here. Let me go through this one a little bit faster. Exact same thing that we’re going to do. Get some opportunity filters in place. So I’m going to click on the gear icon, precede with. I’m going to go to decisions. I’m going to add some opportunity filters. The first one that I add is always opportunity is available. This time we’re having the bot check this position. This time we’re having the bot checking to see if this other type of spread that we want to get into is available, the $5 wide spread. So that’s the first one. Then we want to add another recipe to check and see if the bot has enough capital for 33%. So we’re going to do the 33% of the bots allocation.
We’re going to go here to the opportunity. We’re going to select that which is the $5 wide spread. We’re going to do just leave it at 100% of the bid/ask spread cause we just want to make sure it’s got more than enough capital to go. And then finally, the last thing that we’re going to do is we’re going to go down here, and we’re going to do the opportunity bid/ask spread. Again, we’re checking the $5 wide spread, and we’re doing the actual bid/ask spread. We’re going to do this one a little bit wider. We’ll say about 20 cents. Maybe if volatility is high, market volatility might start going up a little bit. So spreads might be a little bit wider, so we’re going to count for that by doing that spread just a little bit wider. Again, you can modify this if you want to. Take this down the yes path. Go ahead and modify this actual caption here. So did the opportunity pass on my filters? Yes. Okay, good to go, good to go. We’re good to go with this one.
So this is our first entry. Our first flash crash scanner that we’re building out here. Just simply going through checking a bunch of stuff. Seeing for an overbought scenario, overbought environment, check and see if we have positions, then we’re doing a dynamic entry. We’re just slightly adjusting how we get into the position based on if it’s in an uptrend or not in an uptrend, okay? So I’m going to go ahead and save this. It has my master ticker in here, which is IWM right now. I’m going to go ahead and save this to my list of scanners.
All right, one scanner down, lots to go. Now let’s think logically through this. What is the next thing that you would want the bot to do if it open a short call spread? Now we talked about this at the beginning, but what is the next thing that you want the bot to do for the hedge component? You want the bot to buy a put. So we can do this by using two different automations. The first one that we’re going to do is we’re going to add an event. You don’t have to do this, by the way. This is like a bonus point because as soon as the new position gets opened, I want that new put option to start working. Like, I want to try to get into that new put option almost immediately, so I have no lag in between the entries and axis, okay?
So, in this case, what I want to do is I want to add an event. So I want to add an event. I’m going to add an event, and I’m going to go down to run the event as soon as the bot opens a new position. So basically, this event is sitting there watching the bot and seeing if the bot opens a new position. In this case, what type of position? Well, only short call spreads, but do not run this automation to buy a put whenever the bot opens any other type of positions. Only run this automation when the bot opens a short call spread. Okay? Only when it opens a short call spread.
Now I have to tell the bot what series of actions and decisions to go through. So I’m going to add a new automation, and I’m going to call it the flash crash because I want to know where these are in my library, long put hedge addition. Okay? This is my long put hedge addition, and this is my instant open, which is really what I want it to do. It’s going to run instantly the second that the bot opens the first position. Notice that we can inside of your bots, you can kind of link position opening actions to another automation to open another position, okay? Pretty cool, right?
So this is what we’re going to do. We’re going to start this one. We’re going to start this one a little bit different. We’re going to start this one by having the bot loop through its positions. Okay? We’re going to have the bot loop through any of the short call spread positions that it has. Now, this is key. This is key why we’re having the bot do this. We already know that the bot has a short call spread position. Do you guys agree?
So the first thing that we’re going to do is we’re going to pull in all the information on the short call spread position that the bot has at this point by repeating through each short call spread. In this case, each just means the one short call spread position. Okay?
Now we’re also, once we do this, we’re going to add a decision here to check and see if the bot already has a long put position in place. Now, remember, we didn’t set up this automation to say, hey bot, check and see if you have a long put option already. No, no, no. this automation runs as soon as a short call spread is entered. So we want to build some logic in here that checks to make sure, like double, double-check, to make sure that the bot doesn’t already have a short or long put option position open.
So we can go here, and we can say does the bot have exactly 0 positions, right? 0 positions that are long puts. We want to make sure, like, for sure, for sure, that the bot has 0 positions that are long puts. Now that we’ve looped through our short call spreads. The bot has the data, and the information for the short call spreads. We want to make sure that the bot has exactly 0 positions that are long puts. We also want to make sure that the bot is not currently opening a long put option.
I know there’s a lot of decisions in here. This is all good stuff, okay? So we want to make sure that the bot is not currently, isn’t currently opening a position with our symbol. Our master symbol that we have. Now, in this case, we can do our symbol, which is IWM. This prohibits you and prohibits the bot from entering multiple orders at the same time, right? Maybe this is firing and going through decisions, but maybe you also, I’m just like making a lot of assumptions of you also doing stuff may be that you’re not doing. But you also entered an order to buy a put yourself in the exact same time. Whatever. But this prevents you from doing that. It double-checks to make sure there’s no current opening orders that are going through the bot as you go.
Okay, so we’re starting to build some of this logic and build it out as we go. The last thing that I want to add before I actually get to an open position action here. And you’ll understand why this is important as we start building out some of our monitors. But I gotta tell you guys like this only came to mind to me when I was scripting out what I wanted the bot to do. This is kind of the beauty of building bots as you can script these things out and kind of put these in. if you didn’t think about it right away, you could always come back in and edit, but I kind of thought about it before building out this automation. But I want to add a single decision to make sure that the last position that the bot had closed was more than ten days ago as a long put.
Now the reason I want to do this is because there is a scenario where the bot can open a hedge, profit from a hedge. I don’t want the bot to immediately open another hedge back-to-back. To me, that doesn’t make any sense. I want the bot to go through the market. Open a hedge and close the hedge, but at that point, I don’t want the bot to try re-hedge something that it already took off profitably, right? Does that make sense?
So you can build in this kind of like gap between your hedge if you want to or your positions. Again, this is just if you want to. You can modify this as you go. But I think this is a good way to kind of space out your trades and make sure that you, in some cases, are not hedging things back-to-back to back. Like, do you really have scenarios that are back-to-back to back, or are you only going to get hedging scenarios a couple times a year. Does that make sense? I don’t think the markets would always be super high overbought that you would want to hedge them all the time on a reoccurring basis. So you could do something like the bot has last close a position more than a certain number of market days ago. Don’t reclose and reopen a new position back-to-back.
So you could do something like five calendar days, ten calendar days, right? You don't want to open and close positions back-to-back as you go. So we could do something like that. And we could also if you wanted to, where's this one. Oh, here we go. This is the one I actually wanted. Let me just modify this. Sorry, I added the wrong one here. We want to go down to this one. There we go. Last close a position with the symbol that we're still currently going through more than, let's say, eight market days ago? Ten calendar days ago? Ten market days ago? That'd be like two weeks, right?
So you don't want to go through back-to-back positions. Again, if you want this, add it. If you don't, just simply delete the decision and be on your way. Okay? Next one here that we're going to do. We finally got to the point where probably we actually want to open a position. Now again, all this happens really, really fast. After the bot goes into this instant open kind of automations situation, right? We instantly want to try to open it, but we also want to make some logical decisions before we start going through it, okay?
Now, the last thing that we're going to do is we're going to add an open position action. So we want to open a long put option. We want to do it in the same symbol as our short call spread position. This is why we add that short call spread position loop at the beginning because we want to pull in the information on our short call spread and use that information for adding our long put option that is a component of that. It's so important and so cool that you can do this because you can reference the same symbol. So whatever you're trading in the short call spread, you're now trading in the long put hedge. That means if you want to swap the short call spread symbol, that would then flow through to your long put spread hedge that you have.
Expiration, check this out. We're going to match the expiration to the position that we already have. So here's what we're going to do. Let me go through it again because I went through it a little bit fast. So if you choose the expiration here, we're going to match the expiration to the expiration of the position that we currently have. So we go down here to this recipe which is same as position. This allows us whatever position we are into that was our call spread, we can match and reference that same exact expiration. So same expiration as whatever our short call spread position is. Okay, well, that's good.
Now we can do the strike. We can do the same exact strikes. We can do different strikes. We can do $1 amount above and below. We can do a delta. We can do whatever we want. I like doing around a 15 delta, okay? We're going to do a 15 delta or lower. That means don't do the closest to 15. That means exactly 15 or lower, right? That's what we want. So want to buy out, out, out, out of the money long put options for this particular hedge.
The next thing that we can do for the amount. This is so fun. You can do the same quantity as your short call spread position. Listen, this is really awesome stuff. Because if you enter, remember, our short call spread position was 33% of the bot's allocation, right? So sometimes that might be three contracts, sometimes it might be five, sometimes it might be ten. Whatever doesn't matter. You can match that quantity here by just doing the same quantity as your existing position. If you did three, you do three. If you do five, it'll do five. That way, you're trying to match it like contact for contract for reducing the cost of that insurance as much as possible.
The last thing that we're going to do here is we're going to choose the way that we want it to price. Again, the same thing here, I would do patient. I would do about 80% of the bid/ask spread, right? I would do something a little bit more on the safe side because, at this point, you're getting into the hedge. I don't think you have to rush pricing at this point to get into the position. I certainly don't think you have to rush pricing. You should take your time with pricing and get into it at a reasonable pace. So we're going to do it patient, and we're going to do it 80% of the bid/ask spread, and then we can go ahead and hit save. And then add this to our automation editor.
All right, now what we've got is we've got our flash crash long put hedge addition which is our instant open automation in place. We're just going to go ahead and save this. And then we're going to save it to our actual bot. So bot is running. Bot identifies a short call spread opportunity. Opens a short call spread opportunity. Instantly the bot tries to go through this decision framework and tries to open another short or long put spread opportunity.
I'm going to add or precede this with our opportunity filters. One, I want to make sure the opportunity is available. That's it, that's the first thing. Like, do I even have strikes available for that? And then the second thing that I want to add here inside of this is I want to add something for bid/ask spread. So same thing as always, I want to go through here, add an opportunity filter for the bid/ask spread. I want to make sure that the bid/ask spread is reasonable, reasonable, like tight. You can do 20 cents, 25 cents, something like that. It's gotta be something reasonable to try, right? So you just gotta filter out like aggressive, outrageous volatility and filters, okay?
So there we go. Now we're actually good to go, so I go ahead and save it, and now I've got it added here. What's going to happen when that event goes off because it's only going to run once. What happens if you don't get into a long put position? At this point, what happens? The event runs once. Your automation runs. Tries to get in to, but what if the spread is too wide right now? What if there's nothing available? What if you don't have the capital at that moment, right?
It doesn't matter. It only is going to run one time. So what we have to do here is we have to build a scanner that kind of picks up on this and continues to do it at the next interval. So we want this automation here running for sure because the second that we get into a short call spread which could be at 9:52, right? Because the order could be working, and it could be working and working. Could be like at 9:50, 9:52, 9:49. We want it instantly discharge trying to get into the long put. But that only runs that first instance. So we also want to add a scanner, and we can just reselect the exact same one, right? Which is our flash crash put spread hedge addition, right? We just simply reselect that and also run it as a scanner.
Now, these won't overlap with one another because this one only runs one time instantly when the bot open that for a short call spread position. But now we have this new scanner that's going to be running that's also going to be going through the same logic over and over and over again, but it will do it every 15 minutes interval, which means that if the first one doesn't get the position opened, then this one will keep pick up the ray and keep mowing the yard or whatever that saying is, right? Like it keeps digging, keeps looking for an opportunity.
I'm running both of them and now the exact same automation. I'm just triggering one as an event so that it runs instantly as soon as we get into a new position. Tries to reduce that gap between new position. Think about it for a second. Your bot opens a short call spread. The second that that order gets filled, this automation runs whenever the bot opens a short call spread position, but it only runs one time. Now that short call spread that you get into because the automations are running and then trying to fill through smart pricing, that short call spread could've been entered at 9:50 in the morning, right? 10 minutes after the automations run, 5 minutes after the automations run
So what I'm doing here is I'm getting one extra automation run that tries to open that long put hedge the second that that short call spread is opened. And if that doesn't work because the bid/ask spread is too wide or because something else, right? Like it doesn't pass my filter, I want to continue running that scanner to open a new long put spread position. I want it to continue doing that. Over and over and over again. Okay? And notice you can run your scanner with some position loops, right? Pulling in the information for your short call spread as you go.
Next thing that we’re going to add here is we’re going to add, in this case, now that we’ve got our two entries in place, we want to add our monitor automations. So we’ve got two components that we want to monitor here. We want to monitor the short call spread, and we want to monitor the long put. I think you should monitor them individually. We’re going to split them out so you can split out your automations however you want.
So what we’re going to do is we’re going to add a monitor. We’re going to call this our new monitor. We’re going to call it flash crash hedge, and we’re going to call this one our call spread monitor, okay? So this is our flash crash bot but our call spread monitor. And this case, what we’re going to do is we’re going to do a pretty traditional monitor automation. So the first thing that we’re going to do is we’re going to loop through any of our positions that are short call spreads. Make sense. Very similar. We only want to go through short call spreads in this case.
Next thing that we want to do for our short call spreads is check and see if we have a profit. This makes logical sense if we had sold a call spread, and now the market is moving down; well, do we have a profit on our short call spread? Can we close our hedge? So we go here to position premium has decreased. We give it a number, whatever our profit target is, say 50% since it was opened. And then simply save this to our automation editor.
So now we can say something like, did the short call spread hit our profit target? Yes? Go ahead and close the position. Easy peasy, right? Go and close the position for just the short call spread. If we sell a short call spread, and now the market’s moving down, we can close just that short call spread and try to take some profit. By the way, this is the ideal scenario for us right now. If we sell a call spread, it’s just purely to get some premium to help pay for the long put option. So if we can capture some profit from that short call spread, then it reduces the net cost of that now, potentially or mostly free long put option that we have.
If we sold a short call spread for $50, and we bought a put option for $50, and then we take 50% profit on our call spread, right? And we close that and make a $25 profit, that basically reduces the net cost of our long put protection to $25. It cuts the premium or the insurance that we had to pay in half. That’s the best-case scenario. That’s the first thing I want the bot to do. Did our call spread reach a profit target? I think 50% is a good general target for this based on a lot of research that we’ve done, obviously. Okay?
If we’re not at that profit target, then the last thing I want to do, and this one is a pretty simple one, is I just want to hold the position all the way to expiration. Now again, you guys can do whatever you want. You can do multi-tier approach where you do different days and different profit targets, whatever. But in this case, because this is purely a hedge position, I want to take profits, or I’m just willing to hold the position. Appropriately position size, I know exactly what I’ve got, I’ve run my numbers on this, I know how much I’m willing to lose on insurance, I want to hold the insurance, right? Like, I want to hold this position. So if it’s not done yet, I want to run it all the way to expiration.
So the position expires in less than two market days. Whatever works for you, okay? If the position expires in less than two market days, go ahead and close the position, remove the risk, right? Buy it back, don’t let it expire in the money, etc., etc., okay? Very simple mechanics here because we just want to take profit on this thing or run it to expiration. Remember, we’re trading something 60 days out. So we’re going to have a lot of time to hopefully see some fluctuations and maybe take some money off the table. Now go ahead and save. This is one component that we have, okay? One component.
Now we’ve got our call spread basically covered. Next thing that we’re going to do is we’re going to build a monitor to cover our long put option. We’re going to call it flash crash long put monitor. Now this one is going to be a little bit different, but pay attention. This one is going to be very, very fun to build out, okay?
First thing that we’re going to do is we’re going to loop through the R positions that are specifically long puts. So we add a position loop for just long put options. Again, we’re going to be just specifically in this monitor automation looping through long put options. First thing that I want to do here. This one is going to be a little bit different, so pay attention here. And here’s the thought process on doing this as we build it out. If the market is crashing, I don’t want the bot necessarily to be in charge of taking the position off.
That’s right, you heard me. This is a scenario where I don’t want the bot to be in charge of taking off my hedge. This, ladies and gentlemen, is the beauty of using bots and automations is that you don’t have to let the bot doing everything. I’m telling you right now; this is an example where I don’t want the bot taking off the long put. If the market is crashing, I want to be the one to decide that. Because if I put in some arbitrary profit target like 25%, 70%, 50%, 100%, what if I need that position on? Because everything else is hinging on that. Then I want to be the decider of that.
There’s only 37 events over the last 20 years that have had 5% moves down like, okay, I’ll be around. I should get notified at those 37 events. Now, if you want to do a really high-profit target like 200%, 500%, whatever you want. By all means, knock your socks off. But what I want to do in this scenario is I want the bot to check and see if it’s got a nice big profit. So, in this case, I’ll do position premium, which is our long put has increased by 50% since it was opened. It could be 25%. You can do 50%. You can do whatever you want. But, bot, if the position premium increases by 50%, send me a notification.
Yeah, I get people all the time that ask this question like how do you use notifications. And a lot of people are using really cool, clever ways. This is by far one of the easiest use cases for notification in the platform. It’s like let your bot notify you of a particular setup or an environment that you should be notified of. So I would say something like, hey Kirk, or whatever. Markets might be getting crazy. This long put is now up 50%. Check on it, right? Whatever. You talk to yourself. I know Lee has some pretty funny ones that I’ve seen him using his templates, right? But that’s what I want. I don’t want the bot to close. I want the bot if it has a 50% profit, boom, immediately notify me.
If my .15 delta long put super, super far out of the money, has moved enough that it’s got a 50% profit, something starting to happen. Would you guys agree? Something’s boiling under the surface. So that’s why I want the bot to do. I want it to notify me and then do nothing else on that side, okay?
Now for the rest of it, I want to also check, okay? I want to also check, and this could be a scenario where you do want the bot to close. Let me build one where you do want the bot to close. I have one scenario where you might want the bot to close if you’re not around. And I’m going to build this into it. You guys can choose if you want to use it or not, right?
So here’s the scenario, right? If I don’t have a 50% profit, what I want it to do is I want the bot to check the symbol that I’m trading. So I want to link it to that symbol that the price has decreased 4% today, right? One market day ago, since one market day ago, which would basically be today. So check and see if the market has gone down 4% or more today. Because in our research, when the market goes down by 4% or 5% any given day, it’s likely to go back up the other direction the next day. Even that the next afternoon, it’s likely to rebound, right? You guys remember the research in the slides?
So if the market is down 4% in one day, okay, maybe that might be the scenario where if I’m not at the computer, not at my desk, whatever, I might want to take money off the table ASAP. If the market’s not down 4%, the last thing that you want to do here, if you want to do anything at all, right, is you want to close this position one day from expiration only if the position in the money. So I do want to build in a logic for that rare one-off scenario where the market goes down, and it goes down enough, but not far enough and not fast enough that the position was never profitable, never would ever, and it just barely lands in the money, and it’s like a couple pennies wide, okay? It could happen.
So what I want to do is I want to build a group decision here where I check and see if the position expires in less than a day. So the position expires in less than one market day, okay? And I want to check and see if the symbol is trading under my long put. So the position’s underlying price is below my long put option strike. Okay? So both of these have to be true in order for me to want to close the position one day before expiration. And at that point, it probably is like just on the edge, but I don’t want to get assigned, or I don’t want to auto-exercise the position, okay? Don’t want to auto-exercise the position. So I just group it together, and then if that’s the case, then yes, I go ahead, and I close the position. That’s what I’ll do. I’ll go ahead and close the position.
Okay, so there's our long put monitor in place, done. Now we got a long put in place. So with all of these, we've actually built out just the first component. We're going to go a little bit faster now. We're going to build out the next couple components, okay?
The next component that we want to build out, the next part of our strategy here that we wanted to build out it's the short put spread. So for the short put spread, we're using the research. We're looking for the market to be down 4% intraday, right? We're looking for the market to be down 4% intraday. So here's what we're going to do. We're going to build out a new automation called flash crash (short put spread rebound) or our like rebound scanner. Whatever you want to call it doesn't matter.
So here's what we're going to do. We're going to look up a decision. We're going to go and see if the symbol that we're trading, again, this is our master. We're going to link this all together at the end. A master ticker symbol that we're using. We're going to use that IWM position for right now. We're going to see if the IWM price is down 4% in the last market day. So basically, since yesterday. So is IWM down 4% since yesterday. That's the very first thing that we want to do, right? And what we're trying to do is we're trying to play a little bit of a market rebound here, right? Do you remember that? We're playing a little bit of a market rebound here.
So we're first checking to see if the market price is down more than 4% in one day. And we're going to add some other decisions. Some other decisions we would add would be bot has exactly 0 positions that are short put spreads. We don't want to retrade a short put spread if we already have a short put spread. So we go down here to short put spread. Bot has exactly 0 positions that are short put spreads, okay?
But the first thing that we want to check is to make sure the market is down by 4%. Gap could be included. Yep, if the gap is down, great. Yep, doesn't matter in the gap, just 4% lower or more. Next thing that we want to do is we want to open a short put spread position. Remember, I like to build out my positions first, and then I fill in with our opportunity filters. So I'm going to go here, and I'm going to connect this to our master symbol. I'm going to choose an expiration between 10 and 20 days.
You can do something wildly different if you want to, okay? It doesn't matter to me, okay? My logic of doing this is the following. You certainly don't want to sell a put spread too far out because when volatility is high and everything flat lines because volatility is high, we might get the move in the stocks that you're looking for, like the stock actually re-bounce. But you don't actually get the movement in the actual option contracts. Options contracts are too far out. Don't move fast enough.
Option contracts are too close, like that same day or the next day or whatever, might just be too close because of 4% move could turn into an 8% move then never recovers, right? There's probably some sort of like happy, like, you know, goldilocks and the three bears movement around like 10-20 days. Not too close, not too far, somewhere kind of in-between. Modify this if you want to; that's the way I'm going to play it in any series. It doesn't have to be the monthlys. It could be any series. It could be the weeklies.
Now I'm going to do the short put right at a 30 delta. I think at that point, on a 4% move down, markets are insanely high, or volatility is probably really, really high, right? So volatility is probably really high, and pricing is probably starting to balloon. We're definitely starting to see option premium and spreads, right? Start to widen. But you can still do a 30 delta from that point. So I want to do a 30 delta from that point, okay? I don't think I've selected it. There we go. You want to do a 30 delta from that point. And then our long put you could do at a pretty reasonable distance like $5, $3. It really depends on how you want to do it, but I would do something around a $5 wide spread.
So I would do my long put to be $5 below my short put leg, and I would do $5 or lower, right? That's where I will go. The amount of the contracts. How many contracts we're going to do? Well, this is our second strategy, so we're going to be 33% at the bot's allocation for this particular setup. That means that in the middle of the day, if the markets are down big and we're not there to take care of it, then it's going to do 1/3 to the bot's allocation towards the short put spread strategy. Which, by the way, could be done without the hedge in place, right?
So like they're all independent running in the spot. Each one could be running at the same time, or one could be running, and the others couldn't. So you could not have a hedge on, but then you can take advantage of the market move in the day, right? The market move in a day. And then the last thing that we want to do here is we definitely want to do patient pricing. So I'm a fan of doing patient pricing, but I do want to get into the position. So I'm going to let it go 100% through the bid/ask spread. Okay? I want it to try multiple prices, and even though the markets are crazy that day, I don't want to rush it. But I don't want to get into the position because I want to try to benefit from that rally potentially the next day.
So now that I've added my position, now what I want to do is, again, precede this with some opportunity filters. I'm going to precede this, okay? I'm going to precede this with some opportunity filters. So first thing that I'm going to add here is I'm going to check and make sure that the opportunity is available. It's not even available? Then don't do anything, right? There's nothing 10-20 days, stop. I don't want to do that, right? You can do it like a stair-step progression approach of like if that's not available then do this if that's not available then do this. I don't have time to build that out. Somebody wants to do it, that'll be awesome, okay?
Next thing that I want to do is I want to make sure the bot has enough capital. So I go to the bot has enough capital available for how much? Well, we're going to do 33% of the bot's allocation, so we're going to check that. Of what opportunity do I want to check? Our short put spread opportunity that I built out, and again 100% at the bid/ask spread. And then finally, we're going to check for bid/ask spreads to be within a reasonable range.
Now, look, this is up to you what you determine as being reasonable, but for just context, think about where you'd be in this scenario, where your bot would be. Markets are down, 4+% on the day, right? Spreads are probably pretty wide. So something a little bit wider is okay here. It's just curving the edges of like ridiculously wide spreads. If it's 30 cents wide, but you do patient smart pricing, you're still going to get five tries at different pricing, and it's still going to try to walk you through that at bid/ask spread.
So just logically put something maybe a little bit more. If you put it too narrow, you're going to miss the opportunity completely. So you want to do something semi-realistic to that filter, okay? And then the last thing that we're going to do here is we're going to just modify the actual caption, make it a little bit simpler and easier, and then we're off and running. Okay?
So there’s our short put spread opportunity. This is kind of the short put spread rebound that we’re looking for. We go ahead and save this. Save this to our list of scanners. Now we got a number of scanners that we’re building out in the spots. Pretty cool.
All right, so now what we have to do is now we have to build out our monitor automation for this particular put spread. Because if the bot opens a put spread, we don’t have anything to monitor the put spreads. So we add our flash crash hedge, and this is going to be our short put spread monitor automation. Now, remember, what we’re looking for here is a very quick rebound profit on the market going down intraday and maybe the next day on average closing higher.
So here’s what we’re going to do. We’re going to loop through all of our positions. This time we’re only going to be focused on our short put spreads, right? We’re only going to be focused on our short put spreads, so we add that to our position loop. Then the first thing that we can do is we can do some very simple monitor automations. So here’s one way you can do it. Okay? I’ll do it one way. You guys can do it differently if you want to. I’m going to check for an absolute profit target, so if the position premium decreases, I’m going to say by 75%, get me out right away, like immediately, okay?
So if the position goes down by 75%, then drop me out of the position ASAP. So if you get that quick rebound, and even if it happens in the same day, even if it happens in the same day, I want to be out of the position immediately. You can set that 90, or 80, or whatever, but there’s gotta be some level where you’re like this was a short-term trade for a short-term trading opportunity, and I don’t need to stretch it anymore. Whatever that is, put that in here.
Now, if you don’t get that, what I would do in this scenario, what I’m going to do with this template is I’m going to run it as a smart stop. So this time, I’m going to use our smart stop, which is we set a target, and then we set a trailing amount because I don’t want to miss an opportunity hopefully to profit, but at the same time, I don’t want to get out too early, right? So this is literally the beauty of smart stops. This was an idea from community members. It’s one of the original, like big wish list items that people had that we built.
So I’m going to link this to our position. I’m going to set my target at 50%, like 50% triggers the smart stop for me, and then I want to trail it by 10% from there. And again, this is going to be trailing the high of the position even through the scan intervals. So you’ll know what the position highest even though the 15 minutes scan intervals, which is kind of cool. So now I want to use a smart stop. So if I get triggered on a smart stop, then I want to close the position as well, right?
So if I hit my immediate profit target of 75%, my absolute close, if I don’t hit my 75% profit target, I want to trigger a trailing smart stop 10% behind hitting a 50% profit first. Kind of a cool, intelligent way to do this, I think. And then if that doesn’t happen, then I want to go ahead and close the position. Now look, if I’m entering this position 10-20 days from expiration, I’m okay holding the position very close to expiration. I’m not holding the position as a ten day position, whatever. I want to hold the position very close to expiration. I have no problem doing that.
Remember, at 30 days, the markets, on average, are flat. So I don’t mind holding the position 20 days, whatever, you know, like most of that way because maybe the market settles down into a range, volatility goes down, the premium goes down in the position. Just making sense, we’re just kind of like talking through it. I don’t mind holding the position closer to expiration.
So I’m going to check and see if the position expires in less than two market days, so be it like inside expiration week. And if it does expire in two market days, I want to only close the position if the position is being challenged. So if the position is not being challenged, no point in closing the position just cause it expires soon if it’s still out of the money. So we’re going to check and see if the underlying price is below my short call strike of my position. So it’s gotta be inside two days, and the underlying price has to be inside my short call strike, and only then would I go ahead and close the position out cause I don’t want to get assigned. Okay?
So there you go. There’s our flash crash put spread monitor for that rebound. Taking a look at an absolute profit target, then a smart stop trailing, and then we’re intelligently monitoring the position as it nears expiration. Once we’re good to go here, we simply hit save and then add this monitor to our list of monitors.
Okay, so we’ve got two of our different components built out now. Two of our different strategies. So the third and final strategy that we want to build out is the iron condor position. Here’s how I want to do this one. Again, this is a little bit different. It’s up to you how you want to do it. If you want to do it completely different, doesn’t matter to me.
I want to use a lot of the same components that we have used in our short put spread rebound, right? In our short put spread rebound we just built out; we were looking for the stock to be down for 4% of the day. We were looking for the bot to not have existing positions, right? Like, I don’t have to rebuild that from scratch. I can use a lot of the components, a lot of the components without rebuilding it from scratch. But I don’t want to modify that one, so what I’m going to do is I’m going to highlight here, and I’m going to create a copy of this automation. That creates a brand new copy of the automation that now I can modify.
So here’s what I want to do. I want to modify this to be my iron condor rebound. I can just take off the word’s copy and add stuff like that. Now am I still looking for the ticker symbol being down 4% on the day? Yep, that’s still true. Am I still looking for the bot having exactly 0 off of position type? Yes, but now I want it to have 0 iron condors cause now this is looking for iron condors. I don’t want the bot to have any other iron condors, just one. I just want to get into this one.
And then I can delete these and just rebuild out my new position, right? My new iron condor position. Now before I do that, there’s one thing that I want to do differently in this particular setup. If the market is down 4%, I want to build in a decision that starts to check for 4% intraday move after 12 o’clock. Like if the market’s down 4% in the morning, I don’t necessarily want to enter an iron condor. I want to enter an iron condor later in the afternoon. Now, you may be different. I’m certain that most people might be different, but that’s just the way I want to do it a little bit differently.
If I’m already entering a short put spread immediately when the market is down 4%, which could happen in the morning, I want to build my iron condor to trade later in the afternoon. Only trade that component, that mutual component, later in the afternoon. So what I want to do here is I want to precede this with a decision for market time. So I want to go all the way to the bottom of our decision recipe, and I want to say the time is after 12 o’clock. The current market time is after 12 o’clock. That’s the only time I want it to start checking for an iron condor.
Now look, if you don’t want that, clone the template, and come in here and just delete this one decision and you’re done. No harm, no fall. But it’s just another way of doing it. I’ve already got something that’s going to try to profit from that early move in the morning. So now, what I want to do here is I want to now start building out the rest of my positions. So if we get all of these things, we get that big intraday move, then I want to open a position. What type of position? An iron condor. I want to open it in the master ticker symbol.
The expiration is really tricky. This one is going to be that you want to do something at least 30 days, right? And really any series. You could do monthlys. I’d probably do monthlys to make it probably a little bit better pricing. But you definitely want to go out 30 days because research-wise, we showed you in the beginning, about 30 days after, on average, the markets are neutral. So that’s kind of where you want to set up your timeline for your strategy. So at least 30 days.
Now what we want to do is we want to set up our strikes. We could do our short call strikes. We could do our short put strikes, right? And I’ll let you guys decide where you want to go with these. You can leave them at the defaults. You can choose to do something different, right? I’ll just set these up the same way as defaults.
A .30 and .10, and a .30 and .10, pretty neutral on both sides. And then the amount we’re going to do is 33% of the bot’s allocation. So now we’ve got our 33 and 33, and 33 of the bot’s allocation. We’re going to set the pricing at smart pricing patient. We’re going to go 80% of the bid/ask spread because we don’t need to force ourselves into this, but we certainly do want to get into a position, but if we start doing it at 12, we’ve got all afternoon to get into a position if we can, okay?
And this, to me, is like icing on the cake. If we can get into this position, that's kind of icing on the cake for this strategy. Now we're going to add some opportunity filters, so we're going to precede that with some additional opportunity filters. We're going to add very similar ones to the ones we've had before. First, check and see if there's an opportunity even available. That's number one. Next, check and see if the bot has capital available for that opportunity. So does the bot even have capital for 33% of the allocation of that potential opportunity that we might open that's an iron condor? And then, finally, we want the bot to check some opportunity bid/ask spreads.
Now again, I'll say it again because it's worth saying over and over again. Think about where the bot would be in this market environment. If the bot is trading and the market's down 4%, spreads are probably wide. But if you're doing smart pricing, you're trying multiple prices to get into it. Potentially multiple orders all day long. So it's okay to let this bid/ask spread kind of filter out the really egregious spreads and focus on something more narrow. Doesn't have to be insanely narrow, but something more narrow than, say, 30 cents or 40 cents, whatever works for you. Once you're good to go, you simply hit save. Add that to the yes path. Now we can modify this particular caption, and now we're good to go.
Now we're going to go ahead and hit save. Save this to our list of scanners. Now the last thing that we're going to be doing now is we're going to be building out our iron condor manager. Now, for the sake of brevity, since we're almost at to two hours anyway. I've already got an iron condor manager that I've built out before, which is called my iron condor manager for three exits. So I'm going to create a copy of that one. That one is just a very simple iron condor. I'm going to call this one iron condor manager, and this will be for my flash crash bot.
We have our iron condor position. It repeats through iron condor positions. Checks to see if we fit our profit target, which we can set as a custom input. Then we have the switch. This is pretty cool. We have a switch in here that says close if challenged. That's if you want to close the position if the iron condor gets challenged. You can simply turn this switch off if you want to. You don't have to use it. And then it checks some expiration threshold, and again, closes the position if it's near expiration and being challenged by some strikes. Okay?
So now we've got a new iron condor manager that we've added just by copying and modifying or editing anything that we have inside of our original set of automation from anything else that we found before. Okay? Anything else that we found before. Once we're good to go here, we simply hit save. We choose our profit targets, so we close our iron condor at 50%. We would close maybe at like two market days, right? And in this case, I would say that we're going to leave close if challenged to off. I don't want to immediately close the iron condor as soon as it's challenged.
Remember, this is a really high volatility event. And by the way, this is a great use case for switches. This switch can be used in multiple bots on or off. In a regular, traditional iron condor position, right? You might want to turn the switch on and say yes, close if challenged. But in this case, I'm going to turn it off because I know that markets are volatile, and I'm not expecting to make a profit on this iron condor the first day or the first two days. I'm being realistic in that.
The research shows that after 30 days, markets were on average neutral or flat. So I may get challenged very early in the cycle, and I'm okay with that, right? So I'll leave close of challenged to off. I don't have to modify anything; just turn the switch off. Bot does not close if it gets challenged and then I simply hit save.
Okay, so now we have all three of our components built out. Our strategies built out on our bot because we got one more thing that we need to do here to kind of really put the bow together with this. We've got our short call spread that instantly is linked to a long put option. That's our hedge component. Then we've got our short put spread, which is kind of our short-term rebound. And then we've got our iron condor position which we try to profit from the flatness of the markets over the 30 days following a hedge flash crash event.
The last thing that we're going to do here is we're going to tie this all together and put anything that we want to be controlled at the bot level into bot settings. So you noticed as we're going through here, like our short call spread entry, we have a master ticker symbol called master hedge ticker symbol. That is only used by this automation, okay? Only used by this automation. Instead, what we want to do is we want to combine the inputs into bot-level inputs. We want to tie together different automations if needed so that one input is controlled through different automations.
So what I'm going to do here is I'm going to create a bot-level input. Now notice where I went. I'm in the list of automations, and I click on my scanner, which has an input called IWM. And I'm going to click here to create a new bot input. And I'm going to call this master ticker which is IWM. That master ticker I can now connect to other automations. So now, when I go to my flash crash short rebound, notice this one also has an input for the ticker symbol. But I can connect this now to my bot level input called master ticker, which means that both automations now share the same input.
Notice how we're doing that. We're not sending the inputs to the bot level, so bot automation shares the same input, right? And I can even go down to my iron condor now. This one has a ticker symbol input. Now, if you wanted to trade iron condor on SPY, you can just simply swap this, so the entire bot will be running on IWM except for your iron condor position, which runs on SPY. You can do that if you wanted to, but if you want to trade all the same product, you can then connect it to that master ticker symbol.
That means that everything would be traded in that master ticker symbol. Everything. Everything will be traded in that master ticker symbol. You can send all of these to the bot level as well so that everything is just at the bot level. Your profit target, you add an input for your profit target, you add an input for your expiration threshold. You add one for close if challenged, right? It all goes to the bot level.
So now that I've created all of those, if I go to my settings, now I can basically control most of the bots using these inputs here. I can swap the entire bot to trade on SPY just like that. I can swap it back to IWM just like that, and everything flows through.
Now I did not spend the time on this template to go through and input everything. There's a lot that you can input, and by all means, please go through and input more stuff and make more inputs if you want to. There's a lot more you can do. I know there's a lot of moving parts to this, so I thought in this case, it was easier to just add them all as we go, and then you guys can swap them out and create inputs if you want to. Once you're good to go, you simply hit save.
That bot template is now—all of this is now done. And all we have to do now, once we're good to go, is just simply turn on the automations. That's it. It starts running and starts going through each progression. Starts working through each of the different things that you could do. And it could get into everything at one time, like the hedge, and then later gets into the rebound and the iron condor. Or if it misses the hedge, it could get into the rebound the iron condor, and then later it gets into the hedge.
I like this way of doing it because I felt like thinking through this like opportunity after seeing the research that you can get more longevity out of the hedge and insurance by also trying to play and profit from some of the market moves that we know and see in the research like tend to normalize or stabilize or that rebound that happens, right? There's a lot of different components to it. I think it's pretty cool, and I didn't really actually consider until we did a lot of the research around it.
So I don't think this is the end all be all. I think this is the very beginning of what I hope would be a long-term community massive trade collaboration on how we can two drinks. I think this is a really interesting way to go about building a bot in an awesome, awesome use case. For something that doesn't happen that often, but needs to be very specific when it does happen.
So that's that. I'm going to share the template into the community as soon as we get off this. I'm telling you, I know you guys have amazing ideas. I've already seen a ton of them. Please, let's collaborate on this. Let's share some ideas back and forth. This one was a big one. This was a fun one to put together. It's a brain teaser for sure and a super fun bot template.
I hope you guys really enjoy it. Have a great rest of your week, and if you guys need anything, we're always here to help [email protected] Until next time, happy trading.