Xander S's Senior Project Blog
|
|
Project Title: Timing the Market: Evaluating Mean Reversion and Momentum Algorithmic Trading Strategies BASIS Advisor: Fatima Mrabet Internship Location: Independent Project Onsite Mentor: |
Project Abstract
Is technical trading legit? The use of statistical indicators to generate buy and sell signals in the stock market has long been debated. Some consider it pseudoscience and impractical; others view it as a tried-and-true probabilistic approach to exploiting patterns. What’s not debated is the rise of algorithmic trading, which now accounts for roughly 70% of U.S. equity trading volume. Large firms have made billions through their algorithms, yet the mechanics behind them remain proprietary. This leaves the rest of us guessing. With real-world implications for both individual and institutional investors, my study aimed to provide insights into the legitimacy of indicator-based algorithmic trading and identify opportunities for strategy optimization. Using Python, I built a backtesting engine capable of running thousands of strategies across varying time frames, market conditions, and market capitalizations. Each strategy-condition combination was evaluated using a wide range of performance metrics and regression analysis. Finally, I incorporated machine learning to construct an optimized "mega-strategy" based on the highest-performing combinations and implemented it in live trading scenarios. My research narrows the gap between institutional dominance and everyday traders by showing what actually works in different trading scenarios.
Week 10: The Final Algorithm
I began this project with the simple goal of comparing how mean reversion and momentum technical trading strategies performed across different market contexts. After completing my research, I am now able to make useful and insightful conclusions regarding my topic, which I’ll detail during my Senior Project presentation next week. Right now, I’ll discuss the... Read More
Week 9: Overview
I will use this week's blog as an opportunity to provide a higher-level overview of my project. The goal of my research was to (1) asses the validity of two overarching theories within the world of technical trading (mean reversion and momentum), and (2) use my findings to fine-tune a trading algorithm that I could... Read More
Week 8: X-Value
I spent this week formulating and validating a composite rating system to evaluate the performance of the backtested strategy-context triple combinations. I have named it the "X-Value," and it is designed to aggregate and normalize a variety of performance metrics into one, easily comprehensible score. Most people assume the return of a strategy is enough... Read More
Week 7: Statistical Significance
I’ve spent the past week continuously adding strategies to my backtester and deciding how I will test my results for statistical significance. This is important as it will help filter out redundant/underperforming strategies and identify those that truly outperformed. This is key, as it will narrow my base strategy pool and set the foundation for... Read More
Week 6: Streamlining and Scaling
I spent this week making various changes to my approach to this project as I add more and more strategies. Last week, my backtester ran through 4 different long mean reverting Bollinger Bands strategies. This week, it runs through 132 strategies; this includes a mixture of both mean reverting and momentum long, short, and combined... Read More
Week 5: Backtesting
I’ve spent this week coding out the main backtesting engine, downloading historical data, and evaluating the performance of some test strategies. Below are 4 simple Bollinger Bands-based strategies that I ran. My backtesting engine provides trading plots upon request, which makes it easy to visualize strategies. Below is an example: One of... Read More
Week 4: Data Collection and Processing
I’ve spent this week acquiring data, slicing it up, and building the framework for my backtesting engine. This began with requesting historical price data for my selected ETFs from Interactive Brokers. I was able to acquire daily Open, High, Low, Close, and Volume data since: 2005 for the XLG ETF (mega-cap representation) 1993 for the... Read More
Week 3: Performance Evaluation
I’ve spent the week compiling a list of ways I can evaluate the performance of my specific backtesting strategies. Many people assume a simple % profit or loss will tell you everything you need to know, but there are many other metrics that can be used to assess strategy legitimacy. Below is a summary of... Read More
Week 2: Parameters and Definitions
I’ve spent this week determining my variable and fixed conditions and how I define them. I’ve further begun to think about how I will represent these conditions in my backtests. Below is a summary of my current framework for the variable conditions. Market Conditions: **I will be using the S&P 500 index as the representation... Read More
Week 1: Technical Indicators
Before I begin backtesting and evaluating technical strategies, I have to build them—and building strategies requires knowing how to utilize statistical (or technical) indicators. Although there’s a vast selection of indicators used by traders, I’ve spent this week focusing on the more commonly used momentum and mean reversion-based tools. Below is a quick summary of... Read More
Week 0: Intro
Welcome to my senior project! My name is Xander, and I’m a stock market enthusiast. Ever since the age of ten, I’ve actively traded public equities in both paper and live accounts, trying to figure out what strategies maximized my returns. As I learned to code, my curiosity shifted toward algorithmic trading—the use of automated... Read More
