The Grail Forum
December 14, 2017, 05:20:12 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Coming soon!! Oct 2017: Ant Strategy Explorer with powerful Data mining capabilities. Read more at http://nextgentrading.com
 
  Home Help Search Login Register  
  Show Posts
Pages: 1 [2]
16  General Category / News and Public Announcements / GGO / GWFO / CASB V2.02 just released!! on: August 20, 2009, 04:03:09 pm
Hi All

We have just released the new GGO / GWFO / CASB V2.00 !!
V2.00.xx is fully compatible with TradeStation 8.x (including the latest TradeStation 8.6 Build 2525 and also 8.4/8.5 versions), as well as the older TS2000i.


Upgrade to the latest Version of GGO/GWFO/CASB V2.0x.xx as follow:

1. Download  Grail Genetic Optimizer (GGO) V2.00.08  from
   http://www.thegrailsystem.com/graildemo2.htm

(Download GGOInstall.rar and use the WinRAR utility to extract. Note that you can download WinRAR for free at
http://download.cnet.com/WinRAR-32-bit/3000-2250_4-10007677.html )

2. Uninstall the previous version of GGO by running the 'Uninstall THE GRAIL Genetic Optimizer' option on the Windows All Programs sub menu.

3.   Run GGOInstall.exe to install the new GGO on your computer.
Before you start THE GRAIL GGO SmartEditor application, first copy the new certificates (the files Certificate.txt & Certificate2.ldf that you will receive from support@thegrailsystem.com) to the C:\Program Files\TheGrailGGO folder

4. Run the GGO SmartEditor application. Select Help, About and check your registration status:
Status should be: Not Expired
License Type should be: Valid Trial License

5. Download Grail Walk-Forward Optimizer (GWFO) V2.00.12  from  
   http://www.thegrailsystem.com/graildemo.htm

6.  Run WFOInstall.exe and install GWFO over the existing version on your computer. (No need to uninstall previous version)
Before you start the Walk-Forward Optimizer application, first copy the new certificates (the files Certificate.txt & Certificate2.ldf that you will receive from support@thegrailsystem.com) to the C:\Program Files\TheGrailWFO folder

7. Run the Walk-Forward optimizer application. Select Help, About and check your registration status:
Status should be: Not Expired
License Type should be: Valid Trial License

8. Import into TradeStation, the file Candlesticks.els which can be found in the
C:\Program files\TheGrailGGO folder. These CandleStick definitions are needed for the new price pattern entry type in CASB


ADDITIONAL STEPS IF UPGRADING FROM GGO/GWFO V1.xx.xx

BEFORE you install the new GGOInstall.exe

Please perform the following additional steps:

1. Use your Windows Search facility and search for the file GADLL.dll.
Then DELETE ALL GADLL.dll's from your computer.

2. Also delete the file GAData.bin in the C:\Program files\TheGrailGGO folder

 Then AFTER you have installed the new GGO V2.00.08, open the GGO SmartEditor once and close it again and then check if you have a GADLL.dll dated 8/19/2009 in C:\Windows\System folder.

If not, copy the GADLL.dll dated 8/19/2009 in the C:\Program files\TheGrailGGO folder to the C:\Windows\System folder


We are pretty confident that the new version is 100% stable, but with any new software installation
it is always a good principle to create a restore point so that if something goes wrong, you can easily restore your computer to what it was before.
In Windows, just select
Start, All programs, Accessories, System Tools, System Restore, Create a restore point, and there you go!

---------------------------------------------------------------------
Existing users upgrading from GGO/GWFO V1.xx.xx should note that GWFO V2.00.xx has a new security mechanism and requires new registration certificates.     E-mail support@thegrailsystem.com to obtain valid certificates BEFORE installing V2.00. Users that previously purchased our Platinum upgrade package may upgrade one computer at no additional cost while others may upgrade at a cost of $250
Upgrades may be ordered at the following link:
http://www.thegrailsystem.com/grail-trading-system-order.htm

---------------------------------------------------------------------
Procedure for Final Registration

Once you have tested the software and decided to purchase, we will issue you with final certificates.

To request final certificates, do the following:

1. In the GGO SmartEditor:
   Select Help, Register, Request Registration Certificate
2. Follow the instructions on the request form and e-mail support@thegrailsystem.com your registration info so that we can create final certificates.
Remember to include the Request header in the subject line of your mail!
It will look something like: Registration request for Your Name : 4D-5B-D1-B6-9F-16-81-F4

3. Once you receive your final registration certificates, save the certificates (the files Certificate.txt & Certificate2.ldf) to both the C:\Program files\TheGrailGGO and C:\Program files\TheGrailWFO folder

4. For both the GGO SmartEditor and GWFO:
   Select Help, Register, Load Registration Certificate and press the 'Load certificate' button
   Then select Help, Register, Check Final registration
   You should receive a message: 'This version is fully Registered'
   Then select Help, About and check your registration status:
   Status should be : Registered
   License Type: Full License
  
17  General Category / News and Public Announcements / We have a new forum! on: August 20, 2009, 04:00:09 pm
Hi All

I have setup a new forum using the Simple Machines Forum engine.
My experience is that SMF is more powerful and user-friendly than the phpbb forum architecture, especially when it comes to posting of attachments, pictures etc.etc.
Even more important is the fact that SMF has good security to keep spammers away!!

You are welcome to use the forum to discuss any topic related to The Grail software or computerized/algorithmic/systematic trading.

Enjoy!!

Wouter

P.S. Please note that because of contractual agreements previously signed, thegrailblog is unfortunately no more available

18  General Category / Documentation and FAQ's / Computer Assisted Strategy Builder (CASB) - FAQ's on: August 20, 2009, 03:38:57 pm
Frequently Asked Questions

Copyright 2004-2010 Technovest (Pty) Ltd

1. Can I add my own indicators to CASB?
2. Can I use an indicator with range -1 to +1 with the CASB/Neural hybrid?
3. How do I use multi data streams in CASB?
4. Can a saved template in CASB be deleted or copied over?
5. Can I use any MyVar variable when adding an Additional filter?
6. Why did CASB not export any of the non standard indicators when I used 'Export CASB strategy'?
7. What regional settings should be used with CASB?
8. I am using CASB to model new strategies, but the GGO optimization report keeps on being empty?
9. When a strategy is exported from CASB for GGO/GWFO testing, how can one decipher the logic of the entry signals?
10. Does CASB D&P functionality support creation of an adaptive trading system?

11. How do I create a TS verified function for an indicator I want to use?
12. Can I use my own exit code along side of the presets for exits?
13. How can I import a CASB Template made on a separate machine?
14. Do I need all the data streams on the final chart if I have used multiple data streams?
15. What is an appropriate Maximum bars per trade setting?
16. Can I do timeframe optimization for my existing system which is coded in EasyLanguage(TM)?
17. Is Intrabar entry order types allowed with multi time frame optimization?
18. How would one use the DMI as a Boolean Filter in CASB?
19. Does it make sense to use random numbers seeds other than 1-10?
20. How do I use CASB to "enforce" and exit?

21. Do the Moving Averages apply to MultiData? Does the 5 data stream limit also apply to MA's?
22. How does "File, Export CASB Parameters" work?
23. If a filter is defined refering to Data2, can I leave the Data to "Do not optimize streams",
if no MultiData indicators are selected?
24. When is a D&P report rewritten?
25. Is there a recommended methodology that will aide in reducing fitting when running a CASB Template or a GGO run?
26. Can one use indicators with Price inputs such as "(H+L)/2"?
27. How does the Oscillator turning point (5th) entry type works?
28. Why are the Moving average crossovers never used on the price series, but only on other indicators?
29. Why do I get Entry/Exit on the same bar after profit targets are hit?
30. Why do recursive functions sometimes give problems with EasyLanguage(TM)?

31. Where can I find additional indicators to be used with CASB?
32. Can I reboot my computer while running CASB?
33. Should look inside bar back testing resolution be turned on, when using CASB?
34. When using the "File, Export CASB Strategy" option, I get a "not valid integer value" error?
35. How can I speed up my CASB optimization?


1. Can I add my own indicators to CASB?
CASB is extremely flexable and it is very easy to add your own indicators.
You can basically use any indicator as long as that indicator has been imported into your TradeStation and has been verified.
Use the 'Add an indicator' button in the Oscillators/Channel breakouts section on CASB3 to add a new indicator.
Note that you might need to first specify a new bandclass on CASB2 (or simply use an existing band class) so that CASB can know between which values the buy/sell trigger bands will vary.

2. Can I use an indicator with range -1 to +1 with the CASB/Neural hybrid?
My indicator has an output of +1 and -1 only, UpTrend Mode=+1 and Down TrendMode = -1.
How can this be used with the Neural hybrid and classified as +3 to -3 range for Neural Hybrid purposes?
Such an indicator can easily be implemented in CASB:
First you need to specify a new bandclass so that CASB can know between which values your oscillator will be oscillating.
On CASB2, press the 'Add a BandClass' button.
Type in a description e.g. 'Oscillator between -1 and +1'
Since your oscillator has a fixed range, you will next select
'Trigger band is a fixed line' as band type.

Next you must define the trigger band ranges.
If you have an oscillator that oscillates between -1 and +1 then typically
you would like to Sell when overbought i.e. in the region of +1,
and Buy when oversold i.e. in the region of -1
Thus, you will specify the UpperBand range as 0 to 1
and the LowerBand range as -1 to 0
Next press OK to save your new band class definition.

Now you only need to add your oscillator to the list of indicators:
On CASB3, press the 'Add an Indicator' button in the Oscillators / Channel breakout section.
Then type in a description and the EasyLanguage definition e.g. MyOscillator(Price,Length)
and select as BandClass, the new bandclass you have just defined yourself: 'Oscillator between -1 and +1'

3. How do I use multi data streams in CASB?
In CASB a user can select various indicators in the Oscillator / Channel breakout section on CASB3.
These indicators then serve as the underlying data series to be used.
If you have specified a basic formula e.g. RSI(Price,Length) then CASB by default assumes to use the
Close prices of Data stream #1.
CASB allows the usage of multiple data streams as follow:

On CASB3 there is a Data dropdownbox. It has the following options:
1. Do not optimize streams
2. Optimize 2 data streams
3. Optimize 3 data streams
4. Optimize 4 data streams
5. Optimize 5 data streams

If you leave this selector on 'Do not optimize streams' CASB will only apply the indicators on the default Data stream.
Thus the usage of multiple data streams must explicitly be specified by adding another indicator, e.g.
RSI(Price of data2,Length) and then CASB will know that it must calculate that specific RSI using data stream #2.

Should you specify any of the options 2-5, e.g. Optimize 3 streams, CASB will automatically optimize
the first 5 indicators (as selected in the Oscillator / Channel breakout section) on 3 data streams.
This would require you to make sure that your have inserted 3 data streams onto your chart, e.g.
@ER2.D 20 min, @ER2.D 40 min and @ER2.D 60min.
It is very important to remember that you should always specify the data streams with the shortest bar interval first,
otherwise it can lead to exponential waiting times.
Thus in our example Data1 would be 20min, Data2 would be 40min and Data3 would be 60 min bars.
CASB will then automatically test all permutations of the 5 multidata indicators on any of the data streams.

Note that this approach only allows the specific data streams on the chart to be optimized. Thus, if you have
3 data streams e.g. 10,20 and 30 minutes, then CASB will only be able to optimize those 3 intervals and
will not be able to do optimization on other increments e.g. 15 minutes that are not on the chart.
Doing a simultaneous time frame optimization on a wide range of bar intervals (to be calculated during execution) would just be too computing intensive
given the current TS architecture and would lead to unrealistic waiting times. (Note that this feature should be possible with USO)

4. Can a saved template in CASB be deleted or copied over?
The active template is automatically saved when the 'Generate code' button is pressed. Thus if you have made changes to the current template, it will overwrite the previous copy. If you want the current changes to be saved as a new unique template, just select a different active template number on CASB3 and press the Save As button.
We strongly recommend NOT to use Template1 for D&P purposes, because Template1
will we overwritten to the default values every time you upgrade.

5. Can I use any MyVar variable when adding an Additional filter?
When adding an Additional Filter in CASB2 when it has only 1 Variable.
Must one start with MyVar1 or can 1,2,3 be left 0's and use only MyVar4 for the new Filter?
You can use any one of MyVar1-4. Thus if you only want to use MyVar4 that's also OK!

6. Why did CASB not export any of the non standard indicators when I used 'Export CASB strategy'?
Make sure that you have imported all necessary functions into your TradeStation, if you have used any non standard or proprietary functions. (There is no way that CASB can know what functions are standard TS functions and which ones are proprietary).
CASB is not exporting ELS/ELD files but is only exporting a text file.
If you havenot imported all your non standard indicators, then that text might not Verify in TradeStation.

7. What regional settings should be used with CASB?

Not only for CASB, but also for GGO/GWFO, the regional settings should preferably be English/USA.

8. I am using CASB to model new strategies, but the GGO optimization report keeps on being empty?
This can happen if
1) On CASB4 you have selected Required trading frequency, accuracy and drawdown (FAD) settings that were too strict, thus filtering out all systems being modeled by CASB, OR
2) On CASB3 in the Entry types box, you have selected Buy/Sell filters that were too strict, again resulting in systems that could not adhere to the FAD settings as per 1) above

9. When a strategy is exported from CASB for GGO/GWFO testing, how can one decipher the logic of the entry signals?
About 3/4 through the strategy you will find statements that typically looks as follow (only an extract):
If EntryType=2 then begin
LongEntry = (MavST crosses above LowerBand);
If LongEntry then begin
If OrderType=1 then Buy this bar at close;
These statements define the actual entry signals.
EntryType=1 handles with moving average crossovers
EntryType=2 handles with oscillators
EntryType=3 handles with channel breakouts
OrderType=1 is to trade at the close of the current bar
OrderType=2 is to trade at the open of the next bar
OrderType=3 is for intrabar entry orders
For moving average crossovers, MavST and MavLT is the short and long term
moving averages calculated on top of the underlying indicator
For Oscillators and channel breakouts, MavST is the short term
average of the underlying indicator.
The underlying indicator is calculated higher up in the section:
{* Define Indicators used for entries *}
IndType[Count] is the variable determining the
indicator e.g. IndType[Count]=1 would select the first indicator,
IndType[Count]=2 would select the second indicator etc.

