I’ve worked as a university researcher, data scientist, full stack engineer, data engineer, analytics engineer and quant developer. I started Open Source Quant to share the things that I learn while I manage my own money.
Fractional Brownian motion is a stochastic process that can model mean reversion. Predicting future values turns out to be a simple linear model. This model has significant predictive power when applied to currencies.
The square root of your portfolio’s covariance matrix gives you a powerful way of understanding where your portfolio variance is coming from. Here I show how to calculate the square root and provide an interactive example to explore how it works.
Rather than recalculating a least–squares model on each new data point, you can simply update the fitted coefficients. This saves you computational time and allows you to place greater emphasis on recent data.
Poorly monitoring your trading strategy means you are missing mistakes and leaving money on the table. By converting your bot’s logs from plain text to JSON you can create a near real time monitoring system and never miss a beat.
Using the Ornstein–Uhlenbeck process, you can calculate the expected spread between bond yields of different maturities. These expected values can then be used to estimated the expected value of treasury ETF spreads.
Bond returns are a function of yields. Calculating the expected value of this function is quite difficult. You can take a Taylor expansion to make calculating the mean and variance of returns much easier.
The return of a bond ETF can be estimated from bond yields. The distribution of a bond ETF’s returns turns out to be a function of the interest rate, expected change and variance of the interest rate. Bond returns are skewed depending on the interest rate’s level.
How can you measure performance when investing? You might think you can simply measure how much money you make. However, this can lead to losing a large portion of your capital. I want to show you why that can happen and how I measure my own investment performance.
Support vector regression models transform input vectors into a high number of dimensions where the regression problem becomes linear. This new space is defined by a kernel function. A major drawback of these models is that they are slow to fit the kernel parameters. Here I develop an algorithm to quickly fit the Gaussian kernel’s bandwidth parameter. This algorithm is fast, robust on some datasets, and has a similar fit to slower and more exhaustive methods.
I created two algorithms that quickly optimise the bandwidth parameter for a Gaussian kernel. These algorithms only operate on the independent variables of a modelling task. This means they can be used regardless of the chosen kernel machine model and modelling task.