Quantitative Trading and Systematic Investing

Letian Wang Blog on Quant Trading and Portfolio Management

0%

This post demonstrates how to perform a Bayesian linear regression, including the intuitions behind Bayesian statistics, linear regression Bayesian representation, conjugate Bayesian model, and Python implementation.

Introduction

In last post we reviewed the classical linear regression and now let's look from Bayesian perspective. There is well-known philosophical difference between frequentist and Bayesian. Interested readers can read further this debate online such as this one on Wiki. In my opinion, one advantage of Bayesian is its ability to perform online machine learning recursivelly as new information comes in incrementally.

In terms of the linear regression, Bayes's Theorem can be written as

\[ f(\beta|y,X)=\frac{f(y|\beta,X)f(\beta|X)}{f(y|X)} \tag{1.1} \]

where \(f(\beta|X)\) is the prior belief of parameter \(\beta\); \(f(y|\beta,X)\) is the likelihood of observing \(y\) given our prior; and \(f(y|X)\) is called evidence. Finally, \(f(\beta|y,X)\) is the posterior belief of pararmeter \(\beta\) once the evidence \(y\) has been taken into account. This posterior then becomes new prior and the circle continues recursively.

Read more »

This post discusses the linear regression model, including simple linear regression and multiple linear regression, and its implementations in Python, specifically in Scikit-Learn library. It also serves as a basis for further discussions of more advanced linear regression models such as Bayesian linear regression.

Read more »

This post discusses the Value at Risk (VaR) measure used in financial markets, including the variance-covariance method, marginal VaR, component VaR, and then analyze the risk profile of a real portfolio.

Introduction

Value at Risk (VaR) is widely used by financial institutions to measure market risks or potential investment losses. It tells the maximum possible loss for a given portfolio over a certain time horizon, with a certain confidence level \(\alpha\), or

\[ Pr(Loss \le -VaR)=1-\alpha \tag{1.1} \]

There are three approaches to calculate VaR, that is, historical simulation, variance-covariance, and Monte Carlo simulation.

Read more »

This post discusses the basic practices of portfolio management and mean-variance portfolio optimization, including Efficient Frontier, Global Minimum Variance, Tangency Portfolio, and their implementations in Python.

Introduction

Modern Portfolio Theory (MPT) studies the tradeoff between return and risk. The risk of a portfolio is determined by not only the variance but also the correlations among assets. For a given risk, a rational investor would prefer an allocation with a higher expected returns; On the other hand, for a given return, he or she would prefer the portfolio with a lower risk level. This is a typical dual optimization problem.

Read more »