NextGenFAQ.GIF

Frequently Asked Questions

1. Why is the ASE using Ant Colony Optimization?

A significant difference between the Ant Strategy Explorer (ASE) and TradeStationTM is the implementation of an Ant Colony Optimization algorithm (using Swarm Intelligence) instead of a Genetic Algorithm.
Ant algorithms exploit the highly coordinated behavior of real ants to coordinate populations of artificial agents that collaborate to solve complex computational problems e.g. discrete optimization (hence ideal for Big Data Analytics and/or Data Mining)
More specific, Ant Colony Optimization (ACO) has an advantage over Genetic Algorithm (GA) approaches of similar problems when the graph may change dynamically; the Ant colony algorithm can be run continuously and adapt to changes in real time. This is especially useful in a trading environment. Also, our own research has found ACO to converge quicker than GA's when confronted with very large search spaces, which is exactly what we have when scanning thousands of event permutations across many symbols or data streams.

2. Why is calculating the fitness function across multiple data streams so important?

The most significant difference between the ASE compiler and TradeStation EasyLanguageTM is the fact that fitness functions are calculated across multiple data streams. This results in the search algorithm being able to converge to more robust solutions.
Let's explain with an example:
In EasyLanguageTM whenever a strategy is optimized, the fitness function is only calculated on the trading performance achieved on the first Data stream of a single chart. In other words, at any specific moment, the search algorithm can only measure the robustness of a single data stream, for example it can measure the performance on 30 minute bars but does not have access to the performance on 25 minute and 20 minute bars when the search algorithm must make a decision what is robust. Same applies to evaluating different stocks.
EasyLanguageTM can only calculate the fitness function on a single stock at a time and does not know during the search what is the simultaneous performance of the strategy on other stocks in the portfolio. This limitation is in our opinion the most significant short coming of the EasyLanguageTM environment, because it inhibits the search algorithm to converge to a truly robust solution.
The Ant Strategy Explorer solves this problem by calculating the fitness function across multiple data streams, where multiple data streams could be either different bar intervals or different instruments. Thus, during the search, the ASE compiler knows what was the simultaneous performance of the strategy on multiple bar intervals (or other symbols) and can make a more informed decision about the robust potential of the strategy at an early stage. This feature becomes even more important when scanning a universe of stocks and events where the algorithm needs to get rid of an overload of non-robust solutions as to eventually arrive at viable trade recommendations within a reasonable search time.

3. What scenarios of multi bar interval and multi market back-testing does ASE support?

ASE V1.01.178 (or later) supports the following multi bar interval and multi market optimization scenarios, with the click of a button, no additional programming or modification of strategies needed:

Scenario 1

Back-test a strategy that uses multiple data streams across multiple bar intervals, all data streams uses the same symbol e.g.

Stream#

Symbol

Interval Start

Interval End

Increment

Data1

@ES.D

10

30

5

Data2

@ES.D

20

60

10

Data3

@ES.D

30

120

15

IMPORTANT: In EasyLanguage, the execution of the strategy always happens on Data1. Even though Data 2,3, etc. can be used for entry/exit logic, the actual execution will always take place on Data1.

Scenario 2

Back-test a strategy that uses multiple data streams across multiple bar intervals, each data stream uses a different symbol e.g.

Stream#

Symbol

Interval Start

Interval End

Increment

Data1

@ES.D

15

60

5

Data2

@TF.D

15

60

5

Data3

@NQ.D

15

60

5

Scenario 3

Back-test a strategy that uses a single data stream across multiple markets, e.g.

Symbol#

Symbol

Interval Start

Interval End

Increment

Symbol1

@ES.D

15

60

5

Symbol2

@TF.D

15

60

5

Symbol3

@NQ.D

15

60

5

Data1 is optimized to be either @ES.D, @TF.D, @NQ.D, thus execution can be on any of the symbols.

The difference between Scenario 2 and 3 is as follow:

With Scenario 2, Data1 is always the same symbol, so the strategy is always executed on the same symbol (even though strategy rules based on Data2 and Data3 are calculated on other symbols, but Data2 & Data3 is not used for execution).

With Scenario 3, Data1 is optimized across different symbols, so the strategy is executed on different symbols.

4. What does "EasyLanguage friendly" means?

The Ant Strategy Explorer is "EasyLanguage friendly". But what does it really means?
EasyLanguageTM was developed by TradeStation Securities. It can be considered the standard programming language in the trading industry. EasyLanguageTM code has been in development since the late 1980's, and as a result it has one of the largest collections of trading ideas in the world already implemented. Hundreds of EasyLanguageTM indicators and strategies are available across the internet and in major trading publications like "Technical Analysis of Stocks & Commodities".

EasyLanguageTM functionality has gradually expanded over the years and around the year 2000 when TradeStation launched their TS2000i version, it was quite mature and fully lived up to its reputation of being "Easy". This version of the EasyLanguageTM syntax is referred to as "legacy EasyLanguage". In the mid 2000's TradeStation introduced Object Oriented EasyLanguage (OOEL). While the idea was good, the implementation of OOEL was unfortunately not nearly as elegant as legacy EasyLanguageTM and the syntax is sometimes clumsy and non-intuitive. In our own opinion, the "Easy" in EasyLanguageTM was gone the moment when OOEL was introduced.

