
I am trying to find a good practical example of Bayes' theorem use in finance. I have a great example in medicine with cancer screening, but I struggle to find something cool in finance. Should be simple enough for undergraduate students, does anyone have any ideas?

"Earth: some bacteria and basic life forms, no sign of intelligent life" (Message from a type III civilization probe sent to the solar system circa 2016) 



nikol


Total Posts: 915 
Joined: Jun 2005 


Risk management problem:
P(account of clientA is in limit breach)*P(history of limit breachesclients defaulted)=>P(clientA is in default)
Trading problem:
P(see uptick)*P(history of upticks  uptrends)=>P(beginning of uptrend)
PS: My mistake. Above should be modified from 'beginning updtrend' to 'uptrend'. Correct is this: P(see uptick)*P(history of upticks  start of uptrends)=>P(we are at beginning of uptrend)




goldorak


Total Posts: 1085 
Joined: Nov 2004 


We are in 2019 and finance folks are still relying on frequentist statistics. That tells a lot about this industry.
Once you actually reverse the way we have been (wrongly) trained to look at things in finance, and consider the probability of the hypothesis you make given the data you observe rather than the probability of the data given the hypothesis you make, the use of Baye's theorem is pretty straightforward.

If you are not living on the edge you are taking up too much space. 



bullero


Total Posts: 57 
Joined: Feb 2018 


Parameter estimation?
Edit: For example in stat arb you could sample the posterior joint distribution for a set of interesting parameters that describe the stochastic behavior of a spread you are trading. Then, given the joint density you compute the expected pnl. 



AB12358


Total Posts: 63 
Joined: Apr 2014 

 


@goldorak, we have:
P(HD)=P(DH)*P(H)/P(D)
So in order to get the probability of the hypothesis (H) given the data (D), we need unconditional probabilities of the data and hypothesis... How do we go about those?
I know you are super clever, please explain like I am 12 years old. 
"Earth: some bacteria and basic life forms, no sign of intelligent life" (Message from a type III civilization probe sent to the solar system circa 2016) 


Maggette


Total Posts: 1187 
Joined: Jun 2007 


Sorry, I guess I am missing something here. I don't get the question. You are aware of the classical Bayesian inference stuff (start with a prior for the parameters ...posterion = prior * likelihood..etc)?
In general you don't do that in a closed form pen and paper way....
Edit: I get know that I misunderstood the question. I guess you are looking for a more direct application of the theorem, other than general bayesian statistics 
Ich kam hierher und sah dich und deine Leute lächeln,
und sagte mir: Maggette, scheiss auf den small talk,
lass lieber deine Fäuste sprechen...




nikol


Total Posts: 915 
Joined: Jun 2005 


@NeroTulip
>> P(HD)=P(DH)*P(H)/P(D)
Usually P(D) = 1.
>> I know you are super clever, please explain like I am 12 years old.
Hm... Assume that you already explained the concept of probability.
Imagine walking in the museum and seeing Kandinsky's Composition no.XI https://www.wassilykandinsky.org/YellowRedBlue.jsp
Data is painting H is everything what tells imagination about the picture. P(H) is a probability that particular H (let say face) will appear among anything else. P(DH) is a number (EDIT: better fraction=P(DH)/P(D)) of paintings with faces on it. Portraits included.
Then P(HD) is a probability that what I see is face indeed.




vertigo


Total Posts: 6 
Joined: Dec 2015 


