alphaengine 1.0.2__tar.gz → 1.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. alphaengine-1.1.0/.github/ISSUE_TEMPLATE/bug_report.md +32 -0
  2. alphaengine-1.1.0/.github/ISSUE_TEMPLATE/data_shape.md +24 -0
  3. alphaengine-1.1.0/.github/ISSUE_TEMPLATE/method_request.md +29 -0
  4. alphaengine-1.1.0/.github/dependabot.yml +13 -0
  5. alphaengine-1.1.0/.github/workflows/codeql.yml +29 -0
  6. {alphaengine-1.0.2 → alphaengine-1.1.0}/.github/workflows/publish.yml +3 -0
  7. alphaengine-1.1.0/CHANGELOG.md +63 -0
  8. alphaengine-1.1.0/CODE_OF_CONDUCT.md +49 -0
  9. alphaengine-1.1.0/CONTRIBUTING.md +39 -0
  10. {alphaengine-1.0.2 → alphaengine-1.1.0}/PKG-INFO +203 -37
  11. {alphaengine-1.0.2 → alphaengine-1.1.0}/README.md +201 -35
  12. {alphaengine-1.0.2 → alphaengine-1.1.0}/SECURITY.md +2 -2
  13. alphaengine-1.1.0/docs/plugins.md +60 -0
  14. alphaengine-1.1.0/docs/project-format.md +79 -0
  15. alphaengine-1.1.0/docs/result-format.md +89 -0
  16. alphaengine-1.1.0/examples/process_stress_monitor.yaml +15 -0
  17. alphaengine-1.1.0/examples/screen_validate_size.yaml +12 -0
  18. {alphaengine-1.0.2 → alphaengine-1.1.0}/pyproject.toml +7 -1
  19. {alphaengine-1.0.2 → alphaengine-1.1.0}/scripts/gen_docs.py +1 -1
  20. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/__init__.py +6 -1
  21. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/_version.py +35 -20
  22. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/agent/bakeoff.py +74 -20
  23. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/agent/brief.py +93 -30
  24. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/agent/chart.py +53 -23
  25. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/agent/sim.py +22 -4
  26. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/auth.py +56 -6
  27. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/cli.py +1635 -39
  28. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/client/executor.py +12 -2
  29. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/client/session.py +104 -13
  30. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/commands.py +350 -12
  31. alphaengine-1.1.0/src/alphaengine/complete.py +123 -0
  32. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/core/__init__.py +2 -0
  33. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/core/backtest.py +8 -3
  34. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/core/bakeoff.py +7 -3
  35. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/core/pairs.py +4 -1
  36. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/core/validation.py +83 -30
  37. alphaengine-1.1.0/src/alphaengine/datasets.py +383 -0
  38. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/demo.py +20 -6
  39. alphaengine-1.1.0/src/alphaengine/envelope.py +130 -0
  40. alphaengine-1.1.0/src/alphaengine/ideas.py +285 -0
  41. alphaengine-1.1.0/src/alphaengine/io.py +423 -0
  42. alphaengine-1.1.0/src/alphaengine/ledger.py +631 -0
  43. alphaengine-1.1.0/src/alphaengine/memo.py +374 -0
  44. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/model.py +44 -1
  45. alphaengine-1.1.0/src/alphaengine/pipeline.py +342 -0
  46. alphaengine-1.1.0/src/alphaengine/plugins.py +264 -0
  47. alphaengine-1.1.0/src/alphaengine/project.py +307 -0
  48. alphaengine-1.1.0/src/alphaengine/repl.py +149 -0
  49. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/study/__init__.py +22 -2
  50. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/study/report.py +77 -10
  51. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/study/schema.py +84 -3
  52. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/sweep/runner.py +132 -7
  53. alphaengine-1.1.0/src/alphaengine/sync.py +381 -0
  54. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/tui/app.py +41 -8
  55. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/tui/dispatch.py +296 -15
  56. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/tui/mark.py +2 -0
  57. alphaengine-1.1.0/src/alphaengine/watch.py +272 -0
  58. {alphaengine-1.0.2 → alphaengine-1.1.0}/tests/test_bakeoff.py +4 -1
  59. {alphaengine-1.0.2 → alphaengine-1.1.0}/tests/test_cli.py +46 -3
  60. {alphaengine-1.0.2 → alphaengine-1.1.0}/tests/test_client.py +93 -4
  61. alphaengine-1.1.0/tests/test_coverage_paths.py +600 -0
  62. {alphaengine-1.0.2 → alphaengine-1.1.0}/tests/test_goldens.py +4 -1
  63. alphaengine-1.1.0/tests/test_io.py +116 -0
  64. {alphaengine-1.0.2 → alphaengine-1.1.0}/tests/test_math_audit.py +49 -4
  65. alphaengine-1.1.0/tests/test_project.py +920 -0
  66. {alphaengine-1.0.2 → alphaengine-1.1.0}/tests/test_sim.py +1 -1
  67. {alphaengine-1.0.2 → alphaengine-1.1.0}/tests/test_sweep.py +228 -0
  68. {alphaengine-1.0.2 → alphaengine-1.1.0}/tests/test_tui.py +2 -2
  69. alphaengine-1.0.2/src/alphaengine/complete.py +0 -71
  70. alphaengine-1.0.2/src/alphaengine/repl.py +0 -80
  71. {alphaengine-1.0.2 → alphaengine-1.1.0}/.github/workflows/ci.yml +0 -0
  72. {alphaengine-1.0.2 → alphaengine-1.1.0}/.gitignore +0 -0
  73. {alphaengine-1.0.2 → alphaengine-1.1.0}/AGENTS.md +0 -0
  74. {alphaengine-1.0.2 → alphaengine-1.1.0}/LICENSE +0 -0
  75. {alphaengine-1.0.2 → alphaengine-1.1.0}/docs/assets/banner.png +0 -0
  76. {alphaengine-1.0.2 → alphaengine-1.1.0}/docs/assets/data_boundary.png +0 -0
  77. {alphaengine-1.0.2 → alphaengine-1.1.0}/docs/assets/session.png +0 -0
  78. {alphaengine-1.0.2 → alphaengine-1.1.0}/docs/figure_contract.md +0 -0
  79. {alphaengine-1.0.2 → alphaengine-1.1.0}/docs/workflows/evaluate_process.json +0 -0
  80. {alphaengine-1.0.2 → alphaengine-1.1.0}/docs/workflows/research_week.json +0 -0
  81. {alphaengine-1.0.2 → alphaengine-1.1.0}/docs/workflows/stress_study.json +0 -0
  82. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/__main__.py +0 -0
  83. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/agent/__init__.py +0 -0
  84. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/agent/answer.py +0 -0
  85. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/agent/driver.py +0 -0
  86. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/book.py +0 -0
  87. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/charts.py +0 -0
  88. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/client/__init__.py +0 -0
  89. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/client/agent.py +0 -0
  90. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/connectors/__init__.py +0 -0
  91. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/context.py +0 -0
  92. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/core/active.py +0 -0
  93. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/core/allocate.py +0 -0
  94. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/core/covariance.py +0 -0
  95. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/core/cross_section.py +0 -0
  96. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/core/factors.py +0 -0
  97. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/core/market.py +0 -0
  98. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/core/options.py +0 -0
  99. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/core/panel.py +0 -0
  100. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/core/performance.py +0 -0
  101. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/core/portfolio.py +0 -0
  102. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/core/process.py +0 -0
  103. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/core/profile.py +0 -0
  104. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/core/rates.py +0 -0
  105. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/core/regime.py +0 -0
  106. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/core/relations.py +0 -0
  107. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/core/risk.py +0 -0
  108. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/core/screen.py +0 -0
  109. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/core/series_shapes.py +0 -0
  110. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/core/signals.py +0 -0
  111. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/core/stress.py +0 -0
  112. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/core/technical.py +0 -0
  113. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/core/trace.py +0 -0
  114. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/core/walkforward.py +0 -0
  115. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/demo_book.py +0 -0
  116. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/demo_returns.py +0 -0
  117. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/demo_signal.py +0 -0
  118. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/demo_universe.py +0 -0
  119. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/events.py +0 -0
  120. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/loaders.py +0 -0
  121. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/py.typed +0 -0
  122. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/sweep/__init__.py +0 -0
  123. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/tui/__init__.py +0 -0
  124. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/tui/stage.py +0 -0
  125. {alphaengine-1.0.2 → alphaengine-1.1.0}/src/alphaengine/tui/typeface.py +0 -0
  126. {alphaengine-1.0.2 → alphaengine-1.1.0}/tests/test_agent.py +0 -0
  127. {alphaengine-1.0.2 → alphaengine-1.1.0}/tests/test_answer.py +0 -0
  128. {alphaengine-1.0.2 → alphaengine-1.1.0}/tests/test_book.py +0 -0
  129. {alphaengine-1.0.2 → alphaengine-1.1.0}/tests/test_commands.py +0 -0
  130. {alphaengine-1.0.2 → alphaengine-1.1.0}/tests/test_context.py +0 -0
  131. {alphaengine-1.0.2 → alphaengine-1.1.0}/tests/test_events.py +0 -0
  132. {alphaengine-1.0.2 → alphaengine-1.1.0}/tests/test_executor_ops.py +0 -0
  133. {alphaengine-1.0.2 → alphaengine-1.1.0}/tests/test_loaders.py +0 -0
  134. {alphaengine-1.0.2 → alphaengine-1.1.0}/tests/test_model.py +0 -0
  135. {alphaengine-1.0.2 → alphaengine-1.1.0}/tests/test_portfolio.py +0 -0
  136. {alphaengine-1.0.2 → alphaengine-1.1.0}/tests/test_process.py +0 -0
  137. {alphaengine-1.0.2 → alphaengine-1.1.0}/tests/test_quant_maths.py +0 -0
  138. {alphaengine-1.0.2 → alphaengine-1.1.0}/tests/test_relations.py +0 -0
  139. {alphaengine-1.0.2 → alphaengine-1.1.0}/tests/test_screen.py +0 -0
  140. {alphaengine-1.0.2 → alphaengine-1.1.0}/tests/test_signals.py +0 -0
  141. {alphaengine-1.0.2 → alphaengine-1.1.0}/tests/test_smoke.py +0 -0
  142. {alphaengine-1.0.2 → alphaengine-1.1.0}/tests/test_trace.py +0 -0
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: Bug report
3
+ about: Report a reproducible bug in AlphaEngine
4
+ title: "[Bug]: "
5
+ labels: ["bug"]
6
+ assignees: []
7
+ ---
8
+
9
+ ## Summary
10
+
11
+ A clear and concise description of what went wrong.
12
+
13
+ ## Reproduction
14
+
15
+ Minimal Python snippet or CLI command that reproduces the issue (using synthetic data or `alphaengine demo`):
16
+
17
+ ```python
18
+ import alphaengine
19
+ # ...
20
+ ```
21
+
22
+ ## Expected vs. actual behavior
23
+
24
+ - **Expected:**
25
+ - **Actual:**
26
+
27
+ ## Environment
28
+
29
+ - `alphaengine` version (`alphaengine version`):
30
+ - Python version:
31
+ - OS:
32
+ - `numpy` / `scipy` versions:
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: Data shape / loader issue
3
+ about: Report a CSV, Parquet, or interop data-shape edge case
4
+ title: "[Data shape]: "
5
+ labels: ["data-shape"]
6
+ assignees: []
7
+ ---
8
+
9
+ ## Data source / format
10
+
11
+ Which loader or flag was used (`--data`, `load_panel`, `alphaengine.io.from_quantconnect`, `alphaengine.io.from_vectorbt`, etc.)?
12
+
13
+ ## Anonymized header and sample rows
14
+
15
+ Please paste 3–5 anonymized rows showing the header and column types (never paste proprietary price history):
16
+
17
+ ```csv
18
+ date,symbol,close
19
+ 2026-01-02,AAA,100.00
20
+ ```
21
+
22
+ ## Current behavior / error message
23
+
24
+ Paste the `DataShapeError` or unexpected behavior observed:
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: Method request
3
+ about: Propose a published quantitative or statistical method for alphaengine.core
4
+ title: "[Method]: "
5
+ labels: ["enhancement", "methods"]
6
+ assignees: []
7
+ ---
8
+
9
+ ## Published reference
10
+
11
+ Everything in `alphaengine.core` comes from peer-reviewed literature. Please cite the paper or textbook:
12
+
13
+ - **Citation (authors, year, title, venue):**
14
+ - **DOI / URL:**
15
+
16
+ ## What question does it answer?
17
+
18
+ Describe the statistical or risk question this primitive answers and how it fits into the validation/research loop.
19
+
20
+ ## Proposed signature and inputs/outputs
21
+
22
+ ```python
23
+ def proposed_method(returns, ...):
24
+ ...
25
+ ```
26
+
27
+ ## Dependencies
28
+
29
+ Does this method run on `numpy` + `scipy` alone, or does it require an optional extra (e.g. `statsmodels`)?
@@ -0,0 +1,13 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "pip"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+ open-pull-requests-limit: 5
8
+
9
+ - package-ecosystem: "github-actions"
10
+ directory: "/"
11
+ schedule:
12
+ interval: "weekly"
13
+ open-pull-requests-limit: 5
@@ -0,0 +1,29 @@
1
+ name: codeql
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ schedule:
9
+ - cron: "20 6 * * 1"
10
+
11
+ permissions:
12
+ contents: read
13
+ security-events: write
14
+
15
+ jobs:
16
+ analyze:
17
+ name: Analyze (python)
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - name: Checkout repository
21
+ uses: actions/checkout@v4
22
+
23
+ - name: Initialize CodeQL
24
+ uses: github/codeql-action/init@v3
25
+ with:
26
+ languages: python
27
+
28
+ - name: Perform CodeQL Analysis
29
+ uses: github/codeql-action/analyze@v3
@@ -33,6 +33,9 @@ jobs:
33
33
  - uses: actions/setup-python@v5
