write_report¶
Defined in fynance.research
- write_report(experiment, output_dir, *, notebook=True, execute=False)[source]
Write a portable report for
experimentunderoutput_dir.Creates
<output_dir>/<experiment.name>/withreport.mdand atearsheet.png(when an equity curve is present), plusreport.ipynbwhennotebookis True. Nothing is ever written outsideoutput_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(needsnbformat).- 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).