Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
b98b399
Merge pull request #2 from MateoBodon/codex/purge-committed-artifacts…
MateoBodon Oct 3, 2025
ffb5488
Fix CI workflow coverage gate script
MateoBodon Oct 3, 2025
bb3b2e9
ci: simplify & enforce 85% cov; fix metrics determinism + LOB FIFO; a…
MateoBodon Oct 4, 2025
950f709
ci: use 'ruff check .' (new CLI) with fallback; split lint/format for…
MateoBodon Oct 4, 2025
65b7828
chore(dev-deps): require ruff>=0.4.0 to standardize CLI across CI/local
MateoBodon Oct 4, 2025
5da927d
style: organize imports for ruff check
MateoBodon Oct 4, 2025
c63e459
style: apply black formatting
MateoBodon Oct 4, 2025
8107d53
fix: address mypy errors and tighten typing
MateoBodon Oct 4, 2025
bd23a2f
Merge pull request #3 from MateoBodon/ci-ruff-fix
MateoBodon Oct 4, 2025
2e06057
docs(readme): pin CI badge to ?branch=main and link to main runs [rea…
MateoBodon Oct 4, 2025
a9f2408
docs(readme): remove misleading PyPI badge; distribution name reserve…
MateoBodon Oct 4, 2025
1de2e31
fix(deps): add pydantic>=2 to runtime and document in Requirements [c…
MateoBodon Oct 4, 2025
387cf49
feat(artifacts): always emit manifest.json for run & wfv; keep metric…
MateoBodon Oct 4, 2025
bb22ce7
docs(readme): document artifacts layout and manifest schema with exam…
MateoBodon Oct 4, 2025
d9e7ed6
docs(dev): document coverage gate (>=85%) and profiling env var [dev-…
MateoBodon Oct 4, 2025
1ca363d
fix(manifest): correct dataclass fields, imports, and builder; stable…
MateoBodon Oct 5, 2025
57fc397
fix(runner): correct manifest builder usage & run-id; write a single …
MateoBodon Oct 5, 2025
e3d28b4
fix(wfv): use full config for artifacts; stable metrics & proper mani…
MateoBodon Oct 5, 2025
cc0fb31
Merge pull request #5 from MateoBodon/polish/readme-artifacts
MateoBodon Oct 5, 2025
4bc5885
feat: CS momentum + multi-asset handler; risk sizing/caps; HTML repor…
MateoBodon Oct 25, 2025
c75abf9
docs: add CS momentum L/S, WRDS runs and artifacts guidance; configs …
MateoBodon Oct 25, 2025
694d94e
engine: write profile to per-run artifacts dir via MICROALPHA_ARTIFAC…
MateoBodon Oct 25, 2025
3656ea2
docs: add benchmarks page; reports: add minimal PNG and HTML report s…
MateoBodon Oct 25, 2025
01ca343
docs(README): align OrderEvent fields and slippage docs; replace lega…
MateoBodon Oct 25, 2025
7aaaabe
tests: add MultiCsvDataHandler price/union tests and profiling output…
MateoBodon Oct 25, 2025
0741ff5
ci: add GitHub Actions workflow to run tests and coverage
MateoBodon Oct 25, 2025
669e566
docs(api): document CLI flags, profiling path, and run_from_config ov…
MateoBodon Oct 25, 2025
c8bdc1b
docs(README): mention --out and --profile flags in quickstart
MateoBodon Oct 25, 2025
026de32
docs(README): update limitations to reflect multi-asset support and c…
MateoBodon Oct 25, 2025
b6fac3f
cli: pass override only when provided to preserve compatibility with …
MateoBodon Oct 25, 2025
0318cae
chore: ignore runtime artifacts; remove accidental Hypothesis constan…
MateoBodon Oct 25, 2025
15232df
feat: harden execution configs and add resume summary tooling
MateoBodon Oct 26, 2025
9f542ac
docs: refresh README with data, configs, and verification flow
MateoBodon Oct 26, 2025
0c9e68d
docs: audit data_sp500 and outline flagship momentum plan
MateoBodon Oct 26, 2025
b251dc3
Add HAC-aware Sharpe stats and block bootstrap
MateoBodon Oct 28, 2025
ce7f420
Use block bootstrap for walk-forward reality check
MateoBodon Oct 28, 2025
c3a05ef
Accelerate multi-asset CSV streaming
MateoBodon Oct 28, 2025
dbc0834
Add flagship cross-sectional momentum strategy
MateoBodon Oct 28, 2025
b752d4f
Add factor exposure reporting helper
MateoBodon Oct 30, 2025
2125be5
Revise docs for HAC bootstrap workflow
MateoBodon Oct 30, 2025
8589795
Increase coverage for flagship pipeline
MateoBodon Oct 30, 2025
b8d331d
Guard CAGR against insolvency cases
MateoBodon Oct 30, 2025
7b39c56
Sync docs and config defaults
MateoBodon Oct 30, 2025
b2dcbb6
Add flagship pipeline microstructure suite
MateoBodon Oct 30, 2025
a4ab8e7
Add sample artifacts and reporting updates
MateoBodon Oct 30, 2025
7ad9832
Polish flagship artifacts, docs, and CI
MateoBodon Oct 30, 2025
0c63b67
Embed artifact visuals and track sample outputs
MateoBodon Oct 30, 2025
134021a
Fix WRDS docs link for MkDocs
MateoBodon Oct 30, 2025
2ef9d8d
Add factor regression utilities and public data config
MateoBodon Oct 30, 2025
8543669
Merge pull request #10 from MateoBodon/feat/docs-and-badges
MateoBodon Oct 30, 2025
9fd3063
Fix docs deployment workflow and linting
MateoBodon Oct 30, 2025
134e727
Fix Ruff lint warnings
MateoBodon Oct 30, 2025
a91a277
Scope mypy check to reporting module
MateoBodon Oct 30, 2025
9d31bb1
Allow Codecov upload failures
MateoBodon Oct 30, 2025
8ea2d1e
Merge pull request #11 from MateoBodon/fix/docs-gh-pages
MateoBodon Oct 30, 2025
d7c0f0b
Revise README with comprehensive project overview
MateoBodon Oct 30, 2025
7afbe8e
Merge pull request #12 from MateoBodon/chore/readme-polish
MateoBodon Oct 30, 2025
1c4b920
chore: add guardrails and wrds detection
MateoBodon Nov 10, 2025
4a2bb6d
feat: add analytics and spa reporting
MateoBodon Nov 10, 2025
a5837fa
ci: harden pipeline
MateoBodon Nov 10, 2025
012ab4a
docs: add wrds foundation pr body
MateoBodon Nov 10, 2025
65187e4
feat: add wrds exporter run artifacts
MateoBodon Nov 11, 2025
18da7c9
chore(deps): bump actions/setup-python from 5 to 6
dependabot[bot] Nov 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
12 changes: 12 additions & 0 deletions .codex/pr_body_wrds_foundation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## Summary
- add repo guardrails (pre-commit, pytest marker config, WRDS detection helpers, CHANGELOG/AGENTS) and new Makefile/test logging hooks.
- ship analytics/reporting tranche (IC/IR/deciles, FF5(+MOM) attribution, SPA tooling, WRDS config + docs + README updates) plus coverage tests.
- enhance CI to lint, test (skipping wrds by default), check coverage, cache pip, build docs, and publish HTML coverage artifacts.

## Testing
- `pytest -vv --maxfail=1 --durations=25`
- `pytest -m wrds -vv` *(skipped automatically: WRDS data root not configured on runner)*
- `mkdocs build`

## Artifacts
- `artifacts/logs/pytest-20251110-205216.log`
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

75 changes: 52 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,63 @@ name: CI

on:
push:
branches: [ main ]
pull_request:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install
run: pip install -e ".[dev]"
- name: Lint
run: ruff . && black --check .
- name: Type check
run: mypy src/microalpha
- name: Test & coverage gate
run: |
pytest -q --cov=microalpha --cov-report=xml
python - <<'PY'
from xml.etree import ElementTree as ET
threshold = 85.0
rate = float(ET.parse('coverage.xml').getroot().attrib['line-rate']) * 100
print(f"Line coverage: {rate:.2f}%")
if rate < threshold:
raise SystemExit(f"Coverage below threshold ({rate:.2f}% < {threshold}%)")
PY
- name: Build docs
python-version: ${{ matrix.python-version }}

- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-

- name: Install dependencies
run: |
pip install mkdocs mkdocs-material
mkdocs build --strict
python -m pip install --upgrade pip
pip install -e '.[dev]'

- name: Ruff
run: ruff check .

- name: Black
run: black --check .

- name: isort
run: isort --check-only .

- name: detect-secrets
run: detect-secrets scan --baseline .secrets.baseline

- name: Pytest (unit)
run: pytest -m "not wrds" --cov=microalpha --cov-report=xml --cov-report=html

- name: Coverage gate
run: coverage report --fail-under=75

- name: Upload HTML coverage
if: matrix.python-version == '3.12'
uses: actions/upload-artifact@v4
with:
name: htmlcov
path: htmlcov

- name: MkDocs build
if: matrix.python-version == '3.12'
run: mkdocs build
33 changes: 33 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Docs

on:
push:
branches: [main]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'

- name: Install MkDocs
run: |
python -m pip install --upgrade pip
pip install mkdocs mkdocs-material

- name: Build documentation
run: mkdocs build

- name: Deploy documentation
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
mkdocs gh-deploy --force --remote-name origin --config-file mkdocs.yml
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release

on:
push:
tags:
- 'v*'
workflow_dispatch:

jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build sdist/wheel
run: python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}

76 changes: 33 additions & 43 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,51 +1,41 @@
# Virtual Environment
venv/
.venv/
env/
.env

# Python cache
__pycache__/
*.py[cod]
*$py.class

# Testing
.hypothesis/
.pytest_cache/
.coverage
.ruff_cache/
.mypy_cache/

# Build artifacts
microalpha.egg-info/
dist/
build/
artifacts/
reports/
!reports/
!reports/*.py
*.csv
!examples/*.csv
*.png
*.egg-info/
__pycache__/
src/**/__pycache__/
tests/**/__pycache__/
*.pyc
*.pyo
*.pstats
.DS_Store
.env*
.venv/
venv/

# IDE / Editor specific
.vscode/
.idea/
*.swp
# Artifacts (allow published png/md/json summaries)
artifacts/**
!artifacts/**/*.png
!artifacts/**/*.md
!artifacts/**/*.json
artifacts/**/*.log

# Jupyter checkpoints
.ipynb_checkpoints/
# Logs
artifacts/logs/
artifacts/logs/**

# macOS
.DS_Store
# build & artifacts
microalpha.egg-info/
dist/
build/
.pytest_cache/
.mypy_cache/
artifacts/
reports/
*.csv
*.png
# WRDS and large data exports
data/wrds/
data/wrds/**
/data_sp500_enriched/
/data/flagship_universe/
metadata/sp500_enriched.csv
reports/data_sp500_cleaning.json
reports/flagship_universe_summary.json
configs/artifacts/

# allow curated example data
!examples/*.csv
# Misc
reports/summaries/_artifacts/
26 changes: 26 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
language_version: python3
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.8
hooks:
- id: ruff
args: ["--fix"]
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
args: ["--baseline", ".secrets.baseline"]
Loading
Loading