probability distribution formula?

Discussion in 'Options' started by xpsyuvz, Jan 25, 2005.

  1. The question is though: to what markets does the Brownian Motion Model apply? If you don't know, its simply garbage in, garbage out.
     
    #41     Mar 24, 2005
  2. gbos

    gbos

    Not exactly. When you try to figure a 20% barrier the tails of the distribution doesn’t come into play. Even with big skewness and kurtosis the barrier remains practically the same. So it comes down to what you are looking for. Of course if you want to figure out the 1/1000 event barrier then no one knows.

    In other words for someone not looking for a barrier deep into the tails of the distribution the model applies reasonably well in all liquid markets and all timeframes bigger than a few minutes.
     
    #42     Mar 24, 2005
  3. gbos

    As an example, I’m trying to determine the probability that a stock will touch a given price at any time during a specified period;

    Stock Price 500
    Up Barrier 550
    Time 6 months
    Volatility 20%
    Drift 4.75%

    The calculation works fine in your compiler (53.3% prob), but in Excel I’m getting a #Value error. The formula in the cell using the above example reads;

    =ProbPTUB(0.0475,0.2,0.5,550,500)

    I’m sure it’s me doing something wrong. Appreciate any help.

    PT.
     
    #43     Mar 25, 2005
  4. ProbPTUB ?? In mine it's called prob_hitub and it works fine. Thanks gbos.
     
    #44     Mar 26, 2005
  5. nonprophet

    I refer you to page 2 of this thread, from which I copied and pasted into VBA. Your <b>prob_hitub</b> does not feature there.

    I can see that I should have been using ProbMaxPTUB rather than ProbPTUB for the example I gave above. But neither formula will work anyway.
     
    #45     Mar 26, 2005
  6. PT, I hadn't noticed the details on page 2, I was referring to probability.xls on page 7. But this spreadsheet alone does pretty much what you're looking for, within excel.
     
    #46     Mar 26, 2005
  7. nonprophet

    I hadn't noticed the attachment on page 7. I've copied the formula from there and you're right, it works !

    Thanks.
     
    #47     Mar 26, 2005
  8. kut2k2

    kut2k2

    :confused:

    Looks like an ordinary Black-Scholes calculator. What's so special about this one?
     
    #48     Jun 30, 2005
  9. GTG

    GTG

    No, it looks like there is a bug. The snorm function is getting an overflow on this line:

    snorm = 0.5 + w * (0.5 - 1 / Sqr(2 * pi) * Exp(-z ^ 2 / 2) * (a1 * k + a2 * k ^ 2 + a3 * k ^ 3 + a4 * k ^ 4 + a5 * k ^ 5))

    Specifically the overflow happens when it adds 0.5 to the other big term. I don't know enough about visual basic to know why this doesn't work. It seems like maybe the line is just too long.

    I fixed it by doing the calculation in 2 steps like this:

    Dim test1 As Double

    test1 = (0.5 - 1 / Sqr(2 * pi) * Exp(-z ^ 2 / 2) * (a1 * k + a2 * k ^ 2 + a3 * k ^ 3 + a4 * k ^ 4 + a5 * k ^ 5))

    snorm = 0.5 + w * test1

    After changing that code I get 0.2820...
     
    #49     Jul 1, 2005
  10. ==================================

    Believe you are right MTE and that s an important distinction;
    and yet the way Creville wrote it has some
    important practical trading/invest hints.:cool:
     
    #50     Jul 1, 2005