10. Does CASB D&P functionality support creation of an adaptive trading system?
Although a genetic algortihm is highly adaptive by design, the standard CASB is not adaptive in the sense that you would like it to be. Note that CASB can be modified to do exactly what you want, but that is something that must rather be done on your own by modifying the code of the CASB template manually.


11. How do I create a TS verified function for an indicator I want to use?
When using say, "MyTSI" ,do I actually create a new Function for it in TS or can I simply type "MyTSI" in CASB when I go to add it?
You need to create a new MyTSI function in TradeStation:
Use File, Open EasyLanguage document to open the TSI function.
Now select File, Save EasyLanguage Document As, and save the original TSI function as
MyTSI.
Now edit the EL code of the MyTSI function and replace all XAverage functions with Average.
Finally select Tools, Verify to verify your new MyTSI function.
Now you can simply use MyTSI in CASB using the definition MyTSI(Price, Length, 13,1)

12. Can I use my own exit code along side of the presets for exits?
Yes, you can use your own exit code. But since the CASB front-end does not cater for adding your own exits, you will have do it manually.
Just identify an exit that you do not want to use, and then replace that exit with your own code.
For instance, if you do not want to use a trailing stop, you can tick the Trailing stop exit on CASB3, but then in the template, just delete the CASB code within the if statement of the Trailing stop exit and replace it with your own code:
If Scale1Type=5 or Scale2Type=5 or Scale3Type=5 then begin
If Scale1Type=5 then ScalePar2=Scale1Par2;
If Scale2Type=5 then ScalePar2=Scale2Par2;
If Scale3Type=5 then ScalePar2=Scale3Par2; { ScalePar2 ranges between 1-10 }

If Scale1Type=5 then ScalePar1=Scale1Par1;
If Scale2Type=5 then ScalePar1=Scale2Par1;
If Scale3Type=5 then ScalePar1=Scale3Par1; { ScalePar1 ranges between 1-10 }

{ Insert the logic for your own exit strategy here, using ScalePar1 and ScalePar2 as parameters }

end;

13. How can I import a CASB Template made on a separate machine?
You should be able to use templates on any other machine by simply transferring the file
CASBTemplateX.def, which is located in C:\Program files\TheGrailGGO folder.

14. Do I need all the data streams on the final chart if I have used multiple data streams?
The resulting systems most likely will not use all of these when generating the final system.
It is important to keep the exact 5 data streams on the chart because even if CASB is only using one data stream it might be Data4 and thus you cannot delete the other data streams from the chart.

15. What is an appropriate Maximum bars per trade setting?
I would recommend users to increase their Maximum bars per trade setting on CASB4, now that we have introduced multi time frame optimization.
Thus I would recommend users to increase their Maximum bars per trade to at least 200, and in some cases an even larger setting might be appropriate.

16. Can I do timeframe optimization for my existing system which is coded in EasyLanguage(TM)?
The multi time frame optimization is provided as part of the CASB template and involves very specific code.
Thus one can only use the multi time frame feature during a CASB D&P.

17. Is Intrabar entry order types allowed with multi time frame optimization?
No, EasyLanguage does not allow intrabar entry order types when optimizing multiple data streams.
If you do that, the EL interpreter will produce the following message when trying to verify your CASB template:
"Cannot mix next bar prices with data streams other than Data1"

18. How would one use the DMI as a Boolean Filter in CASB?
Description: DMI
EL code: (DMIPlus(Length) - DMIMinus(Length))
BandClass: Zero line trigger
Thus when DMIPlus crosses above DMIMinus, you will get a buy signal
and when DMIPlus crosses below DMIMinus, you will get a sell signal.

19. Does it make sense to use random numbers seeds other than 1-10?
I.e. if I run the same CASB search the next day, will it return the same results if I don't change the seed?
We are simply varying the GASeed to define different random starting points for the GA. Even though the GASeed is not random, the resulting starting points are random, and thus we can simply use 1-10 as seed.

20. How do I use CASB to "enforce" and exit?
CASB allows the following exit strategies to be enforced with specific values:
End-of-day exit, stoploss, profit target, breakeven stop, trailing stop.

To enforce an exit, simply goto CASB3, check the 'Enforce exit' tickbox and select the exit to be enforced as well as the dollar value to be used (if applicable).

CASB by default optimizes a total of three different exits per strategy.
By enforcing a specific exit, CASB will still continue to test all the exits as selected in the 'Exits' box on CASB3 as a possible 2nd or 3rd exit rule.


21. Do the Moving Averages apply to MultiData? Does the 5 data stream limit also apply to MA's?
The moving averages are applied on top of the indicators as selected in the 'Oscillators/Channel breakouts' section on CASB3.
Thus if the underlying indicator is using Multidata, then the MA will also be multidata.

With regard to the question:
"If under CASB 3 Entry types, only one entry type is selected (Ex. Oscillators),
does one have to also "Un-Check" indidual indicators under the other 2 types?
Or would the software automatically not include all other entry types?"
Note that most indicators can be traded as either an oscillator or a breakout.
Thus if you have only selected 'Oscillators' then CASB will automatically only test the indicators as if they are
oscillators.

22. How does "File, Export CASB Parameters" work?
The File,Export CASB parameters option was previously necessary with the old GSB prototyping strategy.
We have only kept this option for backwards compatibility.
Where as File, Export CASB strategy exports a complete EL strategy, the Export CASB parameters option
only exports the variable definitions as used in the CASB template itself.
Now with CASB, it is not necessary to export the template variables on their own, since CASB
exports complete Verifiable strategies.

23. If a filter is defined refering to Data2, can I leave the Data to "Do not optimize streams", if no MultiData indicators are selected?
Yes, with additional filters, CASB simply uses whatever datastream the user has specified.
Thus Multidata is only applicable to the indicators in the 'Oscillators/Channel breakout' section on CASB3.
If you want to use a specifc data stream with a filter, you need to specify that specific data stream
in the definition of the filter, since CASB will not automatically optimize it.

24. When is a D&P report rewritten?
If a D&P is completed with no good results, does one have to "Delete" all generated files
under GGO & WFO, before running a new D&P for the same symbol?
How does the above apply to GGO and WFO produced files?
I personally start with only a few indicators and then gradually increase the complexity of
the trading model.
If for instance I have started with only two indicators and did not get good results, then I can move
on to another two indicators/data streams or maybe just replace one of the indicators/data stream with another one.
If I have started with 15 indicators and 5 data streams, how will I know which ones was the "bad"
ones that was actually responsible for distracting CASB in all kinds of wrong directions?
You do not have to delete all the generated files, because they will be overwritten next time if you are using
exactly the same symbol and bar interval.
The GGO optimization report is saved using the following name format:
Symbol_Interval_BuildCASBTemplateX_Fitness Y.txt
Thus if you are using the same symbol, bar interval, template and fitness, then that report will be overwritten.

25. Is there a recommended methodology that will aid in reducing fitting when running a CASB Template or a GGO run?
A D&P run is not optimizing a single system a such but is discovering new systems (by varying switches).
Since the stress testing feature works so well when optimizing a single system with GGO,
CASB also allow one to do stress testing during the CASB D&P process.
However, the stress testing is only done on
the "real" parameters and no stress testing is done on the switches (which will result in a different system).
In this way, the D&P run favours newly discovered systems which performs well during
stress testing (varying) the real parameters of that specific system.

The stress level and stress test increment% can be set on CASB4.
VERY IMPORTANT:
When selecting a stress test size>1, you should increase the number of Iterations accordingly!
E.g. when no stress testing is selected (Stress test size=1), then optimize
GASeed 1...10 and
Iteration 1...2000 as usual

When doing stress testing (Stress test size>1), Iteration should be optimized 1...MaxGen x PopSize x StressTestSize

e.g. if stress test size=3 then optimize
GASeed 1...10 and
Iteration 1...6000 (40 x 50 x 3)

Note that if you have selected Stress test size=3, your D&P will now take 3 times longer compared to when no stress testing is selected.

26. Can one use indicators with Price inputs such as "(H+L)/2"?
Yes, simply replace 'Price' with whatever formula you want to use.
By default, whenever CASB come across the word 'Price' within a definition, it replaces it with
'Close' in the final template, but if you use a formula like (H+L)/2 instead of 'Price', CASB will use it just as you have specified it in the definition.

27. How does the Oscillator turning point (4th) entry type works?
This entry type generates a buy signal when the short term average turns to the upside
and a sell signal when the short term average turns to the downside.
Thus the signals generated by the Oscillator turning point are faster than the signals
generated by the normal Oscillator entry type that must first wait for the short term
average to cross the upper/lower bands.

28. Why are the Moving average crossovers never used on the price series, but only on other indicators?
CASB1 states "An indicator of this type is drawn directly on the underlying price series".
However, the CASB generated code will never do straight price moving average crossovers.
This can be achieved by adding an indicator of "Close".
Since CASB always draw the moving averages on top of the indicator, it implies that if you want the moving average crossover directly on the price series,
then you need to use an indicator with the definition 'Close'.

29. Why do I get Entry/Exit on the same bar after profit targets are hit?
In TradeStation, on the Format Strategies -> Properties menu (where you set the Position Limits), you should select 'Allow up to 2 entry orders when the order is generated by a different entry order'.
This is required if your strategy has (or will test) either Max Favorable Excursion, Drawdown Support, or both of these exits.

30. Why do recursive functions sometimes give problems with EasyLanguage(TM)?
The document "Some Programming Issues in EasyLanguage" is available at https://www.tradestation.com/discussions/Topic_Archive.aspx?Topic_ID=34190
This document explains why EasyLanguage does not allow the usage of recursive functions under certain conditions.


31. Where can I find additional indicators to be used with CASB?

To make the most of your CASB, we recommend all users to consider buying an additional library of indicators and not just trying to use the few canned indicators provided with TradeStation.
Here is an example of such a library:
170 indicators, 76 trading systems, 11 paint bars, 4 functions, 3 show me's, all for free! Available at
http://trader.online.pl/ELZ/!-ELZ-index.html

32. Can I reboot my computer while running CASB?
Is there a way to pause CASB, for instance if I want to reboot my computer?
Yes, just do the following:
1. Abort the CASB optimization
2. Use the GGO SmartEditor to load the GGO optimization report and scroll down to the bottom of the report to see what was the last GASeed being used when CASB was interrupted.
3. Let's say you aborted CASB when GASeed=6 and Iteration=250.
4. Then restart CASB by optimizing:
GASeed 6...10
Iteration 1..2000
Note that you will again optimize Iteration between 1...2000 regardless of the iteration number at which CASB was previously aborted.
(The Iterat# column in the CASB report is a record index calculated as follow: Iteration+100000*GASeed
Thus the first 2 digits represent the GASeed while the last 4 digits represent the Iteration number)

33. Should look inside bar back testing resolution be turned on, when using CASB?
When evaluating a trading signal for a given bar, TradeStation assumes the following:
If the Open of the bar is higher than the Close, then TS assumes the High of the bar was made before the Low.
If the Open of the bar is lower than the Close, then TS assumes the Low of the bar was made before the High.
The assumptions are not always true in real life, especially if the open and close was relatively close to each other indicating a bar with sideways market action.
Thus, using these assumptions can then lead to inaccurate backtesting results.
To be prudent and to ensure that you have accurate backtesting results at all times, we recommend that CASB users should ALWAYS use look inside bar back testing, if the strategy uses any intrabar entries/exits. (While there are means of protecting yourself against the TS assumptions, it is a very advanced topic and not recommended for the typical user).
Using look inside bar back testing will result in the optimization being a bit slower, but at least you know for sure you can trust the results.

If you want to save time by not having to use LIB, you should
use the Buy/Sell next bar at market Entry order type and also select ‘Evaluate exit only on close of bar’.
Then you can safely optimize your strategy without having to use Look-Inside-Bar (LIB) backtesting resolution.

But, as soon as you have selected to use an intrabar Entry order type (e.g. Buy next bar at Highest(High,MyVar5)+1 point)
or if you have not checked the ‘Evaluate exit only on Close of bar’ option, the strategy will need intrabar information to
be accurately executed and thus Look-Inside-bar backtesting resolution is recommended.

34. When using the "File, Export CASB Strategy" option I get a "not valid integer value" error?
The EXPORT CASB STRATEGY option is ONLY available with regard to an optimization report that was created by CASB.
Those reports can easily be identified because they all include the word "Build" in front of the strategy name, e.g.
@ER2.D_30min_BuildCASBTemplate1_Fitness1 while the report name of a normal GGO optimization report that was created by the GGO, will be for instance @ER2.D_30min_MyStrategyName_Fitness1, thus without the "Build".

35. How can I speed up my CASB optimization?
Look-Inside-Bar (LIB) backtesting is only necessary if a strategy has intrabar entries or exits.
Strategies that don't require any intrabar execution and just trade on the open or close of the next bar, does NOT require LIB testing.

CASB does allow one to evaluate exits only on the Close of each bar.
In this way we do not need LIB resolution and can save lots of time!
Furthermore, there is also a strong case to be made that evaluating exits only on the close
of the bar will prevent unnecessary exits to be triggered by a noisy intrabar high/low.

Anyway, if you want to save time by not having to use LIB, then on CASB3 you should
use the Buy/Sell next bar at market Entry order type and also select ‘Evaluate exit only on close of bar’.
Then you can safely optimize your strategy without having to use Look-Inside-Bar (LIB) backtesting resolution.

But, as soon as you have selected to use an intrabar Entry order type (e.g. Buy next bar at Highest(High,MyVar5)+1 point) or if you have not checked the ‘Evaluate exit only on Close of bar’ option, the strategy will need intrabar information to be accurately executed and thus Look-Inside-bar backtesting resolution is recommended.

Also read "How much history data is enough for CASB?". Refer
http://www.thegrailsystem.com/forum/index.php?topic=261.0
19  General Category / Testimonials / Testimonials GGO/GWFO/CASB V1.xx on: August 20, 2009, 03:36:41 pm
"Brilliant product, a must for anyone trading mechnical system." - Ajay Shah, November 2004

"I want to congratulate you for the release of GGO and GWFO; I’ve been testing these products for two days and realize what a great potential they have. GGO and GWFO features are not “nice to have” but necessary tool to whoever takes system design
seriously." - Leopoldo Sanchez, November 2004

