Take the 2-minute tour ×
Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. It's 100% free, no registration required.

I have two stocks, A and B, that are correlated in some way.

If I know (hypothetically) that stock A has a 60% chance of rising tomorrow, and I know the joint probability between stocks A and B, how do I calculate the probability of stock B moving tomorrow?

For bonus upvotes - do you know of any standard libraries that can calculate the joint probability of stocks A and B, given a time series of historical data?

Update:

The phrase "conditional probability" is also applicable.

share|improve this question

4 Answers 4

up vote 7 down vote accepted

So you want to calculate $\mathbb{P}[B_1 > B_0 + \varepsilon \;|\; A_1 > A_0 + \varepsilon]$? If you truly have the joint distribution of $A_1$ and $B_1$ and the current prices $A_0$ and $B_0$, this just becomes a simple exercise in integration, by the definition of probability density. Are you asking how to find a conditional probability in general, or is your question about something else?

share|improve this answer
    
Interesting. Calculating integrals is not that difficult, thanks or the tip. –  Contango Jul 9 '11 at 11:38

You can use copulas. The probability that B rises given A rises is $P(- R_B < 0 | - R_A < 0) = \frac{P(-R_B < 0, - R_A < 0)}{P(-R_A < 0)} = \frac{C(F_{-B}(0),F_{-A}(0))}{F_{-A}(0)}$.

You can specify the marginals as a GARCH process and use either non parametric or parametric copulas to get your final conditional probability.

share|improve this answer
    
Interesting, thanks for the answer! –  Contango Aug 11 '13 at 9:54

Why not using the so simple Monte-Carlo estimator

$ \hat{p}_N =\frac{ \sum_{i=1}^N 1_{|A_{i+1}-A_i|>0 \cap |B_{i+1}-B_i|>0}} {\sum_{i=1}^N 1_{|A_{i+1}-A_i|>0 }}$

where $1_{|A_{i+1}-A_i|>0}$ is $1$ if stock $A$ has moved at time $i+1$

share|improve this answer
    
The main deficiency of this would be if you want a time-varying estimator of conditional probability, since once you've got large $N$, $\hat{p}_N$ would respond very slowly to a sudden clustering of joint positive returns. Here you would want time-varying copulas (not estimated through MLE). –  Jase Aug 10 '13 at 13:52

...do you know of any standard libraries that can calculate the joint probability of stocks A and B, given a time series of historical data?

Using R and the LSPM package with the code posted here might be what you are looking for.

share|improve this answer
    
The LPSM package looks interesting. Thanks! –  Contango Aug 11 '13 at 9:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.