An Introduction to the Median

Reprinted from Jianlin Su’s article “An Introduction to the Median“. The annotations in this post were added by me.

I recently revisited the concept of the median, so I decided to write down the key points while they are still fresh.

When removing or clipping outliers, we often need a “baseline.” For example, for a batch of nonnegative data, we may regard any value greater than 50 times the baseline as an outlier. So how should that baseline be chosen? A common choice is the mean, but the mean is easily pulled away by outliers. As a result, using it as the baseline may bias us toward those outliers and cause some problematic results to be missed. In such cases, the median can be a better baseline.

Read more
10,000x Faster: The Ultimate High-Performance Normal Integration Solution, with Code

10,000x Faster: The Ultimate High-Performance Normal Integration Solution, with Code

In derivatives pricing and large-scale risk backtesting, where every millisecond matters, traditional normal-distribution integration often becomes both ugly code and a performance bottleneck. This article introduces a fully vectorized numerical algorithm that lets you exploit the parallelism of modern CPUs, GPUs, and even TPUs to break through that bottleneck.

Read more
From Chatterjee's Correlation to Tau-Star: Completeness and Power in Independence Testing

From Chatterjee's Correlation to Tau-Star: Completeness and Power in Independence Testing

In the earlier article Three Measures for Sequence Correlation, I introduced Chatterjee’s correlation coefficient, which can detect nonlinear and non-monotonic associations between variables. Its form is simple, computation is fast, and it is especially suitable for screening input features for nonlinear machine learning models. New research, however, shows that its detection efficiency is inadequate for some non-functional dependence structures. This article first reviews and expands on the concrete mechanics and key properties of Chatterjee’s \(\xi\). It then introduces an alternative: the equally consistent, distribution-free independence test statistic \(\tau^*\).

Read more

A Bayesian-Inference Method for Measuring Box Office Outperformance

The film industry is a market with exceptionally high uncertainty, and box office performance directly affects both the financial condition and market valuation of production companies. The degree of box office outperformance is a key indicator of how well a movie is received by the market and an important variable in evaluating film-company performance. Traditional box office forecasting methods, however, often rely on static point-estimate models. They struggle to capture the dynamic evolution of box office revenue over time, and they are even less capable of quantifying how far box office results exceed market expectations and with what level of uncertainty. As a result, they are difficult to convert into actionable investment strategies.

Read more
Learning to Rank in Brief: From RankNet to LambdaMART

Learning to Rank in Brief: From RankNet to LambdaMART

This article gives a concise introduction to the background, taxonomy, and evaluation metrics of learning to rank, then reviews several classic algorithms from its development history. The goal is not to cover every technical detail, but to build an intuitive understanding of the core concepts behind ranking, as preparation for practical LTR applications in different scenarios.

Read more

Shaputa: A Feature Selection Method That Combines SHAP and Boruta

Shaputa is a hybrid feature selection technique that combines SHAP (SHapley Additive exPlanations) with Boruta’s shadow-feature mechanism. By constructing a random baseline for every feature and comparing it with model-derived SHAP importance, Shaputa produces more robust and structure-aware feature selection results in high-dimensional, complex datasets. It is especially useful in nonlinear settings where traditional methods often struggle.

Read more
Trends in Large Language Models and Their Applications in Quantitative Investing

Trends in Large Language Models and Their Applications in Quantitative Investing

Large language models have become the hottest and fastest-moving frontier in computing since ChatGPT burst onto the scene at the end of 2022. LLMs have gradually shed the role of mere tools and become independent carriers of intelligence that can handle tasks on their own. In 2024, hundred-billion-parameter models such as Qwen2 and Llama3.1 were released one after another, and the performance of open-source models has moved steadily closer to that of closed-source systems. For quantitative researchers, a necessary question is how to combine LLM technology with financial applications to improve research and investment. This article first draws on Li Mu’s talk to discuss LLM trends and best practices, and then reviews specific application scenarios for LLMs in quantitative investing.

Read more
SHAP: The Theoretically Optimal Machine Learning Explanation Algorithm

SHAP: The Theoretically Optimal Machine Learning Explanation Algorithm

SHAP (SHapley Additive exPlanations) is a game-theoretic, model-agnostic approach to machine learning interpretability. It can quantify each feature’s contribution to a single prediction while also aggregating local explanations into a global view of the model. SHAP has strong theoretical guarantees and, thanks to substantial engineering optimization, is also practical in real-world workflows. This article introduces the core theory behind SHAP and shows several example visualizations.

Read more
Houyi Project Technical Report - How to Win an Intelligent War in Apex Legends

Houyi Project Technical Report - How to Win an Intelligent War in Apex Legends

HOUYI is positioned as a general-purpose aiming assistant for electronic shooting games. It currently supports Apex Legends, abbreviated below as apex. Its runtime framework is a two-stage pipeline of detection and tracking: first, object detection is used to identify enemies on the screen, and then the crosshair position is computed and corrected automatically. The mission of HOUYI is to use computer technology to resist the alienation imposed by electronic shooting games.

Read more