"It seems like you've developed some very valuable tools. The Walk-forward analyzer is, as someone else has said, a "dream come true". It solves a problem I've always had when developing systems. Actually, several problems." - Bill Shugg, December 2004

"I am in awe of the potential that is included in the new GGO/GWFO software suite. Developing "set and forget" robust models , plus the correct re-optimization scenerio for non-robust models are just two ways that may indeed make this software worthy of it's name. "The Grail System Suite, don't develop without it!" - Joe Krutsinger, CTA

"I think your product is very very good! I believe it will become the standard of industry. So I have bought the whole Suite today. Thank you for your great product" - Chung-Hao Yang, January 2005

"I would like to compliment you on your continued advancements to an already outstanding product and also for your timely customer service." - Kevin Rose, January 2005

"Your product has taken us to a whole new level (whether we are ready or not)." - Ray Nungaray, November 2004

"I started using GGO and GWFO last November and after the trial period and a month on lease I gladly bought the Suite. I must say, in the last few years, nothing has improved my bottom line and knowledge of how to create a better system then your products. My systems 'before Grail' looked great yet consistantly traded badly in real time.

Besides loosing lots of bucks! I began doubting my original concepts and take on the market since the systems were falling apart and showing me I was wrong. Being a slow study... I continued to add more and more complicated filters and conditions and with increasingly detailed and more thourough optimizing with TS...you guessed it...I looked better and better and traded worse and worse...I was developing and throwing out decent strategies left and right.

Then your products came along. The stress testing and walk forward ability are amazing. Immediately I saw my mistakes and they were easy to correct. Most of my take on the market was fine, it was the trying to get perfect results on past data that actually prevented any robustness going forward. Now my systems are a lot simpler and I'm making decent returns. I'm no trading maestro but I now know what to expect and I get it. Better to have reasonable expectations that get filled consistantly then unrealistic ones that always fall short."

Dave Klinger - March 2005

"When I was live automated trading my strategies before I learned of this (The Grail) testing/development process, the one thing I did not know was "Should I weather this drawdown, or is the strategy no good?"
Now I trade my systems with confidence. I know what to expect, and if the DD is within range, I am not worried (well, not too worried...who likes a DD!)
This product is Indispensable, in my judgment. I wouldn't trade without it!"

Gordon Lantz - April 2005

"The software (GGO and GWFO) that I purchased from your company has changed my life. .....
The new tutorials, although somewhat verbose, really helped me understand how to harness the power of the Grail.....
The reason my life has changed is that I now have confidence in my strategy that I simply did not have before. ....
The most obvious benefit of your software is the amount of time it saves.
You can do in a week what it would have taken years to do in TradeStation, and centuries to do with Excel.
But don't undersell your customers on the psychological benefits of trading a system that passes Grail's demanding statistical analyses.
The Grail Suite is by far the most expensive piece of software that I have ever bought, but it's worth every penny.
I'll never trade another system that has not been put through the wringer of the Grail products."
Zak Perryman, August 2005

"Keep up the great work, I am getting results far better than I thought possible with your product."
- Travis Mijat, September 2005

"I must admit that your tools and the tutorial you add to it, improved my performance and helped me a lot." - Haim Gabsow, September 2005

"I am lecturing trading system design at a prominent financial institution in my country, as well as supporting the financial R&D of this institution. This includes, among other methods, the implementation of GGO & GWFO in the bank's common practice.
We do that for nearly a year now (with GWFO - actually since October 2004), and no one seems to complain, to say the least.
I have faith on the Grail methodology, which I can only convey to my students ( 40 MBAs ), and recommend it as part of my course.
Needless to say, I am not engaged with the Grail commercially or otherwise, except for being an old loyal customer.
I have been provided with nothing less than 5-star product, 5-star support, 5-star responsiveness in this industry.
Absolutely second to none." - Eitan Rotem, October 2005

"I for one am making money using Grail on the ER2. Actually I have not touched one system since April." - James P Tann, October 2005

"I may sound like a commercial but these products have completely changed the way I approach strategy development and has kept me from trading strategies that would have shredded my account. I will never trade without them again. If you are a bit EasyLanguage challenged (as I am), the CASB is extremely powerful in that it provides an interface in which you can specify your entries and exts and it will then generate a template which can then be used to "discover" those settings that work for a particular market/timeframe (these templates also, by the way have a Time Frame Optimizer where you can specify up to 5 bar intervals) resulting in a collection of strategy candidates that can then be tested with the Genetic Optimizer and Walk Forward Analysis. There is a learning curve here but it's well worth the effort.

You just aren't going to find these kinds of tools at these price levels. Again, I'm not affiliated with Grail and am simply a user but I think you'll find that the user community would agree with the points I've made here. AND the support from the Grail Team for this product is the best I've experienced, for any software product." Steve Harwood, November 2005

"I've spent the last two years building neural net models using Neuroshell Daytrader Professional, along with Optimax. Neither program comes close to what you've done with the Grail. I was getting results almost immediately with the GGO that took me a year to achieve with Neuroshell. What planet did you say you guys were from?"
"The compliment is sincere. Feel free to run it on the blog, but please mask my name or initials and my country. I'm sure ...............(name) and ............(name) would take exception to the observation. But it doesn't change the fact." - January 2006
20  General Category / News and Public Announcements / The Grail vision and future on: August 20, 2009, 03:30:09 pm
The Grail suite of statistical tools currently consist of the following software:

1) Grail Genetic Optimizer (GGO)  V2.00

2) Grail Walk-Forward Optimizer (GWFO) V2.00

3) Computer Assisted Strategy Builder (CASB) V2.08


We have just released important upgrades for all three products above.
Most significant is the GWFO that is now between 3-10 times faster than V1.04.40.
With this dramatic speed increase, performing a complete walk-forward cluster analysis is only a pleasure.

It is our vision to continue to develop The Grail system evaluation methodology with the emphasis on multi-platform compatibility.

All current versions are fully compatible with the latest TradeStation 8.6/8.7 ( www.tratestation.com ) as well as the older TS2000i platforms.
First on our list is to ensure compatibility with the MultiCharts platform ( www.tssupport.com ).
This task should be accomplished by the end of September 2009.

Wouter Oosthuizen

Software engineer: The Grail

Chief Executive
Technovest(Pty)Ltd
21  General Category / Documentation and FAQ's / GGO / GWFO - FAQ's (continued) on: August 20, 2009, 03:24:53 pm
42. How do I select the best/most robust system/parameters using GWFO?
43. I get an "Array out of bounds error" when using Concurrent genetic walk-forward?
44. How can I verify the WFO result?
45. In GWFO, how do you determine the parameter names for the suggested values to be used for x number of days?
46. When I run GWFO I get all zero parameters for a specific/all runs?
47. What happens to the data in the WFO data folder if I run the same optimization with a different fitness number?
48. What exactly is Walk Forward robustness based on?
49. Can I specify different fitness functions when walk forward testing ?
50. I'm getting a robustness of >100% on one of my systems. Is that possible?
51. What is the difference between a rolling and anchored walk-forward?
52. How does GWFO calculate the in/out-of-sample windows?
53. How can I audit the GWFO OptimizationSummary and WalkForwardSummary?
54. Should look inside bar back testing resolution be turned on?
55. When using GGO, I get an error "Exception EInOutError in Module gadll.dll. Read beyond end of file"
56. Why does some traders select parameters as per the GGO optimization report instead of simply using the parameters suggested by the GWFO?
57. What is the difference between the OOS testing during a regular GGO optimization and the OOS testing done by the GWFO?
58. Where can I read more about walk-forward analysis?
59. Is there an efficient way to use GGO to do some Quick Screening of Strategies?
60. How do I set final input values for my GGO optimized strategy, to be used in real-time?
61. Why are there fewer GWFO trading history files than the number of GGO Iterations performed?
62. My concurrent walk-forward produces results with lots of zeros?
63. What factors mostly influence the execution speed of GGO/GWFO and how much can the GGO/GWFO benefit from multithreads/multi-cores?
64. Can I perform a cluster analysis for the Concurrent walk-forward method?

42. How do I select the best/most robust system/parameters using GWFO?
How do one select the best/most robust system when using the Walk-Forward Optimizer (GWFO)?
First of all one should remember that the main function of GWFO is to perform a detailed walk-forward analysis on all the systems that were either selected by the genetic optimizer (GGO) or tested during an exhaustive optimization in TS (if GGO was not used).
Thus one is using GWFO in the first instance to determine if a system is robust at all and is capable to pass the test criteria as defined by the user under Test Criteria Settings. If a system fails the walk-forward analysis, then you do not even have to worry about which parameter combination is the best, because GWFO tells you that the system is not sufficiently robust.
Once a system has passed the walk-forward ananlysis test, you can start worrying about which parameter combination is the best to use.
In this regard there are two different ways how GWFO could be used:
1) You could select the parameters that most frequently appeared on the WalkForwardSummary tab,
2) You could simply use the suggested parameters for the next XX days to trade the system. (the last line on the OptimizationSummary tab)
This method is being used by traders that believe in constant reoptimization at fixed intervals

When you do a walk-forward analysis with GWFO, it validates whether the system is overall robust enough to be implemented in real-time.
If you have excluded a significant portion of the data during genetic optimization and your system pass the walk-forward test, then the next step is to determine which parameters to use.
Here is some other methods that you also could have used:

If you are using GGO together with GWFO then during the genetic optimization you got results that can be viewed using the GGO SmartEditor on the Optimization report tab.
It is important to realize that GGO and GWFO is looking at the same system from different angles and thus, the moment results from the two angles confirm each other, we have more assurance.

First we could identify within GWFO the parameters that appeared to be most robust over different periods as well as the parameters that came out on top during the last walk-forward run. We write down these parameters and then continue our selection in the GGO SmartEditor. You can rank the results on several different fields but will most probably use the Fitness function as ranking criteria.
Now we are looking to see if we can find any of the parameter combinations suggested by GWFO in the top 50 of GGO. (We are saying top 50, but 50 is just an arbitrary figure to indicate that you should not be only looking at the best 5 for example) What is important is the quality of the results taking into account your own specific requirements.
If only the first 20 ranked systems have very good results in terms of the fitness function and other performance statistics that are important to you, then you would only look at the top20. Now you are trying to see if you can
find any of the systems (as suggested by GWFO) also being highly ranked in GGO. If you can find any such system, then you have so much more assurance because now that system has been confirmed by two different approaches.

Traders who strictly follow an approach of re-optimization at fixed intervals would simply use the parameters of the last walk-forward run on the Walk-ForwardSummary tab.
Personally I would follow the above selection methods and then from my final shortlist of favourable parameter combinations, select the one that satisfies most of the critieria that you have defined for yourself.

43. I get an "Array out of bounds error" when using Concurrent genetic walk-forward?
It could happen that you experience an "array out of bounds" error when doing a concurrent genentic walk-forward.
There is a quick solution as explained in GGO Help, Contents, Troubleshooting:
When a concurrent walk-forward is done, by default the arrays for INSTrades and OOSTrades are limited to cater for an anticipated number of in-sample and out-of-sample trades, e.g.
Array: INSTrades[1000](0),OOSTrades[250](0);
(There is no way that GGO can know beforehand how many trades your strategy is going to generate)
If you get an out of bounds error, it means your strategy has generated more trades than what the array definitions can currently handle and thus you should simply increase the array sizes as follow, e.g. (doubling the sizes):
Array: INSTrades[2000](0),OOSTrades[500](0);