34
34
  with:
35
35
  python-version: "3.12"
36
+ - name: Verify git tag matches __version__
37
+ run: |
38
+ python -c "import os, runpy, sys; v = runpy.run_path('src/alphaengine/_version.py')['__version__']; ref = os.environ.get('GITHUB_REF_NAME') or os.environ.get('GITHUB_REF', '').removeprefix('refs/tags/'); exp = f'v{v}'; sys.exit(f'Tag {ref!r} != {exp!r}' if ref != exp else 0)"
36
39
  - run: python -m pip install --upgrade build
37
40
  - run: python -m build
38
41
  - uses: actions/upload-artifact@v4
@@ -0,0 +1,63 @@
1
+ # Changelog
2
+
3
+ All notable changes to `alphaengine` are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to Semantic Versioning (with computed golden values
7
+ treated as part of the public contract).
8
+
9
+ ## [1.1.0] - 2026-10-24
10
+
11
+ ### Added
12
+ - **Project workspace (`ae init` and `ae` alias):** Initializes `.alphaengine/` (`project.toml`, `ledger/`, `data/`, `studies/`, `ideas/`, `universes/`, and SHA-256 content-addressed `objects/`). Commands walk up from the current directory to locate the project; documented in `docs/project-format.md`.
13
+ - **Project-wide ledger (`ae log`, `ae show`, `ae diff`, `ae rerun`):** Every run and `sweep()` inside a project writes an append-only run record and accumulates trial counts across runs on the same `idea_id` or `family`.
14
+ - **Dataset registry (`ae data add`, `ae data list`, `ae data show`, `ae data lineage`):** Registers CSV and Parquet datasets locally with full 64-hex SHA-256 hashes, row counts, date ranges, column schemas, and checks for duplicate timestamps, gaps, look-ahead rows (`--asof-col`), and survivorship hints.
15
+ - **Standard result envelope (`v1.0`), pipes, and declarative YAML pipelines:** Added `--json` and `--stdin` support across commands (`ae screen --json | ae validate --stdin | ae size --stdin`), `ae run <pipeline.yaml>`, two example pipelines in `examples/`, and `docs/result-format.md`.
16
+ - **Hypotheses as objects (`ae idea new`, `ae idea list`, `ae idea status`, `ae idea show`):** First-class hypothesis tracking with `--kill-if` rule evaluation, `--idea <id>` run linking, and pre-run prior-work checks.
17
+ - **Extended seal, verify, and committee memos:** `ae seal <run|idea>`, `ae verify <study.json> [--data <file>]`, and `ae report memo <idea|run> --format md|pdf` where every figure cites its `[run_id]`.
18
+ - **Research shell (`ae shell`):** Interactive shell with tab completion over verbs, run IDs, dataset names, and idea IDs, a project status line with cumulative trial count, inline ledger/idea commands, and automatic ledger recording of agent proposals.
19
+ - **Entry-point plugin system (`alphaengine.plugins`, `ae plugin list`):** Supports `loader`, `method`, and `template` plugins, with `quantconnect`, `vectorbt`, `csv`, `deflated_sharpe`, `combinatorial_oos_stability`, and `committee_memo` registered as built-ins (`docs/plugins.md`).
20
+ - **Local file watcher & live drift monitor:** `ae watch <pipeline.yaml>` re-runs pipelines when watched datasets change on disk; `ae monitor <run> --live <file>` compares live returns against the backtest's bootstrapped 95% intervals.
21
+ - **Opt-in workspace sync (`ae remote`, `ae push [--dry-run]`, `ae pull`):** Syncs sealed studies, allowlisted ledger runs, and ideas to `POST /api/workspace/sync` (with 404 fallback to `POST /api/me/runs/ingest`), enforcing the 512-element series cap and never uploading dataset rows.
22
+
23
+ ## [1.0.3] - 2026-10-24
24
+
25
+ ### Added
26
+ - **Sealed studies (Schema 1.2):** Canonical-JSON SHA-256 content hash (`content_sha256` with sorted keys and fixed 8-decimal float formatting), full 64-hex `data_hash`, and optional per-trial ledger export (`SweepResult.ledger()`, `include_ledger=True`).
27
+ - **CLI study verbs:** `alphaengine seal <study.json>` (writes `content_sha256` and verifies on re-run) and `alphaengine report <study.json> [--retail]` (reports to `/api/me/runs/ingest` by default or `/api/retail/ledger/import` with `--retail`).
28
+ - **Complete study ingest payload:** `study/report.py` `_payload()` now includes `selection` (PBO), `psr_vs_zero`, `sr0_expected_max`, `min_track_record_length`, `grid_keys`, `n_failed_trials`, `content_sha256`, and optional `assignment_id` and `thesis_id`.
29
+ - **Interop loaders (`alphaengine.io`):** `from_quantconnect(path)` and `from_vectorbt(portfolio_or_csv)` construct a `Study` with returns, performance metrics, data hash, and trial-count provenance (`"asserted"` when provided/present, `"not_recorded"` with verdict refusal when absent).
30
+ - **Credentials purge:** `alphaengine logout --purge` removes `~/.config/alphaengine/credentials.json`, cleans up its config directory, and clears managed keys from the current process.
31
+ - **API URL override:** `ALPHAENGINE_API_URL` environment variable and unified `DEFAULT_API_URL` constant across CLI and study reporting.
32
+ - **Security & governance:** Weekly Dependabot configuration (pip + GitHub Actions), Python CodeQL workflow, `CONTRIBUTING.md`, `CODE_OF_CONDUCT.md`, and GitHub issue templates.
33
+
34
+ ### Changed
35
+ - **Opt-in series sharing on `/traces`:** `_report_trace` sends scalar figures only by default. Uploading full series to `/api/harness/runs/{id}/traces` requires `--share-series` or `ALPHAENGINE_SHARE_SERIES=1`; any payload sent without opt-in is guarded at most 512 elements.
36
+ - **Deliberate math & golden updates:**
37
+ - `deflated_sharpe(..., n_trials=1)` no longer silently deflates as `N=2`. At `n_trials=1`, `sr0_expected_max` is `0.0` (was `0.037` on the `rets(9, 200)` golden) and `deflated_sharpe` equals `psr_vs_zero` (`0.8434`, was `0.6875` on the golden), with an explicit note that no multiple-testing deflation applies.
38
+ - `SweepResult.verdict()` passes the cross-trial Sharpe dispersion across valid grid trials into `deflated_sharpe` per Bailey & López de Prado (2014), falling back to single-series sampling error only when fewer than 2 valid trials exist.
39
+ - Renamed `cpcv_score` to `combinatorial_oos_stability` (keeping `cpcv_score` as a deprecated alias) to accurately describe single-stream purged/embargoed sub-sample stability.
40
+ - `pbo_cscv` validates `n_splits` (even integer $\ge 2$) and raises a clear `ValueError`.
41
+ - **Neutral framing:** Added *"Research tool, not investment advice"* disclaimer to README, `--help`, and the boot screen; renamed user-facing bakeoff `survivor` / `survivor_weights` to `top_ranked_config` / `model_weights` while preserving backward-compatible dictionary keys.
42
+ - **Release guard:** `.github/workflows/publish.yml` verifies that the git tag matches `v{__version__}` before building.
43
+
44
+ ## [1.0.2] - 2026-10-20
45
+
46
+ ### Added
47
+ - **Four-pass adversarial GAN bakeoff:** `run_bakeoff` and `core.bakeoff.referee` run four passes (eight candidate proposals across `equal`, `hrp`, `risk_parity`, `inverse_vol`, `var_sorted`, `low_vol`, `momentum`, and `reversion` against eight regime, tail, rate, and crash-cluster attacks) under a hard 12-call, 60-second ceiling.
48
+ - **Multi-pass bakeoff scorecard in PDF reports:** Cumulative wealth across passes, in-sample vs. post-attack Sharpe comparison, and candidate scorecard table.
49
+
50
+ ## [1.0.1] - 2026-10-19
51
+
52
+ ### Added
53
+ - **Harness simulation tools:** Added `monte_carlo` and `scenarios` to the local session tool stack.
54
+ - **Multi-page PDF & text reports:** Accepted session traces render multi-panel portfolio, scenario stress, Monte Carlo fan, and bakeoff reports to the user's `Downloads` folder.
55
+
56
+ ### Fixed
57
+ - **Ledoit-Wolf sample-count divisor:** Fixed sample covariance scaling in `ledoit_wolf_cov` so `hrp_weights` and `risk_parity_weights` differentiate weights across wide panels.
58
+
59
+ ## [1.0.0] - 2026-10-18
60
+
61
+ ### Added
62
+ - **Interactive terminal simulator (`alphaengine`):** Full-screen Textual session where plain-English questions execute as a deterministic stack of local tool calls (`profile`, `align`, `regime`, `price`, `reprice`, `correlation`, `covariance`, `cointegration`, `portfolio`, `overlap`, `performance`, `var`, `process`, `workflow`, `bakeoff`) with citation guarding.
63
+ - **Pinned cash rate & statistical refinements:** Default risk-free rate pinned to the H.15 3-month Treasury constant maturity (`4.21%` as of `2026-10-06`, `DGS3MO`; pass `0` for excess of zero), automatic Newey-West HAC lag selection in factor regressions, and Benjamini-Hochberg FDR survivors in cointegration screening.
@@ -0,0 +1,49 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, caste, color, religion, or sexual
10
+ identity and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the overall
26
+ community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or advances of
31
+ any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email address,
35
+ without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement
40
+
41
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
42
+ reported to the project maintainers at **wfe818@gmail.com**. All complaints will
43
+ be reviewed and investigated promptly and fairly.
44
+
45
+ ## Attribution
46
+
47
+ This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org),
48
+ version 2.1, available at
49
+ <https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>.
@@ -0,0 +1,39 @@
1
+ # Contributing to AlphaEngine
2
+
3
+ Thank you for your interest in contributing to AlphaEngine.
4
+
5
+ ## Core design constraints
6
+
7
+ Before opening a pull request, please keep these architectural rules in mind:
8
+
9
+ 1. **Two runtime dependencies (`numpy` and `scipy`).** Optional extras (`factors`, `agents`, `connectors`, `tui`) are lazy-imported so `import alphaengine` never requires network clients, LLM SDKs, or UI frameworks.
10
+ 2. **Goldens are a public contract.** Computed values in `tests/test_goldens.py` are pinned so saved studies remain reproducible. Never modify a golden value simply to make a test pass; deliberate mathematical corrections require a version bump and a `CHANGELOG.md` entry explaining what changed and why.
11
+ 3. **Data boundary.** Computation runs locally. Without explicit opt-in (`--share-series` or `ALPHAENGINE_SHARE_SERIES=1`), no list longer than 512 elements may leave the machine.
12
+ 4. **Trial-count honesty.** Trial counts must be derived from the executed grid (`derived_from_grid`), explicitly marked (`asserted`), or `not_recorded` (which refuses an `edge` verdict).
13
+
14
+ ## Local development setup
15
+
16
+ ```bash
17
+ python -m venv .venv
18
+ source .venv/bin/activate # Windows PowerShell: .\.venv\Scripts\Activate.ps1
19
+ pip install -e ".[dev,factors]"
20
+ ```
21
+
22
+ ## Required checks before submitting
23
+
24
+ Run all five CI gates locally before pushing:
25
+
26
+ ```bash
27
+ python -m ruff check src tests
28
+ python -m ruff format --check src tests
29
+ python -m mypy src
30
+ python -m pytest
31
+ python -m pytest tests -m golden -q
32
+ python scripts/gen_docs.py --check
33
+ ```
34
+
35
+ If you add or modify CLI commands or flags in `src/alphaengine/commands.py`, regenerate the README command table with:
36
+
37
+ ```bash
38
+ python scripts/gen_docs.py --write
39
+ ```