Skip to content

Add first-hour QTA2 research and persistent position ledger - #31

Merged
mrcha033 merged 2 commits into
mainfrom
feat/deterministic-position-lifecycle
Jul 29, 2026
Merged

mrcha033 merged 2 commits into
mainfrom
feat/deterministic-position-lifecycle

Conversation

@mrcha033

Copy link
Copy Markdown
Owner

Summary

  • add full-universe read-only first-hour research collection/evaluation and QTA2 scoring
  • require a fresh nonnegative same-session benchmark regime before QTA2 shadow entry quotes
  • add persistent account/market strategy-position ownership and broker reconciliation
  • parallelize deterministic screening and emit compact stdout receipts

Validation

  • 76 Python regression tests pass
  • marketplace and deterministic release packaging pass
  • QTA1 full-universe output remains byte-identical
  • QTA2 execution remains RESEARCH_ONLY, shadow-only, live_enabled=false

@mrcha033
mrcha033 merged commit 677fe4c into main Jul 29, 2026
3 checks passed
@mrcha033
mrcha033 deleted the feat/deterministic-position-lifecycle branch July 29, 2026 15:08

@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: 25cee59e03

ℹ️ 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 +1216 to +1218
source_timestamp = kis_market_timestamp(
date_value=compact_date,
time_value=latest["stck_cntg_hour"],

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 Obtain the Korean benchmark date from broker data

When the Korean index endpoint returns a delayed or cached tick whose time of day is within the 90-second freshness window, this constructs source_timestamp using the requested session date rather than a date supplied by the broker, so evaluate_market_regime can incorrectly accept a previous-session observation as same-session data. Use a date-bearing response or endpoint, or block admission when the observation date cannot be verified.

Useful? React with 👍 / 👎.

Comment on lines +223 to +226
previous: Decimal | None = None
for bar in bars:
current = Decimal(bar["close"])
if previous is not None and previous < entry <= current:

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 entry crossings in the first observed bar

When the first bar opens below the entry threshold and closes at or above it, this function cannot report the crossing because previous starts as None. That systematically undercounts entry_crossed_by_bar_close and the resulting cross fractions in the opening-hour evaluation; initialize the first comparison from the first bar's open (or an explicitly defined pre-window baseline).

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