44. How can I verify the WFO result?
For each run displayed in the OptimizationSummary and WalkForwardSummary you will find the parameters (inputs) that were used are displayed in the Parameters column.
The trading history file that was used to generate the statistics for that run will be found in the
C:\Program files\TheGrailWFO\Data\Symbol_Interval_Strategynam e folder.
The history files are named as follow:
Symbol_Interval_Strategyname_Input1_Input2_Input3 .......txt
You can then open the applicable file (thus the file with the same inputs as listed in the parameters column of the GWFO report) using any text editor.
Then simply identify all the trades with dates that fall in between the start and end date as listed in the Period column of the OptimizationSummary or WalkForwardSummary report.
If you sum the P&L's of those trades, you should arrive at exactly the same figure as listed in the GWFO.
All other statistics (MaxDD,#Trades etc) will also be only for those trades that fall inbetween the applicable start and end date.
You should repeat this process for each individual run, since each run would most probably have used a different history file (with a different parameter combination).

45. In GWFO, how do you determine the parameter names for the suggested
values to be used for x number of days?

One cannot view the parameter names in GWFO although they are displayed in exactly the same order as in the original strategy or one can use the GGO output as you did.
In the folder C:\Program files\TheGrailGGO you will find a file called YourStrategyName.DEF that list all the inputs used.
Another easy method would be to load the appropriate GGO Optimization report as follow:
Set GGO to 'Evaluate strategy' mode.
Then use File, Open Optimization report to load the applicable report. This report will show all the input names in the same order as used by GWFO.

46. When I run GWFO I get all zero parameters for a specific/all runs?
Please check in the applicable subfolder of folder C:\Program Files\TheGrailWFO\Data if there is not a trading history file with all zero's in the filename. Thus the filename will look something like this:
Symbol_Interval_StrategyName_0_0_0_0_0_0_0_0_....t xt
If so, delete this file manually because it most probably only contains junk data that is causing GWFO to malfunction.
This file sometimes gets created automatically when TradeStation recalculates the trading strategy right at the end of a genetic optimization (when you were using the Genetic Optimizer). Then all parameters are reset
to zero and as a result a file is created that contains the trading history for a system where all the parameters were zero, which is usually nonsense.
After you have deleted the file with all zero's in the filename, you should re-run your walk-forward analysis and the results should be fine.

47. The GGO reports folder has the fitness number in the folder name, but the WFO data folder does not use the fitness number in the folder name.What happens to the data in the WFO data folder if I run the same
optimization with a different fitness number?

The GWFO data folder contains the trading history files generated during the genetic optimization.
It does not matter if you optimize the same strategy with different fitness numbers, because all what will happen is that the GWFO Data folder will contain the trading history files of several optimizations using different
fitness functions.
The different GGO reports (named according to fitness) will only access the trading history files generated by that specific optimization.

48. What exactly is Walk Forward robustness based on?
The WalkForwardSummary provides a summary of the out-of-sample window performances. This table also calculates and compares annualized rates of return for the in-sample and out-of-sample results. This statistic is the Robustness Index (also called the walk-forward efficiency)
RI = OOS Annualized Profit / INS Annualized Profit x 100%

thus

Robustness Index = Annualized P&L on WalkForwardSummary / Annualized P&L on OptimizationSummary x 100%

where

Annualized P&L on WalkForwardSummary =
Total Net Profit on WalkForwardSummary x 365 / Total days on WalkForwardSummary

Annualized P&L on OptimizationSummary =
Total Net Profit on OptimizationSummary x 365 / Total days on OptimizationSummary

49. Can I specify different fitness functions when walk forward testing ?
Note that GWFO does its walk-forward using the trading history files created in the
C:\Program files\TheGrailWFO\Data folder.
Since the trading history files only contain P&L information for every single trade, one cannot choose a fitness function for the walk-forward test and thus the NetProfit is the default fintess function.
The trading history files, were created as a result of whatever fitness function you have selected in GGO. Different fitness functions will produce different parameter combinations to be tested and thus different sets of trading history files. Note however, that GGO simply writes all trading history files to a folder with the name of the symbol and strategy. Thus if you perform two GGO optimizations after each other on the same symbol and strategy, but using different fitness functions,
then the C:\Program files\TheGrailWFO\Data\Subfolder will contain all the trading history files for both fitness functions and should you then perform a walk-forward analyses, it would actually be a walk-forward on both the fitness functions used in GGO.


50. I'm getting a robustness of >100% on one of my systems. Is that possible?
The GWFO cluster analysis will be able to tell you if it is an abboration or not. If the 100%+ figure is not surrounded by other similar high figures, then it would suggest that it is an abboration. Note that even the cluster analysis can only be trusted if you have used a sufficient amount of data in the first place.

51. What is the difference between a rolling and anchored walk-forward?
The GWFO performs each run completely on its own and each line of results displayed in the GWFO OptimizationSummary and WalkForwardSummary represents only the results of that specific run.
However, although the out-of-sample windows (on the WalkForwardSummary) will never overlap, the cutoff periods (start and end dates) of the different in-sample runs (on the OptimizationSummary) will overlap.
This is not only the case with anchored walk-forward but also with rolling walk-forward you will find that the different in-sample windows overlap to some extent.
Even though the in-sample windows overlap, each different run is evaluated on its own.

Graphically it would look like this:

Rolling Walk-forward OOS=20%:

Run #1 |--------- In-sample 80% ---------| OOS 20% |

Run #2 ............... |---------- In-sample 80% ---------| OOS 20% |

Run #3 ................................. |---------- In-sample 80% ---------| OOS 20% |

Anchored Walk-forward OOS=20%:

Run #1 |--------- In-sample 80% ---------| OOS 20% |

Run #2 |----------------- In-sample ----------------------| OOS 20% |

Run #3 |---------------------------- In-sample -------------------------| OOS 20% |

(With anchored walk-forward the length of the 20% OOS is calculated according to the first run)

52. How does GWFO calculate the in/out-of-sample windows?
GWFO uses bars to calculate the walk-forward window lengths and not dates.
The number of bars per walk-forward run is calculated as follow:

TotalBarsPerRun = Total number of bars / (Walk-forward runs * Out-of-sample% + In-sample%)
InSampleBarsPerRun = TotalBarsPerRun * In-sample%
OutOfSampleBarsPerRun = TotalBarsPerRun * Out-of-sample%

For example, if all the data has 10000 bars and we apply an out-of-sample%=20% with 10 walk-forward runs, then for a Rolling walk-forward we get:

TotalBarsPerRun = 10000 / (10 * 0.2 + 0.8 ) = 3571 bars
InSampleBarsPerRun = 3571 * 0.8 = 2857 bars
OutOfSampleBarsPerRun = 3571 * 0.2 = 714 bars

Thus we get:

In-sample Out-of-Sample
StartBar EndBar StartBar EndBar
Run#1 1 2857 2858 3572
Run#2 715 3571 3572 4286
Run#3 142 4285 4286 5000
Run#4 2143 4999 5000 5714
Run#5 2857 5713 5714 6428
Run#6 3571 6427 6428 7142
Run#7 4285 7141 7142 7856
Run#8 4999 7855 7856 8570
Run#9 5713 8569 8570 9284
Run#10 6427 9283 9284 9998

GWFO also adds a rule to the calculation to enforce the last out-of-sample window always to continue until the last bar (bar no 10000 in this case) to compensate for cumulative rounding errors.
(resulting in missing out on the last 2 bars in this case, as can be seen from the above example)
For an anchored walk-forward, the in-sample startbar would simply
have been fixed at 1.

53. How can I audit the GWFO OptimizationSummary and WalkForwardSummary?
To audit the GWFO OptimizationSummary and WalkForwardSummary, you can do the following:
For each run displayed in the OptimizationSummary and WalkForwardSummary you will find the parameters (inputs) that were used as displayed in the Parameters column.
The trading history file that was used to generate the statistics for that run will be found in the
C:\Program files\TheGrailWFO\Data\Symbol_Interval_Strategyname folder.
The history files are named as follow:
Symbol_Interval_Strategyname_Input1_Input2_Input3 .......txt
You can then open the applicable file (thus the file with the same inputs as listed in the parameters column of the GWFO report) using any text editor.
Then simply identify all the trades with dates that fall in between the start and end date as listed in the Period column of the OptimizationSummary or WalkForwardSummary report.
If you sum the P&L's of those trades, you should arrive at exactly the same figure as listed in the GWFO.
All other statistics (MaxDD,#Trades etc) will also be only for those trades that fall inbetween the applicable start and end date.
You should repeat this process for each individual run, since each run would most probably have used a different history file (with a different parameter combination).
Thus you will not be able to verify the GWFO report's by simply looking at an individual trading history file.
You should be able to agree an individual trading history file with the trades list as produced by TradeStation when using the exact same parameters and slippage & commission settings as was used when the trading history file was created.

54. Should look inside bar back testing resolution be turned on, when using GGO/GWFO?
When evaluating a trading signal for a given bar, TradeStation assumes the following:
If the Open of the bar is higher than the Close, then TS assumes the High of the bar was made before the Low.
If the Open of the bar is lower than the Close, then TS assumes the Low of the bar was made before the High.
The assumptions are not always true in real life, especially if the open and close was relatively close to each other indicating a bar with sideways market action.
Thus, using these assumptions can then lead to inaccurate backtesting results.
To be prudent and to ensure that you have accurate backtesting results at all times, we recommend that Grail users should ALWAYS use look inside bar back testing if the strategy has any intrabar entries or exits.. (While there are means of protecting yourself against the TS assumptions, it is a very advanced topic and not recommended for the typical user).
Using look inside bar back testing will result in the optimization being a bit slower, but at least you know for sure you can trust the results.

55. When using GGO, I get an error "Exception EInOutError in Module gadll.dll. Read beyond end of file"
The "Read beyond end of file" error is because on that computer, you still have an old GAData.bin file that was created by GGO V1.05.46 or earlier.
First of all, make sure you have installed GGO V1.05.48 (Goto GGO Help, About to check the version)
Then goto C:\Program files\TheGrailGGO and delete the file GaData.bin and your problem will be solved!

56. Why does some traders select parameters as per the GGO optimization report instead of simply using the parameters suggested by the GWFO?
GGO/GWFO caters for a wide range of traders with different approaches.
If you follow an approach on consistent re-optimization, then you could simply use the parameters as suggested by GWFO.
However, some traders prefer to select parameters themselves using the GGO optimization report to manually filter results and to look at equity curves etc.etc.
Traders who prefer using GGO to select their final parameters, should still use GWFO to validate overall model stability of the strategy under scrutiny.

57. What is the difference between the OOS testing during a regular GGO optimization and the OOS testing done by the GWFO?
When you select 'Exclude first x% and last y% of data' or
'Exclude data before xxxx and after yyyy' on the GA Settings tab of GGO, the genetic optimizer will exclude that portion of data during the optimization. Thus for each parameter combination, you are doing a SINGLE walk-forward test on a portion of unseen data.
When using the walk-forward optimizer, the GWFO simulates MULTIPLE walk-forward periods where each walk-forward period has its own in-sample and out-of-sample portion. Graphically it looks as follow for a rolling walk-forward:

Rolling Walk-forward with OOS=20%:

Run #1 |--------- In-sample 80% ---------| OOS 20% |

Run #2 ................. |---------- In-sample 80% ---------| OOS 20% |

Run #3 .................................... |---------- In-sample 80% ---------| OOS 20% |

A walk-forward analysis consisting of MULTIPLE walk-forward runs, provides higher statistical significance than a single walk-forward on a single piece of unseen data.

58. Where can I read more about walk-forward analysis?
The GWFO implements most of the ideas described in the book:
"Design, Testing and Optimization of trading systems" by Robert Pardo.
Mr. Pardo explains in great detail what a walk-forward analysis really is about, and why it is so significant.

Any serious system trader should read this book BEFORE taking on the markets. This little book is pure gold!

59. Is there an efficient way to use GGO to do some Quick Screening of Strategies?
To be able to do some "Quick Screening of Strategies" we recommend that one
should use GGO at its most basic / "introductory" level.
Thus no stress testing, no walk-forward testing or anything else.
Then the genetic optimization will only have 2000 tests.
Thereafter you goto the GGO SmartEditor, open the optimization report and simply look at the "Avg Fitness for the Top100" in the upper right hand corner.
You can write down these values for the different Ranking criteria and compare for different markets/bar intervals.
These values would be able to give you a preliminary indication of whether the system is able to perform on that market or not.

60. How do I set final input values for my GGO optimized strategy, to be used in real-time?

In the GGO SmartEditor, set Mode to 'Evaluate strategy' and then load the GGO Optimization Report using
File, Open Optimization Report menu option.
Then use the GGO Optimization Report to identify the most profitable solution that best fit your trading style.
(for each iteration, you can also view an equity graph on the EquityGraph tab)
When evaluating a GGO modified strategy,
it is important to note that the GGO Optimization Report completely replaces the TradeStation Strategy Optimization Report.
You will NOT be using the TS Strategy Optimization Report report at all, since the TS report does not contain the input values (and during the optimization the actual values for the inputs were generated by GGO at run time, thus TradeStation does not know these values and will not be able to generate an accurate strategy performance report).

To use the modified GGO strategy itself in real-time, you should change the values of your strategy inputs (which has been changed to variables) to the values obtained from the GGO optimization report (or the TS 'Print Log/Debug' window). Verify strategy again and set Iteration=0 to use strategy in real-time.

IMPORTANT: We recommend that you should use the modified GGO strategy only to optimize the strategy and to generate the GGO Optimization Report. Then once you have identified the optimal parameter values, you can simply set the inputs in the original strategy that you will be using for real-time trading purposes.

61. Why are there fewer GWFO trading history files than the number of GGO Iterations performed?
During the genetic optimization, GGO generates several duplicate permutations, i.e. identical parameter combinations.
The difference between the number of trading history files (e.g. 2000-3000) and total Iterations (e.g. 6000) are all duplicates.
Note that GGO automatically keeps track of all permutations previously evaluated and save time by not re-evaluating duplicates.

62. My concurrent walk-forward produces results with lots of zeros?
The problem is most likely that your system generates too few trades per in and out-of-sample period as to produce any figure that makes sense when a concurrent walk-forward is performed.

The Concurrent genetic walk-forward was a very specific request by some users and we designed the method to cater specifically for their needs. The concurrent method is much more time consuming than the Genetic sample method because more iterations must be performed in TradeStation. When short term data is used (e.g. 5 minute intervals), then the number of bars increases dramatically as well as the computing time and then the Genetic Sample method becomes even more attractive.

VERY IMPORTANT: For a walk-forward to make any sense, once needs a minimum of 30 trades within each in-sample period. The 30 is not a figure grabbed from the air, but is the statistical minimum amount of trades required as to provide meaningful results.

So as long as you have 30 or more trades in each in-sample period, you are ok, but if you have a strategy that does not generate at least 30 trades per in-sample period, then you can not rely on the Walk-forward optimization approach, and then you should fall back to rely on the Genetic optimizer only.

If you have a strategy that generates less than 30 trades in the in-sample periods of a concurrent walk-forward then do not be disappointed, because you should still be able to use the Genetic sample method, as long as you have at least 30 trades in each in-sample period.

Also note that with the Concurrent method, there is no graphs to view within the GWFO. You can only view equity graphs if you should open a specific trading history file, i.e. those sitting in the C:\Program files\TheGrailWFO\Data folder.

Our recommendation to users is to use the Genetic sample method as a first choice. This method should be able to provide you with a reliable analysis even if you are using daily data with relative low number of trades. Once you are using a strategy that generates hundreds of trades, then you can again re-look at the concurrent method.

It must be noted that the Genetic sample walk-forward method is the approach that made The Grail Walk-forward optimizer famous.  Our estimate is that about 95% of Grail users uses the Genetic Sample method.


63.What factors mostly influence the execution speed of GGO/GWFO and how much can the GGO/GWFO benefit from multithreads/multi-cores?

The Grail Genetic Optimizer (GGO) provides a clever method of selecting parameters (i.e. input values) to be used during optimization.
In other words, GGO recommends parameter values to be used during optimization, so that one can arrive at a near optimal solution by only evaluating a fraction of the number of possible permutations (# of tests), but GGO cannot increase the speed of individual tests as they are executed by the TradeStation platform.

The speed at which a single optimization test/iteration is performed, is determined by the speed at which the TradeStation EasyLanguage (EL) interpreter can execute the EL strategy and GGO does not affect that speed.
A GGO modified strategy will at the end of each test, make a quick call to the GGO dynamic-link library (DLL) as to determine what parameters to use for the next test,
but all EL strategy calculations will continue to be within TradeStation.
Of the total time taken to perform a genetic optimization, more than 99% of the time is spent by the EasyLanguage interpreter executing the strategy and less than 1% of the time is spent on calls to the GGO to recommend new parameter combinations.
Since less than 1% of the total time of the optimization is spent on actual calls to the GGO DLL, it matters very little whether the DLL uses multi-cores or not.
On the other hand, since TradeStation is responsible for more than 99% of the calculations performed, the ability of the TradeStation platform/EL interpreter to utilize multi-cores will have a significant effect on the actual time to perform each test.

The Grail Walk-Forward Optimizer (GWFO) supports two methods of walk-forward:
1)   Genetic sample walk-forward
2)   Concurrent walk-forward

With the genetic sample method, the GGO will in a clever way select parameter permutations and the GGO modified strategy will export complete trading history for each permutation so that the GWFO can afterwards perform a walk-forward analysis on those trading history files. (Select menu option Recalculate, Genetic Sample Walk-forward) Thus with this approach, all walk-forward calculations takes place within the GWFO stand-alone software. Since the GWFO stand-alone executes much faster than the EL interpreter, the Genetic sample walk-forward method is much faster than the Concurrent method.
It should be noted that with GWFO V2.00, we have performed careful profiling and re-written significant portions of the code as to remove/solve previous bottlenecks. While GWFO V2.00 does not yet fully utilize multi-cores, GWFO V2.00 performs a genetic sample walk-forward typically between 5-10 times faster than the older V1.04.40.
Should a user want to fully utilize multi-core availability, it can be achieved by running more than one instance of GWFO, as long as each is performing its own analysis on different trading history folders.

With the Concurrent method, all walk-forward calculations are performed within TradeStation and the GGO modified strategy will export a final report containing the walk-forward analysis statistics. This report is then viewed within GWFO (select menu option File, Open Concurrent Genetic Optimization report) and very little calculations takes place within GWFO.  Since the EL interpreter is much slower than the GWFO stand-alone and while most calculations for the concurrent method takes place within TradeStation, the Concurrent walk-forward method is much slower than the Genetic sample method.

64. Can I perform a cluster analysis for the Concurrent walk-forward method?
The cluster analysis feature (i.e. building a matrix of multiple WFA's automatically) is only available for the Genetic Sample Walk-Forward method.
Thus, in GWFO you cannot perform an automated cluster analysis if you are doing a concurrent walk-forward (but you can still build a matrix by manually varying the values of WalkForwardRuns and OutOfSamplePerc).
This is because the concurrent walk-forward takes place within TradeStation/MultiCharts, while the genetic sample walk-forward is calculated by the GWFO standalone software. (Refer FAQ 63)
So the Concurrent Walk-forward will only allow you to do a concurrent walk-forward analysis for a single number of WF runs & OOS% window at a time.
To perform a concurrent walk-forward:
In GWFO, on the GASettings tab you will select for example:
Out-of-sample window = Concurrent Rolling walk-forward with 10 Walk-forward runs and OOS window of 20%
Then you will optimize the strategy within TradeStation by optimizing Iteration between 1...6000 (if StresstestSize=3) and optimizing WFCnt  1...RequiredNumberOfWalkForwardRuns, for example 10.
Then after that step, within GWFO you will select 'File, Open Concurrent Genetic Optimization report' and then select the 'Recalculate, Concurrent Genetic Walk-forward' menu option.
The results of the concurrent walk-forward will then be displayed on the OptimizationSummary, WalkForward and TestResults tab.
But these results will only be for 10 walk-forward runs and an OOS window of 20%.
If you now want to run another concurrent walk-forward for let's say 15 walk-forward runs and OOS window of 25%, then you need to go back to TradeStation,  and do the following:
1) change the name of your strategy to something else (so that you do not overwrite the report for 10 WF runs!) and
2) change the values of WalkForwardRuns and OutOfSamplePerc to the new required value  e.g.
 
