QQuant, Built

Act IV · Return Premia (P)

Part 29 of 43

Alpha Mining and Automated Research

Master'sstarts at this level57 min of film 17 chaptersprerequisites: Part 26, Part 27

If a machine can try ten thousand formulas a minute, is research finished, or has overfitting been automated?

A formulaic alpha is a small program: rank this, difference that, correlate over twenty days. The space of such programs is astronomically large, and the part searches it three ways, at random, by genetic programming and by reinforcement learning, and then lets a language-model agent propose and revise formulas. Every search is run against the trial counter. The winner's curse is measured directly: the best formula in sample, out of sample. Combining many weak alphas helps only until the weights themselves become the thing being overfitted. China's quant industry, and the fund that produced DeepSeek, are the industry file.

What you need. Parts 26 and 27.

What you will be able to do

Undergraduate

  • Explain what a formulaic alpha and an information coefficient are.
  • Explain the winner's curse of a search.

Master's

  • Implement random search and genetic programming over expression trees and score candidates by IC on held-out days.
  • Combine alphas with shrinkage and measure the combination out of sample.

PhD

  • Derive how many alphas can be combined: the out-of-sample Sharpe ratio of plug-in weights as the number of signals grows with the sample.

Industry

  • Describe an alpha factory: submission, correlation limits, decay monitoring, capacity.

Contents

Each chapter has a home level. Choose a track to see what to read and watch: Undergraduate 14 min · Master's 47 min · PhD 57 min · Industry 27 min.

  1. 0Ten thousand formulasUndergraduate3 min
  2. 1Formulaic alphasUndergraduate4 min
  3. 2The search spaceMaster's2 min
  4. 3Random search and the winner's curseUndergraduate3 min
  5. 4Genetic programmingMaster's4 min
  6. 5Reinforcement learning: AlphaGenMaster's4 min
  7. 6LLM research agentsPhD3 min
  8. 7Combining weak alphasMaster's4 min
  9. 8The counter explodesMaster's4 min
  10. 9Decay, crowding and the alpha factoryIndustry4 min
  11. 10China's quant industryIndustry3 min
  12. 11From a quant fund to DeepSeekIndustry2 min
  13. 12What remains for humansIndustry3 min
  14. 13Evaluating a mined combinationMaster's3 min
  15. 14Rule 29: the alpha factoryIndustry2 min
  16. For the researcher: how many alphas can you combine?PhD6 min
  17. Recap, desk questions, problemsAll tracks3 min

Also on this page: Lecture · Key results · Try it · Lab · Problems · Reading · 中文 · Build the film.

Lecture

The text of each chapter is the film's narration, as it is spoken, so you can read along or revise without the film. The pictures are in the film. A dashed box stands for a number the film computes when it is rendered (hover over it to see what is computed); the README's figures for each chapter, where it lists them, follow the chapter's text.

Ten thousand formulasUndergraduate3 min

Alpha mining and automated research: machines that search through formulas for trading signals, write their own research, and test it; what they find; and how easily the search itself fools you.

Here are sixty formulas, drawn at random from a small grammar of prices, volumes and a few operators. Each one is a trading signal: rank the coins by it every day, buy the top, sell the bottom. We drew ten thousand of them, and asked each one how well it would have predicted tomorrow's returns on the coins Binance traded in 2018 and 2019.

Keep the best so far. The more formulas we try, the better the winner looks: by ten thousand, a score of , the kind of number a research note would celebrate. Three questions decide whether it means anything. Is it real, or the luck of the largest search? How many different ideas are hiding among the ten thousand? And how many tries did it take, because the full adaptive search history affects interpretation. This part studies all three, then specifies an evaluation protocol. The sealed strategy result is excluded; no payoff is read or scored.

Where this sits. This is the last part of the series' fourth act, on return premia. Parts twenty-three to twenty-five asked which risks are paid and how many factors are real; Part twenty-six built the tools to test a backtest without fooling yourself; twenty-seven turned machine learning on returns, and twenty-eight turned it on words. This part hands the whole research loop to machines, and asks what is left of those tests when the search itself is automatic.

The idea predates today's language models. John Koza described genetic programming in 1992, and Franklin Allen and Risto Karjalainen studied evolved technical trading rules for the S and P 500 in 1999. WorldQuant's industrial research example and Kakushadze's 2016 formula publication provide further chronology. Since 2023, the cited papers describe reinforcement learning and language models as miners and researchers. AlphaAgent's version 1 cites early 2024 small-cap factor underperformance as motivation. These dates and author reports provide context; attributing a loss to crowding requires positions, flows, funding and a defined comparison.

The plan: a formula grammar, random search, genetic programming and a small reinforcement-learning miner, using their stored ordinary calculations. Then versioned research-agent reports; selected combinations and estimation risk; computational bookkeeping and its limits; decay, possible crowding channels and scoped industry accounts. We separate reports from causal conclusions and keep information, selection and execution assumptions visible. Finally, evaluate what human judgement contributes and specify a protocol with a fixed arithmetic example. Sealed strategy results remain unread and unscored.

The research desk now has a formula grammar, three search mechanisms, combination tools and records of the supplied computations. Those counts are partial bookkeeping. Valid evaluation also needs the full adaptive history, information provenance, dependence assumptions and attainable execution. This part develops those distinctions while leaving sealed strategy results excluded.

1Formulaic alphasUndergraduate4 min

Before a machine can search for signals, a signal has to be something it can write down. What does that look like?

In 2016 Zura Kakushadze published a hundred and one real-life alpha formulas. They use prices, volumes, ranks, correlations and delays. The paper reports average holding periods from about 0.6 to 6.4 days in its original setting. Its average pairwise correlation is about sixteen percent. Low average correlation can help diversification, but does not establish independence, profitable execution or stability on a different market. Our coin examples adapt the inputs rather than exactly replicating the paper.

The language has three kinds of words. Here the fields are daily close, high, low, quote volume in tether, log return, and the typical price: high plus low plus close divided by three. The field named vwap is this typical-price proxy, not a transaction-weighted price. Across assets, rank sorts the finite values. Through time, moving statistics, changes, delays and rolling correlations use each asset's history. Arithmetic combines them. The exact missing-value and tie rules belong to the implementation; a familiar operator name is not proof of identical behaviour to a published formula.

Here is Alpha number twelve as a tree. At the leaves, volume and close. One level up, their changes since yesterday. Then the sign of the volume change, and minus the price change, multiplied together. In words: if volume rose, bet against today's price move; if it fell, bet with it. Every formula is a tree like this, and that is what makes searching over them possible: trees can be grown, cut and spliced.

A formula is not yet an executable trade. This original calculation forms the signal and eligibility using day t's close and inclusive volume, then marks a position from that same close. Treat that price as an idealised convention; an attainable backtest needs publication, processing and execution delays. Subtracting the cross-sectional average makes dollar exposures balance. It does not remove market beta, sector exposures or financing risk. The rank book has one dollar long and one short before costs. The original return helper also filters missing future outcomes and renormalises on the remaining assets: an ex-post availability limitation, particularly around exits. A moving average can smooth a signal; this calculation does not use that optional decay. Settings explored in development belong in the search history.

The original reader uses a later frozen public archive, including listed and delisted Binance tether pairs. This broadens coverage but does not establish a survivorship-free, historically investable universe or complete delisting returns. Eligibility uses sixty days since the first finite close and an inclusive twenty-eight-day median quote-volume threshold of 250,000 tether. There were eligible coins at some point in 2018 to 2020, a median of per day. The daily score is an ordinal rank correlation with the following close-to-close log return. Train labels are indexed to 2018 and 2019; validation labels to 2020. The last training interval uses the first 2020 close, and the final 2020 target is missing in this sliced grid. Later public candles are read before these masks. No sealed strategy result is accessed.

Three of the hundred and one, run on coins. Each was built for American stocks a decade ago, and on coins in 2018 and 2019 all three have negative information coefficients: on this market they point the wrong way. In 2020, Alpha forty-one turns to , and Alpha twelve to . A formula's sign and size change from one market and one year to the next. That is the raw material of mining: thousands of weak relations that do not travel well.

Pause and predict. Alpha twelve bets against today's price move when volume rose. What market behaviour would make it work, and what would make it fail?

2The search spaceMaster's2 min

If signals are trees, how many trees are there to search? Count them. A tree of depth one is a single field: six of them. A tree of depth d is a field, or an operator applied to smaller trees: one argument, or a time-series operator with one of four windows, or two arguments. The two-argument term squares the previous count, so the number of trees grows doubly exponentially with depth.

The numbers. Six formulas of depth one; of depth two; about million of depth three; about times ten to the of depth four. Depth six gives around ten to the . No computer will ever evaluate them all. So search has to be guided: random, evolutionary, learned, or written by a language model. And every formula it evaluates is a trial, which Part twenty-six taught us to count.

This is Koza's grow idea implemented locally. Unless the depth limit forces a leaf, stop with probability three in ten and choose one of six fields. Otherwise, the conditional operator probabilities are twenty-five percent unary, thirty-five percent time-series, ten percent rolling correlation and thirty percent arithmetic. Time windows are chosen from three, five, ten and twenty days. These probabilities define a search prior; they do not sample formula strings uniformly, and repeated draws are common.

The nominal space contains repetition. Of ten thousand draws, strings are distinct, and draws are single fields. Strictly increasing transformations preserve rankings on a shared finite sample; x over y and minus y over x illustrate this when both inputs are positive. Zeros, signs, missingness and the stable ordinal tie rules need separate care. We count different mean training scores after rounding to five decimals. Equal rounded means can come from different signal vectors, and different strings can be strongly related. None of these counts is an estimate of independent trials.

Pause and predict. A million machines each evaluate a hundred formulas a second. How long to try every formula of depth five?

3Random search and the winner's curseUndergraduate3 min

The simplest miner draws formulas at random and keeps the best. How good does the best of ten thousand look, and how good is it?

We drew formulas at random, up to depth four, and scored each by its mean daily information coefficient on 2018 and 2019. The training score chooses the trading sign. Read the actual leading expressions: the winner smooths a recent minimum of typical price divided by the high. Several other entries repeat typical price divided by the low, directly or after ranking. These are related price-range expressions, but they are not all the same formula or necessarily identical signal vectors. Repeated strings and related syntax do not count independent ideas.

Before the winners, compare two chosen designs. Fresh independent normal numbers are assigned to each coin and day a few hundred times on the same grid. Their median absolute mean score is . The training-signed random formulas have median , about times that benchmark. The grammar, missingness, repeated formulas and rank conventions differ from this noise design. This is descriptive evidence for the supplied archive and grammar, not a universal null test or a guarantee of tradable predictability.

Does the training score carry to the next labelled year? Each dot uses a formula's 2018-2019 mean score horizontally and its 2020 mean with the training-selected sign vertically. The formulas share data and many underlying expressions. The cross-formula correlation is , and percent keep a positive sign. These related observations do not supply ten thousand independent confirmations. Narrow ranges and low volatility recur in the formula family, but this comparison does not isolate a causal factor premium, remove the grid's availability limits or establish net trading performance.

Keep the largest training score so far. The winner rises to as ten thousand draws are inspected. A leading independent Gaussian absolute-maximum approximation, using the separately simulated noise spread and two-sided sign choice, gives . This dashed bar is a reference scale, not a calibrated p-value for correlated, adaptive or non-Gaussian formula scores. The corresponding training-selected formula scores on the labelled 2020 validation period. That validation is repeatedly inspected in this lesson; it is not an untouched final test or proof of an executable edge.

