5) Using AutoSearch Automation

New Training Video! 

Click Here to see a training video of this step!

In a sense, we've seen a bit of automation already.  In the Strategy that we created in Step 2, we added variables to allow us to test a range of parameter sets within our system.  This level of automation has already saved us a great deal of time.  Imagine how time-consuming it would have been to manually change and rerun each of the 1,936 parameter sets in our example Strategy!

The ability to test alternate parameter sets is certainly a good start, but an even more powerful feature would be the ability to test a variety of supporting trading rules.  When creating our Strategy in Step 2, we placed two trading rules in the Entry String (RSI and CMF) and just one trading rule in the Exit String (RSI).  StrataSearch, however, has thousands of additional trading rules that have been pre-loaded and are ready to use.  For example, one trading rule might allow us to hold positions only when the S&P Index is above its moving average, and another might have us enter positions only when there has been significant volatility in the stock, and yet another might implement a good-till-canceled stop-loss in our Exit String. 

Like the parameter sets, testing thousands of trading rules (with their own respective parameter sets) would take an entire lifetime, if we were to do it manually.  Fortunately, the AutoSearch will do this for us automatically.

While there are many different ways to use the AutoSearch, in this step we'll be taking the Strategy we created in Step 2 and creating and running an AutoSearch that will test our Strategy alongside a variety of supporting trading rules.

Creating a Trading Rule

Building the AutoSearch

Running the AutoSearch

Examining the Results

Additional AutoSearch Uses

Creating a Trading Rule

To begin, we'll first be creating a trading rule based on the Strategy we created in Step 2.  Open the Combination Results Listing and then right-click on any of the results in the list to open the submenu.  You can then select Create Optimization Trading Rule:

You'll then be shown a Trading Rule Setup window similar to the following:

The setup should look very familiar, as the settings are nearly identical to the ones we used when creating the Strategy in Step 2.  In fact, setting up a Trading Rule works almost the same way as setting up a Strategy.

Give your Trading Rule a name, such as My First Trading Rule, and the click OK to save the setup.  In this step, we actually used a shortcut to create the Trading Rule rather than creating one from scratch.  As we build our AutoSearch in the next step, we'll see where our saved Trading Rule is stored.

Building the AutoSearch

An AutoSearch Setup allows us to define which trading rules we'd like to use, and how many we'd like to place in each system the AutoSearch builds.  We can also configure certain trading rules to be used in every system.

To create an AutoSearch Setup, open the Setups > AutoSearch Setups menu, and then click the Add button:

You'll first want to give your AutoSearch Setup a name, such as My First AutoSearch.  Next, if you scroll down through the list of available trading rules, you'll come across the trading rule we created in the above step.  You can highlight this trading rule and then click the Update button if you wish to view it or make changes.  We used a shortcut to create the trading rule last time, but if you ever want to create a trading rule from scratch, this is where you can do that.

After highlighting your trading rule, double-click the box in the Always column to select that as the option.  By setting the trading rule for Always, you're saying that our trading rule should be used in every system this particular AutoSearch creates.

Next, click on the Supporting Entry tab:

Trading rules configured on the Supporting Entry tab will add trading rules only to the Entry String.  We'll be making a couple changes on this screen.

First, from the Trading Rules Filter, select Stock Trending from the list.  This will display only the trading rules that have been categorized as Stock Trending. 

Next, click the Check All Random button.  As you'll see, the selections for all the trading rules move from the Never column to the Random column.  In essence, we're telling the AutoSearch that these are the trading rules it should select from when it's adding trading rules to the Entry String of the systems it builds. 

Finally, in the Include from settings, change it to read: Include from 1 to 1 of the random Trading Rules below.  This tells the AutoSearch that when it creates systems, it should always include just 1 of the trading rules configured for Random from the list.

Next, let's go to the Supporting Exit tab:

Initially you won't see any trading rules in the list at all.  This is because there are no trading rules in the Supporting Exit tab categorized as Stock Trending.  Change the Trading Rules Filter back to [All Trading Rules] to see a list of all Supporting Exit trading rules.

Supporting Exit trading rules are added only to the Exit String of the system.  We're going to add just one: a good-till-canceled stop-loss that will be used in only half of the systems that this AutoSearch builds.

First, locate the trading rule named Good-Till-Canceled Stop, and then double-click the box in the Random column for that item.  Since this is the only trading rule we're setting to Random or Always, it is the only one from this list that will be included the trading systems this particular AutoSearch builds.

Second, change the Include from setting to read:  Include from 0 to 1 of the random Trading Rules below.  With this setting, as the AutoSearch builds one trading system after another, sometimes it will add our trading rule from the list, and sometimes it will not.

Next, click on the Supporting Entry and Exit tab:

Supporting Entry and Exit trading rules give you the opportunity to add trading rules to both the Entry String and Exit String.  So, for example, a trading rule on the Entry String might require the S&P 500 Index be above its moving average while a trading rule on the Exit String might force a sell if the S&P 500 Index crosses below its moving average.