Var: WalkForwardRuns(15);  { Set number of Walk-Forward runs }
Var: OutOfSamplePerc(25);  { Set Out-Of-Sample data window (OOS%) }

3) Verify strategy
4) then optimize WFCnt 1..15 this time, while Iteration is again optimized 1...6000.
 
If you then go back to GWFO and load the Concurrent Genetic Optimization report for the strategy you have just optimized, you will now see the concurrent results for 15 walk-forward runs and an OOS window of 25%

Using this method, you can build your own matrix to perform a cluster analysis, but you have to do it manually and it is going to take much longer than the genetic sample cluster analysis that is fully automated.
22  General Category / Documentation and FAQ's / Genetic / Walk-Forward Optimizer (GGO/GWFO) - FAQ's on: August 20, 2009, 03:23:17 pm
Frequently Asked Questions

Copyright 2004-2009 Technovest (Pty) Ltd

1 a. What makes GGO/GWFO so unique?
1 b. TS 8.6 now has its own genetic optimizer. Why do I need the GGO?
2. How do I select between the Prepare/evaluate strategy/portfolio/CASB mode from within the GGO SmartEditor?
3. Why do I get zero or no results with GGO?
4 a. How many variables does the GGO allow?
4 b. What is the ideal optimization ranges and increments to be used with GGO?
5 a. Error: Cannot find DDL library file?
5 b. FileAppend error / FastFileAppend failed?
6. What is the longest period of data GGO/GWFO can handle?
7. How does a Genetic Algorithm work?
8. What makes GGO/GWFO different from any other products currently available for TS?
9. What is a Walk forward analysis?
10. Should one deduct commission&slippage before GGO and GWFO? What about position sizing?

11. If I use the GGO with the last 30% excluded for Walk Forward and then run the data thru GWFO,
will the test still be out of sample(Unseen)?
12. Is there any way to restart GGO where it was previously interrupted?
13. Quickstart procedure with GGO/GWFO?
14. Why not fully automating the registration procedure?
15. How do I select robust parameters using GGO/GWFO?
16. What are the 3 different walk-forward methodologies implemented by GGO/GWFO?  
17a. On which inputs should stress testing be used?
17b. What StressTestSize should I be using?
18. Can I use multiple signals/strategies with GGO?  
19. Does the #Trds column in the GGO Optimization Report mean round-turn trades, or single side?
20. I have a problem in viewing GGO equity graphs or performance summaries?

21. Does GGO automatically Backup my strategy?
22. Does norton anti-virus slow down TS 8.x during optimizations?
23. Why may the Underscore or forward slash not be used as part of a symbol or strategyname?
24. May I run both GGO/GWFO simultaneously?
25. What is the unseen gradiant column in GGO and how to interpret it?
26. How is the number of iterations calculated?
27. What is implications of 0% OOS in GGO?
28. Number of records in GGO report is less than number of iterations performed?
29. A few basics about genetic algorithms (GA's)
30. Does GGO include a Sharpe Ratio as a fitness function?

31. Why do I get GGO parameters that are not direct multiples of the step that I selected for optimization?
32. What is the meaning of each column in the trading history files?
33. How to interpret the GWFO cluster analysis?
How much data should I use when doing the re-optimization?
34. GWFO: Where is the "Settings for the next NN days" found?
35. Which is most important? GGO or GWFO?
36. What happens to the data in the GWFO data folder if I run the same optimization with a different fitness number?
37 Is the GGO/GWFO compatible with TS8.x / TS2000i?
38. What regional settings should be used with GGO/GWFO?
39. What is the concept/benefits behind Stress Testing?
40. How does the Weighted fitness function (Fitness #10 in GGO) works?

41. How does the GWFO work?
42. How do I select the best/most robust system/parameters using GWFO?
43. I get an "Array out of bounds error" when using Concurrent genetic walk-forward?
44. How can I verify the WFO result?
45. In GWFO, how do you determine the parameter names for the suggested values to be used for x number of days?
46. When I run GWFO I get all zero parameters for a specific/all runs?
47. What happens to the data in the WFO data folder if I run the same optimization with a different fitness number?
48. What exactly is Walk Forward robustness based on?
49. Can I specify different fitness functions when walk forward testing ?
50. I'm getting a robustness of >100% on one of my systems. Is that possible?

51. What is the difference between a rolling and anchored walk-forward?
52. How does GWFO calculate the in/out-of-sample windows?
53. How can I audit the GWFO OptimizationSummary and WalkForwardSummary?
54. Should look inside bar back testing resolution be turned on, when using GGO/GWFO?
55. When using GGO, I get an error "Exception EInOutError in Module gadll.dll. Read beyond end of file"
56. Why does some traders select parameters as per the GGO optimization report instead of simply using the parameters suggested by the GWFO?
57. What is the difference between the OOS testing during a regular GGO optimization and the OOS testing done by the GWFO?
58. Where can I read more about walk-forward analysis?
59. Is there an efficient way to use GGO to do some Quick Screening of Strategies?
60. How do I set final input values for my GGO optimized strategy, to be used in real-time?
61. Why are there fewer GWFO trading history files than the number of GGO Iterations performed?
62. My concurrent walk-forward produces results with lots of zeros?
63.What factors mostly influence the execution speed of GGO/GWFO and how much can the GGO/GWFO benefit from multithreads/multi-cores?


1a. What makes GGO/GWFO so unique? What is The Grail methodology?
The Grail Genetic Optimizer (GGO) has an important advantage when compared to other genetic optimizers. Where existing genetic optimizers should be carefully monitored during the optimization process to prevent over-optimization, GGO has a much more sophisticated but also more effective approach to prevent curve fitting. This is because the actual selection of final parameters does not take place in GGO but is made with the help of the Walk-forward optimizer (GWFO). GGO merely selects profitable solutions to be properly walk-forward tested at a later stage by GWFO. GWFO enables the user to perform a detailed walk-forward analysis on those solutions selected by GGO, thereby providing much higher statistical evidence/assurance than other methods.
Even though the genetic/walk-forward optimization approach is not as prone to over-optimzation risks as other genetic optimizers, the GGO also introduces an additonal measure to promote stable parameter selection during the initial genetic optimization stage. This is achieved by performing a stress test on parameter combinations to see how performance would have deteriorated if all the parameters were changed a certain percentage (which can be set by the user). While we strongly recommend to use this feature, users should note that the stress test will increase the total time taken to optimize, by a factor of 2-5 depending of the stress level set by the user (the recommended setting is 3).
Running GGO on its own without the stress test or the walk-forward optimizer would be similar to using any other existing genetic optimizer. By adding the stress test would add another dimension to the level of assurance provided by GGO while also using the walk-forward optimizer adds yet another dimension of protection against curve-fitting.
It is totally up to the user to decide which level of protection is sufficient for his specific needs. However, we would strongly advise GGO users, to always use the Genetic optimizer with level 3-5 stress testing, in combination with the walk-forward optimizer. This will provide users with the highest level of assurance without unrealistic waiting periods.

1b. TS 8.6 now has its own genetic optimizer. Why do I need the GGO?
If you are merely looking for a straight forward genetic optimizer on its own, then the TS genetic optimizer is sufficient, but if you are looking for a comprehensive system evaluation methodology including important features like stress testing and walk-forward analysis, then you need the GGO&GWFO.
Refer http://www.thegrailsystem.com/grail-trading-system-faq.htm for more detail, including a flowchart of The Grail methodology.

2. How do I select between the Prepare/evaluate strategy/portfolio and CASB mode from within the GGO SmartEditor?
To make the GGO SmartEditor front-end more user friendly, it has a Mode selector.
The Mode selector (at the top just next to the speedbuttons) allow you to choose between the following 4 modes:
i) Prepare strategy
Used to prepare a strategy for genetic optimization in TradeStation
ii) Evaluate strategy
Used to evaluate a strategy after it has been optimized in TradeStation
iii) Genetic Portfolio Optimizer (optional)
Used to setup/modify a portfolio of systems and to genetically optimize the portfolio
iv) Computer Assisted Strategy Builder (CASB) (optional)

When choosing a specific mode, GGO will only activate the applicable menu options and tabsheets, so that a user can more easily navigate to perform the required task.

3. Why do I get zero or no results with GGO?
I see empty records where all results are zero and no trades were generated along with normal results.

Possible reasons: The most common instance is the following (also explained in GGO Help, Contents, Troubleshooting, Problems frequently experienced):
Why does the NetProfit and number of trades displayed in the GGO optimization report and Print Log/Debug window sometimes differ from the TS Strategy Optimization report?
EasyLanguage uses the LastBarOnChart function to identify the last bar on the chart which is critical for software like GGO to operate.
However, TradeStation has a quirk where if the strategy being used trades on the next bar, then LastBarOnChart will never become true if TS is used in offline mode. (This is because TS is waiting for the begining of the next bar to happen before if will trigger LastBarOnChart to be true.)
The bottom line is that the LastBarOnChart function cannot be trusted to always identify the last bar.
GGO bypass this limitation by using the LastCalcDate function to test for the end of a strategy. As soon as LastCalcDate becomes true, then GGO assumes the end of the chart has been reached.
Since LastCalcDate already becomes true on the first bar of the last day, we are missing out on any trade/s that happens on the last day.
The cumulative profit until the beginning of the last day is printed in the Print Log/Debug window and exported to the GGO optimization report.
As a result, there can be a slight difference between the figures in the GGO optimization report and the TS Strategy Performance/Optimization report. If you compare the total net profit according to the GGO optimization report with the TS trades list, then you will see that it agrees 100% with the cumulative balance as at the beginning of the last day.

(Note that the NetPrft, GrossP, GrossL, #Trds etc. columns of the GGO Optimization report contain values calculated only for the in-sample period.
That would typically be the first 70% of data if you have used the defaults as per the Out-of-sample window setting on the GA Settings tab of the GGO SmartEditor. The 3rd last column, TotPrft, contains the total profit for the whole period where TotPrft = NetPrft + UnseenPrft )

EasyLanguage has another quirk.
If a strategy uses Open,High,Low or Close as a price input
(e.g. Input: Price(C); or Input: Price(H); or Input: Price(L); or Input: Price(O); )
then if you change the input statement to a var statement, then the strategy will not give the same results or will simply generate no trades.
Thus
Input: Price(C); gives the desired result, but
Var: Price(C); does not generate any trades!
While GGO as part of the strategy modification process rename existing inputs as variables, it follows that if a price Input is renamed by GGO, then the strategy might end up generating no trades. A quick solution to this problem is to manually rename the Var: Price(C); statement back to an input statement (after the SmartEditor has been used). This can be done because GGO anyway ignores O,H,L,C inputs while there is no optimization range applicable.

If the variable Trace is True (defined as part of the GGO modified strategy variables), then an user may watch the Print Log/Debug window during optimization.
If the input values listed in the Print Log/Debug window or in the GGO optimization report appears not to be within the ranges as defined by yourself, then you must just re-create the strategy again and carefully select/double check the optimization ranges for the different inputs.
Note that in current versions of GGO, the output to the debug window is switched off by default, thus Trace is False by default. To have output to the Print Log/Debug window, just change the setting of the variable Trace from (False) to (True), in the GGO modified strategy. Even if Trace is switched off, the optimization results will always be saved in an optimization report. To view the report, in GGO SmartEditor:
Set mode to 'Evaluate strategy', then select  File, Open Optimization Report and select the required report. Then you will be able to scroll up and down through the solutions and view equity graphs on the EquityGraph tab.

