excel sample spreadsheet for TWS

Discussion in 'Retail Brokers' started by TraDaToR, Jul 2, 2012.

  1. TraDaToR

    TraDaToR

  2. After downloading latest IB api version go to

    C/ jts / Excel / twsdde
     
  3. TraDaToR

    TraDaToR

    Thanks a lot.
     
  4. gmst

    gmst

    so you trade with excel that IB provides? I have looked into it but I found DDE links spotty. Can you please list the benefits that you find and your experiences in trading through the spreadsheet rather than TWS or some other frontend. Thanks for sharing.
     
  5. TraDaToR

    TraDaToR

    I don't use the spreadsheet to trade, I only use it as a support to create my own spreadsheets. The API syntax reference on the website is full of errors but you can use the sample spreadsheet to find where the problem is. The sample spreadsheet is more accurate than the API reference.

    I have used excel to trade quite complex systems with a lot of cancel/replace and thousands of messages per day. It worked quite well. One key to make it more robust is to have the minimum of VBA variables in the DDE link. If you want to submit an order, just define the limit price and the order ID as a variable and write all the rest( symbol, expiry, order type, side, exchange ) in the VBA sentence that will generate the DDE link. I know it's suboptimal but at least every order will be sent.
     
  6. TraDaToR

    TraDaToR

    I forgot. Benefits: You can have one idea on saturday night, write the whole system the next morning and test it in sim on monday. When you are used to VBA, you write functioning programs really fast.
     
  7. gmst

    gmst

    TraDaTor, Thanks for sharing! I know some of the biggest banks and hedge funds use excel as a modelling tool and definitely all the trading books are maintained in excel. However, I know only one group that uses excel to send orders, and that too uses it for capturing a very specific MOC imbalances. But good to know your experience of using excel successfully for much complicated trading and thanks for tip. Cheers

    Follow up - Where do you do all your strategy development and backtesting? Excel or some other platform?
     
  8. TraDaToR

    TraDaToR

    I used to backtest on TS, AmiBroker and wealth lab but I haven't backtested in years. I just write a system that might work and put it on sim for 1 week, 1 month, 3 months... depending on the frequency of trades and what should be considered a relevant sample.
     
  9. gmst

    gmst

    Allow me to pick your brains here, since you have been trading longer than I have. Why did you stop backtesting completely? Lescor also mentioned that he doesn't backtests rather only foward tests with a small amount. He actually doesn't even sim it, but rather starts trading it with a very tiny size. I also forward test many things that are hard to write code and backtest. But then there are a whole lot of things for which its not too difficult to write code and backtest them thoroughly. If nothing else, backtesting the strategy over a long time period allows you to correlate performance of the strategy with different market conditions.

    If you say you have now enough market understanding and don't need to do backtests. My counter point would be that probably this is a justifiable answer since you are accountable to only yourself about your money. I would guess, however that if you start a CTA and start managing OPM, then you will backtest properly before putting client's capital at risk if your methodology is systematic. Curious to hear your thoughts. Cheers.
     
  10. TraDaToR

    TraDaToR

    For most systems I trade, you need to simulate limit order queue, not just OHLC datas. Backtests wouldn't be representative. At least IB simulates the order queue for bid and ask when paper trading. It 's not perfect but it gives you a better picture of the possible results.
     
    #10     Jul 3, 2012