Home     Manual


G-BOT - Backtesting and Robustness Analysis


G-BOT offers two main ways of testing strategies, apart live trading with paper money or real money (forward live testing):

1) Backtesting: that is processing past real data and looking at the results

2) Forward testing within mutating random scenarios (generated on the fly)


Random scenarios are available in either single run mode (like a
"backtest") or in iteration mode ("Game Analysis"  or "robustness analysis"), which runs iteratively the strategic scalping/hedging over and over, thus providing distributions and average results in order to study the game performances and robustness within a large sampling space of price curves.

Testing with random data is useful for various reasons:
- A greater variety of situations is checked ("curve fitting" is more difficult against varying random scenarios, also because we randomize volatility too within the random processes)

- Data is perfectly "clean".



Tickgrabber: a realtime tickdata recorder

Tickgrabber is a tickdata "recorder" which collects realtime ticks and store them orderly in your hard disk. It can record ANY instrument (including options).

In order to process past real data, G-BOT expects, by default, that on your desktop you have a folder called "TickData". In this folder, you will have 1 folder for each instrument, and, in that folder, all the tickdata files (1 for each "day"):


Tickdata folders


These folders can be created automatically, by using "TickGrabber".


Tickgrabber


How to use TickGrabber: quickstart


Tickgrabber is very easy to use. It can be started once and let run forever (never shut it down, even if the Gateway is restarted).
It will automatically populate the "Tickdata" folder with all instrument folders and files. (This data can be immediately used by G-BOT backtesting facility.)

Start up instructions:

- Run Tickgrabber

- Edit the symbol list, if it needs to be changed
- Check the 3 check boxes (Autostart/Autostop/Loop Forever) and click on "Apply"
- Let it run and forget about it. It will continue recording tickdata forever for all the specified instruments.


You can add/remove more instrument on the fly, anytime.
(Note that if you hit a IB limit, you can increase arbitrarily the number of tickers with the "Quote Booster".)

As a detail, note that Tickgrabber stores the ticker file in the folder "
TickGrabber_Files" in your "Documents" folder.
(This is similar to G-BOT, which instead use the folder "
GBOT_Files", in your "Documents" folder.)


It will automatically load, by the default, the file "
Symbols1.txt".
Note that a second instance of  Tickgrabber would look by default for another symbol file "
Symbols2.txt" and so on. This way you can have separate different instances of tickgrabber, using different symbol file (for instance one for futures, and another one for stocks and ETFs, which trade only RTH).


Notes:

Tickgrabber assumes, for generality, a day session to be:
- from 18:00 edt to 18:00 edt of next day


In case you need to restart Tickgrabber after a computer reset or whatever,
make sure that the red label ("Target Tick File") matches with the start day of the trading session. In order to set that automatically: 
- click either on "
default 24H" or
"default 24H - 1 Day" if starting time is past midnight, as appropriate.

You can "record" anything with Tickgrabber, including Futures, Stocks, ETFs, Cash, Options, CFDs, etc. The ticker conventions are exactly the same as G-BOT, and follow closely IB notation.


Note that according to our rules and to IB rules, it is obviously illegal to disseminate this data for commercial purposes.

Use it for personal research, and to improve your scalping/hedging games with G-BOT.




How to backtest the tickgrabber tickdata with G-BOT



This is straightforward: just switch to to "backtest" tab and, in the symbol list, add the symbols you wish to backtest (use "Edit symbol" button to add symbols).

(The symbol names as the same as the folder names created by tickgrabber in you tickdata repository.)

Click on "Get Files" > "Single Backtest" tab > "Start Backtest"



How to make G-Bot process tickdata that you already have

G-BOT can process any tickdata. Clearly, it expects them in exactly the same format as generated by TickGrabber. So, if you have tickdata that you wish to process with G-BOT, simply convert that data into the tickgrabber format. The
Tickgrabber format is very simple and efficient.

Each daily tickdata files will look like:




where the 6 values on each line are: Hour, Min, Sec, Ms, Bid=1/Ask=2, Price

The file name will be of the type:
InstrumentName_Day.txt

example:
EMD FUT 201006 CME_USD 100_2010-04-23.txt where the instrument name is in G-Bot symbol format.

The name of the folder containing the daily tick files will be the same as the instrument name, example:
EMD FUT 201006 CME_USD 100

G-BOT will also process tickdata file with an
alternate format, where bid and ask are on the same line, and instead of the 1/2 bid/ask codes, there is a 0 (this is for the cases where you have both BID and ASK, associated with a unique timestamp). Example:




Before backtesting your own data make sure it is consistent and fulfills the following
minimal conditions:

- Time must go only forward
- Each price MUST be an exact multiple of the instrument ticksize

- Do not replicate same ticks at same time


(Note that sometimes tickdata resellers, inflate files with "garbage" prices to better justify their costs.
Consecutive equal prices can be removed, as they add nothing and only waste processing time.) 


 Home     Manual