A winner can be selected partly for its estimation noise. A latent mean plus additive noise is a useful model. Under independent Gaussian noise with comparable means, the leading maximum grows like square root two log N; heterogeneous means and dependence change that argument. The displayed shrinkage is a conjugate Gaussian-prior conditional mean, with specified prior and noise variances. Those parameters are not estimated by dividing validation by training scores. Here the top hundred average in training and in validation, retaining about percent. That ratio mixes selection, regime changes and measurement error. It does not identify what fraction of the spread is real. Related calm-coin formulas still provide far fewer distinct exposures than their string count suggests.

Pause and predict. Under the leading independent Gaussian reference, the search grows from ten thousand formulas to a million. By what factor does square root two log N grow?

4Genetic programmingMaster's4 min

Random search wastes its draws: it never learns from a good formula. John Koza's genetic programming, in 1992, bred programs instead. Can formulas be bred, the way a farmer breeds wheat?

Two formulas that scored well are parents. Pick a random branch in each. The child is parent A with parent B's branch spliced in: closing price minus yesterday's change in volume, ranked. Nothing guarantees the child makes sense; selection decides. And now and then a mutation replaces a branch with a fresh random one, so the population does not run out of new material.

The local algorithm uses training fitness. Fitness is absolute mean training IC minus 0.0005 per tree node. Tournament selection draws five candidates and takes the fittest. Subtree crossover, mutation and copying generate the next population, subject to the depth rule. Each of three seeds uses one hundred individuals and twenty-five scored generations. The elite is selected by penalised fitness, so its raw IC need not improve monotonically. Validation scores are computed during fitting but are not used by this selection rule. Offspring bred after the last scored generation are not evaluated.

Three seeds illustrate the same search rule. Selection rewards penalised training fitness, not validation performance; raw champion IC can move differently from that fitness. Validation was computed during fitting but not used to select generations. The highest-training run reaches and validates at ; the other two average and . Each run evaluates about unique strings in its own cache. Strings, seeds and validation comparisons are dependent and belong in the recorded adaptive search history; they are not independent statistical trials.

Compare recorded score histories, rather than matched computational budgets. Grey is the random-search training incumbent, reaching after a thousand draws. That axis counts draws, including duplicates. Purple shows each GP run's current penalised-fitness champion against the distinct strings evaluated within that run's cache. Raw champion IC need not rise monotonically; the saved history contains a decrease. Evaluation cost also depends on expression size. This is not a controlled efficiency comparison. The highest-training final champion scores in training and in validation. Its validation score shrinks but is not zero. Adaptive training selection and repeatedly inspected validation do not establish an executable edge or a universal ranking of search methods.

Genetic programs can grow redundant branches. In this run the average size moves from to nodes, and the champion ends at . A parsimony penalty discourages growth but does not rule it out. Dead or redundant branches are a known mechanism for bloat; node counts alone do not prove that mechanism in this run. Longer expressions cost more to evaluate and can complicate interpretation. Their actual predictive value still requires selection-aware validation.

The three final champions. One repeatedly takes rolling minima of quote volume; another averages the daily low-to-high ratio. They resemble liquidity and price-range proxies, but these expressions alone do not identify size or volatility premia. The third combines a rolling correlation with close times quote volume. Those terms have different units: the grammar does not enforce dimensional coherence. Read the formula and its actual validation score rather than treating complexity as evidence. All three are adaptively selected training champions; their displayed validation results do not establish executable profits or a causal factor story.

Allen and Karjalainen's1999 study applies genetic algorithms to technical rules on the S-and-P500. Their experimental design separates training, selection and subsequent testing periods. That separation is a design choice whose validity depends on all research decisions. They do not find a consistent after-cost advantage over buy and hold across their reported tests. Some rules favour calmer periods. This is a result in their historical setting, not proof that evolution always finds volatility, that every rule fails or that our adapted coin search replicates their design.

Pause and predict. You run the evolution on 2018 and 2019, and then choose among the champions of many runs by their score on 2020. Is 2020 still out of sample?

5Reinforcement learning: AlphaGenMaster's4 min

Random search and evolution reward a formula for being good on its own. But a desk does not trade one formula; it trades a combination, and a formula that copies what the desk already has adds nothing. What if the miner were rewarded for what a formula adds?

AlphaGen's June2023 version1 studies synergistic factor collections using policy gradients. Its PPO policy writes symbolic factors and is rewarded for the fitted pool's performance. Its Chinese-stock setting uses a20-day price-return target, training2009-2018, validation2019 and testing2020-2021. Our unchanged original uses a small GRU with REINFORCE, a next-day target and a different coin archive. It is inspired by the mechanism, not a reproduction of the paper's architecture, data, metrics or results.

How does a network write a formula? In reverse Polish notation, the way old calculators worked. Close; close again; the five-day mean of the top item; subtract; rank. A stack keeps track, and at the end it holds a single formula: the rank of the price's gap above its five-day mean. At each step, the network outputs a probability for every token, and a mask removes the ones that could never close into a valid formula.

The local miner is inspired by AlphaGen, with a smaller REINFORCE implementation. A GRU chooses tokens under a stack-validity mask. Reward is the marginal training IC of a least-squares pool when the proposed formula joins. The fit zero-fills missing future returns, while IC scoring filters finite outcomes, so the two missingness conventions differ. REINFORCE credits sampled log probabilities with this marginal reward, scaled by one hundred; invalid formulas receive minus0.01. A new string joins only above0.0005 gain. Above ten members, the removal with the best remaining training score is chosen. This is adaptive training selection, not independent evidence of complementary out-of-sample alpha.

Condition on a fixed current pool and reward mapping. The objective is expected reward under the token policy. The log-derivative identity gives an unbiased sampled score-function gradient for that fixed conditional objective. It does not make the backtest score unbiased or the changing pool stationary. Sequence log probability sums the token log probabilities. A baseline independent of the sampled action, conditional on the available state, has zero score-function expectation. A suitable baseline can reduce variance, but an arbitrary one need not. The current pool score is part of the marginal reward definition here; no separate learned value-function baseline is fitted. Updating policy and pool supplies no guarantee of global optimisation.

The single-seed original run samples episodes; repeated strings can recur. A penalty for failed decoding is defined, but the stored result does not report a failed-decode count. The current pool's fitted training score ends at . Admission and removal use that same training objective. Its cache evaluates distinct valid strings. This is a computational count within one adaptive search, not independent tests. The stored histories describe pool score and size; they do not preserve a policy checkpoint or establish how token probabilities changed.

The final pool contains formulas. Volume and recent-price terms recur, but visual resemblance does not identify independent economic risks. These formulas were chosen to help the fitted training combination, with training-based signs and weights. Its mean IC is in training and in validation, with an IID-day descriptive t-statistic of . The validation-to-training ratio is about percent. Dependence, adaptive selection, missingness and costs remain unresolved by that ratio; synergy reward does not guarantee durable diversification.

Pause and predict. The reward is the gain in the pool's training score. What reward does a formula earn that is pure noise, but uncorrelated with everything in the pool?

6LLM research agentsPhD3 min

Genetic programming and reinforcement learning search blindly over symbols. A language model can read papers, propose a hypothesis in words, write the code and read the backtest. Can it do the researcher's job?

The agent's loop is the researcher's loop. A hypothesis, in words. Code that tests it. A backtest. And a critique that becomes the next round's context: what worked, what to try next. The search is no longer over symbols but over ideas, and the language model's reading of the literature is the prior.

Three papers illustrate different approaches. Alpha-GPT's July2023 version1 puts human-language interaction between a researcher and conventional formula search: trading ideas can be translated into seeds and backtests can be interpreted. This version describes a framework and its chosen experiments. It does not establish independent live profitability. Competition rankings and later publication claims are not used as evidence for this version.

AlphaAgent's February2025 version1 uses regularised exploration. It compares proposed syntax trees with an existing library for originality, and uses semantic checks to align factors with hypotheses. Syntactic novelty does not guarantee an economically independent exposure. The authors report resistance to decay in their CSI500 and S-and-P500 experiments. These are author-selected historical comparisons; they do not isolate crowding causally or establish independent live performance, valid model chronology, capacity or net returns under every implementation.

R-and-D-Agent-Quant's May2025 version1 combines research and development. Hypotheses become tasks, a code agent implements them, and a multi-armed bandit chooses directions for factor and model optimisation. The abstract reports up to twice the annualised return of classical factor libraries using seventy percent fewer factors. Its displayed experimental split is2008-2014 training,2015-2016 validation and January2017 through August2020 testing, on the CSI300 setting. These are the authors' comparisons, not an independent replication or proof that the language-model research process could have run with only information available then.

Three cautions. A language model or its research context may contain information from the historical test period. A declared cutoff alone does not prove what the model saw. Record all loops, prompt changes, failed runs and human choices as adaptive selection history; loop count is not an independent-trial count. The reported outcomes belong to specific paper versions and selected markets. A paper's held-out period does not establish live feasibility, public-data vintages, complete costs or an absence of leakage. No external agent experiment is run or sealed strategy scored here.

Evaluate the whole research procedure. Audit the model's information provenance, retrieved documents and supplied context; a declared training cutoff alone is insufficient. Preserve prompts, code versions, failed runs, backtests and human choices as a full adaptive history, not a count of independent trials. Freeze preprocessing, data vintages, tools, selection rules, portfolio construction and costs as well as the model. Use inference suited to dependence and selection, attainable execution assumptions and appropriate benchmarks. An untouched evaluation is valuable, but opening data once does not by itself guarantee validity, power or live feasibility. No external agent experiment is run here.

Pause and predict. An agent proposes five hundred hypotheses and keeps the five with the best backtests. How many trials does the counter record?

7Combining weak alphasMaster's4 min

No desk trades one mined alpha. It trades a combination of hundreds or thousands, each weak. How strong is their sum?

Start with a population model, not an inference about our forty selected formulas. Standardise the signals and target, assume equal signal-target correlation c and equal pairwise correlation rho, and use a jointly positive semidefinite covariance matrix. The average's correlation is c times square root N over one plus N minus one times rho. Its square cannot exceed one: feasibility requires c squared N no larger than one plus N minus one times rho. For positive rho the variance-based breadth approaches one over rho. The formal IC limit is c over square root rho only along feasible models. With zero rho, fixed nonzero c cannot continue to arbitrarily large N. Statistical independence and independent trials do not follow from this breadth measure.

Draw the population amplification factor through one hundred signals. The uncorrelated reference rises from one to ten on this displayed domain; a feasible target correlation still bounds the combined IC by one. With rho0.3 the formal large-N multiplier is about1.83. Our selected formulas have average training return correlation , giving the illustrative equicorrelation multiplier . Actual pairwise correlations and target ICs differ, and return correlation is not the same object as signal correlation. This matched toy curve does not prove a ceiling for their realised or future performance.

These are training correlations of forty selected long-short return series. Selection first ranks formulas by absolute training IC, then rejects a candidate when its ranked training signal has absolute correlation above0.9 with a previously kept signal. Correlation below that threshold is not independence or a proof of residual alpha. Many return series still move together. Missing component returns are zero-filled for this matrix; it is a descriptive training calculation, not an identified set of independent economic bets.

Count covariance directions. The first eigenvalue carries percent of the trace of this training correlation matrix. Orthogonal principal components are uncorrelated in that sample; they need not be statistically independent. The participation ratio is . It measures concentration of eigenvalues. It is not an independent-trial count, a number of causal factors or proof that forty selected formulas are three independent bets.

Compare weighting conventions for training-selected formulas. The fitted forty-formula combination has training annualised Sharpe . Reusing the selection and estimation data makes it optimistic; an estimated optimum need not dominate every comparator under different constraints or missingness rules. Its labelled2020 validation Sharpe is . Equal weighting gives , but the component formulas were still selected using training data. Equal weighting averages finite returns, while weighted application zero-fills individual missing returns; the comparison is not otherwise identical executable accounting. Selection, mean estimation and covariance estimation all matter. The research chapter isolates a simpler model.