For now, change the Trading Rules Filter to Sector Divergence, and then click the Check All Random button to include those trading rules as possible additions to the systems this AutoSearch builds.

Next, change the Include from setting to read: Include from 0 to 1 of the random Trading Rules below.  This tells the AutoSearch to sometimes add one of these trading rules, and sometimes not.

When you've completed the above settings on each of the tabs, click OK to save your AutoSearch Setup.

Running the AutoSearch

When we ran our first Strategy in Step 3, there were less than 2,000 possible parameter sets that could be produced with our trading system.  However, with our first AutoSearch, there are millions.  For this reason, we need to be a little more selective about which results we'd like to store in our database, or it will become extremely large very quickly.

To set Combination Results Filters, enter the Setups > Trade Settings menu and enter the Combination Filters tab:

Check the box named Enable Filtering of Combination Results, and then set one or more filters that will allow you to save only the best results.  Naturally, it will take some experience to identify the filters that would be most helpful to you, but you can start with something as simple as requiring the 5PortAPR (Average Annual Return for a Portfolio Size of 5) to be greater than 10. 

Combination filters can be adjusted even as the AutoSearch runs.  So if you're examining results and see that the AutoSearch is not being filtered as well as it could be, reenter the Setups > Trade Settings and tighten the filters to ensure your database remains as clear as possible.

When you've set your filters, open the Run > Run Combinations menu to begin the AutoSearch:

First, set the Run Type to AutoSearch, and then select the setup you created from the list.  In the example above, the AutoSearch we created was named My First AutoSearch.  You can also identify which Sector you'd like to run your AutoSearch against. 

After clicking Start, you'll see the Processor running your AutoSearch:

Watching the Entry and Exit Strings in the Processor, you can see that the systems the AutoSearch is creating are exactly as we defined them.  The first trading rule in each system is the one we created from our initial Strategy, so every system this AutoSearch creates uses that as its foundation.  Every system also contains exactly one additional trading rule in the Entry String that's taken from the Supporting Entry group in the setup.  The good-till-canceled stop-loss is added to the Exit String in approximately 50% of the trading systems this AutoSearch creates.  And finally, a Supporting Entry and Exit rule is also added to 50% of the trading systems this AutoSearch creates.

If the Processor is running through the systems too quickly, feel free to click the Pause/Resume button so that you can examine some of the Entry and Exit String that the AutoSearch is creating.

As you can see, the AutoSearch is a unique and powerful mechanism for assembling trading systems according to your own definitions.  See the next step for information on examining the results of this AutoSearch.

Examining the Results

It's common to examine the results of an AutoSearch even while the search continues.  So you can proceed with this step while the Processor is still running.

To view the results of your AutoSearch, open the Display > Combination Results menu:

For the Selection, select AutoSearch, and then select the name of your AutoSearch Setup from the list.  Again, make sure the Sector is set to [All Securities / All Sectors] or the specific Sector you ran your AutoSearch against.  Then click OK to display your AutoSearch results.

Like the Strategy results, the Combination Results Listing displays a grid with each result listed as a single row.  You can examine the different columns and Views, and sort them in any order by clicking on the column headings.  You can also run and create a Detailed Analysis of any of the individual results, just as you did with the individual Strategy.  For a refresher on examining results, see Step 4) Examining the Results

Tip:  You don't need to stop the AutoSearch in the Processor if you wish to run a Detailed Analysis on any of your results.  Simply submit the Run Detailed Analysis as you normally would, and the AutoSearch will be interrupted temporarily while the Detailed Analysis runs.  The AutoSearch will then continue automatically once the Detailed Analysis is complete.

Additional AutoSearch Uses

While the information below is not an actual demonstration, it's important at this point to consider all that the AutoSearch can do.  We've used one specific scenario, but the AutoSearch has many uses:

  • Use an AutoSearch to test only Supporting Entry trading rules alongside your existing system.
  • Use an AutoSearch to test only Supporting Exit trading rules alongside your existing system.
  • Use static variables with your existing system, testing only additional trading rules.
  • Instead of using an existing system as your foundation, include a variety of Primary trading rules as possible foundations.
  • Include only the trading rules that use formulas you're most familiar with.
  • Create your own trading rules to supplement the StrataSearch rules database.
  • Create your own trading rules and use them exclusively.

The AutoSearch provides some extremely helpful automation to the search for trading systems.  In the same way that it would take a great deal of time to manually change and test the parameter sets of a single system, it would take a great deal of time to manually add and revise different trading rules in a system.  But the AutoSearch handles this automatically.

The AutoSearch is a great leap forward, but it leaves us with a large database of results that we must manually sift through.  Wouldn't it be nice if we had an additional tool that would add some intelligence to the selection process, allowing us to automatically select the best results from our AutoSearch?  The OneClick Search provides just that.

New Training Video! 

Click Here to see a training video of this step!

Next StepUsing OneClick Automation

See AlsoAutoSearch, AutoSearch Setups, Processor, Combination Results Listing, Detailed Analysis