[QF] Introduction & Essential Foundations

Foundations & Basic Essentials

Brief coverage on basic foundational topics in finance for understanding toward alpha designs & portfolio management


Alpha & Beta

In finance & economics, a commonly known model called the Capital Asset Pricing Model (CAPM) can be perceived to serve as the propelling root of cause for the concept of alpha:

\[R_a = R_f + \beta (R_m - R_f)\]

where:

\(R_a =\) Expected Return of Security \(R_m =\) Expected Return of The Market \(R_f =\) Risk-free Rate \(\beta =\) Beta of Security

Beta, by definition, is the security’s “sensitivity” to market’s risk/volatility movement. Although, it is better to understand it from a quantitative approach, when it comes to alpha, as we proceed on understanding Beta as the “regressed slope of the security’s returns with respect to the returns of the selected market/benchmark (e.g.: 0.5 beta = on average, for every 1% returns on the market, our security returns at 0.5%). We will demonstrate this terminology further as we move forward.

In addition, notice we are using “expected returns” as this is important to proceed on understanding alpha design. Recall that since CAPM aims to model a security/portfolio, say AAPL, to a certain market as a benchmark to our choosing, say the SPY index, or even the XLK (Technology Index from SPDR) to compare AAPL with its competitors in the sector its operating in, to obtain its expected rate of returns in able to price equity investments.

Starting with the textbook definition:

Alpha (or Jensen’s Alpha) is the risk-adjusted/excess returns of a portfolio, used to evaluate its returns performance with respect to its expected returns against certain selected benchmark (using CAPM model).

Jensen’s \(\alpha = R_p - (R_f + \beta (R_m - R_f))\) where \(R_p =\) Portfolio’s Return

As CAPM aims to evaluate the expected return of a certain target, Alpha is used to evaluate actual performance of such target, usually a portfolio, strategy, or individual security (notice that \(R_p\) is not an expected value but a realized/actual value).

It is important to highlight the definition of alpha being risk-adjusted/excess returns as this is the foundation to which we will use to proceed on understanding & designing alphas. On a mathematical standpoint, whereas beta is the slope, alpha is the y-intercept when regressing returns against a selected benchmark, or that alpha is the returns of a certain investment target when the expected benchmark returns 0% on average. In other words,

Alpha is the independent returns of a portfolio with respect to a selected benchmark.

It is valuable to have high alpha as best as we can, such that statistically, given the classic definition of alpha, regardless of market’s movement, bullish or bearish, even if it crashes, the alpha component of a given portfolio return will mathematically be unaffected. This is the power of finding alphas.


Modern Portfolio Theory

From a fundamental perspective of portfolio management, controlling risk tolerance & maximizing returns, the topic of Modern Portfolio Theory (MPT), or mean-variance analysis, is essential in quantitative finance.

Assume we have constructed a portfolio of selected securities (this is an intricate process that we will further explore), we seek to generate maximal returns with as minimal risk as possible, both in-sample & out-sample. If we have M amount of the selected securities in such portfolio, and given a selected N time indexes (minute/hour/day/week/month/year/etc), we have their N historical prices of M securities, each defined as: \(\vec{p_i} = \begin{vmatrix} p_{i_1}\\ p_{i_2}\\ \vdots\\ p_{i_N} \end{vmatrix}\) where \(i = 1,2,...,M\) indexed as each security in such portfolio

NOTE: Historical prices data are subjected to readjustment for any purpose. We can define them as simple as the open or close prices for each time index, or to other customizable approaches, like setting it as the average between the two, etc…it is your choice to model the prices for whatever purposes that might follow your theoretical way on tackling the objective at hand, whether that be assessing assets’ relationships or building predictive models.

We then proceed on defining the securities logarithmic returns vectors as:

\[\vec{r_i} = \begin{vmatrix} r_{i_1}\\ r_{i_2}\\ \vdots\\ r_{i_N} \end{vmatrix} = \begin{vmatrix} log(\frac{p_{i_2}}{p_{i_1}})\\ \\ log(\frac{p_{i_3}}{p_{i_2}})\\ \vdots\\ log(\frac{p_{i_N}}{p_{i_{N-1}}}) \end{vmatrix}\]
  • Another way to calculate the interval returns can as straight forward as percentage change of one point to the next.
  • We use log to smoothen the returns shape & minimize outliers. This can be good & bad, depending on the situation, as we will further explore.

We can construct a table of such defined prices & returns of M securities as an N x M matrix, where M columns as securities & N rows as time indexes, such that: \(PRICE = \begin{vmatrix} p_{1_1}&p_{2_1} &\cdots &p_{M_1} \\ p_{1_2}&p_{2_2} &\cdots &p_{M_2} \\ \vdots&\vdots &\ddots &\vdots \\ p_{1_N}&p_{2_N} &\cdots &p_{M_N} \end{vmatrix}\) , \(RET = \begin{vmatrix} r_{1_1}&r_{2_1} &\cdots &r_{M_1} \\ r_{1_2}&r_{2_2} &\cdots &r_{M_2} \\ \vdots&\vdots &\ddots &\vdots \\ r_{1_N}&r_{2_N} &\cdots &r_{M_N} \end{vmatrix}\)

