Category: research blog
-
A trendline-drawing algorithm
We have all seen and tried drawing some trendlines on the charts. Wedges, channels, support, resistance, you name it. But how do we draw them algorithmically? I will demonstrate here using Python software. I have came upon an interesting way to draw them, that is also relatively computationally fast, even without any optimization. First, let’s…
-
Exploring Position Sizing: The Trailing Kelly Criterion
Abstract: The conventional wisdom of employing a fixed percentage position size, ex. 2% of one’s portfolio, in trading, might not be the most effective strategy for optimal returns. This article looks into the potential benefits of utilizing the Kelly Criterion as a dynamic position-sizing mechanism to optimize leverage in real-time based on trailing performance. Kelly…
-
Expected Trade with Random Forest
A dark, deep forest in the middle of nowhere. Maybe Siberia? Full of bears, wolves and randomness. Each tree has its own lifecycle and has different insects chewing them branches. What does that have to do with the risk management? We will get to it. To start, I would like to ask a question- how…
-
Fundamental Economic Indicators. Any Good? – Testing 33 of the Most Popular Metrics for Linearity
Abstract: This article explores some of the economic indicators available on FRED and their potential relationships with the SPX index. A primary aim is to establish if these indicators possess predictive, coincidental, or lagging power relative to the stock market. A selected basket of 35 indicators, satisfying a criteria such as simplicity of interpretation and…
-
K-Means Algorithm to Detect the Current Market Regime
K-Means is one of the most popular clustering machine learning algorithms out there. It’s the Oyster Perpetual of the Rolex watches – the entry level Rolex watch. Good? Absolutely. Are there any better? You bet. K-means is a machine learning algorithm used for clustering. Given a set of data points, the algorithm aims to partition…
-
Different Random Walk Methods
This article discusses three of the most interesting ways of modelling a random walk. Then we will construct a Monte Carlo simulation and overlay its distribution over the current SPY price. More interestingly, we have computed Monte Carlo on SPY prices from the prior 5 days & put a dot at where we are right…
-
Angry Trader – Rational Trader
There is a significant edge hidden in being the opposite of an angry or a frustrated trader. When people trade with fear, anger or whatever other negative emotion, their PnL ALWAYS goes down. Does not matter the market direction, volatility, drivers, instrument, anything- it always goes down. Every trader knows this. The question is- by…
-
Scaling Positions Exponentially
Compound interest is making riches since the dawn of time. A common problem is the waiting time. It usually takes many years before one start seeing the effects of it, so how do we fasten the process in trading? When trading, the most common approach is to risk 1, 2 or another fixed amount of…
-
Portfolio Construction Theory: Optimization
This is a continuation of the “Portfolio Construction Theory: Risk” article, which is diving into the optimization of a portfolio, called the efficient frontier. This will be done with the help of Python as I am currently not paying for Microsoft Office products, hence no access to Excel Solver. If you are more interested in…
-
Portfolio Construction Theory: Risk
This article will cover some of the major principles and topics when constructing a portfolio of securities. The focus is risk management. Article will cover: Risk I will define risk as losing money. Big risk -> lots of money can be lost. Small risk -> a safe amount of money can be lost. Money can…