For a population linear projection, ask what is new. Project a centred new signal on the existing library using the same distribution and finite second moments. The residual is orthogonal to that library. Its covariance with the target captures an additional linear direction when residual variance is positive. The increase in the best squared multiple Pearson correlation is residual covariance squared divided by residual variance times target variance. This is a projection identity, not a finite-sample selected-alpha significance test. Rank transformations must be defined before projection to interpret it as rank-based prediction; re-ranking a fitted residual changes the problem. Estimated residuals and weights require fresh validation.

Pause and predict. Ten thousand alphas, each with an out-of-sample IC of one percent, and an average correlation of point three. What is the IC of their average?

8The counter explodesMaster's4 min

Since Part twenty-six the series has kept a trial counter: every configuration tried on the way to a registered strategy. Machines that search thousands of formulas make it run. What does that do to the bar a result must clear?

This is existing registration metadata, read without changing the ledger. The counter reaches by Part twenty-five; Part twenty-six's recorded data-snooping study adds ten thousand rules. The historical increment for Part twenty-nine is , and the count through this part is . These registrations already exist. Restoring the unchanged original calculations creates no new registration or market trial, and no sealed payoff is read. The recorded count documents a search history, not independent tests.

The original computational accounting uses four sources. Ten thousand random draws, per-seed unique GP strings, distinct valid RL strings, and compared combination sizes include repeats, related expressions and adaptive rewards. The current restored originals total , while the existing registered increment is , a difference of . The restored RL original evaluated strings; the earlier checked-in notes reported808. That difference is preserved without another run to seek a match or a registry rewrite. Current computational counts and historical registration metadata answer different questions. Neither is an independent-test count, and no external agent system is run here.

Consider a reference model. Near a zero Sharpe, independent returns with consistent annualisation give approximate annual Sharpe noise of one over square root T years. Dependence, tails and selection can change that uncertainty. For independent comparable Gaussian null strategies the leading maximum scale is square root two log N divided by square root T. It is not an exact expectation, p-value or universal hurdle. Using the original count and three years gives annualised Sharpe units. The actual strategies are related and adaptive, so this is fixed model arithmetic only. The sealed strategy result remains excluded, and no pass or fail conclusion is supplied.

Three qualifications. Dependence often reduces a maximum relative to an independent reference, but one effective count need not fit every tail or adaptive search. The raw counter is bookkeeping, not a general upper bound on damage. A union bound would also need valid marginal probabilities and a complete tested family; neither follows from counting formulas. A clean future evaluation freezes the data, timing, selection rule, costs and reporting protocol before outcomes are seen. Its power and validity still need analysis. No sealed experiment is opened in this review.

Now inspect one specific shuffle design. Tomorrow's finite returns are permuted among eligible coins within each day, with a shared permutation for all fixed formulas. Exchangeability of those coin labels under a relevant null is an assumption; heterogeneous risks and serial structure complicate it. The unchanged original scores pre-drawn formulas on such shuffles. It does not repeat the adaptive GP, RL or combination search. The leading independent Gaussian reference is . The observed mean shuffled maximum is . Inverting that leading scale gives about , a calibration index using this noise spread. Twenty maxima and a mismatched reference do not identify an independent-trial count. We do not scale this fraction to the full search or claim that a strategy clears a corrected hurdle.

Pause and predict. Use the leading independent Gaussian reference for a million pure-noise formulas and two years of independent daily data. What annual Sharpe scale does it give?

9Decay, crowding and the alpha factoryIndustry4 min

A signal can fade in two ways: over the days after it is measured, and over the years, as others find it. How long does a mined signal last?

First measure prediction by horizon in the supplied research grid. The training-selected formula is held fixed while its rank correlation is measured against each individual future day's log return. Training IC is tomorrow and ten days ahead; validation gives and . Shared observations and overlapping horizons make these related diagnostics. Persistence can reflect stable characteristics and data conventions. It does not by itself identify a crowding mechanism, feasible execution or lower costs; the measured book turnover is a separate calculation.

Within the original research slice, the formula's yearly means are , and . These are three observations for a training-selected formula, with one repeatedly inspected validation year. Changes can reflect sampling, universe composition and regimes, not just crowding. Three years do not identify a causal rate of alpha decay. The sealed strategy evaluation remains excluded; this review adds no later performance observations.

Separate two illustrative mechanisms from one reported comparison. The geometric horizon pattern assumes a chosen phi; it is not fitted as a universal law here. For a stationary Gaussian position process with fixed variance and a fixed linear mapping to holdings, mean absolute changes scale with square root one minus autocorrelation. Rank books, changing membership and constraints need separate turnover accounting. Net edge subtracts costs using a stated exposure denominator and convention. McLean and Pontiff report26percent lower predictor returns out of sample and58percent lower after publication across97 stock predictors. Those are particular sample comparisons, not universal decay constants or a complete causal decomposition of crowding.

Measure signal persistence and dollar trading separately. The mined signal has rank autocorrelation and trades dollars per day per dollar long. The adapted classic signals have autocorrelations near zero. Alpha twelve trades about dollars per dollar long per day; that dollar-flow ratio does not mean every holding was replaced. A linear illustration multiplies mean daily dollars traded by 365 and five basis points one way: about percent a year for Alpha twelve and for the mined formula, per dollar long. These are cost illustrations under fixed conventions, without compounding, financing, borrow or market impact; they do not establish attainable execution.

WorldQuant provides a public example of distributed formula research. Finding Alphas describes organising many small candidate signals, research rules and portfolio combination. A published account of a pipeline is not independent evidence that every candidate or business unit is profitable. BRAIN gives outside researchers a platform for writing and simulating formulas. Platform access, user counts and industrial scale do not establish independent ideas, complete historical information, valid inference or attainable returns. The economic value of continued research depends on changing opportunities and costs, not a universal law that every signal must decay.

Consider possible crowding channels. Similar data and operators can produce related exposures, but string resemblance does not measure positions across firms. Capital flows and shared funding constraints can compress an edge or transmit selling. Those are possible mechanisms, not an inevitable sign pattern or a causal finding from our formula correlations. New information, horizons, position limits and diverse exposures may help, subject to costs and capacity. Novel syntax alone offers no protection; identifying a crowding episode requires positions, flows and funding evidence.

Pause and predict. An alpha's IC halves every two years as others find it. Starting from point zero three, after how many years is it below point zero one?

10China's quant industryIndustry3 min

China's quantitative-investment industry offers a useful setting for discussing common exposures, index hedges and execution constraints. What can happen when similar research pipelines produce crowded books?

Index enhancement aims to outperform a specified equity benchmark. A stock-selection portfolio benchmarked to the CSI500 or CSI1000 can carry factor exposures as well as security-specific bets. Shorting index futures offsets an estimated component of market exposure. It does not leave pure alpha: beta mismatch, size and sector tilts, basis moves, financing, margin and execution remain. Large factor libraries can share these risks even when their formula strings differ. Neither mined-factor counts nor a market-neutral label identifies a causal source of excess return.

An example in the literature. AlphaAgent's February2025 introduction cites small-cap factor underperformance in early2024 as a motivation for studying decay and reversals. That establishes what the paper reports, not a causal explanation for every fund. Common size exposure, basis risk, financing and margin mechanisms can amplify a loss. Their relative contribution needs actual positions, prices, timing and financing data. Unspecified index declines and aggregate fund-return percentages cannot be combined into one reliable account.

Execution and public records need separate interpretation. Machine speed does not supply market depth, unlimited participation or exemption from exchange rules. A position can be hard to exit precisely when many firms want the same trade. A temporary trading restriction concerns a stated scope and date range; it must not be described as frozen financial assets. To compare reported sales, index losses and fund returns, first align their dates, venue coverage, leverage and denominators. These distinctions matter even when no named firm's return or order-size figure is used.

Use a deliberately simplified hedge decomposition. The long book is offset with index futures using an estimated beta. A small-cap tilt can add a size-spread exposure; the displayed coefficient of one is an illustrative choice, not an estimated industry exposure. The hedge can leave basis changes, beta error, sector and security risks, funding and transaction costs. The spread formula is not a complete portfolio accounting identity. In a fixed equal-notional toy, multiplying the spread by leverage scales that one component. Margin constraints can trigger further selling, but that feedback is a possible mechanism, not a measured causal conclusion about a named firm.

Three lessons. Similar data and operators can produce common exposures across firms; different strings do not establish independent risks. Cash baskets and futures can diverge, and their liquidity can deteriorate together. The basis need not always widen or move in the same direction in every episode. Leverage and margin can transmit drawdowns into forced selling. Evaluate those channels with positions and funding data before assigning a cause to an observed loss.

Pause and predict. A fund is long small caps and short futures on the large-cap index. Small caps fall twenty percent and the large-cap index five. What did the market-neutral fund lose?

11From a quant fund to DeepSeekIndustry2 min

Technical papers connect High-Flyer Quant and DeepSeek through computing infrastructure. What does a quantitative-research pipeline have in common with a language-model lab, and where does the analogy stop?

Use the versioned technical record. Fire-Flyer's paper dates construction of its PCIe-A100 system to2021. Its August2024 version acknowledges contributors at both DeepSeek-AI and High-Flyer Quant and describes hardware-software co-design. DeepSeek-V3's December2024 version reports2.788million H800 GPU hours for official training. At an assumed two dollars per GPU hour, that is5.576million dollars. The report excludes prior research and ablation experiments on architecture, algorithms and data. This is not total project investment, an R1 cost estimate or a vendor-normalised comparison of identical models. The connection between the organisations does not itself establish a causal efficiency advantage.

The August2024 version1 report describes Fire-Flyer2. Its ten thousand PCIe-A100 processors use custom communication and storage engineering. These are the authors' system specifications. They report DGX-A100-like performance at about half the cost and forty percent less energy in their stated comparison. Hardware, workloads, accounting boundaries and measurement methods matter. This is a reported systems comparison, not our independent benchmark or proof that a trading strategy, language model or business has a universal cost advantage.

There is a useful engineering analogy. Both a quant research pipeline and a model lab organise data, compute, experiments and evaluation; neither evaluation is impossible to fool. Clean data, scientific judgement, infrastructure and well-specified objectives all matter. Their relative scarcity depends on the task. Sharing a model can improve access and applications while changing its commercial value; model quality can still become obsolete. Trading-signal adoption can reduce an edge in some models, but decay is not universal. These are different economic mechanisms, not a theorem that published models retain value forever while trading signals always disappear.

Pause and predict. Why might a fund that trades on machine-learned signals give away its best language model, but never its best signal?

12What remains for humansIndustry3 min

If machines can search, write code and backtest, what is left for the researcher?

Three human responsibilities remain. Specify useful hypotheses and economic mechanisms before seeing outcomes, while allowing for the possibility that a prior excludes the truth. Audit data timing, vintage, membership, missing outcomes, revisions and trading access; a broad retrospective archive does not prove that nothing was lost to survivorship. Record the full selection history, choose how to validate or stop, and assess execution, capacity, financing and changing risks. Automated code can enforce defined rules, but cannot turn unspecified assumptions into evidence.

An ex-ante restriction can reduce a search's selection burden. In the particular independent Gaussian null model, the leading maximum scale is square root two log N standard errors. Ten thousand nominal tests give ; one hundred give . Related scores and adaptive search need a different calibration. A prior may also exclude useful ideas. Choosing or rewriting it after looking at outcomes spends data and creates additional selection. Its value is not exactly the number of strings removed, and no prior supplies a universal independence or error-control guarantee.

