Developed in Python with Databento, Polygon, and MongoDB.
A big thank you to Databento for their data sponsorship which made this project possible. I highly recommend their API.
For any questions, criticisms, or tips for improvement, please email me at [email protected].
Stocks that experience significant and sudden drops are likely to continue their decline briefly before reverting to their mean value.
The strategy involves analyzing the top 3000 US Equities by liquidity or market capitalization, identifying those that experienced the fastest 10% drop within a rolling 60-day window.
For each qualifying stock, a weight is calculated based on the number of days elapsed since the fastest drop, using the arctan function to scale the weight between 0 and
To ensure market neutrality and create initial short positions:
- Initial weights are adjusted by subtracting their mean, centering the distribution around zero.
- Stocks with more recent drops (weights less than the mean) become negative, representing larger short positions, while those representing older drops are kept long.
Weights are capped at 4.9% and normalized to ensure the portfolio's total weight sums to 1, complying with the CQA challenge guidelines.
If you're looking for a market edge, I must disappoint. Over the short backtesting window, this strategy did not show promising profitability. The reasons could be:
- A flaw in the hypothesis
- A mistake in the strategy logic code
- A mistake in the backtest
Algorithmic development often involves difficult decisions and assumptions. Despite the lack of profitability, the educational experience gained was invaluable.