Advice on Multi-day strategy systems development

Discussion in 'Automated Trading' started by bridenour, Feb 15, 2009.

  1. Hi All,

    I am looking for guidance on the best way to approach the development of an ATS that can both a) manage positions for multiple days and b) manage them at the portfolio level.

    Up to this point, I've been evaluating a number of different package solutions and, in fact, actively using Ninja Trader. Unfortunately, the shortcoming I am finding with every package application I've looked at is their basic inability to manage positions across multiple days. With some, such as ninja trader, you can attempt this but its reliability across days is not where it needs to be to do this effectively.

    My basic question is - is there a package application which will offer this capability and support? I am very comfortable, in fact I prefer, to do most of the devleopment of the system via code -- i do not need higher level functions like wizards, etc.

    If there is not a platform that will support this, I assume the best way to go about it is to custom code a system from the ground up. If that is the preferable approach, are there components or frameworks that will speed this process? (either by handling communication management or certain basic trade functions)

    Thanks for your advice...

    br
     
  2. Hello Bridenour

    I will try to address some of your concerns and question about ATS.

    Custom code is not necessarily a preferred approach. It is the trader’s objectives that make this determination. The prepackaged applications I reviewed have never met my goals or style for trading. So I have been developing custom code for my own ATS’s for about 12 years to trade stocks mostly in the Daily time interval (with trading models going back further). Some of my ATS also trade intraday (in time intervals greater than 30 minutes).

    Many of my ATS systems trade positions. I built custom code in Tradestation, since that was the best software medium of that time. But, today I’m exploring converting them to Ninja Trader.

    There are many ATS components (most you design yourself) that speed processing in an ATS. Here are a few:
    - Multiple exit management rules – How you exit is the most important part of the ATS. I have multiple conditions that can get me out of the current trade. Being in a position with a loss is not the same as trying to protect a $1500 gain from evaporation. Most ATS traders neglect this area.
    - Managing different degrees of volatility – This is another key component to build into the ATS. If your ATS is going to trade in different types of markets than different volatility will apply to these positions.
    - Profit management – My systems are reversal based so I plug the profits and losses back into the next trade. In a good system profits can grow exponentially.

    You mention ATS management at the portfolio level. I would never do that. I’m interested in how well each strategy that I back tested and then forward test is performing in live trading. If the strategy meets the goals of my plan and works similar to how it was in my forward test. I keep on live trading. The sum of all of the active ATS strategies should meet my portfolio level goals.

    I have never found a need for communication level code in trading daily positions. The trades are just too infrequent.

    Thanks,

    Rabbitone
     
  3. Hi Rabbitone,

    Thanks for your response. Let me try to clarify the problem i am having.

    Basically, I am currently running several successful intraday strategies via Ninjatrader. It works fine -- i start them up in the morning, they execute, and its all over by night. Rinse and repeat the next day.


    It is the multi-day strategies that I have trouble with. I have designed and backtested an extremely reliable system (backtested over 10+years) that operates with a general holding timeframe of days to weeks. The problem is ninjatrader and other such platforms can't manage a position across days -- they seem to only be effective with intraday strategies.

    For example, in Ninjatrader every time you have to restart your strategy, it loses all knowledge of the current positions held. Due to broker connection resets, i must restart every day.

    I am looking for a package that will let me design a highly customized management strategy that will enable me to manage multiple positions concurrently with a holding period of days to weeks. I would rather not custom code it all (as there are many convenience functions in these packages i would like to take advantage of), but if i have to i will.

    let me know if this is more clear!

    thanks
    brandon
     
  4. lindq

    lindq

    Look into InvestorRT at www.linnsoft.com. You can interface IRT with InteractiveBrokers via Autotrader.

    To be very brief, in IRT you can develop your strategy and place it into a quote page, which will track entries and assign exits, which will then pass the orders along based on your code. Intraday, multiday, whatever. Your code, placed into the quote pages with your instruments, will trigger the trades based on schedules (actions) that you link with the code (rules).

    You can't leave this configuration completely unattended because you will need to restart IB at least once a day. But that is the only drawback, and I can't imagine running any systems unattended for more than a day that are placing trades in your account.

    Good luck.
     
  5. But when you restart, does the software continue to remember your current positions, levels, stops, profit exit points, etc? This is where I have been running into trouble with everything else.

    Almost need something that can actually store this information to allow for reliable restarts.

    I notice MBTrading provides an SDK to integrate directly with the FIX interface. I wonder if there is some combination of using this SDK, custom coding a solution, as well as possibly using certain packages for common indicator functions, that would make sense? Does anyone use this type of approach?

    Thanks
     
  6. This probably won't help, but FWIW my application (custom) uses a simple Excel spreadsheet to record trades. New trades, along with profit targets and time stop dates, are automatically entered EOD in to Excel (with old-fashioned VB6 code, but it works). The system reads them before the open to set up trades.

    A plus is that I have an (nearly) already done cost basis sheet for Sched D attachment if needed. Another plus is that I can do detailed analysis and graphs of each trading system very easily.

    Good trading to all.
     
  7. I trade a weekly swing trading strategy in Excel using a basket of 90 stocks. I imported quotes using XLQ (http://www.qmatix.com/XLQ.htm) and ran a mulit-year backtest.

    I use the Interactive Brokers Excel API to submit and execute trades directly from Excel.
     
  8. Thanks for the reply Wayne. Once the trades are entered, does your system manage the trade from that point? Or are the exit orders entered at the same time the position is opened?

    My system needs to dynamically manage the positions after the are opened (stops and targets change dynamically based on several factors), so I need a framework that will allow for this.

    Thanks
    Brandon
     
  9. Mine is just a simple 2-5 day swing method. Profit targets and time stops are fixed and sent to IB at the start of trading.

    Doesn't seem like it would work well for you if you are doing dynamic portfolio adjustments. Or at least, it may be more trouble than it's worth to program up.
     
  10. I was not aware Ninja Trader could not track multi-day strategies across days. That would appear to be a major drawback to using automated trading with them. I sure there must be some way to detect where one is at in trading a position with Ninja Trader?

    I trade TradeStation across days. It asks me each day if I want to restart the macros that were running from the previous day. Because Tradestation is also a brokerage the strategy is remarried to outstanding position. Then if the strategy detects a change that day the position can be closed or another one opened.

    I only trade in TradeStation using single threaded multi-day strategies. I would see no reason why multiple multi-day strategies can not be traded in TradeStation as long as funds are available to clear trades.
     
    #10     Feb 18, 2009