DEV Community

dustin liang profile picture

dustin liang

Building data tools and MCP servers for market-attention research.

Joined Joined on 
pandas pivot "Index contains duplicate entries": 9 Questions Answered on a Long Mentions Table

pandas pivot "Index contains duplicate entries": 9 Questions Answered on a Long Mentions Table

Comments
8 min read
pandas pct_change Pitfalls: 6 Ways Percent Change Lies to You on Grouped and Gappy Data

pandas pct_change Pitfalls: 6 Ways Percent Change Lies to You on Grouped and Gappy Data

Comments
4 min read
ADF vs KPSS Test in Python: Five Known Series and 5,400 Simulations Compared

ADF vs KPSS Test in Python: Five Known Series and 5,400 Simulations Compared

Comments
7 min read
pandas crosstab normalize: Row, Column and Total Percentages (Plus the margins, NaN and Multi-Label Traps)

pandas crosstab normalize: Row, Column and Total Percentages (Plus the margins, NaN and Multi-Label Traps)

Comments
8 min read
sklearn TimeSeriesSplit with gap: Walk-Forward Cross-Validation That Does Not Leak the Future

sklearn TimeSeriesSplit with gap: Walk-Forward Cross-Validation That Does Not Leak the Future

Comments
10 min read
scipy savgol_filter in Python: Choosing window_length and polyorder Without Flattening the Peaks

scipy savgol_filter in Python: Choosing window_length and polyorder Without Flattening the Peaks

Comments
11 min read
pandas Anti Join: Finding Rows in One DataFrame That Are Not in Another (and the Key Bugs That Break It)

pandas Anti Join: Finding Rows in One DataFrame That Are Not in Another (and the Key Bugs That Break It)

Comments
8 min read
pandas CustomBusinessDay with Holidays: Building a Trading-Day Calendar for Daily News and Attention Data

pandas CustomBusinessDay with Holidays: Building a Trading-Day Calendar for Daily News and Attention Data

Comments
8 min read
MultiLabelBinarizer with pandas: One-Hot Encoding Stock Concept Tags for Similarity, Theme Averages and sklearn Pipelines

MultiLabelBinarizer with pandas: One-Hot Encoding Stock Concept Tags for Similarity, Theme Averages and sklearn Pipelines

Comments
9 min read
pandas explode() on a List Column: Turning Stock-to-Concept Tags into a Lookup Table, a Co-occurrence Matrix and Back Again

pandas explode() on a List Column: Turning Stock-to-Concept Tags into a Lookup Table, a Co-occurrence Matrix and Back Again

Comments
7 min read
How to Use pandas resample().ohlc() on Data With a Lunch Break: 30-Minute Bars, Session-Aligned Hourly Bars and Correct Daily Candles

How to Use pandas resample().ohlc() on Data With a Lunch Break: 30-Minute Bars, Session-Aligned Hourly Bars and Correct Daily Candles

Comments
9 min read
SciPy Bootstrap Confidence Intervals: Putting Error Bars on Noisy Stock Sentiment Scores

SciPy Bootstrap Confidence Intervals: Putting Error Bars on Noisy Stock Sentiment Scores

Comments
8 min read
Jaccard Similarity in pandas: Measuring How Much Two Concept-Stock Lists Really Overlap

Jaccard Similarity in pandas: Measuring How Much Two Concept-Stock Lists Really Overlap

Comments
7 min read
CUSUM Change Detection in Python: Catching Persistent Shifts in Daily Stock News Attention

CUSUM Change Detection in Python: Catching Persistent Shifts in Daily Stock News Attention

Comments
8 min read
pandas ewm with halflife and times: Smoothing Irregular Stock Sentiment Snippets Without Hidden Lag

pandas ewm with halflife and times: Smoothing Irregular Stock Sentiment Snippets Without Hidden Lag

Comments
8 min read
Rolling Percentile Spike Detection for Stock News Attention: A pandas Walkthrough

Rolling Percentile Spike Detection for Stock News Attention: A pandas Walkthrough

Comments
8 min read
MCP Tool Schema Design for Stock Market Data: Names, Constraints, Provenance and Errors

MCP Tool Schema Design for Stock Market Data: Names, Constraints, Provenance and Errors

Comments
8 min read
Sector Heat Rolling Window Comparison: Unit-Testing AI Theme Heat from 1h to 3d

Sector Heat Rolling Window Comparison: Unit-Testing AI Theme Heat from 1h to 3d

Comments
6 min read
Building a Stock Sentiment Monitoring Pipeline: Hourly Watch, Triggered Drill-Down and a Daily Coverage Log

Building a Stock Sentiment Monitoring Pipeline: Hourly Watch, Triggered Drill-Down and a Daily Coverage Log

Comments
5 min read
How to Read Sector Heat: Mentions, Agencies, Windows and Persistence in A-Share Theme Data

How to Read Sector Heat: Mentions, Agencies, Windows and Persistence in A-Share Theme Data

Comments
6 min read
Sector Heat Rolling Window Comparison: Unit-Testing AI Theme Heat from 1h to 3d

Sector Heat Rolling Window Comparison: Unit-Testing AI Theme Heat from 1h to 3d

Comments
6 min read
Old Label or New Narrative? Scoring Stock Concept Tag Freshness with First and Last Mention Times

Old Label or New Narrative? Scoring Stock Concept Tag Freshness with First and Last Mention Times

Comments
6 min read
Stock News Timeline in Python: Merging Hourly Heat, Opinion Summaries and Media Hits into One Event Log (CATL Example)

Stock News Timeline in Python: Merging Hourly Heat, Opinion Summaries and Media Hits into One Event Log (CATL Example)

1
Comments
6 min read
The Lookback Window Problem in Concept-to-Stock Mention Rankings: Getting the days Parameter Right

The Lookback Window Problem in Concept-to-Stock Mention Rankings: Getting the days Parameter Right

Comments
6 min read
How to Compare Stock Heat Across a Basket: Raw Mentions, Group Share, and Self-Relative Z-Scores

How to Compare Stock Heat Across a Basket: Raw Mentions, Group Share, and Self-Relative Z-Scores

Comments
5 min read
Mentions per Agency: A Simple Ratio for Measuring Discussion Concentration in Stock Heat Data

Mentions per Agency: A Simple Ratio for Measuring Discussion Concentration in Stock Heat Data

1
Comments
5 min read
How AI Agents Pull A-Share Heat Data via MCP in About Five Minutes

How AI Agents Pull A-Share Heat Data via MCP in About Five Minutes

Comments
5 min read
loading...