If a strategy is scaling (trading multiple entries in the same direction, also called pyramiding) and the strategy implements any of the SetStopLoss, SetBreakEven, SetDollarTrailing, SetExitOnClose functions, then the GGO performance report can also differ slightly from the TS performance report. This is because of the fact that the EasyLanguage PositionProfit function combines the P&L of multiple trades within the same bar into one figure. Thus some information is lost. The PositionProfit function is the only EL function available to export trade P&L's for use by external applications, and thus our hands are tied. Note that the cumulative P&L's will always be accurate but the total number of trades and makeup between longs and shorts may differ. We do not believe that these differences have any significant effect on the overall optimization and evaluation process.

Sometimes a user forgets that he has selected only a portion of the file to be used for optimization, and thus the results in the GGO optimization report will only be for that portion e.g. the first 70% of data. (Note that the cutoff period for the very first test is done using an assumed 10000 bars. Since EasyLanguage does not have a function that provides the total number of bars in a chart, it takes at least one completed test to identify the exact number of bars

4a. How many variables does the GGO allow?
GGO V2.00.xx allows 64 inputs
4b. What is the ideal optimization ranges and increments to be used with GGO?
Unlike an exhaustive search, the time a genetic search takes is NOT proportional to the number of inputs, optimization ranges and increments specified. Thus, when working with a genetic optimizer you don't have to be scared to use larger optimization ranges, neither should you hesitate to use smaller increments for each input being optimized.
If uncertain, rather specify a slightly larger optimization range with the smallest increment that makes logical sense. The GGO won't have a problem even if you by accident have specified an optimization range that was too large.

5a. Error: Cannot find DDL library file?
The reason why you get the "Cannot find DDL library file: GADLL.DLL" error, is because you most probably did not fully complete step 1 of the installation instructions in the Help file, Getting Started:
STEP 1: Install and Register GGO
Run the Grail Genetic Optimizer (GGO) installation program that will create a new folder C:\Program Files\TheGrailGGO.
Copy the files GADLL.dll, FastFileAppend.dll and DirUtil.dll which can be found in this folder to the C:\Windows\System folder.
(If your computer does not have a C:\Windows\System folder you may copy the DLL’s to the C:\Program Files\TradeStation 8.x (Build xxxx)\Program folder)

5b. FileAppend error / FastFileAppend failed
Do NOT to use the  'Real time update' EquityGraph feature and close-down the GGO SmartEditor completely while optimizing in TradeStation. The reason for the FileAppend problem is TradeStation trying to access a trading history file simultaneously while GGO is accessing the file.
Where-as GGO has built in error trapping routines to properly handle such instances, it seems that TS does not always handle in/output error checking properly when trying to access a file that is unavailable at the time.
Thus, by closing down the GGO SmartEditor during the optimization, this problem cannot occur anymore.

6. What is the longest period of data GGO/GWFO can handle?
GGO/GWFO can handle as much data as you want or lets rather say as much data TradeStation can provide you with. In fact it is recommended to use as much as possible data when using a product like GGO/GWFO.
GGO modifies your strategy and then you can use the new strategy to genetically optimize it. Thus you can optimize the new strategy on any chart with any bar interval or number of bars.
The same applies for GWFO, because GWFO simply uses the trading history which has been created by GGO during the optimization process.
The time GGO takes to optimize a strategy will always be the time for TS to execute 6000 tests (if you are using the defaults with stress test level=3).
The time GWFO takes to perform the walk-forward analysis depends on the number of trading history files created by GGO.

7. How does a Genetic Algorithm work?
1) GA’s work with a coding of the parameter set and not the parameters themselves. They exploit coding similarities in a very general way. As a result, they are largely unconstrained by the limitations of other methods (e.g. continuity, derivative existence, unimodality etc.)
2) GA’s search from a population of points and not just a single point. In many optimization methods, we move gingerly from a single point in the decision space to the next using some transition rule to determine the next point. This point-to-point method is dangerous because it is a perfect prescription for locating false peaks in multimodal (many-peaked) search spaces. By contrast, GA’s work from a rich database of points simultaneously (a population of strings), climbing many peaks in parallel; thus the probability of finding a false peak is reduced.
3) GA’s use payoff (fitness function) information, not derivatives or other auxiliary knowledge. To perform an effective search for better and better structures, they only require payoff values (fitness function values) associated with individual strings. This characteristic makes a GA a more canonical method than most search schemes.
4) GA’s use probabilistic transition rules, not deterministic rules. GA’s use random choice as a tool to guide their search toward regions of the search space with likely improvement.
Taken together, these four differences, contribute to a genetic algorithm’s robustness and resulting advantage over other more commonly used search techniques.

8. What makes GGO/GWFO different from any other products currently available for TS?
Its capability to be able to do a detailed walk-forward analysis (and not only a single walk-forward on a piece of unseen data). To be able to fully understand the significance of this approach, we refer users to the following book: "Design, testing and Optimization of Trading Systems" , written by Robert Pardo. The approach followed by GWFO is similar to the approach described by mr. Pardo.

What further distinguishes GGO/GWFO from other optimization/testing software is the different levels of protection that its approach provide against over-fitting.
GGO can be used in 3 modes:
1) Use GGO on its own without stress testing
This is similar to most other genetic optimizers. You will simply be optimizing using all of the data with no walk-forward (out-of-sample) testing. Using this method is risky and can easily lead to over-fitting.
2) Use GGO on its own with stress testing
The Stress testing is an efficient measure to promote stable parameter
selection during the genetic optimization stage. This is achieved by performing a stress test on parameter combinations to see how performance would have deteriorated if all the parameters were changed a certain percentage (which can be set by the user).
We strongly recommend to use this feature, although users should note that the stress test will increase the total time taken to optimize, by a factor of 2-5 depending of the stress level set by the user (the recommended setting is 3).
3) Use the Genetic Optimizer (GGO) together with the Walk-forward optimiser (GWFO) as follow:
The user still has the option to decide himself if he wants to switch stress testing on/off.
When GWFO is also used, another useful feature is available. This is to use only a portion of the data for calculating the fitness function during the genetic search process.
We strongly recommend users to use GGO together with GWFO and then use GGO with stress testing enabled AND only select a portion of the data (typically 70%) to be used during optimization. This will provide users with a high level of protection against overfitting.

By adding the stress test we are adding another (2nd) dimension to the level of assurance provided by GGO. By only selecting a portion of the data to be used during
the optimization process we are adding another (3rd) dimension of protection and thereby the user can ensure that a significant amount of data remain totally unseen during the genetic optimization process.
By performing a detailed walk-forward analysis (using GWFO) at the end we add yet another (4th) dimension of protection against over-fitting. By performing a cluster analysis on multiple walk-forward analysis, we add a final (5th) dimension to ensure the selection of most robust parameters.

It is important to note that other genetic optimizers typically use the total period of data for their optimization. If you have a look at their fitness functions, you will see that it uses the standard TS NetProfit,GrossProfit, GrossLoss, NumWinTrades, NumLosTrades functions in the calculation of the fitness values.
These functions are all calculated on ALL the data, so there is no piece of the data that is really "unseen" by the genetic optimization process.
GGO do NOT use the standard TS functions but rather calculates its own net profit, gross profit, number of winning trades etc. figures, based on the portion of data selected by the user.
Thus a portion of the data remains completely "unseen" by the genetic optimizer. The walk-forward optimizer (GWFO) takes it then one step further, by performing a detailed walk-forward analysis, where the systems' overall robustness is verified by simulating that it has seen/ not seen various periods of data where the in and out-of-sample windows are progressively moved forward to form a complete and reliable picture. Also, because our results are based on a much larger sample than testing a single period of unseen data, it offers much greater statistical validity.

Important differences between GGO and some other genetic optimizers that simply use the total period of data during the optimization process
If you have a look at the fitness functions used by other GO's, you will see that it uses the standard TS NetProfit,GrossProfit, GrossLoss, NumWinTrades, NumLosTrades functions in the calculation of the fitness values.
These functions are all calculated on ALL the data, so there is no piece of the data that is truly "unseen" during the genetic optimization process. Thus users never see the true out-of-sample performance of their newly optimized system until they start losing money in real-time!
GGO do not use the standard TS functions but rather calculates its own net profit, gross profit, number of winning trades etc. figures, based on the portion of data selected by the user.

9. What is a Walk forward analysis?
A Walk Forward Analysis (WFA) is the most realistic simulation of the way a trading system is used in real time. It also answers the following important questions:

Will the trading system continue to make money after optimization?
At what rate can I expect the system to make money on unseen data?
What will be the impact of changes in trend, volatility and liquidity on performance in future?
How often should a trading system be re-optimized?
Answering the above questions provides the following benefits:

It verifies the forward-trading ability of the system, i.e. does the system have life after optimization and will it continue to make money in real time? It detects if a system has been overfit or improperly optimized. (Studies have shown that a randomly chosen, poor or overfit system can make money in one or two walk-forward test, but will not make money over a large number of walk-forward tests) A system that makes profit over a large number of walk-forward tests, is most likely to be successful in future.
It reliably measures the rate of post-optimization profit and risk. A WFA produces a statistical profile of multiple in sample optimizations and out-of-sample trading periods. Because it is based on a much larger sample than testing a single period of unseen data, it offers greater statistical validity. It also makes possible a precise comparison and measurement of the rates of out-of-sample versus in-sample trading profit. (A robust system’s future performance should be at levels similar to those achieved during optimization)
A WFA also provides insight into the impact of trend, volatility and liquidity changes on system performance. While these changes can have a very negative impact on trading performance, a robust system will be capable of responding profitably to such changes.
A WFA determines empirically how often a system should be re-optimized for optimal performance.

10. Should one deduct commission&slippage before GGO and GWFO? What about position sizing?
I believe a system must be optimized taking realistic commission and slippage into account so that we can simulate real-time performance as close as possible.
I believe optimization should be done using a fixed trading size (thus without position sizing).
Because position sizing can lead to exponential increase in trading size during certain periods it can easily skew trading results for a specific period


11. If I use the GGO with the last 30% excluded for Walk Forward and then run the data thru GWFO, will the test still be out of sample(Unseen)?
Using the Walk-forward optimizer (GWFO) on its own simulates walking forward successive out-of-sample windows which remain completely unseen. However when using GWFO together with the genetic optimizer (GGO) , GGO genetically selects parameter combinations to be walk-forward tested by GWFO. Thus one could argue that even though GWFO correctly simulates the out-of-sample windows to be unseen, GGO has already "seen" all of the data during the initial selection process. (This is a trap that many other optimizers falls into and their users are not even aware of it. If you have a look at the fitness functions used by some other GO's, you will see that it uses the standard TS NetProfit,GrossProfit, GrossLoss, NumWinTrades, NumLosTrades functions in the calculation of the fitness values.
These functions are all calculated on ALL the data, so there is no piece of the data that is truly "unseen" during the genetic optimization process.
Thus, no matter whatever measures are implemented to prevent over-fitting, users never see the true out-of-sample performance of their newly optimized system until they start trading it in real-time)
GGO do not use the standard TS functions but rather calculates its own net profit, gross profit, number of winning trades etc. figures, based on the portion of data selected by the user.)
For this reason GGO allows you to exclude a significant portion (e.g. 30%) of the data when using GGO together with GWFO.
However, when the walk-forward optimizer (GWFO) is used on its own, this is not necessary because GWFO accurately treats the moving out-of-sample windows to be totally "unseen".

12. Is there any way to restart GGO where it was previously interrupted?
GGO intermittently save all results and will only reset itself and the optimization report when Iteration=1.
Thus if you had to reboot your computer for some reason while optimizing Iteration between 1....6000, you can continue optimizing Iteration again from where it was, e.g. optimize Iteration between 4589....6000 if your computer crashed while TradeStation was busy
with optimization test# 4589. If you had a power failure and you do not know the exact test run# that the computer was busy with, then you can simply use your best guess, e.g. optimize Iteration again between 4500...6000. At worst GGO might have skipped or repeated a few iterations which is nothing serious.

To identify the exact Iteration# that the computer was busy with last,
you can goto the GGO SmartEditor and use File, Open Optimization Report and load the optimization report GGO was busy with. Then Rank the optimization report according to Iteration# and scroll down to the bottom of the report to see what is the last Iteration#.

13. Quickstart procedure with GGO/GWFO?

Refer GGO/GWFO Help, Contents, Getting Started

For GGO....
1. Download,Install and register GGO
2. Import the function ‘GrailWFO.ELD’ into TradeStation
3. Prepare your strategy manually or using the GGO SmartEditor
4. Optimize trading strategy in TradeStation

For GWFO....
1. Install and register GWFO
2. Import the strategy ‘GrailWFO.ELD’ into TradeStation (if not previously)
3. Prepare Tradestation Strategy
4. Specify trading system optimization ranges
5. Optimize trading strategy in TradeStation
6. Perform Walk-Forward Analysis using GWFO
7. Evaluate Walk-forward Test results

14. Why not fully automating the registration procedure?
The answer is simple: It is in the best interest of users NOT to fully automate the registration procedure (thereby requiring an open internet connection).
Why do I say so? The reason is actually a VERY important one that I believe all TS users should know about.
Few users realize that as soon as you permit any piece of software to freely communicate to the outside world, then you basically give that software provider a free pass to do whatever he wants to do on your computer.
While the software is already installed on your computer, it can in its own time snoop around on your computer extracting sensitive information and pass it on to the software developer without being detected.
While this is mostly true of most trading software that uses some kind of real-time data, it does not pose a risk when you are using software from a large and reputable software provider like TradeStation for instance. Why is that?
In a large company like TradeStation with many programmers at different levels, there exist proper separation of duties. Thus, for any fraudulent activity to take place, it would typically need at least three different employees on three different levels of seniority to work together to achieve anything.
Unfortunately the same does not apply to smaller/3rd party software providers which is sometimes a one/two man show. In such a case those persons can basically do whatever they want and nobody else would know.
This risk is particular to any software that in any way manipulate open source code i.e. your own EasyLanguage code. As soon as software has access to you unprotected code, it is the easiest thing in the world to pass on the code to the software provider without the user knowing anything. (While you would only be using your best strategies, the software do not even have to search your hard drive!)