Take the pattern our miners found: calm coins beat wild ones. A researcher's first job is to ask why anyone would leave that on the table. One answer is leverage constraints: investors who cannot borrow buy risky assets to get risk, which bids them up and lowers their later returns, Andrea Frazzini and Lasse Pedersen's betting against beta. Another is lottery demand: assets with extreme daily jumps are bought like lottery tickets and do worse afterwards, as Turan Bali, Nusret Cakici and Robert Whitelaw found in stocks. A story earns its place only if it predicts where the effect should be strongest, and the prediction is written down before the data are looked at. A story told afterwards, to fit what was found, is just one more trial.

When to stop depends on the objective and evidence. For independent Gaussian noise, sigma times square root two log N is a leading maximum scale. Its derivative is sigma divided by N times square root two log N, for N greater than one. This diminishing slope cannot compare the thousandth trial with a singular approximation at N equal to one. Deciding whether further search is worthwhile also needs a prior over real improvements, computational and execution costs, and a validation or sequential-testing policy. The displayed stopping inequality is a heuristic planning rule, not a theorem that more search always makes a result less credible.

Pause and predict. An ex-ante argument cuts a search from a million formulas to a thousand. Under the leading independent Gaussian reference, by how many standard errors does the scale fall?

13Evaluating a mined combinationMaster's3 min

The sealed strategy result is excluded. We will specify the information and decisions a future test needs, then work through explicitly fixed portfolio arithmetic. No historical payoff is read or scored.

Three layers to freeze. Define the data vintage, information times and complete selection rule, including signs, weighting and stopping. A label date is not an execution timestamp. Specify the portfolio that can actually trade: liquidity, borrow, financing, costs, leverage and exits. A same-close research convention is not an attainable fill. Define the inferential target, benchmarks, dependence assumptions, multiplicity and reporting policy. A fresh period can still have low power, regime change or hidden selection. The protocol is a requirement for a future evaluation, not evidence that this excluded strategy passed.

A fixed four-position toy, not a market experiment. The ranks are zero, one, two and three, with mean one point five. Demeaning and scaling to absolute exposure two gives weights minus 0.75, minus 0.25,0.25 and0.75. Long exposure is one dollar, short exposure minus one, and gross exposure two. The net dollar exposure is zero. Beta, financing and risk are separate questions. This is only the arithmetic behind a rank book.

Choose prices explicitly. All four start at one hundred. Their simple returns are minus one percent, plus one, plus two and zero; no historical series is used. Multiplying those returns by the fixed initial weights gives basis points per dollar long. Starting flat trades two dollars, and at these chosen final prices closing trades another two. At five basis points per dollar traded, total entry and exit costs are basis points per dollar long. The resulting fixed net is basis points. These are simple-return, fixed-share calculations; the original research score uses weighted log returns. Borrow, financing, slippage and impact are omitted, so this toy is neither a historical strategy result nor a performance forecast.

Read any future result with three checks. Align its exposure denominator and distinguish log-return scores from portfolio cash flows. Account for missing outcomes and exits without hindsight reweighting. A protocol and a fixed toy supply no historical payoff, p-value, posterior probability or power estimate. Those require a specified experiment and valid evidence; none is supplied by opening an excluded result.

Pause and predict. In this fixed toy, a hundred basis points gross, four dollars traded at five basis points per dollar: what is the net per dollar long, and which real trading risks remain outside the calculation?

14Rule 29: the alpha factoryIndustry2 min

The House's twenty-ninth rule: what a signal found by a machine must survive. The first sheet records ordinary research calculations. Grammar size, random-search scores, three GP runs, the RL pool and selected-formula correlations describe their supplied data and conventions. Validation is repeatedly inspected, counts are not independent trials and covariance directions are not independent bets. The strategy experiment is excluded: no payoff or score is read, and no sealed experiment is opened. The counter through Part twenty-nine is existing registration metadata,23,480; restoration makes no new registration or market trial. Separate those facts before drawing an investment conclusion.

The evaluator recursively walks the original expression tree. Time-series operators use current and earlier array rows. That local property is useful, but insufficient for point-in-time validity. The archive, universe construction, current-close eligibility, missing future outcomes, token definitions, selection procedure and attainable execution all need separate checks. A backward-looking operator does not certify a future-free end-to-end research process.

Here is the original generation update. The penalised-fitness champion is copied first. Tournament selection chooses parents; crossover, mutation or copying form children, with the depth rule rejecting overgrown trees. A string is scored when fitting first encounters it in that seed's cache. Validation is computed then but not used in the selection criterion. The offspring bred after the last scored generation are discarded without evaluation. Unique strings across seeds, repeated episodes and adaptive decisions belong in the search history; they are not independent tests.

The tools this part adds. Formula trees, search, scoring, combination and estimation-risk calculations remain the unchanged originals. Rule twenty-nine is to record the full adaptive search, audit data and execution timing, and validate the complete selection and weighting process. Inference must address dependence and multiplicity rather than treating the raw count as independent tests. Include costs, funding, borrow and capacity, and measure common exposures. A low pairwise correlation or one fresh interval alone cannot certify a machine-found signal.

Apply the rule to three cases. For GP training IC0.08, ask about data timing, penalised fitness, seeds, cached evaluations, discarded searches and a selection-aware validation protocol. For an agent's Sharpe3, audit model and retrieval provenance, prompt and human choices, dates, costs and dependence; a declared cutoff is insufficient. For a new library member, estimate its incremental effect after selection, weight estimation and costs. The research model's true-strength threshold is conditional, not an automatic admission test using its fitted Sharpe.

For the researcher: how many alphas can you combine?PhD6 min

For the researcher: Chapter seven combined mined alphas with weights estimated from the data. Every extra signal brings some edge and some estimation error. Exactly how do they trade off, and when does one more alpha make the combination worse?

Isolate estimation risk in a fixed population model. The K return coordinates are IID over T observation days, jointly Gaussian with positive definite covariance and fixed means. The alpha set is specified independently of this sample; no selection, costs, constraints or regime changes are modelled. The population tangency direction is inverse covariance times the mean; its squared per-day Sharpe is the squared norm of the whitened mean theta. Use the true covariance and estimate only the mean. All Sharpe quantities in this derivation are per observation period. Estimated covariance and a selected library are additional problems, not already accounted for.

Whiten with the known population covariance. The estimated direction is theta plus a standard Gaussian vector divided by square root T. Its population out-of-sample Sharpe is the inner product with theta divided by its own length, exactly. The numerator has mean S and variance S over T. Squared length has mean S plus K over T and variance four S over T plus two K over T squared. Replacing these concentrating quantities by their limits gives S divided by square root S plus K over T. At finite K and T this is an approximation, not the expectation of a ratio. It requires a stated asymptotic regime before becoming a convergence claim.

The same known-covariance model has an exact training identity. Replacing the population mean in the numerator by its fitted sample mean, but retaining the true covariance in the denominator, gives training score equal to the norm of z. This is not the usual fully sample-estimated Sharpe. Its concentrating scale is square root S plus K over T; even zero population strength can produce a positive fit. The product of that training score and population out-of-sample Sharpe is exactly z transpose theta, with expectation S. It concentrates at S in the bounded-strength regime. This model does not identify which losses in the selected coin library came from mean error, covariance error, selection or data conventions.

State the regime precisely. Let the pre-specified dimension and observation count grow with K over T approaching finite gamma, and deterministic squared population strength approaching a finite positive S. Gaussian concentration makes the numerator tend to S and squared length to S plus gamma, so the population Sharpe tends to S over square root S plus gamma. The two variance calculations prove this known-covariance statement. It is not an exact finite-sample mean formula or a theorem about adaptively selected alphas. Brown and Kan-Zhou provide estimation-risk context; adding estimated covariance changes the problem. A scalar rescaling of weights does not itself reduce Sharpe, and shrinkage improvements depend on the rule and objective.

The original simulation fixes each coordinate's daily Sharpe at0.03, about under365-day annualisation, and uses independent Gaussian coordinates. Population strength grows with K in this illustration, unlike the bounded-strength limit just stated. The coloured curves use250,500 and1,000 observation days, not one, two and four calendar years. Dots are300-replicate means, with sampling error; agreement need not be exact. At250 days and forty coordinates, the simulated mean is per day versus population optimum . Triangles estimate covariance too. All finite values, including nonpositive estimates, are shown; nonfinite cells are explicitly omitted. This comparison illustrates estimation risk in the chosen Gaussian design, not a universal finite-sample guarantee.

Under IID Gaussian observations and the unbiased sample covariance, T minus one times the estimated covariance is Wishart with T minus one degrees of freedom, independently of the sample mean. Its expected inverse equals T minus one over T minus K minus two times the population inverse, provided T exceeds K plus two. The moment fails at the boundary; the formula is not valid beyond it. Multiplying every weight by the same positive scalar leaves Sharpe unchanged. Random directional error, not scalar inflation alone, is the concern. In300-replicate simulations at250 days and eighty coordinates, the mean is per day with covariance known and estimated. The observed difference does not establish that every estimate or shrinkage rule improves or worsens every finite sample.

Now separate a finite addition from a differential approximation. Use f equal to S over square root S plus K over T, with daily squared strengths and a daily observation count. This objective already approximates actual finite-sample Sharpe. Adding one fixed independent coordinate of true squared strength a increases f exactly when the displayed quadratic is positive. Solving its positive root gives the finite-addition threshold. The often quoted S over T S plus two K is a first-order, stronger sufficient threshold, not the exact finite one. These are true residual strengths in the stated model, not selected in-sample estimates. In the original diminishing-strength illustration, at 500 observation days, the objective peaks near among the displayed K values. That discrete-grid illustration is not a universally optimal library size.

Return to the selected coin formulas. Training scores reuse the data that chose the library, signs and weights; they are optimistic for several reasons. Across these inspected sizes, validation estimated weighting is largest at ; at forty its annualised Sharpe is , versus for equal weighting. Choosing that size after this table would spend the validation year. Equal weights still inherit formula selection, and missing-component conventions differ between the two rules. Correlation alone does not invalidate whitening with known covariance; selection, estimated covariance, nonstationarity and non-Gaussian dependence break the simple model here. The table does not isolate one causal explanation or establish net executable performance.

Three open questions. The formula assumes the alphas were fixed in advance; when they are the winners of a search on the same days, their means are biased too, and the joint correction is not settled. If each alpha's edge decays, more days is not simply better: it trades noise against staleness. And the best way to shrink both the means and the covariance of many weak alphas at once is still an active topic.

Pause and predict. Twenty independent alphas, each with a daily Sharpe ratio of point zero two, and a year of data. What is the best possible Sharpe ratio, and what does the formula say you will get out of sample?

Recap, desk questions, problemsAll tracks3 min

Seven research lessons. The fields and ranking rules are adapted to a retrospective archive, with idealised timing. Repeated strings and rounded scores do not count independent ideas. The training-selected random winner scores then on labelled validation. GP optimises penalised training fitness; RL rewards marginal fitted-pool IC. Their search histories are adaptive. Agent papers supply versioned author reports. Correlation and participation ratios describe selected sample exposures, not independent trials or causal economic factors.

Seven evaluation lessons. Existing registrations through this part total 23,480; restoration adds no market trial. The fixed shared shuffle does not replay the full adaptive search and supports no independent-count extrapolation. Horizon diagnostics, industry reports and crowding mechanisms need separate interpretations. Infrastructure comparisons and official training cost reports have stated boundaries. People still specify hypotheses, provenance and execution. The strategy result is excluded, and the fixed toy supplies arithmetic only. The Gaussian estimation model needs a fixed library and explicit regime; its exact finite-addition criterion belongs to an already approximate objective.

Three desk checks. The equal-correlation toy gives about 0.01826 IC, subject to joint covariance feasibility; its breadth is not independent trials. For GP, audit the full search and chronology, not just a tree count. For an LLM agent, model and retrieval provenance, dates, selection and costs matter; a declared cutoff alone is not proof of a clean historical information set.

