Excel Workflow#

The Excel-driven workflow is the default way to run Attribution Analysis: no code needed, just the kaxanuk.attribution_analysis CLI and the parameters workbook. Once you’ve completed the Quick Start and populated your Input/ folders (see Data Formats), this page is the day-to-day reference for the commands you’ll use and how they fit together.

CLI Commands#

All operations are invoked through the kaxanuk.attribution_analysis command (installed with the package).

Command

Description

kaxanuk.attribution_analysis init excel

Create Config/, Input/{Data,Portfolios,Benchmark_Portfolios,Factor_Models}/, Output/ and __main__.py from the packaged template. Fails if Config/ already exists — use update instead.

kaxanuk.attribution_analysis run

Execute __main__.py in the current directory. Accepts one or more paths to run specific scripts (e.g. run script1.py script2.py).

kaxanuk.attribution_analysis autorun

Install files if missing, otherwise run __main__.py. Convenient one-shot command.

kaxanuk.attribution_analysis update excel

Regenerate Config/attribution_analysis_parameters.xlsx from the template. Backs up the existing file as *.1.xlsx.

kaxanuk.attribution_analysis update entry_script

Regenerate __main__.py from the template. Backs up the existing file as *.1.py.

kaxanuk.attribution_analysis --version

Show installed package version.

kaxanuk.attribution_analysis --help

Show all commands. Append --help to any subcommand for its specific flags.

Optional flags:

  • init excel --entry_script my_script.py — generate the entry script with a custom name (default: __main__.py).

See CLI Documentation for the full auto-generated command reference.

Editing the workbook#

Open Config/attribution_analysis_parameters.xlsx and edit column B of the General sheet; leave column A untouched. See Configuration Reference for what every parameter does. Once your inputs are in place and the workbook is configured, run:

kaxanuk.attribution_analysis run

Results are written to the Output folder (and the interactive dashboard launches if configured).