Python for Finance: Analyze Big Financial Data

(Elle) #1

Bayesian Regression


Bayesian statistics nowadays is a cornerstone in empirical finance. This chapter cannot lay


the foundations for all concepts of the field. You should therefore consult, if needed, a


textbook like that by Geweke (2005) for a general introduction or Rachev (2008) for one


that is financially motivated.


Bayes’s Formula


The most common interpretation of Bayes’ formula in finance is the diachronic


interpretation. This mainly states that over time we learn new information about certain


variables or parameters of interest, like the mean return of a time series. Equation 11-5


states the theorem formally. Here, H stands for an event, the hypothesis, and D represents


the data an experiment or the real world might present.


[ 44 ]

On the basis of these


fundamental definitions, we have:


p(H) is called the prior probability.


p(D) is the probability for the data under any hypothesis, called the normalizing


constant.


p(D|H) is the likelihood (i.e., the probability) of the data under hypothesis H.


p(H|D) is the posterior probability; i.e., after we have seen the data.


Equation 11-5. Bayes’s formula


Consider a simple example. We have two boxes, B 1 and B 2 . Box B 1 contains 20 black balls


and 70 red balls, while box B 2 contains 40 black balls and 50 red balls. We randomly draw


a ball from one of the two boxes. Assume the ball is black. What are the probabilities for


the hypotheses “H 1 : Ball is from box B 1 ” and “H 2 : Ball is from box B 2 ,” respectively?


Before we randomly draw the ball, both hypotheses are equally likely. After it is clear that


the ball is black, we have to update the probability for both hypotheses according to


Bayes’ formula. Consider hypothesis H 1 :


Prior: p(H 1 ) = 0.5


Normalizing constant: p(D) = 0.5 · 0.2 + 0.5 · 0.4 = 0.3


Likelihood: p(D|H 1 ) = 0.2


This gives for the updated probability of H 1 .


This result also makes sense intuitively. The probability for drawing a black ball from box

Free download pdf