Position Management - With Multi Strategies

Discussion in 'Strategy Building' started by WinstonTJ, Oct 18, 2010.

  1. Looking for some advice on position management engines across multiple strategies.

    I used to run one main account with multiple subs running different strategies. Now that market conditions have changed a bit and I’ve added new strategies (some longer term and some shorter term) I’m running into some issues where I’ll get crossed signals, for example, an intra-day long on a stock (hold for 3-4 hours) and then during that hold I’ll get a short-term short signal for the stock. I understand how you can’t be long and short the same stock (painting the tape) and I understand how risk/compliance needs to flatten my position if that happens.

    I’m looking at more advanced position management where I would run all of my strategies in the same account. This requires my execution engine to be aware of my positions – essentially it would need to check my basket of long/short stocks prior to executing. For example if I’m long 1000 SPY intra-day and I get a short signal on 400 SPY then I would need to reduce my long position down to 600 SPY rather than be long 1000 in one sub acct and short 400 in another sub account. I’m thinking that my position management needs to be closer to options (Buy to open/sell to open and buy to close/sell to close) versus just buy, sell, sell short, cover. In the example above I’m currently long 1000 and will sell short 400, being net long 600 but with exposure to 1400, which is a no-no. What I need to do is be long 1000, sell 400 (reducing my position to long 600) and then buy back 400 long when I would get my buy to cover signal. This would effectively average down my 1000 long price which would give me the same P&L and keep me compliant.

    Has anyone done this and could you share (here or via PM) any issues you ran into? Complicated position management isn’t really that hard – but I need the code to be light & nimble so that my execution speed is equally as fast. I also need to maintain the same speed AND essentially combine 20 strategies into one giant engine.

    Thx for any advice.
     
  2. dloyer

    dloyer

    Your execution code needs to be aware of global positions. At the very lest, you need a hashtable of positions and net them out and a position per system.

    The speed inpact should not be much since it is all in memeory.

    Think about the edge case of a net long swining to a net short. Do you first go flat, then short?

    Other options:
    * Long only. Problem goes away
    * Sub accounts with single system per account, but unless your broker can share the buying power across all of the accounts, then each sub account has to be fully funded.
    * A short only account and a long only account. Only two accounts to fund.
     
  3. jokepie

    jokepie


    Option One seems better with less complexity.
     
  4. This is exactly what I was asking/trying to get opinions/experience on. I would imagine that I would send two orders at once - if I'm long 1000 SPY and get a short signal of 1500 SPY I'd send a SELL 1000 order and a SS 500 order at the same time. Compliance won't have an issue if all of this is sub-second I would imagine.

    Right now I have multiple accounts and this is causing an issue. I can't have a long only and a short only account and be long SPY in the "long acct" and short spy in the "short acct" due to compliance issues.

    I think the biggest issue is going to be combining multiple strategies where some add liquidity and some remove. If I'm trying to remove on my entry but add on my exit - I can't put out a non-marketable order to Sell 1000 SPY while I put out a marketable order to SS 500 SPY because that puts me long & short.

    I think I'm going to need to discuss with compliance.