A Data-Driven Approach to Reviewing an A-Share Trading Day
Learn how to review a trading day in China’s A-share market using price–volume analysis, market breadth, sector performance, and portfolio attribution. This developer-oriented workflow turns subjective market impressions into structured findings and testable trading rules, while highlighting common evaluation pitfalls.
A Data-Driven Approach to Reviewing an A-Share Trading Day
“How was the market today?” often produces answers based on personal impressions. For a developer, a more useful approach is to treat the question as a data analysis problem: daily market data goes in, and structured conclusions come out.
Using a typical trading day in China’s A-share market—when the index closes slightly higher on declining volume, but trading conditions feel difficult—this article walks through a data-driven review process.
1. Why Use a Data-Driven Review?
Subjective trading reviews have three common weaknesses:
- Sample bias: Investors tend to remember how their own holdings performed rather than how the broader market behaved.
- Unclear attribution: “It felt like a good day” does not distinguish broad market strength from a successful bet on a particular sector.
- Lack of reproducibility: Without quantitative measures, it is difficult to decide whether similar conditions justify the same actions next time.
A data-driven review addresses these problems through market-wide breadth statistics, portfolio performance attribution, and rule-based trading signals.
2. Step One: Validate Index Price and Volume
Descriptions such as “the index barely closed higher,” “volume contracted sharply,” and “resistance near 4,100 was substantial” can be translated into measurable indicators.
Price–Volume Divergence
When an index rises while trading volume declines, it can indicate limited buying strength and weak willingness to chase higher prices. A volume ratio makes this relationship measurable:
def volume_ratio(today_volume, avg_volume_5d):return today_volume / avg_volume_5d# Volume ratio < 0.8 and a positive index close =># Questionable strength behind the rise; watch for a false breakout.
This is a warning signal, not a trend conclusion on its own.
Quantifying a Key Resistance Level
Resistance around a level such as 4,100 can be examined by identifying concentrations of trading activity near that level over the previous N sessions.
These high-activity price zones may contain investors waiting to exit positions bought earlier, potentially increasing selling pressure as the index approaches them. A simple implementation groups turnover from the past 60 trading days into price buckets to identify concentrations.
Comparing Other Markets
A statement such as “the market underperformed Japanese and South Korean equities” requires attention to comparability.
Markets differ in index composition and price-limit rules, so comparing raw percentage changes has limited explanatory value. Risk-adjusted returns or each index’s deviation from its own moving average provide more useful perspectives.
3. Step Two: Examine Market Breadth and Sector Structure
A positive index close can conceal substantial divergence among individual stocks. A data-driven review should track:
- The number of advancing stocks relative to declining stocks.
- The number of stocks gaining more than 5%, as an indicator of the strength of gains across the market.
- Industry sectors ranked by net capital inflows.
The following simplified calculation provides an advance–decline ratio and a count of strong performers:
def market_breadth(quotes):up = sum(1 for q in quotes if q.change_pct > 0)down = len(quotes) - upstrong = sum(1 for q in quotes if q.change_pct > 5)return {"up_down_ratio": up / down, "strong_count": strong}
When the advance–decline ratio is well below 1 but the index still closes higher, heavily weighted stocks may be supporting the index while smaller stocks decline broadly.
This kind of narrowly supported gain offers limited guidance for many portfolios. It can also explain why a session feels difficult despite a positive headline index return.
4. Step Three: Attribute Portfolio Performance
Reducing positions in a communications stock and a medical aesthetics stock, while other holdings produce a mixture of losses and substantial gains, provides useful material for attribution analysis.
The central question is: Did returns come from timing, stock selection, or luck?
A simple framework separates three dimensions:
| Dimension | Question | Quantitative measure |
|---|---|---|
| Timing contribution | How did the entry point compare with subsequent performance? | Relative return over N days after purchase |
| Stock-selection contribution | Did the stock outperform its sector? | Stock return minus sector average return |
| Position-sizing contribution | Did strong performers have sufficient portfolio weight? | Each holding’s contribution = return × weight |
def attribution(positions, sector_mean):for p in positions:alpha = p.return_pct - sector_mean[p.sector]contrib = p.return_pct * p.weightprint(p.name, "alpha=", round(alpha, 2), "contrib=", round(contrib, 2))
Here, alpha represents the stock’s return relative to its sector average, while contrib captures its weighted contribution to portfolio performance.
A belief such as “I only buy stocks I can hold through a decline until they recover” can also be translated into analytical terms: the investor is looking for holdings with strong drawdown recovery characteristics.
One way to summarize this is the product of maximum drawdown depth and the number of days required to recover. A preference for defensive characteristics, such as low valuations and high dividends, reflects an attempt to favor greater stability over volatile upside.
5. Step Four: Turn Market Intuition into Rules
The purpose of a trading review is not merely to judge the day. It is to improve the trading system.
Maintain a simple signal log with three components:
- Entry rationale: Record whether the trade is based on valuation, a market theme, or capital flows, and label the category.
- Predefined exit conditions: Write down the target price, stop-loss level, and conditions that would invalidate the thesis before opening the position.
- Post-trade evaluation: Review the win rate and average profit-to-loss ratio for each category of trading rationale every week.
Once enough observations have accumulated, statistics can help determine which strategies to retain or retire.
For example, a strategy category with a win rate below 40% across 20 consecutive trades should prompt a reassessment before continuing to allocate heavily to it. The review should consider this alongside the profit-to-loss ratio rather than treating intuition as sufficient justification.
6. Common Pitfalls
Overfitting a Single Session
One day of rising prices on declining volume does not establish a trend. Examine at least 5–10 sessions of price and volume together.
Confusing Luck with Skill
Short-term gains may simply reflect exposure to a rising market—market beta. Evaluate returns relative to a benchmark to assess excess performance.
Ignoring Trading Costs and Slippage
Frequent swing trading can lose a meaningful share of its returns to fees and market impact. Include these costs in backtests.
Reviewing Only the Winners
Sharing or reviewing profitable trades while leaving out losses creates survivorship bias. An incomplete trade history can seriously distort strategy evaluation.
7. Conclusion
Turning “How was the market today?” into a data analysis question produces a more reliable review.
Start by checking whether price and volume support the index’s gain. Then use market breadth to uncover the underlying structure, apply attribution to separate timing and stock-selection contributions, and convert observations into testable rules.
The goal is not to predict tomorrow. It is to improve the decision-making system incrementally—a process closely related to code review and continuous refactoring in software engineering.