Next, we ask the question on what are the most optimal allocations, which we define optimal differently depending on the situation, though primarily, we often regard to a portfolio with the optimal allocations to which maximizes a specific ratio that’s widely being used in the investment world to evaluate performance of any portfolio/strategy/security:

Sharpe Ratio (or Information Ratio as dubbed by Tulchinsky) = \(\frac{\bar{R_p} - R_f}{\sigma_p}\) where, simplistically speaking, \(\sigma_p\) = Portfolio’s Volatility = Standard Deviation of Portfolio’s Returns, \(\bar{R_p}\) = Portfolio’s Returns

We perceive Portfolio Allocations ~ Direction (long/short) + Magnitude (0-100% of available capital), where for the given M securities to allocate out capital towards, With 100% = 1 capital available, we define our allocations/weights as: \(w = \begin{vmatrix} w_1\\ w_2\\ \vdots\\ w_M \end{vmatrix}\) such that \(-1 \leq w_{i}\leq 1\) and \(\sum_{1}^{M}w_i = 1\)

IMPORTANT: Both \(\sigma_p\) & \(\bar{R_p}\) can be tweaked & incorporated with much more complexity, such as predictive data added, etc..There are a multitude of ways to compute & determine such value, to which we will further explore as many as we can in our pending research work.

For the sake of simplicity at the moment, performing analysis from the historical standpoint, we opt to first, calculate the individual portfolio’s returns (\(\vec{R_p}\)) for N time indexes, given allocations \(w\), satisfying the condition defined above, for M amount of selected securities in such portfolio:

\[\vec{R_p} = RET\cdot w = \begin{vmatrix} r_{1_1}&r_{2_1} &\cdots &r_{M_1} \\ r_{1_2}&r_{2_2} &\cdots &r_{M_2} \\ \vdots&\vdots &\ddots &\vdots \\ r_{1_N}&r_{2_N} &\cdots &r_{M_N} \end{vmatrix} \cdot \begin{vmatrix} w_1\\ w_2\\ \vdots\\ w_M \end{vmatrix} = \begin{vmatrix} R_{p_1}\\ R_{p_2}\\ \vdots\\ R_{p_N} \end{vmatrix}\]

Then, we can compute \(\bar{R_p}\) as the average returns for N time indexes, being the most commonly used & basic way of calculating it from a historical analysis standpoint, such that \(\bar{R_p} = \frac{\sum_{1}^{N}R_{p_i}}{N}\)

For portfolio’s volatility \(\sigma_p\), being the standard deviation of \(R_p\), we seek to assess this topic in a much more intricate way, as assets exhibit correlational properties, as well as their volatility relationships between each other, and to the market they are in. For any allocations to which we seek to determine to be optimal in our process of optimization, we first calculate the covariance matrix \(\boldsymbol{C}\) for M selected securities, using the constructed returns table:

\[RET = \begin{vmatrix} r_{1_1}&r_{2_1} &\cdots &r_{M_1} \\ r_{1_2}&r_{2_2} &\cdots &r_{M_2} \\ \vdots&\vdots &\ddots &\vdots \\ r_{1_N}&r_{2_N} &\cdots &r_{M_N} \end{vmatrix} = \begin{vmatrix} r_{1} &r_{2} &\cdots &r_{M} \end{vmatrix}\]

where \(r_{i} = \begin{vmatrix} r_{i_1}\\ r_{i2}\\ \vdots\\ r_{i_N} \end{vmatrix}\) represents N returns of individual security i in M selected securities, such that we can compute the average returns \(\bar{r_{i}}\) which, for simplicity, defined as \(\bar{r_{i}} = \frac{\sum_{n=1}^{N} r_{i_n}}{N}\) (subjected to variation - weighted, rolling, etc…).

We can proceed on de-meaning columns of \(RET\), obtaining:

\[\overline{RET} = \begin{vmatrix} (r_{1_1} - \bar{r_{1}})&(r_{2_1} - \bar{r_{2}}) &\cdots &(r_{M_1} - \bar{r_{M}}) \\ (r_{1_2} - \bar{r_{1}}) &(r_{2_2} - \bar{r_{2}}) &\cdots &(r_{M_2} - \bar{r_{M}}) \\ \vdots&\vdots &\ddots &\vdots \\ (r_{1_N} - \bar{r_{1}})&(r_{2_N} - \bar{r_{2}}) &\cdots &(r_{M_N} - \bar{r_{M}}) \end{vmatrix}\]

We can now calculate our sample covariance matrix:

\[\boldsymbol{C} = \frac{\overline{RET}^\top \cdot \overline{RET}}{N-1} = \begin{vmatrix} \sigma_1^2 & \sigma_{12} & \cdots & \sigma_{1M} \\ \sigma_{21} & \sigma_2^2 & \cdots & \sigma_{2M}\\ \vdots &\vdots &\ddots &\vdots \\ \sigma_{M1} & \sigma_{M2} &\cdots &\sigma_M^2 \end{vmatrix}\]

