Back to Projects
Trading StrategyIn Progress

WRDS Revision Factor Model

A portfolio allocation and trading strategy based on analyst price target revisions as momentum indicators.

Hero Summary

What

A production-grade backtesting engine built from scratch to overcome limitations of existing frameworks. Supports multiple timeframes, custom indicators, and realistic order execution modeling including slippage and commissions.

Why

Framework allows testing any strategy with custom entry/exit logic. Supports limit orders, stop orders, trailing stops, and complex order types. Position sizing can be fixed, percentage-based, or Kelly Criterion. Walk-forward optimization prevents look-ahead bias.

Result

annual Return

TBC

accuracy

TBC

factors

8

data

20+ years

System Overview

How It Works

Framework allows testing any strategy with custom entry/exit logic. Supports limit orders, stop orders, trailing stops, and complex order types. Position sizing can be fixed, percentage-based, or Kelly Criterion. Walk-forward optimization prevents look-ahead bias.

Technologies Used

PythonNumPyPandasPostgreSQL

Technical Implementation

Core engine written in Cython for performance optimization. Uses PostgreSQL for tick data storage with efficient time-series queries. Docker containerization ensures reproducible backtest environments. Pandas DataFrames for indicator calculations with vectorized operations where possible.

Limitations & Failure Modes

Every strategy has weaknesses. Here are the known limitations and scenarios where this system struggles.

⚠

Handling tick-level data efficiently

⚠

Preventing look-ahead bias in indicator calculations

⚠

Modeling realistic order execution and market impact

Key Learnings

Pre-optimization is crucial - spent weeks optimizing data structures before writing strategy logic. Learned the importance of proper timestamp handling across different exchanges and time zones. Also discovered that realistic execution modeling is more important than having perfect entry signals.

Future Improvements

Planned enhancements and next steps for this project.

→

Add GPU acceleration for parameter optimization

→

Implement distributed backtesting across multiple servers

→

Create web UI for strategy building without coding

→

Add support for options and futures strategies

Quick Info

Category

Trading Strategy

Status

In Progress

Tech Stack

PythonNumPyPandasPostgreSQL