G-BOT Project
Algorithmic Trading Platform
This is a project I have been leading for a few years, accumulating a nice experience getting through all the imaginable technical
issues related to a project of such complexity.
G-Bot is now, after several years of
development, a robust platform that can trade any instrument
and send orders to any market directly through IB. Orders are executed in milliseconds.
It is also sufficiently general to host any (new) strategy. In the past
we have been testing mainly high frequency trading strategies.
It also integrates strategy backtesting and "calibration" (search for "best"
algorithm parameters, based on historical data), using the same trading engine
for both trading and backtesting/calibration activity (to ensure perfect accuracy).

I have implemented and tested literally thousands strategies or their variations,
and seen countless different ideas. While new strategies and scientific
methods of systematic trading are in continuous development and testing.
In my experience, there are profitable strategies and unprofitable strategies.
I am talking here about algorithms for "systematic profitability".
(Placing some
order with a take profit and a stop it's not even considered "trading" in
this context, but more like betting.)
In any case, even the most profitable strategy may have has significant drawdowns. Even the most profitable and sensible strategy will cause any
account to blow up, if there is insufficient capital or insufficient risk
management.
What is enough capital ?
Well it has to be "calibrated" depending on algorithm parameters and target average daily profit, using
historical data (especially worst case scenarios).
Trading Results with a folio of futures
We will be testing here a new approach. All results obtained by trading real time, with real data
through the paper trading facility make available by Interactive Brokers. All
orders executed are shown in detail:
PUBLIC TEST on Elite Trader:
http://www.elitetrader.com/vb/showthread.php?s=&threadid=202078
of more recent algorithms.
the thread also contains explanations about the algorithm
general idea, returns and cash reserve requirements and interesting questions
from ET members.
(I have also developed other systematically profitable algorithms based
on High Frequency scalping.)
Some Backtest Results (useful to understand drawdown magnitude)
Most accounts blow up because traders do not have an objective idea of the magnitude of drawdowns. Watching at performances on past data can be helpful to determine how many instruments can be traded with a given capital, without being liquidated. Clearly past results should be considered just a rough indication, as the future may reserve any surprise and it's always a good idea to have capital in excess. Remember that simply using stops does not help limit the drawdown, and actually hitting a series of stops can make the drawdown increase beyond any limit. Hedging through stops is actually the least effective way of protection, as it is actually taking a series of losses. (In my experience, any strategy which implements plain stops or "stop and reverse" mechanism turns out to be systematically unprofitable or, at most, a zero profit game.)
Run G-BOT yourself
I am currently giving the possibility to try the platform in paper
trading mode only, for educational purpose. For any serious request, a personal copy will be compiled and
issued on purpose.
If one is interested to see the system in action on his own machine running the
TWS or the IB Gateway,
just send
me a request via email with the following mandatory information:
- Your name, city and country (for program customization)
- MAC address of your pc (If you are unsure how to find it, read
here,
or use this tiny utility we have made to this purpose:
it will display your mac address.)
Note: For Microsoft .Net framework 4.0 or above (tested on windows
XP/Vista/7, 32 or 64 bit (IB components are currently 32 bit: see
https://www.interactivebrokers.com/smf/index.php?topic=84139.0) ). For paper trading only (IB, Interactive
Brokers, only).
Here is a quick installation Manual.
For any issue or feature request, please feel free to send it to us.
Get ready with your skype account to chat real time with any problem or doubt. Our
skype id: DataTimeSRL
)
All the above is absolutely FREE, and active feedback is
welcome.
[Be advised, however, that the use of the system with real money is
granted only to chosen investors.
Attempt to trade real money will cause the program to switch into manual mode
and trading becomes discretionary: will work in "manual" mode only, turning you
into a discretionary scalper.]
G-BOT for real trading ?
Try it, first, in your paper trading account for at least 1-3 months, to understand better how much money it can make and what is the cash reserve necessary.
What strategy does it play?
I am currently working on new algorithms, much less aggressive and patient than
previous ones. But much more tradable.In fact, it's not sufficient that a strategy be simply "profitable", it
must also be "tradable". Tradable here means that, while pursuing a
profit, it will have drawdown and margin requirements which are manageable by
the given account (just think, for instance, of a martingale approach, which is
not practically tradable).
Remember that the Profit and Loss can be decomposed in a "Realized" component
(say the result of closed positions) and an "Unrealized" component (the remaining,
due to still open positions)
P&L = Realized + Unrealized
Typically, you will see, day after day, the "Realized" curve go up slowly
increasing each time with jumps (minimum of the size of the scalp size). In the meantime the
Unrealized, will pull up and down the P&L.
There is no need to panic if the PNL seems at times to lose all what
accumulated with the "Realized", because that's by design, and the program is
just "investing" what has previously "realized", to prepare future profits. If you like, you can think
of it as an "investment phase" that will eventually will be transformed into profits.
(P&L shown by G-BOT is "net" of spread and closing commissions.)
What the robot tries to accomplish at any time is the maximization of the following ratios:
Avg Profit Avg Profit
--------------------------
and
-----------------------------
| max Drawdown ever |
| max position ever |
where "AvgProfit" indicates the average P&L over a given unit of time
(we use "day"),
and "max Drawdown" is the maximum distance ever seen from a local maximum and the
next local minimum of the P&L .
[ Note that looking at these ratios is ways better than using,
for instance, the Sharpe ratio
because first of all we wish to be protected against "extreme scenarios" (so the
"variance" of returns is not that important), and, secondly, the Sharpe ratio
uses the return standard deviation including also the "positive" part of it, and
since "letting the profit run" is sought by many trading strategies, it would
actually penalize strategies which also have large positive returns (and this
would not be good). ]
G-bot uses also real-time correlations in order to apply the best hedging action to the traded folio. (Real time "dynamic" correlations are displayed in the main window and appear (and make sense) after a few hours of data collection.)
Example of autotrading:

