Have you ever wondered whether Bayesian analysis can be applied toward the stock market? We did, and set out to investigate.This book shows you how to find relationships between stocks or exchange traded funds (ETFs) using Bayesian analysis.A relationship that most traders are probably familiar with is linear correlation. This is sometimes used as the basis for pairs trading. But linear correlation is just one way that stocks or ETFs can be related.The analysis we present in this book can be used to exploit almost any kind of relationship that may exist between stocks or ETFs. The book will show how to calculate the probability of a stock or ETF ending the day up or down based on what other stocks or ETFs are doing.A probability is more useful than a simple up or down signal. It quantifies the certainty of a prediction and allows a trader to take a position consistent with a given level of risk.Any active trader should find the techniques presented in this book useful. We are only going to examine the relationships in one small group of ETFs as an example of what is possible but the same techniques will work for any set of stocks, ETFs, or even bonds.The tool we use to calculate the probability of a positive or negative return on a stock or ETF is called a Bayesian classifier. It is called a classifier because it calculates probabilities for only two discrete outcomes: positive or negative.The method we use to calculate these probabilities is called Bayes’ Theorem.