Tell me more ×
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

3 Answers

up vote 6 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. – Gravitas Jul 9 '11 at 11:38

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

...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

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.