behavioral-finance
What it does
This skill links psychology-based market theories to measurable signals. It is for investors and analysts who want to understand why momentum or reversal patterns appear and how to test them.
When to use it
- ✓When you want to explain why momentum or reversal effects appear in a market.
- ✓When you want to build a contrarian signal based on extreme market sentiment.
- ✓When you want to apply debiasing rules to a quantitative strategy.
Skill link
https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/behavioral-finance/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Explain why stocks with strong earnings surprises keep rising for a while, and suggest a testable signal for it.”
5 new skills a week. 1 minute to read.
How it works
The agent explains the bias behind the pattern, such as slow reaction to new information or extrapolating recent trends. It then proposes a signal that can be measured and tested on historical data, along with the risk controls to apply.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Behavioral Finance Applications
Overview
Translate behavioral-finance theory into quantifiable trading signals and risk-control rules. Core assumption: market participants systematically deviate from rational decision-making, and these biases can be predicted and exploited.
Applicable scenarios:
- Behavioral interpretation and parameter optimization for momentum / reversal strategies
- Contrarian signals when market sentiment becomes extreme
- Debiasing mechanisms in portfolio construction
- Capturing behavior patterns specific to retail-driven China A-share markets
Core Concepts
Overreaction and Underreaction
Underreaction → momentum effect:
Mechanism: anchoring bias + conservatism
Investors anchor on old information and update insufficiently to new information
After an earnings beat, the stock price digests it gradually rather than all at once
China A-share evidence:
- Earnings-guidance beats still produce 3-5% excess return over the following 20 days
- After analyst rating upgrades, momentum often persists for 1-3 months
Quant signal:
SUE (standardized unexpected earnings) > 2σ -> buy and hold for 60 days
Top 10% 20-day return -> continue holding for 20 days (China A-share momentum cycles are shorter)
Overreaction → reversal effect:
Mechanism: representativeness heuristic + availability bias
Investors extrapolate recent trends too aggressively and ignore mean reversion
Panic / euphoria drives reactions beyond what fundamentals support
China A-share evidence:
- Rebounds after consecutive limit-downs (after 3 limit-downs, the average 20-day rebound is 8%)
- Big annual losers often earn 5-10% excess return the next year
Quant signal:
Bottom 10% of 250-day return -> buy and hold for 250 days
RSI(5) < 10 -> short-term rebound signal (5-10 days)
Key distinction:
| Dimension | Underreaction (Momentum) | Overreaction (Reversal) |
|---|---|---|
| Time scale | 1-12 months | <1 week or >12 months |
| Information type | Clear events (earnings / announcements) | Ambiguous information (sentiment / trend) |
| Best China A-share window | 20-60 days | 5-10 days (short term) / 1 year (long term) |
Cognitive Bias Checklist
Individual decision biases:
| Bias | Manifestation | Quant Detection | Debiasing Strategy |
|---|---|---|---|
| Loss aversion | Hold losing stocks, sell winners too early | Holding period: losing positions > winning positions by 2-3x | Pre-set stop-loss line and execute mechanically |
| Overconfidence | Overtrading, concentrated positions | Monthly turnover > 100%, single-stock weight > 30% | Limit the number of trades per month |
| Anchoring effect | Anchoring to entry price / historical highs | Abnormal volume expansion near the entry price | Use relative valuation instead of absolute price |
| Confirmation bias | Focus only on information that supports the existing view | Single-source information, ignoring bearish news | Force reading the opposing view |
| Recency bias | Overweight recent events | Recent gains/losses have too much influence on position size | Lengthen the evaluation window (≥60 days) |
| Framing effect | Same information framed differently leads to different decisions | Decision differences between return format and absolute-PnL format | Evaluate consistently in return space |
Group behavior biases:
| Bias | Manifestation | China A-share Characteristics | Quant Indicator |
|---|---|---|---|
| Herding | Chasing rallies and panic-selling together | Extremely fast sector rotation (3-5 days) | Intra-sector stock correlation > 0.8 |
| Information cascades | Ignoring private information and following public signals | Sector follow-through after a leader stock hits limit-up | Sector return on the day after leader-stock limit-up |
| Attention effect | Buying stocks that attract attention | Explosive turnover in limit-up / news-driven stocks | Abnormal turnover > 3x average |
Investor Sentiment Cycle
Fear -> Caution -> Optimism -> Excitement -> Euphoria -> Denial -> Panic -> Fear
| | | | | | |
Bottom Recovery Mid-uptrend Pre-top Top Early selloff Pre-bottom
Quant sentiment indicators:
1. Closed-end fund discount: discount > 15% -> extreme fear -> buy signal
2. Margin-financing growth: monthly growth > 20% -> euphoria -> reduce position
3. New account openings: weekly openings
FAQ
Does this guarantee profits?
No. It turns theories into testable signals, and results must be checked on historical and out-of-sample data.
What is the difference between overreaction and underreaction?
Underreaction is slow to take in news and suggests momentum, while overreaction goes too far and suggests reversal.
Does it cover China's market?
Yes. It includes notes on behavior patterns common in retail-driven China A-share markets.
Details
Original description by the author
Behavioral finance applications: theories of overreaction and underreaction, behavioral explanations for momentum and reversal, investor sentiment cycles, cognitive-bias checklists, and debiasing quantitative strategies.
repo: HKUDS/Vibe-Trading
Popularity
- GitHub stars
- 37k
- Ranking position
- #7500
- License
- MIT
- Updated
- 11/1/2026
Comments
- …
More skills from this repository
vibe-trading
37kGives your agent a full finance research toolkit, covering backtests, factor analysis, options pricing and market data across many markets.
adr-hshare
37kShows your agent how to compare the price of a Chinese company listed in several markets, such as a US ADR and a Hong Kong share.
akshare
37kLets your agent pull free market data for Chinese and global stocks, futures, forex and economic indicators, with no API key needed.
alpha-zoo
37kLets your agent browse a library of ready-made stock factors and test how well a whole set of them predicts returns on a chosen market.
Similar skills
gitcrawl
394kLets your agent search a saved archive of GitHub issues and pull requests, group duplicates, and check their current status on GitHub.
slacrawl
394kLets your agent search and count messages in a local Slack archive, check how fresh that archive is, and refresh it when needed.
goplaces
394kHelps your agent search for places, get their details and reviews, and resolve place names using Google Places, with JSON output for scripts.