VWAP-Based Trading Strategy
This project explores a trading strategy built on the Volume-Weighted Average Price (VWAP), a commonly used benchmark in algorithmic trading that captures both price and volume dynamics.
I used a 30-day rolling VWAP and combined it with a 20-day Exponential Moving Average (EMA) to identify entry and exit signals in trending markets. The idea was simple: Buy when price showed strength above both VWAP and EMA, exit when momentum faded.
Objective
Evaluate how well a VWAP-EMA strategy performs across different market types—trending vs. range-bound, equity vs. index—using real market data and straightforward execution logic.
Methodology
Instruments Analyzed:
NIFTY 50 (India)
DAX (Germany)
AAPL (Apple Inc.)
EOG Resources (Energy sector)
Data Source
2 years of historical daily data from Yahoo Finance.
Strategy Logic
Buy: Close price > VWAP and EMA, no active long.
Sell: Close price < EMA, with an active position.
Unidirectional Trading: No simultaneous long/short.
Tools
MATLAB (for data handling, signal generation, backtesting)
Basic P&L tracking based on price differences
Results
The strategy worked best in trending markets, where clean directional movement aligned with the signal logic. Here’s a snapshot:
Despite lower win rates, especially in range-bound environments, the average size of winning trades outweighed losers in most cases. The system particularly struggled with EOG, a highly cyclical stock, underscoring the limitations of VWAP in choppy conditions.