where \(\boldsymbol{C}\) is a M x M square matrix, such that:

  • The diagonal values \(\sigma_i^2\) = variances of individual securities \(i = 1,2,...,M\)
  • \(\sigma_{ij} = \sigma_{ji}\) = covariances between two different assets i & j, where \(i\neq j\)

\(\sigma_{ij} = \sigma_{ji}\) implies that \(\boldsymbol{C}\) is a symmetric, or Hermitian Matrix. This is a very mathematically important fact that opens us to various options of exploration & analysis, such as Random Matrix Theory, Wilshart Matrices, etc.. to which we will further explore in this series.

Thus, we proceed on calculating \(\sigma_p\) using the covariance matrix \(\boldsymbol{C}\), given any allocation \(w\) that satisfy the conditions above:

\[\sigma_p = \sqrt{w^\top \cdot \boldsymbol{C} \cdot w}\]

Summary & Conclusion

Putting them together, again, from the historical analysis standpoint, we want a portfolio with allocations \(w\) for M securities, with their given (hourly/daily/weekly/etc) returns table \(RET\), an N x M matrix, such that:

  • \(\vec{R_p} = RET\cdot w\) = Portfolio’s individual returns through given N time indexes

  • \(\boldsymbol{C} = \frac{\overline{RET}^\top \cdot \overline{RET}}{N-1}\) = (Sample) Covariance Matrix of M selected securities, calculated from N time indexes (different N’s = different values)

Thus, with:

  • \(\bar{R_p} = \frac{\sum_{1}^{N}R_{p_i}}{N}\) = Portfolio’s Average Returns (for simplicity)

  • \(\sigma_p = \sqrt{w^\top \cdot \boldsymbol{C} \cdot w}\) = Portfolio’s Volatility/Standard Deviations of N Returns

  • \(R_f\) = Risk-Free Rate (usually set as returns rate of T-Bills, or any relatively risk-free assets, or 0 for simplicity)

Portfolio’s Sharpe/Information Ratio = \(\frac{\frac{\sum_{1}^{N}R_{p_i}}{N} - R_f}{\sqrt{w^\top \cdot \boldsymbol{C} \cdot w}}\)

There are many potential applications we can have from understanding mean-variance analysis, especially portfolio risk management, as well as integrating predictive models & establishing boundaries for optimization exploited by computational power. Thus, this can help us figure out the optimal allocations to be holding at any given time, or even serving as a powerful overarching tool to perform analysis on assets using historical data, such as industry analysis, correlational relationships, etc. We can even utilize the individual terms/components of Portfolio’s Sharpe Ratio to design a custom system of steps & equations for optimization to further seek mathematically unsolvable solutions, whereas such solutions can help in finding or evaluating reliable alpha signals (we will further explore this in later posts).


Personal Remarks on Moving Forward

It is important to recognize that for the majority of cases, or all of them at a relative level, higher alpha is desired as alpha represents the independent (relative to the market) excess returns of a portfolio. The important concepts we will keep as reminders are:

  • The concept of alpha is a statistical measure, sacrificially constricted with some potential trade-offs in beta by the overarching market’s risk, especially with lesser dependency on predictive features due to the further compounded risk of prediction/speculation in itself.
  • There is no rewards without risks, as risk = volatility = movements in values to capitalize upon. No risk = \(R_f\) as for any individual retail investors should have in their portfolio. We are seeking to understand such risk & placing ourselves such that we can generate superior returns.
  • All potential securities in the market, each with their own risk measure comprises such market as a whole, the market to which we are setting as a benchmark.
  • Constructing a portfolio means picking a selected N amount of securities WITHIN THE MARKET for your specific returns objective
  • Generating returns from such portfolio by strategically allocating capital sizing & positioning of the selected securities, as well as adding & removing securities within such portfolio.
  • Beta, as defined above, measures the sensitivity to market’s movement of a certain security or constructed portfolio.

With that being said, as we will further dive deeper into subsequent topics & ways to tackle our objective of generate alphas, through data-driven research results, the following key-points are essential to consider in my personal approach on generating optimal returns when it comes to systematic investing & trading:

  • A portfolio with high beta and low alpha (even negative alpha) can still be preferable compared to one with low beta & high alpha (smart beta strategies), depending on market condition as well as such preference is subjected to the specific time for the cyclic market’s nature.
  • The “best performing” portfolio is the one that, on a fundamental level, generate, on average, the highest positive returns as consistent as it can, knowing WHEN and HOW to align itself with market’s volatility/movement (increase beta magnitude) & when not to (decrease beta magnitude), such that such portfolio’s measured alpha reaches its global maximum given stated condition(s).
  • Prediction is an unavoidable component needed to adjust positions through time, such that we could satisfy the ladder objective, in able to maximize alpha in an absolute sense.
  • Quantifying reality to establish definitions of market’s conditions is a gray area needed to be carefully treaded. In other words, we seek to approach the topic not just in a purely quantitative way, but rather in a quantitatively rigorous way that is built from & reflects the fundamental foundations of finance as a whole.