Predict Stock Returns from Sentiment and Market Data
Company: Gsa
Role: Data Scientist
Category: Machine Learning
Difficulty: hard
Interview Round: Technical Screen
You have observations containing timestamp, stock identifier or index membership, sentiment score, relevance score, and stock prices. Design a model to predict a future stock return over a specified horizon.
Explain target construction, point-in-time feature generation, model baselines, time-based validation, and how sentiment relevance should affect the design. The answer should distinguish statistical prediction from a profitable trading decision.
### Constraints & Assumptions
- News or sentiment records may arrive after their event time.
- Multiple records can refer to the same stock and story.
- Transaction costs and turnover matter in evaluation.
### Clarifying Questions to Ask
- What horizon and return definition are required?
- Is the relevance score calibrated across sources and time?
- Do timestamps represent publication time, ingestion time, or both?
```hint Point-in-time availability is part of every feature
A sentiment value is unusable at decision time if it was ingested later, even when its article has an earlier publication timestamp.
```
### What a Strong Answer Covers
- Leakage-safe labels and joins, deduplication, aggregation windows, and market baselines.
- Chronological evaluation with embargoes or purging when labels overlap.
- Predictive and cost-adjusted metrics, uncertainty, drift, and monitoring.
### Follow-up Questions
- How would you model market-wide sentiment separately from stock-specific sentiment?
- How would delayed sentiment data be backfilled without changing historical training truth?
- What result would convince you not to deploy the model?
Quick Answer: You have observations containing timestamp, stock identifier or index membership, sentiment score, relevance score, and stock prices. Cover data and labels, leakage-safe features, baselines and model choice, offline evaluation, deployment constraints, monitoring, and drift.