Configuration Reference#

Full reference for every parameter in Config/attribution_analysis_parameters.xlsx. For the step-by-step guide to installing, generating, and running with this workbook, see Excel Workflow.

Excel Parameters Workbook#

Running kaxanuk.attribution_analysis init excel creates Config/attribution_analysis_parameters.xlsx with a pre-filled template. It has a single General sheet with three columns: parameter name (column A, do not modify), your value (column B, edit this), and description (column C, reference).

Parameter (column A)

Example value (column B)

Description

input_directory

Input

Base folder for all input files

weights_portfolio_directory

Portfolios

Subfolder (inside the input directory) with your portfolio weights

weights_benchmark_directory

Benchmark_Portfolios

Subfolder with your benchmark weights

benchmark_returns_directory

Benchmark_Portfolios

Subfolder with your benchmark returns file

investable_assets_directory

Input/Data

Folder with your investable assets’ price data (one file per ticker)

start_date

2015-01-06

Start date YYYY-MM-DD, or auto to derive from the data

end_date

2025-08-01

End date YYYY-MM-DD, or auto to derive from the data

factor_returns_by_factor_directory

Input/Factor_Models

Folder with the by-factor returns files (one .csv per factor)

portfolio_file_name

my_portfolio

Portfolio weights file name (.csv; extension optional)

benchmark_file_name

my_benchmark_weights

Benchmark weights file name (.csv)

benchmark_return_file_name

my_benchmark_returns

Daily benchmark returns file name (.csv)

brinson_fachler_method

yes

Run Brinson-Fachler attribution? (yes/no)

factor_model_method

yes

Run factor model attribution? (yes/no)

user_column_date

m_date

Name of the date column in your market-data files

user_column_price

m_close_split_adjusted

Name of the price column used to compute returns

market_data_input_format

csv

Format of the market-data files: csv or parquet

portfolio_input_format

csv

Format of the portfolio files: csv or excel

dashboard_port

8050

Port for the interactive dashboard server (1-9999)

parameters_format_version

0.1.0

System use — Excel template schema version. Do not modify. The package checks this and asks you to run update excel if it’s outdated

brinson_fachler_formula (optional)

textbook

Brinson-Fachler variant: textbook (default) or legacy (asset-level numbers of 0.3.x and earlier, deprecated). Case-insensitive

segment_map_file_name (optional)

(blank)

Name (without extension) of a ticker,segment CSV in the input directory that groups tickers into segments for textbook Brinson-Fachler. Blank: one segment per ticker

cash_ticker (optional)

CASH

Ticker that receives the weight remainder when a date’s net weights sum below 1 (textbook Brinson-Fachler only). Needs no price file and earns 0

factor_return_type (optional)

simple

Returns held in the factor files: simple (default) or log. Log files are restated as simple returns. Case-insensitive

linking_method (optional)

carino

How cumulative effects are linked across dates so they add up to compounded returns: carino (default), grap or none (plain sums: no linking, the behaviour before this release). Applies to Brinson-Fachler (textbook only) and the factor model. Case-insensitive

output_directory (optional)

Output

Folder the Excel report is written to (see The Excel Report), relative to the folder you run from; created when missing

yes/no flags are case-insensitive. The csv/parquet/excel format values must be lowercase.

The six parameters marked optional are not needed in existing parameter files: if the row is missing or its value cell is blank, the default shown is used, and parameters_format_version stays 0.1.0. To add them to an older workbook, add the row (parameter name in column A, value in column B). See Brinson-Fachler and Factor Model for what they change, and Data Formats for the segment map file.