The Ant Strategy Explorer (ASE) scripting language is bringing back the "Easy" while getting rid of the "not so easy"!
The majority of legacy EasyLanguageTM strategies (without OOEL) can be transferred to ASE with minimal effort. Note that the ASE Domain Specific Language is not intended to be 100% compatible with EasyLanguage, neither is it intended to be a clone of EasyLanguageTM. It is a Domain Specific Language (DSL) in its own right with several new features that is not available in either legacy EasyLanguage or OOEL. These new features are mainly to support efficient parallel execution in a Distributed / Cloud environment. The ASE DSL is a language for the Next Generation (Millenials and Generation Z) and gets rid of unnecessary complexity that was introduced in EasyLanguageTM over the years. The ASE DSL is also a powerful Array language with cutting edge Data mining capabilities built in by design.

5. Why is a 64-bit compiler so important for Data mining?

A 32-bit compiler cannot address more that 4GB of memory per process whereas the amount of memory that can be addressed by a 64-bit compiler is only limited by physical RAM, for example modern server motherboards can easily support 256GB of RAM. While one can still get away with the 32-bit limitation when analyzing a small amount of data, e.g. optimizing a single symbol, it becomes an absolute showstopper when trying to analyze a large portfolio of symbols in parallel or even one symbol with tick data, what is typically needed when performing Data Mining.

The EasyLanguageTM compiler is 32-bit and that explains why it cannot handle more than a few months worth of tick data on the ES future because otherwise it would run out of memory and crash. A 64-bit compiler like the ASE DSL Compiler can handle much larger amounts of data, as much as your 64-bit motherboard can support.

6. What is the Simplified Portfolio Engine?

The Simplified Portfolio Engine (SPE) is the underlying Engine that drives the Ant Strategy Explorer (ASE), Artificial Intelligence Designer (AID), Ant Event Explorer (AEE) & Ant Portfolio Explorer (APE). The SPE encapsulates an EasylanguageTM friendly SDL, 64bit compiler, Ant Colony Optimizer & strategy back-tester as well as all other functionality needed by the ASE, AID, AEE & APE. In other words, the ASE, AID, AEE & APE are different views of the same underlying Engine called the SPE. Each product exposes a different subset of functionality of the SPE as to present the features in a most user-friendly and easy to use manner. The SPE architecture builds on the strengths of the EasyLanguageTM environment while addressing its shortcomings. It gets rid of unnecessary complexity introduced with Object Oriented EasyLanguage (OOEL) and add a number of features specific to portfolio trading & evaluation that cannot be supported by the TradeStation EasyLanguageTM environment.

7. What is the advantages of a DSL compared to Python?

It's important to understand the significant advantages of a Domain Specific Language designed for a trading environment, compared to a general-purpose language (GPL) like Python.
EasyLanguageTM is a Domain Specific Language (DSL), in other words it contains built in functionality specific to back-testing trading strategies on multiple historical data streams.
The Ant Strategy Explorer (ASE) software provides a proprietary DSL that is syntactically very similar to EasyLanguageTM but further improves on it.
Let's take a simple example:
In EasyLanguage the following two English readable lines of code defines a complete trading strategy:
If Average(Close Data1,5) crosses above Average(Close Data2,10) then Buy next bar at Market;
If Average(Close Data1,5) crosses below Average(Close Data2,10) then SellShort next bar at Market;

The two lines above calculate a moving average on two different data streams, automatically lining up the bars of the 2 different bar intervals in the background and then executing Buy & Sell signals on the price data stream, also automatically calculating all kinds of performance statistics, equity curves etc.etc. that is useful in evaluating a trading strategy.
To achieve the same functionality in a language like Python would require many lines of additional programming where the programmer has to take care of the lining up of bar intervals of different data streams as well as writing logic to calculate trading results, with a high risk of introducing bugs that inaccurately perform the back-testing.

In short, developing, optimizing and properly testing a trading strategy in an Domain specific environment typically takes a fraction of the time that it would take to achieve the same with a GPL, with the further benefit of producing results that one can trust, i.e. knowing that all underlying data streams' time stamps have been accurately synchronized.
Other advantages of the ASE Domain Specific Language includes:
- Easier to use, i.e. less programming experience required which is ideal for Millennials
- Faster execution than Python: The ASE compiler generates machine code for Intel compatible processors (IA-32/64 architecture) for platforms: Win32/Win64 (Mac OS optional). Number of 64bit Engines that can be run in parallel only limited by hardware & cost.

8. Why is it so important to calculate combined Portfolio equity on a bar by bar basis?

Most trading software take a short cut when calculating a portfolio equity curve by simply adding the equity of different strategies on a closed trade to trade basis. While this method is much faster and simpler to calculate compared to a bar by bar basis, the shortcut approach results in a combined equity curve that cannot calculate accurate portfolio drawdowns.
Let's take a simple example:
Portfolio consist of strategy A and Strategy B, each trading on daily bars on a ficticious instrument.

