Skip to content
Public template

Repository files navigation

lasso

Preprints on the identity between Markowitz's Critical Line Algorithm and the LASSO path, each with its LaTeX source and the code and data behind it.

Preprints

Reproducing the results

One command regenerates every result in every preprint, from the repository root:

make reproduce                        # every preprint, one after another
make -C preprints/lasso reproduce     # one preprint

In each preprint it runs make figures (the data, the figures and every number the text quotes), make test (the checks against those numbers), make pdf, and make arxiv-check (the arXiv source compiled on its own). The preprints run one at a time, because the timings in preprints/cla/ would otherwise measure the others' load.

Each preprint's numbers and figures come from one Python script, python/make_figures.py, run with uv. Its dependencies are pinned in the script itself (PEP 723), and python/make_figures.py.lock next to it fixes Python 3.12 and every package to an exact version and hash, so a rerun uses the environment that produced the PDF. Everything is seeded and runs offline, except the download of the Fama-French returns in preprints/lasso/, which are not redistributed; without them, the script skips that check.

cd preprints/lasso
uv run python/make_figures.py          # draw the figures and print every number in the note
uv run python/make_figures.py test     # check those numbers against tolerances

Introduction.md explains the setup in full and how to add a preprint. Reproducibility.md explains why this matters, with stories of what goes wrong without it, here and elsewhere.

Layout

Each folder in preprints/ holds one preprint: a single .tex file with a \documentclass, the Python behind its experiments, and a Makefile that is just include ../Makefile. A preprint written for a journal, like preprints/cla/, may also have its body in sections/, a BibTeX bibliography in refs/ and the journal's class bundled with it; the shared rules run BibTeX and find the class for it. The rules (pdf, figures, test, clean) live in preprints/Makefile, with arxiv and arxiv-check to package the arXiv source. The Python code sits in python/, each script next to its lockfile; python/make_figures.py, if present, writes the figures to figures/.

make -C preprints pdf          # build every preprint
make -C preprints/lasso pdf    # build one

Every pull request into main builds all the preprints. When it is merged, the PDFs are published on the paper branch, with an index.html that links each one by its title. GitHub Pages serves that branch at https://jebel-quant.github.io/lasso/. Each preprint's arXiv source, its .tex and the figures it includes, is published on the arxiv branch as arxiv/<preprint>.tar.gz and as arxiv/<preprint>.zip, ready to upload; CI first compiles each tarball on its own, as arXiv will.

Releases

Contributors

Languages