Building a VWAP-to-Close Factor from Recent Daily Prices
Summary
The example constructs price-based stock factors from recent daily observations. For each half-month sampling date, it retrieves a recent window of daily high, open, low, close, and average price data for the stock universe. It calculates three mean log-price ratios: high relative to open, close relative to low, and average price relative to close. The resulting cross-sectional factor values are standardized and stored by sampling date.
The question focuses on whether the average-price field represents the previous day’s average traded price, described as resembling an intraday moving average. The material does not resolve that data-definition question; it only shows the field being requested and used. It supplies code as an illustration but no factor rationale, backtest, return statistics, or risk analysis. Users would need to verify the platform’s field semantics and confirm that the data and sampling conventions match their intended factor before drawing conclusions.
Key ideas
- The example samples stocks at half-month intervals and retrieves a recent window of daily prices.
- It forms log ratios for high-to-open, close-to-low, and average-price-to-close relationships.
- The calculated factor values are standardized and saved for each sampling date.
- The author questions whether the average-price field represents a prior-day average or an intraday average-price measure.
- No backtest or evidence of predictive value is provided, and the field definition remains unresolved.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.