Three more checks. A selected training Sharpe 6 does not identify expected live performance; do not plug it into a fixed-library theorem as true population strength. Dollar-neutral stock and futures notionals retain basis, size, beta and financing risks. A proposed annual Sharpe 0.3 alone cannot decide admission: true residual strength, period units, estimation, selection and costs all matter. Full English and Chinese solutions are in the notes.

Twelve problems, in three groups. The first six count the grammar, calculate independent Gaussian reference scales under stated assumptions, qualify the fundamental law, derive feasible equicorrelation, compare GP fitness and count nominal agent evaluations. Problems seven through ten prove the baseline identity, work a fixed hedge example, calculate an assumed half-life and evaluate the plug-in approximation in consistent daily units. Two qualifying problems prove the Gaussian concentration limit and exact finite-addition criterion for its approximate objective, then derive the optimal Pearson combination and joint covariance restriction. All twelve have full English and Chinese solutions in the notes.

These distinctions return in portfolio construction, where means and covariances are estimated; in trading costs and capacity, where book arithmetic must become executable orders; and in statistical-arbitrage crowding, where related exposures can unwind together. The finale's historical strategy results remain outside this presentation review. No future chapter reference supplies a performance verdict for an excluded experiment.

The notes distinguish original ordinary calculations, explicitly fixed mathematical toys and versioned primary reports. The computational algorithms and existing registry remain unchanged. Public-source breadth does not by itself prove historical availability, and a paper's reported comparison is not our independent replication. The reading list covers symbolic search, policy gradients, estimation risk and the2023-2025 agent papers, with their specific limitations.

The House now has tools for a formula grammar, random and adaptive searches, selected combinations and estimation-risk analysis. Counts record parts of the search history, while full information, selection and execution audits remain necessary. No sealed result was opened or scored. Next is portfolio construction: how noisy inputs influence an optimiser, and what specified constraints, shrinkage and validation can address.

Where it goes next. The mined signals need a portfolio (Part 30) and a risk model (Part 31); the trials the search added are part of any honest account of what it found (Part 43).

Key results

The part's results in one place, for revision.