A G-Bot Wallpaper
Download the "wallpaper". To install, right click on the image and select "Set as desktop background"
Links to useful interesting technical articles [link exchange with serious sites
welcome]
http://www.puc-rio.br/marco.ind/stochast.html#estimation
http://coreyhoffstein.com/2009/01/08/automated-trading-resources/
[Automated Trading Resources, from Corey]
http://homepage.mac.com/j.norstad/finance/rtm-and-forecasting.html
http://www.tradeology.com/priceaction.htmlources/
http://www.stat.uconn.edu/~studentjournal/index_files/Zoe_s05.ppt
http://people.orie.cornell.edu/~protter/WebPapers/HistoryJP04.pdf
http://www.math.duke.edu/vigre/pruv/studentwork/malone.pdf
http://www.e-m-h.org/
http://www.optioncity.net/pubs/Caltech2004Talk.pdf
http://www.mathematik.uni-leipzig.de/preprint/2002/p3-2002.ps
http://www-groups.dcs.st-and.ac.uk/~history/Printonly/Bachelier.html
http://www.bearcave.com/software/market_trading/resources_and_notes/Architecture%20of%20an%20Interactive%20Brokers%20Based%20Trading%20System.html
[Architecture of an Interactive Brokers Based Trading System]
Forum
http://www.elitetrader.com/
http://www.trade2win.com/boards
http://www.traderji.com/
http://www.traderslaboratory.com
Interesting or amusing threads [please suggest]
http://www.elitetrader.com/vb/showthread.php?s=&threadid=66599&perpage=6&pagenumber=24
"Every forex broker is evil?!"
http://www.elitetrader.com/vb/showthread.php?threadid=171976
"Informal ranking of Chicago prop firms"
http://www.elitetrader.com/vb/showthread.php?s=&threadid=200561&perpage=6&pagenumber=1 "You are more likely to become a top Hollywood actor or
popstar than profitable trader"
http://www.elitetrader.com/vb/showthread.php?s=&threadid=199982&perpage=6&pagenumber=1
"Are you smarter than a top
M.I.T. Grad?"
...
Tools
http://finance.google.com/finance/stockscreener
http://www.amex.com/
http://www.nyse.com/
http://finance.yahoo.com/
http://www.marketwatch.com/tools/etfs/html-adv-screener.asp
http://www.proshares.com/funds
http://www.marketwatch.com/tools/calendars/earnings.asp
http://ultrafunds.blogspot.com/2008/01/ultralong-etf-reference.html
Brokers
http://www.interactivebrokers.com/ibg/main.php
http://www.tradingtechnologies.com/
Firms
http://www.tradersnarrative.com/list-of-proprietary-trading-firms-735.html [Proprietary trading firm directory]
Readings
http://ezinearticles.com/?Trade-Exit---How-To-Cut-Losses-And-Let-Profits-Run&id=62634
http://grailtrading.blogspot.com/
http://ezinearticles.com/?Forex-Scalping-Systems---The-Truth-about-Profit-Potential-From-Day-Trading&id=1030178
http://www.forexfactory.com/showthread.php?t=18238
http://www.readersdigest.ca/money/cms/xcms/day-trader-don-ts_281_a.html
http://www.pipholic.com/ive-found-the-holy-grail-unbelievable.html
http://butlerblog.com/2007/04/05/the-holy-grail-of-trading/
http://www.compuvision.com.au/Examples/HolyGrailPart1.htm
http://chartingstocks.net/article.cfm/id/31320
http://www.financialsense.com/fsu/editorials/wagner/2006/0901.html
http://www.tradingwinner.com/archive/2006/11/19/trading-strategy-using-trailing-stops/
http://opportunitiesaplenty.com/Debt_Blog/2008/05/_using_a_trailing_stop_limit_can_generat.html
http://www.traderji.com/words-wisdom/9837-wisdom-dump.html
http://www.traderji.com/words-wisdom/15241-stage-trading-r-u.html
http://stocks.about.com/od/tradingbasics/a/tailingstop.htm
http://www.trade10.com/technical.htm
Videos
http://masteroptions.com/?p=3 [recommended video to understand options]
Link Exchange (write for exchanging links)
Online forex trading
http://www.forexfloor.com
Currency online trading
http://www.forexondemand.com
Trading Forex
http://www.fxinfo.com
We are not in the US, however, it's useful and wise to recall anyway the following:
CFTC Disclaimer
U.S. Government Required Disclaimer
Commodity Futures Trading Commission Futures and Options trading has large potential rewards, but also large potential risks. You must be aware of the risks and be willing to accept them in order to invest in the futures and options markets. Don't trade with money you can't afford to lose. This is neither a solicitation nor an offer to Buy/Sell futures or options. No representation is being made that any account will or is likely to achieve profits or losses similar to those discussed on this web site. The past performance of any trading system or methodology is not necessarily indicative of future results. CFTC RULE 4.41 - HYPOTHETICAL OR SIMULATED PERFORMANCE RESULTS HAVE CERTAIN LIMITATIONS. UNLIKE AN ACTUAL PERFORMANCE RECORD, SIMULATED RESULTS DO NOT REPRESENT ACTUAL TRADING. ALSO, SINCE THE TRADES HAVE NOT BEEN EXECUTED, THE RESULTS MAY HAVE UNDER-OR-OVER COMPENSATED FOR THE IMPACT, IF ANY, OF CERTAIN MARKET FACTORS, SUCH AS LACK OF LIQUIDITY. SIMULATED TRADING PROGRAMS IN GENERAL ARE ALSO SUBJECT TO THE FACT THAT THEY ARE DESIGNED WITH THE BENEFIT OF HINDSIGHT. NO REPRESENTATION IS BEING MADE THAT ANY ACCOUNT WILL OR IS LIKELY TO ACHIEVE PROFIT OR LOSSES SIMILAR TO THOSE SHOWN. All results shown on this website are live paper trading (broker: Interactive Brokers) results. 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. Hypothetical trading does not involve financial risk, and no hypothetical trading record can completely account for the impact of financial risk in actual trading. All information on this website is for educational purposes only and is not intended to provide financial advice. Any statement about profits or income, expressed or implied, does not represent a guarantee. Your actual trading may result in losses as no trading system is guaranteed. You accept full responsibilities for your actions, trades, profit or loss, and agree to hold us and any authorized distributors of this information harmless in any and all ways. The use of this website constitutes acceptance of our user agreement. Logos and trademarks are the property of their respective owners.
by Tom
University of Rome and DataTime SRL
ET nickname: fullautotrading (for a personal contact send a PM (always welcome!)