Strategy A has the following trade:
1. Long on 1 Nov 2016 @ 1000 ExitLong on 15 Nov 2016 @ 1050 Profit $500

Strategy B has the following trade:
1. Long on 5 Nov 2016 @ 2000 ExitLong on 21 Nov 2016 @ 2100 Profit $1000

When calculating the portfolio equity on a closed trade to trade basis the combined portfolio equity will have only 3 data points:
1. 1 Nov 2016 Cum P&L = 0 Drawdown=0
2. 15 Nov 2016 Cum P&L = 500 Drawdown=0
3. 21 Nov 2016 Cum P&L = 1500 Drawdown=0.

This portfolio equity curve also has no information about intra trade drawdowns and portfolio drawdown is incorrectly calculated as zero because we had 2 winning trades after each other. In this case we had the Presidents election on 9 November and the market made a HUGE pullback on 9 November only to recover quickly afterwards.

When calculating the portfolio equity on a bar by bar basis (the method used by ASE), the combined portfolio equity will have 15 data points, that is a data point for every trading day:

1. 1 Nov 2016 Cum P&L = 0
...
7. 9 Nov 2016 Cum P&L = 250 MaxDrawdown = -1000
...
11. 15 Nov 2016 Cum P&L = 500 MaxDrawdown = -1000
...
15. 21 Nov 2016 Cum P&L = 1500 MaxDrawdown = -1000

This portfolio equity curve has all information about intra trade drawdowns and portfolio drawdown is correctly calculated as -1000, even though we had 2 winning trades after each other.

From the above example it is clear why the Ant Strategy Explorer is able to calculate more accurate portfolio equity curves than most other trading software. Since the bar by bar method is so computing intensive, we absolutely need the ability to use multiple 64bit calculation engines in parallel as to bring down the calculation time to a realistic waiting period.

9. How sure can I be that a trading system will continue to make profit in the future?

Since price patterns may not repeat in precisely the same way in future, a system may not achieve profits/losses similar to hypothetical testing. To address this problem, we must ensure that the system is robust. A robust system can handle a variety of market conditions, across different markets and time frames. A robust system is also not overly sensitive to the values of parameters, neither is it an overly complex system with many rules which merely captures nuances within the test data, which may never repeat.

During development of the Ant Strategy Explorer strategies, several techniques are employed to protect against overly curve-fitting, amongst other:
- Backtest the strategy over a substantial number of data points to generate a large number of trades, using 1 minute Look-Inside-Bar resolution for improved accuracy.
- Perform extensive testing on different bar intervals.
If a strategy trade profitable on multiple bar intervals, using the same buy/sell rule logic then it is a clear indication of the robustness of the underlying logic.
- Exclude a significant amount of data as Out-Of-Sample during the search and optimization process. ASE allows you to select one bar interval as Out-of-Sample, e.g. calculate fitness function on 25 & 30 min bars and walk-forward test on 35 min bars.

10. What is "curve fitting"?

You are curve-fitting when you have so many parameters that you are optimizing in a model or trading system, that you are basically just fitting to historical data. A system which is curve fitted, will work well on historical data, but will not work on new data. Bear in mind that any kind of fitting of a model to data is a kind of curve-fitting. Most traders think that any curve fitting is bad. However, it is only when it becomes what is called "tautological curve-fitting" that it becomes bad, i.e. it begins to take advantage of purely chance idiosyncrasies that occur in historical data but will not necessarily hold up in future data. To avoid this particular kind of curve-fitting, you should keep the number of parameters and model complexity fairly low relative to the number of data points that are being used to construct the model.

11. What kind of investor is attracted by the Ant Strategy Explorer trading strategies?

The Ant Strategy Explorer attracts open-minded, ambitious and independent thinking people. New and inquiring speculators are usually looking for a better, more profitable, more rewarding endeavor than can enrich their lives, not only with money, but also with experience, adventure and satisfaction. They have already been successful in some form of business and/or profession and as a result have accumulated excess capital that they are willing to risk in the markets. Note that the Ant Strategy Explorer is not a get rich quick scheme, rather it is a scientific approach to ensure constant growth on the long term.

12. I'm interested. What do I do next?

The Ant Strategy Explorer & Artificial Intelligence Designer is available via the TradeStation TradingAppStore.

Contact Wouter Oosthuizen via e-mail: support@nextgentrading.com.



Risk Disclaimer - All trading involves risk. Leveraged trading has large potential rewards, but also large potential risk. You must be aware of the risks and be willing to accept them in order to invest in the futures and options markets. Don't trade with money you can't afford to lose. This is neither a solicitation nor an offer to Buy/Sell futures or options. No representation is being made that any account will or is likely to achieve profits or losses similar to those discussed on this web site. The past performance of any trading system or methodology is not necessarily indicative of future results.

  The Ant Strategy Explorer Trading System