Sunday, January 4, 2009

Trading Robot Features (v 0.0 initial)

I will work out full features at a later time (after proof of concept works), but the initial idea of the trading robot's features are:

  1. Each position is tied to a specific trading strategy
  2. Position entries are done manually. Note a stock/option position can have one or more legs
  3. Position adjustments are done by the robot
  4. Position exits are done by the robot
  5. Adjustment rules can be customized with parameters and can be reused for different trading strategies
  6. Be able to do the following using IB API:
  • get current quote for stock, index, or option
  • get historic quote - high/low for the past x days
  • get current options info: bid, ask, delta, theta, iv, etc
  • place single and combination orders: limit, market, stop loss, contingent
  • set up alerts
  • detect execution of orders
  • cancel orders

Major components which can be run from a single workstation (Windows XP) are:

  1. IB Traders Work Station (TWS) software - This is the interface that does the actual trading.
  2. Database - To store strategy rules and trading records
  3. Trading Robot program - This program is implemented in JRuby just runs with no user interface. It accesses TWS and the database, issuing orders to TWS and updates the database.
  4. Trading Monitor web application - This program is implemented in Ruby on Rails and provides a view of what the trading robot is doing along with reports

2 comments:

Anonymous said...

Hi I've also been thinking about a Ruby library for IB. I saw the one on rubyforge - which seems to be stalled.
Are you aware of any other efforts?

If you don't mind saying: What level of interest is there in these posts - judging by RSS subscriptions and also visits

System Trader said...

No, I'm not aware of other ruby library efforts.

As far as visits goes, as of 04/08/2009, there has been over 400 visitors. Not bad since the blog started tracking this info on 01/27/2009 and the topic is narrow for specific audience. You can click on the site meter to see more details on the traffic that comes here.