-
Notifications
You must be signed in to change notification settings - Fork 14
docs: mkdocs GitHub Pages deploy #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
53e92f4
docs: add mkdocs GitHub Pages deploy workflow and fix nav
stefan-jansen d1c689b
docs: deploy to website repo static/docs/engineer/ instead of GitHub …
stefan-jansen 720b1fb
chore: raise python support floor to 3.12
stefan-jansen 8f5d4c4
feat: bridge shared market data specs into engineer config
stefan-jansen 9d4f0ed
test: cover shared market data spec defaults
stefan-jansen 783e1de
feat: add engineered artifact specs
stefan-jansen ef36262
docs: polish docs and refresh AGENTS navigation
stefan-jansen ae0c805
feat: adopt ml4t-specs shared schemas
stefan-jansen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| name: Docs | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: "docs" | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build & Deploy Docs | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v4 | ||
| with: | ||
| version: "latest" | ||
|
|
||
| - name: Set up Python | ||
| run: uv python install 3.12 | ||
|
|
||
| - name: Install dependencies | ||
| run: uv sync --dev --extra docs | ||
|
|
||
| - name: Build docs | ||
| run: uv run mkdocs build --strict | ||
|
stefan-jansen marked this conversation as resolved.
|
||
|
|
||
| - name: Deploy to website repo | ||
| uses: cpina/github-action-push-to-another-repository@v1.7.2 | ||
| env: | ||
| SSH_DEPLOY_KEY: ${{ secrets.DOCS_DEPLOY_KEY }} | ||
| with: | ||
| source-directory: site/ | ||
| destination-github-username: ml4t | ||
| destination-repository-name: website | ||
| target-directory: static/docs/engineer/ | ||
| target-branch: main | ||
| commit-message: "docs(engineer): update from ml4t/engineer@${{ github.sha }}" | ||
| user-name: ml4t-bot | ||
| user-email: bot@ml4trading.io | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,7 @@ on: | |
| tags: ["v*"] | ||
|
|
||
| env: | ||
| PYTHON_VERSION: "3.11" | ||
| PYTHON_VERSION: "3.12" | ||
|
|
||
| jobs: | ||
| build: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,84 @@ | ||
| # ml4t-engineer | ||
|
|
||
| Feature engineering for financial ML: compute indicators, create labels, sample | ||
| alternative bars, and prepare leakage-safe datasets for model training. | ||
|
|
||
| ## Quick Start | ||
|
|
||
| ```python | ||
| from ml4t.engineer import compute_features, create_dataset_builder | ||
| from ml4t.engineer.config import LabelingConfig | ||
| from ml4t.engineer.labeling import triple_barrier_labels | ||
|
|
||
| features = compute_features(df, ["rsi", "macd", "atr"]) | ||
| labels = triple_barrier_labels( | ||
| features, | ||
| config=LabelingConfig.triple_barrier( | ||
| upper_barrier=0.02, lower_barrier=0.01, max_holding_period=20, | ||
| ), | ||
| ) | ||
| builder = create_dataset_builder( | ||
| features=labels.select(["rsi_14", "macd", "atr_14"]), | ||
| labels=labels["label"], | ||
| dates=labels["timestamp"], | ||
| scaler="robust", | ||
| ) | ||
| ``` | ||
|
|
||
| ## Directory Map | ||
|
|
||
| | Path | Purpose | Key Surfaces | | ||
| |------|---------|--------------| | ||
| | `src/ml4t/engineer/features/` | Feature computation and discovery metadata | `compute_features()`, `feature_catalog`, `FeatureCatalog` | | ||
| | `src/ml4t/engineer/labeling/` | Supervised label generation and sample weighting | `triple_barrier_labels()`, `atr_triple_barrier_labels()`, `rolling_percentile_binary_labels()` | | ||
| | `src/ml4t/engineer/bars/` | Tick, volume, dollar, imbalance, and run bars | `TickBarSampler`, `VolumeBarSampler`, `DollarBarSampler` | | ||
| | `src/ml4t/engineer/dataset.py` | Leakage-safe dataset preparation | `MLDatasetBuilder`, `create_dataset_builder()` | | ||
| | `src/ml4t/engineer/preprocessing.py` | Train-only scalers and pipelines | `StandardScaler`, `RobustScaler`, `PreprocessingPipeline` | | ||
| | `src/ml4t/engineer/config/` | Reusable config objects | `LabelingConfig`, `PreprocessingConfig`, `DataContractConfig` | | ||
|
|
||
| ## Public Entry Points | ||
|
|
||
| ```python | ||
| from ml4t.engineer import ( | ||
| compute_features, | ||
| create_dataset_builder, | ||
| feature_catalog, | ||
| FeatureCatalog, | ||
| StandardScaler, | ||
| RobustScaler, | ||
| ) | ||
| from ml4t.engineer.config import LabelingConfig | ||
| from ml4t.engineer.labeling import ( | ||
| triple_barrier_labels, | ||
| atr_triple_barrier_labels, | ||
| rolling_percentile_binary_labels, | ||
| fixed_time_horizon_labels, | ||
| trend_scanning_labels, | ||
| ) | ||
| from ml4t.engineer.bars import ( | ||
| TickBarSampler, | ||
| VolumeBarSampler, | ||
| DollarBarSampler, | ||
| FixedTickImbalanceBarSampler, | ||
| FixedVolumeImbalanceBarSampler, | ||
| ) | ||
| ``` | ||
|
|
||
| ## Core Workflows | ||
|
|
||
| - `compute_features()` appends indicator columns to an OHLCV DataFrame or LazyFrame | ||
| - `LabelingConfig` plus labeling functions create reusable supervised targets | ||
| - `MLDatasetBuilder` handles train/test splitting and train-only scaling | ||
| - sampler classes in `bars/` turn trade data into non-time bars for downstream use | ||
|
|
||
| ## Trust Signals | ||
|
|
||
| - 120 features across 11 categories | ||
| - 60 TA-Lib validated indicators at `1e-6` tolerance | ||
| - ~50,000 labels/second for triple-barrier workflows | ||
| - shared book integration via `docs/book-guide/index.md` | ||
|
|
||
| ## Navigation | ||
|
|
||
| See [src/ml4t/engineer/AGENTS.md](src/ml4t/engineer/AGENTS.md) for package-level | ||
| module orientation and subdirectory entry points. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.