Information coefficient\[\mathrm{IC}_t=\operatorname{corr}_i\bigl(\text{signal}_{i,t},\ r_{i,t+1}\bigr)\]
Combining alphas\[w\propto\bigl(\hat\Sigma+\lambda I\bigr)^{-1}\hat\mu\]
Out-of-sample Sharpe of K alphas\[\mathrm{SR}_{\text{oos}}\approx\frac{\mathrm{SR}^\ast}{\sqrt{1+K/(T\,\mathrm{SR}^{\ast2})}}\]
Size of the search\[\#\{\text{trees of depth}\le d\}\ \text{grows doubly exponentially in } d\]

Try it

Lab 29 · Mining alphas out of noise

Generate a market with no predictability at all, search 400 random formulas over it, and compare each formula's in-sample information coefficient with its out-of-sample one. Then combine K weak but real alphas and watch estimation error eat the diversification.

Figure produced by Lab 29: Mining alphas out of noise
Produced by the lab below, seed 0, in 3.2 s. Simulated data.
python -m videos.quant.labs 29 needs numpy, scipy, matplotlib, numba · download lab29.py · source on GitHub
Formulas searched                       400 (of 3.05e+13 with depth up to 4)
Best in-sample |IC|                     0.035   formula: delay(corr(delay(close, 5), neg(vwap), 10), 20)
The same formula out of sample          IC +0.006
Top 20 in sample: mean |IC|             in sample 0.023   out of sample -0.000
Combining K alphas, total Sharpe fixed  K=1: 99%  K=5: 77%  K=20: 54%  K=50: 36%  K=100: 27%  K=200: 19%

The winner of a search over noise is selected for its luck. And spreading a fixed amount of signal over more alphas only adds weights to estimate.
The code (81 lines; it asserts its own result)
"""Lab 29: mine formulas on a market made of noise, and combine many weak alphas."""

import warnings

import numpy as np

from videos.quant import labs
from explainer.quant.house import alphas

TITLE = "Mining alphas out of noise"
GOAL = ("Generate a market with no predictability at all, search 400 random formulas over it, and compare each "
        "formula's in-sample information coefficient with its out-of-sample one. Then combine K weak but real "
        "alphas and watch estimation error eat the diversification.")
TASKS = [
    "Plant one real signal (add 0.02 x yesterday's rank of volume to tomorrow's return). Does the search find it?",
    "Search 4,000 formulas instead of 400. What happens to the best in-sample IC and to its out-of-sample IC?",
    "In the combination, set known_cov=False. How much more does the estimated covariance cost?",
]


def noise_market(T=260, N=60, seed=0):
    rng = np.random.default_rng(seed)
    ret = rng.normal(0, 0.02, (T, N))
    close = 100 * np.exp(np.cumsum(ret, axis=0))
    spread = np.abs(rng.normal(0, 0.01, (T, N)))
    F = {"close": close, "high": close * (1 + spread), "low": close * (1 - spread), "ret": ret,
         "volume": np.exp(rng.normal(12, 1, (T, N))), "vwap": close * (1 + rng.normal(0, 0.003, (T, N)))}
    fwd = np.vstack([ret[1:], np.full((1, N), np.nan)])  # tomorrow's return, unknown today
    return F, fwd


def run(seed=0):
    F, fwd = noise_market(seed=seed)
    T, N = fwd.shape
    mask = np.ones((T, N), bool)
    train, valid = np.arange(30, 170), np.arange(170, T - 1)
    with warnings.catch_warnings():  # a random formula may be undefined on its first days
        warnings.simplefilter("ignore", RuntimeWarning)
        found = alphas.random_search(F, fwd, mask, train, valid, 400, np.random.default_rng(seed + 1), max_depth=4)
    tr = np.array([a for a, _, _ in found])
    va = np.array([b for _, b, _ in found])
    ok = np.isfinite(tr) & np.isfinite(va)
    tr, va = tr[ok], va[ok]
    best = int(np.argmax(np.abs(tr)))
    name = [s for (_, _, s), keep in zip(found, ok) if keep][best]
    lab = labs.Lab()
    lab.row("Formulas searched", f"{ok.sum()} (of {alphas.count_trees(4)[-1]:.2e} with depth up to 4)")
    lab.row("Best in-sample |IC|", f"{abs(tr[best]):.3f}   formula: {name[:70]}")
    lab.row("The same formula out of sample", f"IC {np.sign(tr[best]) * va[best]:+.3f}")
    top = np.argsort(-np.abs(tr))[:20]
    lab.row("Top 20 in sample: mean |IC|", f"in sample {np.abs(tr[top]).mean():.3f}   out of sample "
                                           f"{np.mean(np.sign(tr[top]) * va[top]):+.3f}")
    sr_star, Tm = 0.25, 120
    Ks = np.array([1, 5, 20, 50, 100, 200])
    rng = np.random.default_rng(seed + 2)
    sim = [alphas.sr_oos_sim(np.full(K, sr_star / np.sqrt(K)), Tm, 300, rng).mean() for K in Ks]
    theory = [alphas.sr_oos_theory(sr_star, int(K), Tm) for K in Ks]
    lab.row("Combining K alphas, total Sharpe fixed", "  ".join(f"K={K}: {s / sr_star:.0%}" for K, s in zip(Ks, sim)))
    lab.note = ("The winner of a search over noise is selected for its luck. And spreading a fixed amount of signal "
                "over more alphas only adds weights to estimate.")
    assert abs(tr[best]) > 0.03 and abs(va[best]) < 0.5 * abs(tr[best])
    assert abs(np.mean(np.sign(tr[top]) * va[top])) < 0.5 * np.abs(tr[top]).mean()
    assert np.allclose(sim, theory, atol=0.035) and sim[-1] < 0.7 * sim[0]

    fig, ax = labs.figure(2, size=(11, 4.2))
    ax[0].scatter(tr, va, s=8, color=labs.SPOT, alpha=0.7)
    ax[0].plot(tr[best], va[best], "o", color=labs.LOSS, ms=8, label="the in-sample winner")
    lim = 1.15 * np.abs(tr).max()
    ax[0].plot([-lim, lim], [-lim, lim], color=labs.MUTED, ls=":", lw=1)
    ax[0].axhline(0, color=labs.MUTED, lw=0.8)
    ax[0].set(title="400 formulas on a market of pure noise", xlabel="in-sample IC", ylabel="out-of-sample IC",
              xlim=(-lim, lim), ylim=(-lim, lim))
    ax[0].legend(fontsize=8)
    ax[1].semilogx(Ks, np.array(sim) / sr_star, "o", color=labs.SPOT, label="simulated")
    grid = np.logspace(0, 2.4, 60)
    ax[1].semilogx(grid, [alphas.sr_oos_theory(sr_star, int(k), Tm) / sr_star for k in grid], color=labs.P,
                   label="SR* / sqrt(1 + K / (T SR*^2))")
    ax[1].set(title="Share of the true Sharpe ratio kept out of sample", xlabel="alphas combined, K", ylim=(0, 1.05))
    ax[1].legend(fontsize=8)
    lab.fig = fig
    return lab

Now change it

  1. Plant one real signal (add 0.02 x yesterday's rank of volume to tomorrow's return). Does the search find it?
  2. Search 4,000 formulas instead of 400. What happens to the best in-sample IC and to its out-of-sample IC?
  3. In the combination, set known_cov=False. How much more does the estimated covariance cost?

Problems, with solutions

Try each problem before opening its solution; the last two of each set are at qualifying-exam level.

Desk questions, with solutions

Six desk checks

  1. 10,000 standardised signals, IC 0.01, equicorrelation 0.3. Under the feasible equal-correlation model the equal-weight IC is 0.0182553. Its variance breadth is 3.33256; this is not a count of independent trials. The mean correlation alone does not identify arbitrary selected signals' combined IC.
  2. GP training IC 0.08 after 25 generations. Request the penalised objective, all seeds and searches, cache/evaluation accounting, chronology, missingness, costs and the full validation protocol. A string count alone gives no universally calibrated threshold.
  3. An agent's Sharpe 3 on 2015–2022 stocks. Audit model and retrieval provenance, prompt/human choices, data vintages, release and execution times, costs and dependence. A declared cutoff alone does not establish the historical information set. A valid fresh evaluation must freeze the entire procedure.
  4. Forty selected alphas have fitted Sharpe 6. No numerical live expectation follows. The Gaussian formula needs true population strength, a pre-specified library, known covariance and consistent units; a selected training score cannot be substituted for population strength. Equal weighting still inherits selection.
  5. Small-cap stocks hedged with large-cap futures. Beta mismatch, size/sector tilts, basis, borrow, financing, margin and execution remain. An equal-notional spread calculation is a labelled toy rather than a causal attribution of an industry's loss.
  6. A fiftieth alpha has annual Sharpe 0.3. That number is insufficient. Use consistent periods, genuine incremental residual strength, estimation/selection effects and net implementation. The research threshold belongs to a particular approximate objective; it is not an automatic admission rule.

Problems, with worked solutions

Problems 1–6: technical drills, with solutions

1. Count depth-two grammar trees. With 6 fields, 5 unary operators, 7 time-series operators and correlation over 4 windows, and 4 binary operators, count trees of depth at most 2.

Solution

There are six leaves. Five unary plus \(7\times4\) time-series choices give 33 unary choices. Four arithmetic and four windowed correlation choices give eight binary choices. Hence

\[a_1=6,\qquad a_2=6+33\cdot6+8\cdot6^2=492.\]

This counts syntactic trees of depth at most two. Algebraic equivalence, repeated draws and equal rankings do not change this syntax count.

2. Noise mean IC. IID daily IC noise has standard deviation 0.10 over 500 days. Give the leading independent Gaussian maximum scale for 10{,}000 signed means; also count both selectable signs.

Solution

Under IID daily noise with standard deviation 0.10 and 500 days, \(\sigma_{\bar I}=0.1/\sqrt{500}=0.00447214\). For 10,000 independent Gaussian signed means, the leading one-sided maximum scale is

\[\sigma_{\bar I}\sqrt{2\ln10000}=0.0191941.\]

Selecting either sign uses the leading absolute-maximum reference \(\sigma_{\bar I}\sqrt{2\ln20000}=0.0199033\). These are asymptotic reference scales, not exact expectations, rejection quantiles or p-values for the actual formula family. Dependence, heterogeneous distributions and adaptive selection change calibration.

3. Ideal fundamental-law toy. In the ideal independent, equal-risk, unconstrained fundamental-law toy, IC is 0.02 across 100 bets. Compute \(IC\sqrt{100}\) and its 365-day annualisation; state why this is not implied by 100 coins alone.

Solution

Under independent, equal-risk bets with the stipulated unconstrained forecasting/weighting model, \(IR\approx IC\sqrt B=0.02\sqrt{100}=0.2\) per day. IID 365-day annualisation gives \(0.2\sqrt{365}=3.82099\). One hundred coins are not automatically 100 independent bets; correlations, constraints, selection and costs can invalidate that translation. This is a fixed model calculation.

4. Equicorrelation. For feasible standardised equicorrelated signals with equal target correlation \(c\), derive \(c\sqrt{N/(1+(N-1)\rho)}\); evaluate \(N=10000,c=0.01,\rho=0.3\) and state the joint PSD restriction.

Solution

For standardised signals, the sum has variance \(N+N(N-1)\rho\) and covariance \(Nc\) with the standardised target. Therefore

\[IC_{EW}=c\sqrt{\frac{N}{1+(N-1)\rho}}.\]

For \(N=10000,c=0.01,\rho=0.3\), this is 0.0182553, and variance breadth is 3.33256. Joint PSD requires \(Nc^2/[1+(N-1)\rho]\le1\). Positive signal covariance alone is insufficient. For \(\rho>0\) the feasible large-\(N\) multiplier is \(1/\sqrt\rho\); its IC cannot exceed one. With \(\rho=0\), feasibility requires \(Nc^2\le1\).

5. Parsimony. GP fitness is absolute mean IC minus 0.0005 per node. What gain pays for ten extra nodes? Does fitness monotonicity imply monotone raw IC?

Solution

Ten extra nodes cost \(10\times0.0005=0.005\) in absolute mean-IC fitness. A 0.005 gain exactly compensates, and a larger gain strictly improves fitness if everything else is equal. Selection/ties and the rest of the population still matter. Better penalised fitness need not mean higher raw IC because expression sizes differ.

6. Agent accounting. An agent scores 500 hypotheses over 4 windows. Count 2{,}000 nominal evaluations and compare independent Gaussian maximum scales with 500. Explain why adaptive counts need further calibration.

Solution

Five hundred hypotheses at four windows yield 2,000 nominal evaluations. The independent Gaussian reference moves from \(\sqrt{2\ln500}=3.52551\) to \(\sqrt{2\ln2000}=3.89895\), a difference of 0.37344 standard deviations, about a 10.6% increase. Related windows, adaptive prompts, failed runs and human choices need separate accounting and null calibration; 2,000 evaluations do not imply 2,000 independent tests.

Problems, with worked solutions

Problems 7–10: worked extensions, with solutions

7. REINFORCE baseline. For a fixed policy and an action-independent baseline conditional on state, prove \(\mathbb E[b\nabla\log\pi(a)]=0\). Must every baseline lower variance?

Solution

Fix a state and a differentiable normalised policy with fixed support and valid differentiation under the sum/integral. For an action-independent baseline \(b\),

\[\mathbb E[b\nabla\log\pi(a)]=b\sum_a\nabla\pi(a)=b\nabla1=0.\]

Treat reward/baseline as fixed when taking the score-function gradient. An action-dependent baseline generally needs a correction. A baseline can increase variance; an appropriate choice, not every constant, reduces it. This identity does not make backtest rewards unbiased or a changing pool stationary.

8. Equal-notional hedge toy. Fixed equal initial notionals: long small caps, short index futures. Simple returns are \(-20\%\) and \(-5\%\). Compute P&L per dollar long before basis, costs and funding; distinguish a toy from attribution.

Solution

Per initial dollar long and dollar short, simple-return P&L is \(-0.20-(-0.05)=-0.15\): 15% loss per dollar long, or 7.5% of initial gross exposure two. This omits basis, beta mismatch, financing, borrow, trading costs and changing positions. It is not a measured fund loss or causal attribution. A leverage multiplier requires a clearly specified capital denominator.

9. Assumed half-life. A chosen exponential IC half-life is 2 years, starting at 0.03. When is IC strictly below 0.01? Is the half-life established by three yearly observations?

Solution

With \(IC(t)=0.03\,2^{-t/2}\), strict inequality \(IC(t)<0.01\) is equivalent to \(t>2\log_2 3=3.169925\) years. Equality holds at the boundary. If observations are restricted to integer years, the first is year four. The chosen exponential law and half-life are assumptions; three selected yearly means do not establish a causal crowding-decay rate.

10. Plug-in approximation. 20 fixed independent Gaussian return coordinates have daily Sharpe 0.02, known covariance and 365 observation days. Compute population optimum and the plug-in approximation, daily and 365-day annualised.

Solution

For 20 pre-specified independent Gaussian coordinates with daily Sharpe 0.02,

\[S=20(0.02)^2=0.008,\quad SR_*=\sqrt S=0.0894427.\]

At \(T=365\), the known-covariance approximation gives

\[f(S,20)=\frac{0.008}{\sqrt{0.008+20/365}}=0.0319249\]

per day. Multiplication by \(\sqrt{365}\) gives population optimum 1.70880 and approximation 0.609924 annualised. The latter is not an exact finite-sample expected Sharpe and does not include selected-library or estimated-covariance effects.

Problems, with worked solutions

Problems 11–12: qualifying problems, with solutions

11. Gaussian concentration and finite addition.

Solution

For IID \(r_t\sim N(\mu,\Sigma)\) with known positive definite \(\Sigma\), set \(\theta=\Sigma^{-1/2}\mu\) and \(z=\Sigma^{-1/2}\hat\mu=\theta+\varepsilon/\sqrt T\), \(\varepsilon\sim N(0,I_K)\). The population Sharpe of \(\hat w=\Sigma^{-1}\hat\mu\) is exactly

\[SR(\hat w)=\frac{z^\top\theta}{\|z\|}.\]

For deterministic pre-specified \(\theta_K\) with \(S_K=\|\theta_K\|^2\to S\in(0,\infty)\) and \(K/T\to\gamma<\infty\),

\[\mathbb E[z^\top\theta]=S_K,\quad\operatorname{Var}(z^\top\theta)=S_K/T,\]

\[\mathbb E\|z\|^2=S_K+K/T,\quad\operatorname{Var}\|z\|^2=4S_K/T+2K/T^2.\]

Both variances vanish, so Chebyshev and continuous mapping give \(SR(\hat w)\to_p S/\sqrt{S+\gamma}\). At finite dimension, replacing ratio components by their means is an approximation, not an exact expectation. The original equal-strength growing-\(K\) simulation has growing \(S_K\) and is a different illustrative regime. The known-covariance training score using the fitted mean and true variance equals \(\|z\|\); its product with population out-of-sample Sharpe is exactly \(z^\top\theta\), whose expectation is \(S_K\).

For the approximate objective \(f(S,K)=S/\sqrt{S+K/T}\), add one fixed independent coordinate with true per-period squared strength \(a=s^2\). Positive denominators allow squaring and cross multiplication:

\[f(S+a,K+1)>f(S,K)\iff(TS+K)a^2+(TS^2+2SK)a-S^2>0.\]

For \(S>0\), its positive root gives the exact finite-addition threshold within this approximate objective:

\[a>\frac{2S}{TS+2K+\sqrt{(TS+2K)^2+4(TS+K)}}.\]

Dropping the positive quadratic term yields \(a>S/(TS+2K)\), a stronger first-order sufficient condition, not a necessary exact finite threshold. With \(S=0\), any \(a>0\) increases the objective. These use true incremental strengths in common observation units; annualised selected Sharpe estimates cannot be inserted as daily population strengths. Estimated covariance adds another problem. For unbiased Gaussian sample covariance, \(\mathbb E\hat\Sigma^{-1}=(T-1)\Sigma^{-1}/(T-K-2)\) requires \(T>K+2\). Scalar inflation alone leaves Sharpe unchanged; random directional error matters.

12. Optimal Pearson combination. (qual) For standardised signals with positive definite \(C\) and target correlations \(c\), derive maximal Pearson IC \(\sqrt{c^\top C^{-1}c}\), joint PSD feasibility, and the equal-IC equicorrelation special case.

Solution

Centre and standardise the signals and target; assume finite second moments and positive definite signal correlation matrix \(C\). For weights \(w\),

\[IC(w)=\frac{w^\top c}{\sqrt{w^\top Cw}}.\]

Cauchy–Schwarz after whitening gives \((w^\top c)^2\le(w^\top Cw)(c^\top C^{-1}c)\). Equality holds for \(w\propto C^{-1}c\), with sign chosen for positive correlation. Thus maximal IC is \(\sqrt{c^\top C^{-1}c}\). If \(c=0\) it is zero. Joint PSD of \(\begin{pmatrix}C&c\\c^\top&1\end{pmatrix}\) requires \(c^\top C^{-1}c\le1\) by the Schur complement.

For \(C=(1-\rho)I+\rho\mathbf1\mathbf1^\top\), positive definiteness requires \(-1/(N-1)<\rho<1\). With \(c=c_0\mathbf1\), \(C^{-1}\mathbf1=\mathbf1/[1+(N-1)\rho]\), so maximal positive IC is \(|c_0|\sqrt{N/[1+(N-1)\rho]}\). For \(c_0>0\), equal weights attain it, reproducing Problem 4. This is a population Pearson identity; selected sample correlations, nonlinear re-ranking and unknown covariance require additional estimation and validation.

Reading and notes

The part's papers

from READING.md

  • Brown, S. (1976). Optimal portfolio choice under uncertainty: a Bayesian approach. PhD thesis, University of Chicago (estimation risk).
  • Koza, J. (1992). Genetic Programming: On the Programming of Computers by Means of Natural Selection. MIT Press.
  • Williams, R. J. (1992). "Simple statistical gradient-following algorithms for connectionist reinforcement learning." Machine Learning 8.
  • Neely, C., Weller, P., Dittmar, R. (1997). "Is technical analysis in the foreign exchange market profitable? A genetic programming approach." JFQA.
  • Allen, F., Karjalainen, R. (1999). "Using genetic algorithms to find technical trading rules." JFE 51.
  • Kan, R., Zhou, G. (2007). "Optimal portfolio choice with parameter uncertainty." JFQA 42.
  • Bali, T., Cakici, N., Whitelaw, R. (2011). "Maxing out: stocks as lotteries and the cross-section of expected returns." JFE 99.
  • Frazzini, A., Pedersen, L. H. (2014). "Betting against beta." JFE 111.
  • Tulchinsky, I., et al. (2015; 2nd ed. 2019). Finding Alphas. Wiley.
  • Kakushadze, Z. (2016). "101 formulaic alphas." Wilmott 84.
  • McLean, R. D., Pontiff, J. (2016). "Does academic research destroy stock return predictability?" JF 71.
  • Kakushadze, Z., Serur, J. A. (2018). 151 Trading Strategies. Palgrave Macmillan.
  • López de Prado, M., Lewis, M. (2019). "Detection of false investment strategies using unsupervised learning methods." Quantitative Finance 19.
  • Chordia, T., Goyal, A., Saretto, A. (2020). "Anomalies and false rejections." RFS.
  • Yang, X., Liu, W., Zhou, D., Bian, J., Liu, T.-Y. (2020). "Qlib: an AI-oriented quantitative investment platform." arXiv.
  • Isichenko, M. (2021). Quantitative Portfolio Management. Wiley.
  • Yu, S., Xue, H., Ao, X., Pan, F., He, J., Tu, D., He, Q. (2023). "Generating synergistic formulaic alpha collections via reinforcement learning." KDD 2023; arXiv 2306.12964 (checked at the source, November 2026).
  • Wang, S., et al. (2023). "Alpha-GPT: human–AI interactive alpha mining for quantitative investment." arXiv 2308.00016; EMNLP 2025 system demonstrations.
  • DeepSeek-AI (2024). "Fire-Flyer AI-HPC: a cost-effective software-hardware co-design for deep learning." SC'24; arXiv 2408.14158 (checked at the source).
  • DeepSeek-AI (2024). "DeepSeek-V3 technical report." arXiv (High-Flyer's AI lab; see AI, Built Parts 14, 16).
  • Li, Y., et al. (2025). "R&D-Agent-Quant: a multi-agent framework for data-centric factors and model joint optimization." NeurIPS 2025 datasets and benchmarks; arXiv 2505.15155.
  • Tang, Z., Chen, Z., Yang, J., Mai, J., Zheng, Y., Wang, K., Chen, J., Lin, L. (2025). "AlphaAgent: LLM-driven alpha mining with regularized exploration to counteract alpha decay." arXiv 2502.16789 (checked at the source).
  • Public record on the Chinese quant industry, February 2024: exchange notices on Ningbo Lingjun (Shanghai and Shenzhen, 20 February 2024); Bloomberg, Reuters, Caixin and SCMP reporting; WorldQuant press releases on BRAIN (August 2022) and the International Quant Championship (2023).

Papers and sources

Primary reports and attribution

  • Kakushadze, 101 Formulaic Alphas, arXiv 1601.00991v1: reported holding-period and correlation statistics in its original setting; adapted coin inputs differ.
  • Yu et al., Generating Synergistic Formulaic Alpha Collections via Reinforcement Learning, 2306.12964v1: PPO, Chinese stocks and a 20-day target, with its stated training/validation/test split.
  • Wang et al., Alpha-GPT, 2308.00016v1, 31 July 2023: human–AI interactive framework. Competition and later-version rankings are not used as evidence for this version.
  • Tang et al., AlphaAgent, 2502.16789v1: AST originality and hypothesis alignment; author-reported historical comparisons and early-2024 motivation do not identify causal decay or live performance.
  • Li et al., R&D-Agent-Quant, 2505.15155v1: author-selected factor/model comparisons and stated historical split; full LLM-process chronology is a separate issue.
  • Fire-Flyer AI-HPC, 2408.14158v1: author-reported system specifications and cost/energy comparison; a systems comparison rather than a controlled causal account of trading-to-model advantage.
  • DeepSeek-V3 Technical Report, 2412.19437v1: 2.664M pretraining + 0.119M context-extension + 0.005M post-training H800 GPU hours = 2.788M; at assumed $2/hour, $5.576M. Prior research and architecture/algorithm/data ablations are excluded. This is not total project or R1 cost.
  • Koza (1992), Williams (1992), Allen–Karjalainen (1999), Brown (1976), Kan–Zhou (2007), McLean–Pontiff (2016), Finding Alphas, and the series reading map provide the surrounding literature. The concentration proof above states its own regime rather than attributing a selected-library theorem to these references.
Data, scope and reproducibilityComputational and information scope

The financial algorithms, all compute.py files, House library and three registries remain unchanged. Twelve ordinary originals are permitted: grid, classic, space, random, noise, permnull, gp, rl, combine, decay, theory, counter. The envelope experiment is rejected before its counted/cache loader. The presentation's protocol chapter and downstream House/recap never load it. Restoration uses each unchanged original entry point without force, refresh, replacement historical experiments or new registrations. A failed frozen input remains blocked rather than silently replaced.

The public reader calls Part 27's ordinary _grid, not its strategy experiment. It reads a later frozen universe and public candles through 2025 before applying research masks. Including listed and delisted symbols broadens coverage; it does not establish historical investability, complete delisting losses or a complete point-in-time archive. The calculation uses inclusive current-close eligibility, 60 days since first finite close, and a 28-day median quote-volume threshold of 250,000 USDT. Current-close signal formation followed by same-close execution is idealised.

Here volume is quote volume, vwap is (high+low+close)/3, returns are log returns and Alpha#101 substitutes the previous close for open. These are adapted inputs. Stable ordinal sorting does not use average ranks for ties. Partial ties can depend on asset order. The return helper filters finite future outcomes and renormalises on that set; missing exits can therefore introduce hindsight availability. The last 2019 training interval uses the first 2020 close, while the final 2020 target is absent from the sliced grid. Validation is repeatedly inspected throughout the lesson.

Existing ledger metadata totals 23,480 through Part 29, 23,562 globally. Restoring an original calculation does not create a new registration. Nominal draws, per-seed unique strings, policy episodes, covariance directions and independent statistical tests are different quantities. The current original restoration totals 12,868 evaluations (10,000 random, 2,196 GP, 666 RL, 6 combination sizes), while the existing registered increment is 13,010. Earlier checked-in notes reported 808 RL strings. The 142-count difference is preserved; its cause is not identified here. There is no rerun to seek a match and no registry rewrite.

Data, scope and reproducibilityScientific distinctions

Random search draws 10,000 expressions, including repeats. Counting distinct mean ICs rounded to five decimals does not identify distinct signal vectors or independent ideas. A strictly increasing transformation preserves ranks on a shared finite sample; the reciprocal example needs positive, finite inputs. Missingness and ties need separate treatment. A Gaussian maximum scale is an approximation under its own assumptions, not a universal hurdle. A validation/training ratio does not estimate a Gaussian posterior shrinkage parameter.

GP uses absolute training IC minus 0.0005 per node, tournament selection and three seeds. Validation is computed during fitting but is not the selection criterion. Monotone penalised fitness need not imply monotone raw IC. Unique-string caches are per seed, and offspring bred after the last scored generation are unscored. The RL original uses a GRU and REINFORCE over 1,500 episodes; invalid and repeated episodes differ from distinct evaluated strings. Admission requires marginal training-pool IC above 0.0005. Least-squares targets zero-fill missing outcomes, whereas IC scoring filters finite outcomes. The pool evolves during training. This is an AlphaGen-inspired local design, with different assets, horizon and algorithm from the original PPO paper.

The shared-shuffle original scores 500 pre-drawn formulas under 20 daily cross-sectional return permutations. A shared shuffle preserves fixed formula vectors and creates a joint score sample, conditional on that design. Exchangeability of coin labels under a relevant null is an assumption. It does not replay adaptive GP, RL, combination-size selection or all research decisions. Inverting a leading Gaussian maximum scale produces a calibration index; it does not identify independent trials. No extrapolated fraction, corrected strategy hurdle or strategy pass/fail verdict is supplied.

For standardised equicorrelated signals and target, joint covariance feasibility requires

\[\frac{Nc^2}{1+(N-1)\rho}\le1.\]

Thus fixed nonzero target correlation cannot coexist with arbitrarily many mutually uncorrelated signals. A participation ratio counts concentration of sample covariance eigenvalues, not independent trials or causal factors. With a population Pearson projection and residual \(e\) orthogonal to the existing library, the additional best squared multiple correlation is

\[\Delta R^2=\frac{\operatorname{Cov}(e,r)^2}{\operatorname{Var}(e)\operatorname{Var}(r)},\]

provided both variances are positive. Re-ranking an estimated residual changes this linear-projection problem. The selected empirical libraries also involve selection, covariance estimation, missing-component conventions and regimes that the simple known-covariance model does not isolate.

Data, scope and reproducibilityEvaluation and fixed arithmetic

Freeze the information set, data vintage, release and execution times, membership, missing-outcome treatment, signs, weights, tuning, stopping, orders, borrow, financing, costs, benchmarks and inferential/reporting policy. A new period can still have low power, hidden selection or a changed regime.

The four-position arithmetic example uses no assets, dates or historical sample. Ranks \((0,1,2,3)\) give weights \((-0.75,-0.25,0.25,0.75)\): one dollar long, one dollar short. Prices start at 100 and have chosen simple returns \((-1\%,+1\%,+2\%,0)\). Fixed shares earn 100 bp per initial dollar long. Entry trades two dollars; closing at these chosen final prices trades two more. At 5 bp per dollar traded, total cost is 20 bp and toy net is 80 bp. Borrow, financing, slippage and impact are omitted. This differs from the original helper's linearly weighted log-return score and supplies no historical performance, probability or power claim.

Chapter notesThe seventeen chapters
Chapter Question
Hook Why does the largest training score improve with search?
1. Formulaic alphas What exactly are the fields, ranks and execution conventions?
2. Search space How do the grammar and sampling prior create repetition?
3. Random search What does the selected winner establish under a stated noise model?
4. Genetic programming What do penalised fitness, generations and cached evaluations count?
5. Reinforcement learning What does marginal training-pool reward optimise?
6. Research agents What do versioned author reports establish about historical feasibility?
7. Combining alphas How do covariance feasibility, residual strength and weight estimation matter?
8. Counter Why does a fixed shuffle not calibrate the whole adaptive search?
9. Decay How do horizon persistence, turnover and publication comparisons differ?
10. China Which common exposures and execution constraints can survive an index hedge?
11. High-Flyer and DeepSeek What are the boundaries of systems and official-training cost reports?
12. Humans What do hypotheses, provenance, validation and stopping still require?
13. Evaluation protocol What must be specified before interpreting a future result?
14. House What evidence must accompany a machine-found signal?
Research What does the fixed-library Gaussian model prove?
Outro Six desk checks and twelve fully worked problems

中文讲义

本讲的中文说明、交易台问题与习题解答(与英文版对应)。

Desk questions, with solutions中文:六个交易台检查
  1. 一万个标准化信号,IC为0.01,等相关为0.3。 可行等相关模型下等权IC为0.0182553,方差广度为3.33256,均不能称为独立试验次数;平均相关本身不足以确定任意已选信号的组合IC。
  2. GP训练IC为0.08,共25代。 需要目标惩罚、全部种子与搜索、重复及缓存评估次数、信息时序、缺失、成本和完整验证方案;字符串数不能单独给出通用门槛。
  3. 智能体在2015—2022年股票上报告夏普3。 核查模型及检索来源、提示词和人工选择、数据版本、发布和成交时点、成本与依赖。声明的知识截止日不足以证明历史信息集清洁;新验证须冻结完整流程。
  4. 40个已选阿尔法拟合夏普6。 无法推出数值化实盘期望。高斯公式需总体真实强度、预先固定信号、已知协方差及统一单位;已选训练夏普不能冒充总体强度,等权也继承公式选择。
  5. 小盘股多头用大盘期货对冲。 仍有贝塔误差、规模和行业暴露、基差、借券、融资、保证金和执行风险。等金额差价算例不能视为行业损失归因。
  6. 第50个阿尔法年化夏普0.3。 单凭该数不能决定加入。须用一致周期、真实增量残差强度、估计和选择影响及净执行价值。研究门槛只适用于指定近似目标。
Problems, with worked solutions中文:习题1—6及完整解答

1.深度二的语法树。 6个叶节点;一元选择为 \(5+7\times4=33\),二元选择为 \(4+4=8\)。因此 \(a_1=6\),\(a_2=6+33\times6+8\times6^2=492\)。这是深度至多二的语法树计数,代数等价、重复抽样与相同排名不改变此计数。

2.噪声平均IC。 独立同分布日噪声的均值标准差为 \(0.1/\sqrt{500}=0.00447214\)。一万个独立高斯有符号均值的单侧极值首阶尺度为 \(0.00447214\sqrt{2\ln10000}=0.0191941\);若可挑选两种符号,绝对极值首阶参考为 \(0.00447214\sqrt{2\ln20000}=0.0199033\)。它们不是精确期望、拒绝分位数或实际公式族的p值;依赖、异质性与自适应选择需要另行校准。

3.基本定律理想算例。 在独立、等风险、无约束且满足所指定预测及权重模型的100次押注中,\(IR\approx0.02\sqrt{100}=0.2\)每天。按365个独立日年化为 \(0.2\sqrt{365}=3.82099\)。100个币种不自动等于100次独立押注;相关、约束、选择和成本均可能破坏这一换算。此处仅是固定模型算术。

4.等相关组合。 标准化信号之和方差为 \(N+N(N-1)\rho\),与标准化目标的协方差为 \(Nc\),故等权IC为 \(c\sqrt{N/[1+(N-1)\rho]}\)。代入一万、0.01和0.3得0.0182553,方差广度3.33256。目标也必须满足联合半正定约束 \(Nc^2/[1+(N-1)\rho]\le1\)。正相关时可行大样本倍数趋向 \(1/\sqrt\rho\),IC仍不超过1;零相关时需 \(Nc^2\le1\),不能固定非零c而任意增大N。

5.简约惩罚。 多十节点增加 \(10\times0.0005=0.005\) 的绝对平均IC惩罚。增加0.005刚好抵消,更高才在其他条件相同时严格提高适应度;并列与其余种群仍影响选择。因树长不同,惩罚后适应度更高不意味着原始IC更高。

6.智能体计数。 500个假设乘4窗口为2,000次名义评估。独立高斯参考尺度由 \(\sqrt{2\ln500}=3.52551\) 升至 \(\sqrt{2\ln2000}=3.89895\),增加0.37344个标准差,约10.6%。相关窗口、提示词调整、失败运行与人工决定还需计数;名义评估数不等于独立检验数。

Problems, with worked solutions中文:习题7—10及完整解答

7.REINFORCE基线。 固定状态,策略可微、归一化、支持集固定且可交换求导与求和。若b不依赖所抽动作,\(\mathbb E[b\nabla\log\pi(a)]=b\sum_a\nabla\pi(a)=b\nabla1=0\)。取分数函数梯度时须把奖励和基线视为固定;动作相关基线通常需要修正。任意基线不保证降方差,合适选择才可能降低。此恒等式不使回测奖励无偏,也不使变化中的池平稳。

8.等金额对冲算例。 每初始1美元多头和1美元空头,简单收益损益为 \(-0.20-(-0.05)=-0.15\),即每美元多头亏15%,占初始总敞口2的7.5%。基差、贝塔不匹配、借券、融资、成本和动态仓位均被省略;这是固定算例,不能当作真实基金损失或因果归因。使用杠杆倍数还需定义资本分母。

9.假设的半衰期。 令 \(IC(t)=0.03\,2^{-t/2}\),严格小于0.01等价于 \(t>2\log_2 3=3.169925\) 年;边界恰好等于0.01。若只看整数年,首次为第4年。指数形式与两年半衰期是给定假设,三个已选年度均值不能确认拥挤导致的衰减率。

10.插入式近似。 二十个预先固定、独立高斯收益坐标每日夏普0.02,则 \(S=20(0.02)^2=0.008\),总体最优每日夏普 \(\sqrt S=0.0894427\)。取365个观测日,近似值为 \(0.008/\sqrt{0.008+20/365}=0.0319249\)每天。乘 \(\sqrt{365}\),总体最优年化1.70880,插入式近似年化0.609924。后者不是有限样本夏普的精确期望,也未包含已选库或协方差估计的影响。

Problems, with worked solutions中文:习题11—12及完整解答

11.高斯集中与有限增加。 对独立同分布高斯收益及已知正定协方差,令 \(\theta=\Sigma^{-1/2}\mu\)、\(z=\Sigma^{-1/2}\hat\mu=\theta+\varepsilon/\sqrt T\),其中 \(\varepsilon\sim N(0,I_K)\)。权重 \(\hat w=\Sigma^{-1}\hat\mu\) 的总体样本外夏普精确为 \(z^\top\theta/\|z\|\)。

设信号预先固定,确定性强度 \(S_K=\|\theta_K\|^2\to S\in(0,\infty)\),\(K/T\to\gamma<\infty\)。分子期望和方差分别为 \(S_K\)、\(S_K/T\);平方长度期望与方差分别为 \(S_K+K/T\)、\(4S_K/T+2K/T^2\)。两方差趋零,由切比雪夫和连续映射得到夏普依概率趋于 \(S/\sqrt{S+\gamma}\)。有限样本用均值替换比值各项仍只是近似,不能把比值期望等同于均值之比。每坐标强度固定而K增长的原始模拟使总强度增长,属于不同演示情形。使用真实协方差作分母的训练分数等于 \(\|z\|\),与总体样本外夏普之积精确等于 \(z^\top\theta\),其期望为 \(S_K\)。

对已属近似的目标 \(f(S,K)=S/\sqrt{S+K/T}\),加入真实每周期平方强度为a的一个固定独立坐标。正分母下平方并交叉相乘,增益严格为正当且仅当

\[(TS+K)a^2+(TS^2+2SK)a-S^2>0.\]

当S为正时,正根给出该近似目标内精确的有限增加条件

\[a>\frac{2S}{TS+2K+\sqrt{(TS+2K)^2+4(TS+K)}}.\]

丢掉正的二次项得到更强的首阶充分条件 \(a>S/(TS+2K)\),不是精确有限增加的必要条件。S为零时任意正a都提高目标。必须使用相同观测周期中的真实增量强度,不能把已选年化训练夏普当成每日总体强度。高斯无偏样本协方差的逆矩期望为 \((T-1)\Sigma^{-1}/(T-K-2)\),须 \(T>K+2\);纯比例膨胀不改变夏普,随机方向误差才是相关问题。

12.最佳Pearson组合。 对中心化、标准化信号和目标及正定相关矩阵C,\(IC(w)=w^\top c/\sqrt{w^\top Cw}\)。白化后的柯西不等式给出 \((w^\top c)^2\le(w^\top Cw)(c^\top C^{-1}c)\)。取 \(w\propto C^{-1}c\) 并选择正相关方向达等号,最大IC为 \(\sqrt{c^\top C^{-1}c}\);c为零时最大值为零。联合矩阵的Schur补要求 \(c^\top C^{-1}c\le1\)。

等相关时 \(C=(1-\rho)I+\rho\mathbf1\mathbf1^\top\),正定条件为 \(-1/(N-1)<\rho<1\)。若 \(c=c_0\mathbf1\),则 \(C^{-1}\mathbf1=\mathbf1/[1+(N-1)\rho]\),最大正IC为 \(|c_0|\sqrt{N/[1+(N-1)\rho]}\)。正c时等权实现它,重现第4题,并同样满足联合协方差可行性。此为总体Pearson投影恒等式;已选样本相关、非线性重排序和未知协方差另需估计及验证。

中文参考文献与上方所列版本对应。硬件成本及模型训练费用均按作者的比较范围解释;V3的5.576百万美元仅按假设租价折算官方训练,不包含先前研究、消融或整个项目投资,也不是R1费用。行业报道、模型历史信息集与可交易净收益均不由一个纸面性能数字自动证明。

Review log of the earlier QA passes on this part: docs/qa/quant/part29.md.

Data, scope and reproducibility中文:范围与科学解释

双语源表和构图核验已完成,正在执行全新最终视觉审阅。十二个常规原始计算已恢复;125个旁白上下文包含91条人工翻译与34条原表达式复用,86处实际数值占位符与44项显示范围已核验。标签区分随机抽样、各GP缓存计数与历史登记元数据。新增197条画面字幕保留所有旧值,共33,961条。封存策略结果持续排除。所有早期构图与被拒绝成片尝试均保留实际指纹,旧最终批准不转移;完整成片连续听审及发音审阅仍单独待办。

十二个允许的常规原始计算及全部金融算法保持不变。封存策略实验在计数包装器或缓存读取之前被拒绝,协议章、House 和回顾均不加载其收益或分数。恢复不使用强制重算、刷新、替代历史试验或新登记。第29部分累计既有登记为23,480,全系列23,562;这些是已有元数据,不是本轮新试验。 当前原始恢复的计算计数为12,868:随机10,000、GP 2,196、RL 666、组合规模6;既有登记增量仍为13,010。旧笔记记录RL 808个字符串,差额142保持原状,成因未被本次恢复识别,不为匹配计数重跑,也不改登记。

底层读入的是较晚冻结的公开币种和2017—2025年行情,然后才应用研究掩码;包含退市币种不能证明完整历史可投资性或退市损失覆盖。资格使用当日收盘、当日及此前27天的报价成交额中位数和距首个有效收盘的60天,故同收盘成交是理想化约定。volume 为报价成交额,vwap 为高低收均价,收益为对数收益,Alpha#101 用前收盘替代开盘。稳定序数排名不对并列值取平均,部分并列可能依赖资产顺序。原始收益函数按未来收益是否有限重新筛选及归一化,存在事后可得性问题。2019年最后一个训练区间使用2020年首个收盘;切片中2020年最后一个目标缺失,验证年也被反复查看。

随机公式的重复字符串、四舍五入的平均分数、每种种子的缓存条目、RL回合和协方差方向均不等于独立检验。GP优化的是绝对训练IC减每节点0.0005的惩罚;验证分数虽被计算,却不用于代际选择,最后一代之后繁殖的子代未评分。RL以训练池最小二乘组合的边际IC为奖励,拟合中把缺失未来收益填零,评分中却过滤缺失,池与策略不断共同变化。原始共享置换只对500个预先抽取公式做20次每日横截面打乱,不重跑完整自适应搜索;币种标签可交换是额外假设。反解高斯极值首阶尺度所得指标不能识别独立试验次数,也不能按比例外推为全搜索的门槛或策略通过结论。

等相关组合要求联合协方差半正定,即 \(Nc^2/[1+(N-1)\rho]\le1\)。参与比衡量样本特征值集中度,不是独立押注数。总体线性投影增加的最佳平方Pearson相关是 \(\operatorname{Cov}(e,r)^2/[\operatorname{Var}(e)\operatorname{Var}(r)]\);残差和目标方差均须为正,重新排序残差会改变问题。已选公式的样本比较同时受选择、均值和协方差估计、缺失处理与市场变化影响。

协议要事先规定信息集、数据版本、发布时间、成交时间、成员资格、缺失和退出、信号与权重选择、停止、借券、融资、成本、容量、比较基准与统计报告规则。四仓位例子只用固定排名和自选简单价格收益:权重为 \((-0.75,-0.25,0.25,0.75)\),收益为 \((-1\%,1\%,2\%,0)\),毛收益为每美元多头100个基点。建仓交易2美元,按这些终值平仓再交易2美元,每交易1美元收5基点,共20基点,固定算术净值为80基点;借券、融资、滑点和冲击均未计入。这不是历史策略收益、预测或检验功效。

Build the film

python -m videos.quant.quant29.compute      # the part's numbers, into .cache/quant29
python tools/make.py quant29                # the narrated film, English and Chinese
EXPLAINER_TTS=silent python tools/qa_scene.py quant29 Hook   # one chapter, silent, with a contact sheet

Scenes: videos/quant/quant29. Setup: see the course page. Source of these notes: the part's README and the scenes' narration.