Skip to content

[codex] add chinext growth momentum quality snapshot#14

Merged
Pigbibi merged 1 commit into
mainfrom
codex/chinext-growth-momentum-quality-snapshot
Jul 5, 2026
Merged

[codex] add chinext growth momentum quality snapshot#14
Pigbibi merged 1 commit into
mainfrom
codex/chinext-growth-momentum-quality-snapshot

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add CN ChiNext growth momentum quality snapshot contract and builder
  • add sample factor snapshot, artifact docs, and regression tests
  • wire the new builder into package entrypoints and README

Test Plan

  • PYTHONPATH=src:/Users/lisiyi/Projects/CnEquityStrategies/src python3 -m pytest -q
  • PYTHONPATH=src:/Users/lisiyi/Projects/CnEquityStrategies/src python3 scripts/build_chinext_growth_momentum_quality_sample.py

Co-Authored-By: Codex <noreply@openai.com>
@cursor

cursor Bot commented Jul 5, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@Pigbibi Pigbibi enabled auto-merge July 5, 2026 13:28
@Pigbibi Pigbibi merged commit ea679d8 into main Jul 5, 2026
2 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2b63cbe2b2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +35 to +36
min_adv20_cny: float = 0.0,
min_market_cap_cny: float = 0.0,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve the strategy's production floors by default

When callers use this new builder or CLI without threshold flags, these 0.0 defaults are passed into both score_candidates and compute_signals, overriding the pinned strategy's nonzero liquidity and market-cap defaults. For this profile that means zero-market-cap rows can remain eligible and even receive weights; the added sample's 159915 ETF has market_cap_cny=0 and is not the strategy safe-haven, so the default sample build can allocate to it instead of filtering it out. Use the strategy defaults here or only pass these values when explicitly provided.

Useful? React with 👍 / 👎.

Comment thread pyproject.toml
dependencies = [
"pandas>=2.0",
"cn-equity-strategies @ git+https://github.com/QuantStrategyLab/CnEquityStrategies.git@8dfadcf8a4dc6cc516f27a4013248474603d8ce2",
"cn-equity-strategies @ git+https://github.com/QuantStrategyLab/CnEquityStrategies.git@1bced052d515373e88620dae48499a4ad44c10f7",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update the lockfile with the dependency bump

This dependency is bumped to the commit that provides the new ChiNext strategy module, but the checked-in uv.lock still pins cn-equity-strategies to 8dfadcf8a4dc6cc516f27a4013248474603d8ce2. Any locked uv install will not resolve the dependency state represented by this change and can end up without the module imported by chinext_growth_momentum_quality.py; please regenerate and commit the lockfile alongside this pin change.

Useful? React with 👍 / 👎.

Comment on lines +41 to +42
snapshot = _ensure_snapshot_as_of(_read_csv(factor_snapshot_path), as_of=as_of)
ranking = score_candidates(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep non-ChiNext rows out of the new sleeve

This builder forwards the entire CSV into score_candidates without enforcing the contract's ChiNext universe, so a broad A-share factor snapshot can let non-300-prefixed stocks or ETFs that satisfy the factor screens enter the ranking and target weights. This is separate from the market-cap floor: a large non-ChiNext row would still pass the new profile's scoring path unless the pipeline validates or filters symbol to ChiNext stock codes before scoring.

Useful? React with 👍 / 👎.

300001,software,28.0,80000000.0,25000000000.0,0.32,0.28,0.10,0.18,0.75,0.70,0.24,0.16,0.12,0.28,True,0,False,1200
300002,biotech,44.0,60000000.0,18000000000.0,0.24,0.21,0.06,0.15,0.68,0.66,0.18,0.12,0.08,0.24,True,0,False,900
300003,new_energy,16.0,55000000.0,14000000000.0,0.04,-0.02,-0.01,0.08,0.50,0.48,0.05,0.03,0.01,0.20,True,0,False,800
159915,etf,3.5,1000000000.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.12,True,0,False,3000

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include the actual safe-haven row in the sample

For the default sample build, the ChiNext strategy assigns the uninvested/defensive weight to its default safe-haven symbol 511880, but this sample includes 159915 instead. After the production floors/non-ChiNext filtering are fixed, the generated release summary can still reference 511880 in target_weights/managed symbols without any corresponding snapshot row, which makes the sample artifact pack inconsistent for downstream jobs that expect metadata for every managed symbol.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant