agentleFS
stefan-jansenstefan-jansen/machine-learning-for-trading/.github/copilot-instructions.md

machine-learning-for-trading

Copilot instructions22k starsChanged 23 days agoMITView on GitHub

This is the companion code repository for Machine Learning for Trading, 3rd Edition. The conventions below are deliberate and repository-wide. Please do not flag adherence to them as defects, and do apply them when reviewing. - No em dashes. The repository standardizes on the ASCII hyphen (-) in all prose, markdown, docstrings, figure titles, and printed output. Em dashes (—) are being removed repository-wide; a file that uses a hyphen where a sibling still has an em dash is ahead…

We split this copilot-instructions.md into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every notebook is a paired .py + .ipynb managed by jupytext.

    line 17

≈ “Common” is an estimate: at least 1 in 5 of the 3,669 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

Repository conventions for code review

This is the companion code repository for Machine Learning for Trading, 3rd Edition. The conventions below are deliberate and repository-wide. Please do not flag adherence to them as defects, and do apply them when reviewing.

Prose and comment style

  • No em dashes. The repository standardizes on the ASCII hyphen (-) in all prose, markdown, docstrings, figure titles, and printed output. Em dashes (—) are being removed repository-wide; a file that uses a hyphen where a sibling still has an em dash is ahead of the sweep, not a regression. Do not suggest reintroducing em dashes for "consistency" with files that have not been cleaned yet.

Notebooks

  • Every notebook is a paired .py + .ipynb managed by jupytext. The .py is the source of truth; the .ipynb is generated. Edit the .py and run jupytext --sync; never hand-edit the .ipynb.
  • A committed .ipynb is a production re-execution of its paired .py, stamped in metadata.ml4t_provenance. Cell outputs are real, not illustrative.
  • Notebook output must carry no machine-specific paths (no /tmp/..., no home directory, no absolute checkout path). Print repo-root-relative paths instead, e.g. output_path.relative_to(get_case_study_dir("etfs").parents[1]).

Data schema

  • The canonical schema is symbol (entity identifier) + timestamp (all frequencies, daily and intraday). The cme_futures dataset uses product instead of symbol. These are intentional; do not suggest renaming to asset, date, ticker, or pair.

Results and DataFrames

  • The sole source of truth for model/backtest/strategy results is run_log/registry.db in each case study. results/*.json files are a deprecated legacy format and must not be treated as ground truth.
  • Polars-first. DataFrame operations use Polars; pandas appears only at visualization boundaries. Do not suggest converting Polars code to pandas.

Library corrections

  • The six ml4t-* libraries are the production implementations. When a PR updates numbers because a library estimator was corrected (for example a beta/correlation fix), that is a deliberate correctness change, not an unexplained result drift.

Download now (ZIP)

Trending

Quiet since September.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 1 mentionApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 2 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 1 mentionOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the stefan-jansen/machine-learning-for-trading repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about stefan-jansen/machine-learning-for-trading

The biggest 5 of 18 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 18

Talked about on GitHub, Stack Overflow, the web, Hacker News and Bluesky (18 times).

On GitHub · 8

3 more on GitHub

On the web · 4

  • Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.

    Of the Copilot instructions files we read, the 2,297 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.