Announcement

Collapse
No announcement yet.

Spread Question for math wiz

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spread Question for math wiz

    I am trying to find the formula to plot the difference as a percentage between two instruments that are far apart in price. If it were just Coke at 60 and pepsi at 52 I would use ko - pep. If the 8 dollar spread goes negative, its a sign that pepsi's price exceeded Coke. Essentially the zero line crossover is right at zero. When you do Instrument A / Instrument B there is never a zero line crossover. The two instruments I am plotting are a basket of stocks and the etf they are a part of. Statistically they never drift further than a 1/2 of a percent apart. I am working on a mean reversion strategy and I am simply trying to plot the spread as a percentage despite the fact that the instruments are so different in size. The spread calculator allows me to use operators like (/*+-). I need to be able to see a zero line crossover of some kind so that I can back test the farthest percentage historically that the two instruments have diverged. When one crosses the other or vice versa on a performance basis, I need to be able to see that on a histgram or line of some kind that establishes a "mean" so to speak.

    I have tried Instrument A / Instrument B. I have tried A - B. I really need to see the difference as a percentage. Help!!

  • #2
    something like this?

    Day 1:

    Ko = $60
    Pep =$52
    Spread = $8 (+13.3%)

    Day 2:

    Ko = $61
    Pep=$72
    Spread =£-11 (-18%)

    etc...

    spread percentage calc =

    (ko - pep)/ko

    Comment


    • #3
      efs attached

      I think this is what you are looking for.
      Attached Files

      Comment


      • #4
        Had the MA's wrong, but fixed now
        Attached Files

        Comment

        Working...
        X