R

Rethinking Likelihood

I recently finished reading Statistical Rethinking by Richard McElreath. The reviews are true, it’s a great book. As a bonus, it comes with 20 hours of supporting lectures taking you through the content. Statistical Rethinking is an introduction to statistical modelling using Bayesian methods. Bayesian methods seem pretty popular at the moment, so whats the deal? To distill it into a couple of lines, Bayesian methods provide a distribution for model parameters and allow for incorporation of prior knowledge.

Analysing Momentum

This post is going to analyse the momentum effect in US stocks using both publicly available aggregate data, and privately collected individual stock level data. The momentum effect is the tendency for stocks that have gone up (down) in the past to continue going up (down) in the immediate future. Going up or down in the past is usually defined as the prior 12 months returns and is measured on a relative basis.

Intra portfolio correlation

This is a quick post about intra-portfolio correlation. Intra-portfolio correlation (“IPC”) is defined as a weighted average for all unique pairwise correlations within a portfolio. It has typically been used to measure a portfolio’s diversification. That’s not what I’m interested in however. I’m looking at IPC as a potential technical trading indicator. The idea being that an increase or decrease in the co-movement of a group of stocks (or the market as a whole for that matter) may say something about their future returns.

IFRS9 disclosures (part 3)

We continue on our IFRS9 disclosures quest! Part 2 had us doing some heavy data munging, followed by modeling to estimate an ECL balance. In this post we will massage the dataset from part 2 and prepare the report we specified in the first post. This report sets out an opening to closing balance of the loan and expected credit loss balances, and also details transfers between risk stages.

Nested time series data frames

Data leakage can be tricky when analysing time series. Ensuring you are not using the future to predict the future is very important if you want to use the past to predict the future! After all, you don’t get to use future data when you are in the present! These earthquake researchers have been accused of mixing things up. Let’s say we want to apply a machine learning algorithm that requires hyper-parameter tuning, and hence a validation data set, to a time series.

IFRS9 disclosures (part 2)

This post is a continuation of the series initiated here. Recall our problem imagines we are a bank lending to the largest 1,000 US companies. We (“Bank1000”) own the debt of these companies and are required to prepare IFRS9 disclosures. This requires the estimation of an expected credit loss (“ECL”) and risk stage. We have already selected the top 1,000 stocks for analysis, we now need to create an ECL balance and assign a risk stage.

IFRS9 disclosures (part 1)

This series of posts will deal with the preparation of International Financial Reporting Standard 9 - Financial Instruments (“IFRS9”) disclosures for a bank. In particular, the reconciliation tables that are required to account for movements in loan balances and expected credit losses over a reporting period. This is a somewhat arcane topic. Why do we want to do this? IFRS9 is a relatively new accounting standard and the reconciliation tables disclose a flow of loan balances over time, accounting for draw downs, repayments and other cash flows.