Trading Strategy Design -- "Shared Variables"

Discussion in 'Programming' started by clearinghouse, Jan 1, 2012.

  1. This is another opinion question.

    I have multiple entry and exit signals, but some signals are disabled when other signals are in operation. But the way the communication works between the signals, I have a sort of common structure that has a set of boolean variables, flipping on and off these signals or setting state variables.

    Over time, the "shared information" structure just got larger and larger and larger and the code is no longer aesthetically pleasing.

    I'm just curious if any of you have run into such an ugly situation and whether you found a "clean" way to integrate cross-strategy communication. This central coordination point is not a performance bottleneck, but the structure has become massive. I'm trying to tear it apart and refactor it.
     
  2. Are you talking about, in the simplest case, where one system calls long and another calls short?
     
  3. No. That generally never happens for me. All of my forecasts tend to align. A better example might be something like choosing to remove shares on one exchange vs. another, but only letting one system take the shot instead of both. Perhaps EDGA and BYX are both showing shares, but maybe my success rate on one vs. the other is higher, etc.
     
  4. Gotcha. It being probabilistic, why not assign execution venues probabilistically?
     
  5. I could do that, but there are other scenarios that need addressing. Cross-strategy communication has more issues than just routing interacting with risk management. Hedging problems fall into this domain as well.

    I suppose it suffices to say that one hand needs to know what the other hand is doing quite often.
     
  6. Sorry to have used your valuable response space. I had my left hand amputated years ago so I would no longer have "one hand or the other" issues.
     
  7. I find myself wanting to be more like a Hindu God and need more hands to manage exploding complexity.
     
  8. As a long-time denizen of Et's deeps, let me share an insight with you. The fact that only an idiot responded to your post should tell you one of two things. Either your post deserved only an idiotic response, or it is so subtle that it went over ET's collective little head. Being ET's resident idiot, I vote for the former. I think you are overcomplicating things. I recommend that you simplify back to the strategy which has the highest historical expectation, and trade that. Keeping the complications in reserve for the inevitable failure of your best strategy, of course. About once a month, I cannot resist cluttering my trade screen with new and seemginly brilliant ideas. The next month, in a dead drunk, where I am most rational, I scream "You fucking arrogant idiot!" and resimplify.
     
  9. Point taken.
     
  10. rosy2

    rosy2

    Not sure how your set up but I have separate strategies running each keeping track of only its specific position/PL/signal. I then have a hedger strategy running that looks at aggregate positions and adjusts overall. All strategies do keep state but it hasn't gotten that complicated yet.
     
    #10     Jan 1, 2012