write_report

Defined in fynance.research

write_report(experiment, output_dir, *, notebook=True, execute=False)[source]

Write a portable report for experiment under output_dir.

Creates <output_dir>/<experiment.name>/ with report.md and a tearsheet.png (when an equity curve is present), plus report.ipynb when notebook is True. Nothing is ever written outside output_dir.

Parameters:
experimentExperiment

The experiment to render.

output_dirstr or pathlib.Path

Base directory for the artifacts.

notebookbool

Also emit a re-runnable report.ipynb (needs nbformat).

executebool

Execute the notebook before writing it (needs nbclient + a kernel); degrades to an unexecuted notebook with a warning if unavailable.

Returns:
dict of str to pathlib.Path

The written artifacts (keys: markdown, png, notebook — present only when actually written).