15. How do I select robust parameters using GGO/GWFO?
If you are using GGO together with GWFO then during the genetic optimization you got results that can be viewed using the GGO SmartEditor on the Optimization report tab.
It is important to realize that GGO and GWFO is looking at the same system from different angles and thus, the moment results from the two angles confirm each other, we have more assurance.

First we could identify within GWFO the parameters that appeared to be most robust over different periods as well as the parameters that came out on top during the last walk-forward run. We write down these parameters and then continue our selection in the GGO SmartEditor. You can rank the results on several different fields but will most probably use the Fitness function as ranking criteria.
Now we are looking to see if we can find any of the parameter combinations suggested by GWFO in the top 50 of GGO. (We are saying top 50, but 50 is just an arbitrary figure to indicate that you should not be only looking at the best 5 for example) What is important is the quality of the results taking into account your own specific requirements.
If only the first 20 ranked systems have very good results in terms of the fitness function and other performance statistics that are important to you, then you would only look at the top20. Now you are trying to see if you can
find any of the systems (as suggested by GWFO) also being highly ranked in GGO. If you can find any such system, then you have so much more assurance because now that system has been confirmed by two different approaches.

Traders who strictly follow an approach of re-optimization at fixed intervals would simply use the suggested parameters for the next XX days (on the last line on the OptimizationSummary tab)
Personally I would follow the above selection methods and then from my final shortlist of favourable parameter combinations, select the one that satisfies most of the critieria that you have defined for yourself.


16. What are the 3 different walk-forward methodologies implemented by GGO/GWFO?
1. Brute force walk-forward
Walk-forward using TS brute force optimization. Recommended for strategies with up to 4 parameters.
2. Genetically sampled walk-forward
Use Genetic Optimizer to genetically optimize and sample permutations for further walk-forward testing. Recommended for strategies with 5 or more parameters.
3. Concurrent genetic walk-forward
Use Genetic optimizer to optimize strategy while concurrently walking-forward. Most comprehensive walk-forward method (with realistic waiting period) for strategies with many parameters. Recommended for strategies with 5 or more parameters.

17a. On which inputs should stress testing be used?
Can one generalise that stress test on a "Switch" variable should be avoided.
Yes, variables that serve as "switches", should never be stress tested.

17b. What StressTestSize should I be using?

When doing a Genetic sample walk-forward it is recommended that you select a Stress test size of 3 as to increase the resolution of testing.
Then the number of iterations will typically be  2000 x 3 = 6000

With a concurrent genetic walk-forward, the number of iterations already is increased 10 fold, so selecting a Stress test size of 3 is overkill.
Thus, if you select the Concurrent genetic walk-forward method, just select a Stress test size of 1 or 2.
You will then end up with 20000 or 40000 iterations which is 3 or 6 times more than the resolution with a Genetic Sample Walk-forward.

Remember that the most time efficient method is the Genetic Sample walk-forward.
So we recommend:
1) Either use the Genetic Sample walk-forward method with a Stress test size of 3,4 or 5 (as set on the GA settings tab of the GGO SmartEditor)
   This will result in a resolution of either 6000,8000 or 10000 iterations
OR
2) Use the Concurrent genetic walk-forward method with a Stress test size of 1 or 2 which will result in a resolution of 20000 or 40000 iterations


18. Can I use multiple signals/strategies with GGO?
When using the GGO SmartEditor it is important to know that one can only use single strategies with the SmartEditor.
The RSI LE and RSI SE are two different strategies in their own right and should be combined into one to prevent duplicate definition of variables.
This should be done manually by yourself, before trying to use the GGO SmartEditor

19. Does the #Trds column in the GGO Optimization Report mean round-turn trades, or single side?
GGO uses the TS TotalTrades function to cumulatively calculate the number of closed-out trades as they occur, thus also RT's

20. I have a problem in viewing GGO equity graphs or performance summaries?
Within GGO goto Setup, Environment Settings and make sure that your default folders are setup as follow:
Walk-forward data directory: C:\Program files\TheGrailWFO\Data
Reports directory: C:\Program files\TheGrailGGO\Reports
If your settings are not as above, then use the DirectoryListbox and Default folder selection box to set the right folders. Press Save/OK when finished.
Also note that you may not use the underscore ("_") or forward slash ("/") as part of the symbolname or strategyname. Refer FAQ23.

21. Does GGO automatically Backup my strategy?
Yes, when the Encode button is pressed, the SmartEditor automatically saves both the original and modified (target) strategy as a backup for later use/retrieval.
The backup strategies are saved as text files in the C:\Program files\TheGrailGGO\EasyLanguage folder.
GGO modified strategies are saved under a filename that is the StrategyName (as specified on the Inputs tab) with a .TXT extension for easy retrieval by any text editor.
Original strategies are saved using the StrategyName with an .ORI extension. Original strategies can be re-used in the SmartEditor, by using the ‘Retrieve Original strategy previously saved as StrategyName’ option at the bottom of the Original tab.

22. Does Norton anti-virus slow down TS 8.x during optimizations?
It is possible. A solution is to exclude the TS folder from realtime scanning (and planned scanning if if during TS use).
Disable NAV autoprotect.

23. Why may the Underscore or forward slash not be used as part of a symbol or strategyname?
GGO/GWFO uses the underscore as seperator to distinguish between the symbol, interval, strategyname and fitness function while Windows do not allow the forward slash to be part of a filename.

24. May I run both GGO/GWFO simultaneously?
No, you may not run both GGO and GWFO simultaneously because they might access the same trading history file/s at the same time resulting in an "I/O error 32".

25. What is the unseen gradiant column in GGO and how to interpret it?
This figure represents a ratio of Out-Of-Sample profit (extrapolated over the entire data period), divided by In-Sample profit (extrapolated over the entire data period). It basically tells you what percentage of the profit achieved by the INS result was actually realized in OOS.
UnseenGrad = (OOS Profit/OOS Bars) / (Abs(INS Profit)/INS Bars) * 100
It calculates the gradient of out-of-sample equity compared to the gradient of the in-sample equity curve.

26. How is the number of iterations calculated?
When using a genetic optimizer, the number of tests (e.g. 2000 or 6000) has got nothing to do with the number of parameters or the ranges being optimized, as would be the case with traditional TS optimization.
The number of tests to be used for purposes of GGO will always be calculated as follow:
Tests = MaxGen x Popsize x StressTestsize
(Maxgen and Popsize are both variables defining the genetic search structure. Users only need to know that the default values of MaxGen=40 and Popsize=50 is sufficient for any strategy with up to 100 parameters and thus it is strongly recommended to use the default values)
For the default settings (with stress testing switched on StressTestSize=3) the calculation is 40 x 50 x 3 = 6000 tests.
Thus we will optimize Iteration between 1...6000
This is regardless of how many parameters and the ranges to be optimized.
From the above calculation it can also be seen that it does not make sense to use a genetic optimizer if you want to optimize less than 4 parameters, since you will most probably be able to do a traditional brute force search in less then 6000 tests.

27. What is implications of 0% OOS in GGO?
If I were to set the OOS percentage to 0% for the GGO optimization run (and rely exclusively on GWFO for out of sample testing), what negative effect--if any--would that have on the optimization process itself? Would I only lose the "UnSeenGrad" info? Or is an OOS set greater than 0% necessary to what GGO does during the optimization process?
The temptation to try 0% is in order to make maximum use of my sample data...and have the parameter sets determined based on the most up-to-date data available.
It would have no negative effect on the optimization/evaluation process to set OOS%=0 for GGO, as long as you are using GWFO together with GGO. However, you would lose the UnseenGrad info in the GGO optimization report.
Thus, as you have correctly stated, you would rely exclusively on GWFO for out-of-sample testing.

If one is using GGO in combination with GWFO then I don't see any need to exclude data from GGO?
If you are using GGO in combination with GWFO, then you do not have to exclude data from GGO, because GWFO excludes multiple walk-forward periods, which provides greater statistical evidence.

28. Number of records in GGO report is less than number of iterations performed?
During the genetic optimization process, the genetic algorithm might generate parameter combinations that have already been evaluated (i.e. duplicates).
To save time, GGO employs efficient hashing techniques to identify any duplicates to prevent them from being re-calculated in TS again.

29. A few basics about genetic algorithms (GA's)
A genetic algorithm uses a population of non-overlapping strings to represent the trading strategy being optimized. These non-overlapping strings are called “chromosomes”. The genetic algorithm then uses three operators – reproduction, crossover and mutation – to genetically manipulate the chromosomes and thereby optimizing the trading strategy in an evolutionary manner.
The genetic algorithm will pass several times through the population of chromosomes, each time applying the genetic operators to the entire population. Each pass through a population is referred to as a “generation”.

30. Does GGO include a Sharpe Ratio as a fitness function?
The Perfect profit correlation (ff#6) is a fitness function that falls in the same "category" as the sharpe ratio and should provide similar (or even better) results than the Sharpe ratio


31. Why do I get GGO parameters that are not direct multiples of the step that I selected for optimization?
GGO automatically converts all increment fractions to one of
the following:1 divided by 2,5,10,20,50, etc....

32. What is the meaning of each column in the trading history files?
The columns in the trading history files are:
Date Time TradeProfit TradeDrawdown TradeBars LastBar Days Position

33. How to interpret the GWFO cluster analysis?
- Do I just look at Robustness or do you look at one that is 47% and if everything else is OK, you trade that?
I would recommend that you analyse the cluster analysis and then determine the area (cluster) that looks most promising.
The 50% rule is a guideline and if a system gives 47% RI (which is close to 50%) and everything else looks OK (e.g. it is surrounded by other coordinates all giving close to 50% or higher), then I would still be happy to trade that system. However, one should be very careful when making exceptions. Personally I would not trade a system if it has a RI<40% no matter how good other statistics look.

- On one system the equity curve continues to go up on unseen data and gives me a robustness of >55% with sufficient (over 500) trades in sample. The other equity curve tails off. I would normally not trade the one that tails off, but the walk forward analysis also passed. What should I do?
Personally I also place a high emphasis on the quity curve. As they say: "A picture is worth a thousand words!".
Thus if two systems give the same results on paper, I will always choose the one with the equity curve that looks closest to a straight line going upward!
We must remember that GGO/GWFO forms a complete system evaluation methodolgy only when one looks at the whole picture, thus looking at the system from different angles.

Below is two examples (also in Help,Contents, Optimial re-optimization window) on how to interpret the cluster analysis tables:

EXAMPLE 1

Re-optimized P&L (annualized)

OOS% \ Runs 5 10 15 20 25 30

10 17782.91 16740.29 12553.13 9700.53 9396.77 9281.76
15 16565.13 9624.54 10230.31 7777.74 7351.62 6485.74
20 11310.33 8036.32 9282.90 6389.17 6581.01 7444.95
25 10537.80 8624.54 3847.79 6818.86 6939.32 8815.25
30 7367.65 7496.13 6643.93 3428.18 6402.49 2579.89

Walk-forward Overall result (Pass/Fail)

OOS% \ Runs 5 10 15 20 25 30
10 FAILED PASS PASS PASS PASS PASS
15 PASS PASS PASS PASS PASS PASS
20 PASS PASS PASS PASS PASS PASS
25 PASS PASS PASS PASS PASS PASS
30 PASS PASS PASS PASS PASS PASS

Walk-forward Robustness Index%

OOS% \ Runs 5 10 15 20 25 30
10 52.9% 58.4% 70.0% 70.3% 62.3% 66.3%
15 53.7% 81.7% 70.1% 69.8% 64.3% 66.0%
20 66.7% 70.0% 65.3% 64.8% 63.0% 61.0%
25 72.3% 67.0% 66.5% 59.0% 66.4% 66.6%
30 75.7% 66.0% 61.0% 65.8% 57.7% 50.8%

Re-optimization interval (days)

OOS% \ Runs 5 10 15 20 25 30
10 39 29 23 19 16 14
15 51 35 26 21 18 15
20 61 39 29 23 19 16
25 68 42 30 24 20 16
30 75 44 32 25 20 17

The four tables represent (in the order listed above):

1) maximum continuously Re-optimized P&L (annualized)
2) best Walk-forward Overall result (Pass/Fail)
3) maximum Walk-forward Robustness Index%
4) optimal Re-optimization interval (days)

for the various walk-forward run and out-of-sample tests performed.

First of all we will look at the 1st, 2nd and 3rd table to determine the cluster which produced the best results. A cluster is defined as a specific x,y coordinate (e.g. Walk-forward Runs=10, Out-Of-Sample%=OOS%=20) and the 8 neighbors immediately surrounding that coordinate.

You will see that GWFO automatically calculates and display for you the optimal coordinate on the ClusterAnalysis tab.

For this example, one can easily see that the max. re-optimized P&L is produced in the cluster with center x=10 runs, y=OOS%=15.

However, when looking at table #2 we see that one of the tests failed the walk-forward analysis, thus we will rather look for the best cluster (with the highest average) in terms of re-optimized P&L where all the neighbors also passes the WFA.

The cluster with center x=10 runs and y=OOS%=20 appears to be the best.