Regarding Goldorak's post... I think this kind of thinking is worse than useless  it is dangerous. Young people will look at your post and take inspiration, and then get a harsh reality shock when they attempt to use Bayesian methods in practice and found out that these methods are more complicated, more difficult to calibrate and far more subjective than frequentist methods. In my opinion, they are nearly useless in finance.
It is not that finance folks "believe" on frequentist statistics, no, that is how an academic would see it (and academic's opinions count as the same as garbage cleaners)  more likely it is that they are aware of the dangers of using more complicated statistical methods (i.e., Bayesian methods) and therefore use more simple methods that have damage limitations.
You cannot use Bayesian methods for pricing  when you work with the martingale measure, the volatility function is already specified, and the drift is whatever rate you can finance with (LIBOR, OIS, etc...). You could use Bayesian methods for risk  but usually "risk models" need to get regulatory approval and you tend to use simple models (i.e., not subjective) for such cases. Therefore, Bayesian methods are useless.
An example of where you could use them  calibration for yield curves. 
... maybe one day ... 




To Bayes or not to Bayes, that is the question. (ok, kill me now)
@Maggette: Indeed, I am looking for an example of simple direct application of Bayes' theorem in finance, something I could explain to some undergrads.
For example, in medicine, you want to know the probability that you have cancer given that your screening test is positive P(CT). You know the test sensitivity P(TC), the false positive rate P(Tnot(C)), and the prevalence in the general population P(C). Direct application of the theorem gives you the result you are looking for, which can be counterintuitive e.g. your test is positive, but you only have a 15% chance of actually having cancer.
Wondering if there are simple examples like that in finance.

"Earth: some bacteria and basic life forms, no sign of intelligent life" (Message from a type III civilization probe sent to the solar system circa 2016) 


deeds


Total Posts: 462 
Joined: Dec 2008 


@v  i try not to be a 'wowist' but am overcome. Wow.
Garbage cleaners. Useless.
I'll take wisdom from any source and test it. In finance, it would seem some of the best wisdom is that which everyone else thinks is garbage.
In general, i'll try to keep my opinion of sources as clean as possible so i don't miss them in this loose jumble of my i sometimes call mind. 




Maggette


Total Posts: 1187 
Joined: Jun 2007 


@vertigo I think your perspective about users on this phorum is a bit limited.
You probably worked in bigger institutions...but there are a LOT of smaller and sophisticated players out there who don't do riskmanagement in order to comply to regulatory nonsense...but to actually manage the risks on their books!
I never thought about bayesian methods in in derivatives pricing.... But there is still a lot left in the finance industry, that is neither pricing derivatives nor corporate risk management for complicane reporting.
By goldoracks quite knowledgeable posts about the pitfalls of backtesting strategies I assume he is from that part of the industry. I learned stuff from him...
I think to a practioner it is rather obvious where frequentist and bayesian methods complement each other well and where one of the two is more instructive. My experience in energy trading, the bayesian stuff was rather helpful...and in some cases the only way to do at least something.... You can do things with a bayesian approach that you can't do with a frequentist. Frequentist stuff is still the way to go in many use cases, but often it does not do the trick....Use both when appropriate. Everything else is rather academic bickering.

Ich kam hierher und sah dich und deine Leute lächeln,
und sagte mir: Maggette, scheiss auf den small talk,
lass lieber deine Fäuste sprechen...



nikol


Total Posts: 915 
Joined: Jun 2005 


Intuitively Distance to Default is closest to cancer. Must be something about good stress test for the Lehman B. which defaulted few months later.





ahd


Total Posts: 29 
Joined: May 2017 


how about scenario of cratering stock that has been successfully traded in the past based on some meanreversion strategy? is the stock getting super cheap, i.e. is the current realization of the meanreverting state variable far out in the tail of the pdf? or is model wrong in the current environment?
or, better, consider a simple multistrat where trading strat = P(mean reverting dynamics) mr strat + P(trending dynamics) * trend following strat. Now the two probabilities are history dependent in a Bayesian sense... 



goldorak


Total Posts: 1085 
Joined: Nov 2004 


Interesting. ahd recent post gave me an update in my rss feed, but I had not got any since I posted in this thread. Anyone relying on rss feed having the same kind of issue? 
If you are not living on the edge you are taking up too much space. 



goldorak


Total Posts: 1085 
Joined: Nov 2004 


@Nero. (I hope you are taking advantage of fresh snow in the Phrench Alps at the moment...) I understand this will not be what you are looking for (a simple example of Baye's theorem), and my post was more trolling than anything else (do not forget that I spend most of my time in the mountains which makes me a natural troll). Still, I think it is worth a word or two.
First, why would you want to know all different parts: P(DH), P(H) and P(D) ? The only thing you need is to estimate P(HD) so you can use it to actually build a portfolio of... let's call them "opportunities".
Second, your example on cancer is quite telling. All the probabilities you are using have been exante determined thanks to a frequentist process and in medicine there are good reasons to assume that, at least in the medium term, they will not change (unless sapiens metabolism is changing faster than I think it should...). In finance you do not have that luxury, even in the shorter term nowadays (it used to be in the past though). This is an important reason why trying to determine each part separately is a waste of your time. Determining P(HD) through other empirical means is already painful enough.
Finally, regarding your example of Bayes theorem of finance, why not consider the probability of "you are good" conditional on the fact that "you make money". With people having a real habit to overestimate the probability of "you make money" given that "you are good" ? It will not help you making any money though...
@vertigo. Not talking of applying Kruschke's book here. Just to rely on:
First, fix a simple and acceptable for all prior. Second, update that prior given new evidence. Third, iterate once more evidence available.
That is way more powerful than observing, choosing and calibrating a model and hoping for the best in the future.

If you are not living on the edge you are taking up too much space. 


ahd


Total Posts: 29 
Joined: May 2017 


I like @goldorak's suggestion of P(good  make money) = P(make money  good) * P(good) / P(make money) .
Imagine we consider a concrete toy example in which i) an investor gets a coin drawn from an urn containing some distribution of fair and biased coins ii) the investor flips his coin N times and bets on each flip iii) the investor puts his coin back in the urn and a new investor goes through i) and ii) iv) repeat 1000 times The bias (if any) in each guy's coin is a measure of edge or "being good". Each guy is rational and will simply bet whatever side has come up most often for him so far... I'll imagine "good" means "abs(P(heads).5) >threshold1" and "make money" means "avg pnl > threshold2"
@NeroTulip you can have your kids write a script to investigate this, or just show them in class certain features like both conditional probs go up with N as signal becomes more certain to dominate noise, etc.






@goldorak:
I like the P(goodmake money) idea... I think I can probably create a toy example such as:
There are 10,000 hedge funds with 5 year track records. Your favorite one has a 2 Sharpe. What is the probability that the manager is good rather than lucky: P(good2SR)?
To answer this question, let's assume that out of the 10,000 funds, 100 have a large edge with a SR of 2, and 9900 are exotic betas with a true SR of 0.5  but some of them will get lucky.
P(good2SR)=P(2SRgood)*P(good)/P(2SR)=50%*1%/P(2SR)
We have P(2SR)=P(2SRgood)*P(good)+P(2SRnot good)*P(not good)
Is there an analytic solution for P(2SRnot good), or do I need to simulate it?
To be clear, P(2SRnot good) means probability of getting a Sharpe of 2 over 5 years, knowing that your strategy has a true Sharpe of 0.5

"Earth: some bacteria and basic life forms, no sign of intelligent life" (Message from a type III civilization probe sent to the solar system circa 2016) 


goldorak


Total Posts: 1085 
Joined: Nov 2004 


I would simulate it, would it be just to include different volatilities for the managers. 
If you are not living on the edge you are taking up too much space. 



ahd


Total Posts: 29 
Joined: May 2017 


Well, if the investment returns are iid gaussian then the sampling distribution of the SR is a noncentral tdistribution with a known pdf  so you can always compute in closed form stuff like P(realized SR >=2  true SR = 0.5). 