This coordinate is indeed also surrounded with very healthy walk-forward robustness index percentages (table#3). Remember that the robustness index is simply the annualized rates of return for the out-of-sample results divided by the in-sample results.

Table #4 then simply tells you what is the re-optimization interval in days for a given coordinate. In our case, we have finally selected x=10,y=20, thus the optimal re-optimization period is 39 days. Note that accross the whole cluster, using any re-optimization period between 26-68 days (with the corresponding number of walk-forward runs) would still have resulted in good results, thus we have indeed a result that is robust.

If you will be using the system in real-time using an approach of constant re-optimization, you will simply re-optimize your system every 39 days. Even if you do not use an approach of constant re-optimization, then the tables are still very useful because they provide additional prove that your system is robust, by generating profits over a wide range walk-forward run and out-of-sample percentage combinations.

EXAMPLE 2

Re-optimized P&L (annualized)

OOS% \ Runs 5 10 15 20 25 30

10 19291.11 18709.31 13809.98 17066.38 15482.08 14174.17
15 16341.30 14297.19 13152.52 12187.08 14114.28 13606.57
20 14208.05 15463.51 11390.87 11544.66 14597.98 13575.22
25 11135.77 12054.39 15473.71 13392.82 11878.76 15208.33
30 11482.46 11563.75 13434.59 10564.72 11821.49 12805.42

Walk-forward Overall result (Pass/Fail)

OOS% \ Runs 5 10 15 20 25 30
10 PASS PASS PASS PASS PASS PASS
15 PASS** PASS PASS PASS PASS PASS
20 PASS PASS PASS PASS PASS PASS
25 PASS PASS PASS PASS PASS PASS
30 PASS PASS PASS PASS PASS PASS

Walk-forward Robustness Index%

OOS% \ Runs 5 10 15 20 25 30
10 96.3% 99.2% 94.4% 82.1% 73.4% 91.9%
15 101.8% 90.3% 81.1% 94.1% 83.2% 74.2%
20 92.5% 91.2% 87.8% 88.4% 78.9% 77.2%
25 97.3% 95.1% 88.1% 86.0% 93.0% 83.2%
30 86.0% 80.1% 89.8% 82.3% 74.6% 74.1%

Re-optimization interval (days)

OOS% \ Runs 5 10 15 20 25 30
10 32 24 19 15 13 12
15 42 28 22 17 15 13
20 50 32 24 19 15 13
25 56 34 25 20 16 14
30 61 36 26 20 16 14

For this example, the max. re-optimized P&L (table#1) is produced in the cluster with center x=10 walk-forward runs, y=OOS%=15.

When looking at table #2 we see that one of the immediate neighbors even passed with distinction, and all the surrounding neighbors have very healthy walk-forward robustness index percentages (table#3).

Thus we will look no further and stick to this coordinate.

Table #4 tells us the corresponding re-optimization period for coordinate (10,15) is 28 days. However, using any re-optimization period between 19-50 days (using the corresponding number of walk-forward runs) would also have resulted in good results, thus we have selected a result that is robust.

If you will be using the system in real-time using an approach of constant re-optimization, you will be re-optimizing this system every 28 days.

How much data should I use when doing the re-optimization?

The amount of data that you will be using when doing the re-optimization will depend on whether you have selected Anchored or rolling window (not anchored) walk-forward optimization.

If you have not selected anchored (thus rolling) walk-forward then you will for instance re-optimize you system every 28 days (the optimal period for example 2 above) with GGO, using only the last 28 day's data. (Note that you must load sufficient data for TS to satisfy its max. bars lookback setting. Thus if the max. bars TS may reference is 50, then you need to load 78 days history)

If you have selected anchored walk-forward then you will re-optimize your system every 28 days with GGO, using ALL the data starting at exactly the same point in time as what you have used for doing the cluster analysis.

34. GWFO: Where is the "Settings for the next NN days" found?
It is found at the bottom of the OptimizationSummary. Just click on the tab and scroll down to the bottom of the page

35. Which is most important? GGO or GWFO?
Do I give more weight to the outcome in WFGO over what I thought I saw in GGO or just ignore GGO and go for WFGO?
The GGO and GWFO looks at the system from different angles. Personally I would give more weight to the outcome of GWFO (provided sufficient GGO iterations were done), but you should also take into account what the GGO report and equity curve tells you, to form a complete picture

36. What happens to the data in the GWFO data folder if I run the same optimization with a different fitness number?

The GGO reports folder has the fitness number in the folder name, but the WFO data folder does not use the fitness number in the folder name.
The GWFO data folder contains the trading history files generated during the genetic optimization.
It does not matter if you optimize the same strategy with different fitness numbers, because all what will happen is that the GWFO Data folder will contain the trading history files of several optimizations using different fitness functions.
The different GGO reports (named according to fitness) will only access the trading history files generated by that specific optimization.

37. Is the GGO/GWFO compatible with TS8.x / TS2000i?
Yes. GGO/GWFO is fully compatible with TS8.x as well as TS2000i

38. What regional settings should be used with GGO/GWFO?
Not only for CASB, but also for GGO/GWFO, the regional settings should preferably be English/USA.
In Windows, goto Regional & Language settings and make sure that the Number setting is 123,456,789.00 and NOT 123.456.789,00

39. What is the concept/benefits behind Stress Testing?
The stress testing feature works as follow:

Let's say the GA generated the following values for a strategy with 3 inputs:

10 20 30

With Stress test level=1 (stress testing off) GGO will only evaluate this combination.

With Stress test level=2 GGO will subtract 1 x Stress test increment (default=10%) to each input and also evaluate the following additional combination:

9 18 27

With Stress test level=3 GGO will both add and subtract 1 x Stress test increment to each input and
evaluate the following additional combinations:

9 18 27
11 22 33

With Stress test level=4 GGO will both add and subtract 1 x Stress test increment to each input and also subtract 2 x stress test increment thus evaluating the following additional combinations:

9 18 27
11 22 33
8 16 24

With Stress test level=5 GGO will both add and subtract 1 and 2 x Stress test increment to each input, thus evaluating the following additional combinations:

11 22 33
9 18 27
8 16 24
12 24 36

and so forth......

To summarize:
Using the default stress test increment of 10%, the stress test values are calculated as follow for different stress test level settings:

Level Range
1 +/- 0%
2 -10%
3 -10% , +10%
4 -20% , -10%, +10%
5 -20% , -10%, +10%, +20%
6 -30% , -20%, -10%, +10%, +20%

Thus you can see that stress testing is not a test that must be passed, but it is the process of "stressing" the system by varying the inputs a certain % in either direction.

40. How does the Weighted fitness function (Fitness #10 in GGO) works?

Fitness #10 gives more control over the selection process based on multiple aspects considered relevant for the desired trading strategy.
It allows the user to assign different weights to different fitness functions.
You can also define cutoff levels beyond which the partial fitness score remains unchanged.

This allows you to create a compound fitness function for instance:

-Look for maximum net profit (Fitness #1)
Values of 10,000$ or more give a max partial score.
Values of 2,000$ or less give 0 partial score.
Assign a weighting factor of 2 for this criterion.

-Try also to maximize the Net profit to Max DrawDown ratio (Fitness #2)
Values of 15 or more give a max partial score.
Values of 5 or less give 0 partial score.
Assign a weighting factor of 1 for this criterion.

-Finally maximize the Net profit per trade (Fitness #9)
Values of 100$ or more give a max partial score.
Values of 15$ or less give 0 partial score.
Assign a weighting factor of 3 for this criterion.

Note that the architecture of the TradeStation/EasyLanguage environment differs
greatly from other trading platforms and makes it unfeasible to do a normalization
only at the end of an optimization. For that reason GGO normalizes the weighted
fitness calculations during the optimization itself. It follows that during the first
100 or so iterations of any new optimization, the maximum and minimum values are insufficiant to do an accurate normalization. To solve this problem, GGO uses a sliding scale to penalize the fitness calculations during the first 200 iterations with between 0-50% depending on the number of the iteration.
Once 200 iterations has passed, the maximums and minimum are accurate enough for a proper normalization. This method is the most efficient way to implement normalization in a TS/EasyLanguage environment and saves a lot of calculation time while still being sufficiently accurate.

What is appropriate lower and upper threshold boundries for each of the fitness functions (fitness #1 to #9) one should consider when using fitness#10?
It is very difficult to provide threshold levels that would be universally applicable.
The range of any fitness function that includes Net Profit can vary substantially from strategy to strategy depending on the amount of data used, the big point value of that instrument etc.etc.
The threshold values for a fitness function like Net Profit on its own is also purely subjective and should be determined by each trader himself depending on his own preferences.

The weighted fitness function is indeed an advanced option and is certainly not recommended for newcomers to GGO.
If you want to properly determine upper/lower threshold levels for a given instrument given a certain period of data, I would suggest that you first
run a very short GGO optimization on the strategy but using the individual fitness functions seperately.
Then closely watch the typical range for each fitness function.
Finally, recreate your GGO strategy using appropriate threshold values for the weighted fitness function.

In general the following threshold values should do a good job in most cases:

Fitness #1: Net profit
Lower threshold = The minimum profit amount you require
Upper threshold = The profit amount you realistically can expect

Fitness #2: Net profit / Max DrawDown
Lower threshold = 5
Upper Threshold = 15

Fitness #9: Net profit / Trade
The threshold values will be determined by the strategy type. For instance, for a scalping strategy a lower threshold of $15 and upper threshold of $100 would be appropriate while a longer term strategy might need higher values e.g. Lower threshold=100, Upper threshold=400.
In general, the lower threshold should be the minimum average trade required, while the upper threshold should be the average trade realistically expected.

If you are uncertain about which threshold values to use, then we recommend to use the weighted fitness function as is with the default lower threshold=0 and
upper threshold=9999999.
Thus your weighted fitness function will effectively impose no threshold values, but will simply be used to combine more than one fitness function into one with a certain weight assigned to each.


41. How does the GWFO work?
Using GWFO consists of the stages:
1) Optimization of your strategy in TradeStation 2) Walk-forward analysis using GWFO standalone
If GWFO is used on its own you will be doing an exhaustive search during stage 1 and then for all realistic purposes you are limit to a maximum of 6 paramters with limited parameter ranges as you have noticed yourself. This is because the optimization in TradeStation in itself is a slow and time consuming process.
Because an exhaustive search is done the number of permutations optimized is increased exponentially very every additional parameter being optimized.
For this reason you should use GWFO together with the Genetic Optimizer (GGO). During stage 1, GGO now performs a genetic search/optimization
(instead of an exhaustive search if GWFO is used on its own) and genetically select permutations/ parameter combinations to be walk-forward tested by GWFO later during stage 2. In this way you can walk-forward test a system over a much wider range for each parameter and also optimize more parameters if you want to.
In short: Start by optimizing your strategy using the GGO (The GGO SmartEditor will automatically prepare your trading strategy).
During stage 1 your GGO modified strategy will create trading history files for each parameter combination searched. Once you are finished with stage 1 (the optimization in TS), you can continue with the GWFO standalone. GWFO will then use the files created during the genetic optimization stage, and walk-forward those files.


FAQ 42 - 59 continues at http://www.thegrailsystem.com/forum/index.php?topic=4.0
23  General Category / Documentation and FAQ's / Copyright, trademarks, upgrade policy and disclaimers on: August 20, 2009, 03:18:55 pm
COPYRIGHT AND TRADEMARKS

Copyright 2004-2010 Technovest (Pty) Ltd

The GGO/GWFO/CASB software and documentation are the property of Technovest (Pty) Ltd and are protected by copyright with all rights reserved.

LEGAL DISCLAIMER

The GGO/GWFO/CASB software/documentation is provided without warranty of any kind. Technovest (Pty) Ltd does not warranty, guarantee or make any representations regarding the use, or the results of the use of the software or written documentation in terms of correctness, accuracy, reliability, currentness or otherwise. The entire risk as to the results and performance of the software is assumed by the Licensee/user.

In no event shall Technovest (Pty) Ltd be liable in any respect for any claims, loss, indirect, special or consequential damages or lost profits, resulting from use of or reliance on the software or documentation.

The Licensee accepts the software "as is, with all faults", and in lieu of all other warranties and conditions, expressed or implied, including, but not limited to those for merchantability and fitness for a particular purpose.

UPGRADE POLICY

Technovest(Pty)Ltd does not commit itself to any specific number of upgrades during any given period.
All upgrades issued and the intervals at which the upgrades are issued will be at the full discretion of Technovest(Pty)Ltd.
While Technovest(Pty)Ltd always strive to issue upgrades with regular intervals,
the company makes no promise about the frequency of upgrades, neither does Technovest(Pty)Ltd make any promise about future functionality or the date that such functionality might become available. While Technovest(Pty)Ltd strives to add new functionality with regular intervals, Technovest(Pty)Ltd does not commit itself to add requested functionality within any prescribed time frame.


TradeStation TM 8, TradeStation TM 2000i and EasyLanguage TM are registered trademarks of TradeStation Technologies, Inc.

Neither TradeStation Technologies nor any of its affiliates has reviewed, certified, endorsed, approved, disapproved or recommended, and neither does or will review, certify, endorse, approve, disapprove or recommend, any trading software tool that is designed to be compatible with the TradeStation Open Platform.

Neither TradeStation Technologies nor any of its affiliates has reviewed, certified, endorsed, approved, disapproved or recommended, and neither does or will review, certify, endorse, approve, disapprove or recommend, any product or service that offers training, education or consulting regarding the use of EasyLanguage TM


CFTC DISCLAIMER

HYPOTHETICAL PERFORMANCE RESULTS HAVE MANY INHERENT LIMITATIONS, SOME OF WHICH ARE DESCRIBED BELOW.
NO REPRESENTATION IS BEING MADE THAT ANY ACCOUNT WILL OR IS LIKELY TO ACHIEVE PROFITS OR LOSSES SIMILAR TO THOSE SHOWN. IN FACT, THERE ARE FREQUENTLY SHARP DIFFERENCES BETWEEN HYPOTHETICAL PERFORMANCE RESULTS AND THE ACTUAL RESULTS SUBSEQUENTLY ACHIEVED BY ANY PARTICULAR TRADING PROGRAM.

ONE OF THE LIMITATIONS OF HYPOTHETICAL PERFORMANCE RESULTS IS THAT THEY ARE GENERALLY PREPARED WITH THE BENEFIT OF HINDSIGHT. IN ADDITION, HYPOTHETICAL TRADING DOES NOT INVOLVE FINANCIAL RISK, AND NO HYPOTHETICAL TRADING RECORD CAN COMPLETELY ACCOUNT FOR THE IMPACT OF FINANCIAL RISK IN ACTUAL TRADING CONDITIONS.
IN ADDITION THE ABILITY TO WITH STAND LOSSES OR TO ADHERE TO A PARTICULAR TRADING PROGRAM IN SPITE OF TRADING LOSSES ARE MATERIAL POINTS WHICH CAN ALSO ADVERSELY AFFECT ACTUAL TRADING RESULTS. THERE ARE MANY OTHER FACTORS RELATED TO THE FINANCIAL MARKETS IN GENERAL OR TO THE IMPLEMENTATION OF ANY SPECIFIC TRADING PROGRAM WHICH CANNOT BE FULLY ACCOUNTED FOR IN THE PREPARATION OF HYPOTHETICAL PERFORMANCE RESULTS, ALL OF WHICH CAN ADVERSELY AFFECT ACTUAL TRADING RESULTS.
Pages: 1 [2]
Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!