Skip to content

common_reports.contracts.builders.formats

Frozen styling vocabulary for the builders domain — enums, plot/table format objects, theme/palette, and the deterministic colour engine that the immutable components embed.

DECISION (b): these live in contracts/builders/ (not schemas/) — components embed them (Table.fmt) and contracts/ import only stdlib + pydantic, so the dependency arrow stays one-way. All objects are frozen dataclasses: pure data, never logic.

Source-verified against AlgoReports (processor.py / sheet_utils.py / *_configs.yaml / templates). The md (COMMON-HTML-BUILDER-API.md) field list is the base; the [G#] markers are the build-spec corrections where the md mis-states or under-specifies the actual source.

Classes

Align

Bases: Enum

Fields and properties declared here; inherited members belong to the bases above.

CENTER

CENTER = 'center'

LEFT

LEFT = 'left'
RIGHT = 'right'

AxisType

Bases: Enum

Fields and properties declared here; inherited members belong to the bases above.

LINEAR

LINEAR = 'linear'

LOG

LOG = 'log'

Band

add_vrect drawdown band — spans x by date, shades full y (yref=paper).

__init__

def __init__(x0: Any, x1: Any, fillcolor: str | None = None, opacity: float = 0.3, annotation_text: str | None = None, annotation_position: str = 'top left', xref: str = 'x', yref: str = 'paper') -> None

Fields and properties declared here; inherited members belong to the bases above.

annotation_position

annotation_position: str = 'top left'

annotation_text

annotation_text: str | None = None

fillcolor

fillcolor: str | None = None

opacity

opacity: float = 0.3

x0

x0: Any

x1

x1: Any

xref

xref: str = 'x'

yref

yref: str = 'paper'

CellLine

One line of a stacked table cell (modern). A cell whose value is a tuple of CellLine is drawn as a short list: the label (e.g. a ticker), then any of a number (value; signed adds a coloured arrow), a status tag (tag + tone), plain text (text) and a small bar (bar, 0..1). Numbers use the column’s num_fmt/decimals (percent, 2 decimals by default).

__init__

def __init__(label: str, value: float | None = None, signed: bool = False, tag: str | None = None, tone: str = 'info', text: str | None = None, bar: float | None = None) -> None

Fields and properties declared here; inherited members belong to the bases above.

bar

bar: float | None = None

label

label: str

signed

signed: bool = False

tag

tag: str | None = None

text

text: str | None = None

tone

tone: str = 'info'

value

value: float | None = None

ColorKind

Bases: Enum

Fields and properties declared here; inherited members belong to the bases above.

SCALE

SCALE = 'scale'

SIGN

SIGN = 'sign'

THRESHOLD

THRESHOLD = 'threshold'

ColorRule

__init__

def __init__(kind: ColorKind, positive_color: str | None = None, negative_color: str | None = None, zero_color: str | None = None, threshold: float | None = None, above_color: str | None = None, below_color: str | None = None, cmap: str = 'RdYlGn', vmin: float | None = None, vmax: float | None = None, vcenter: float | None = None, text_color: str | None = None, apply_to: str = 'cell', na_color: str | None = None) -> None

Fields and properties declared here; inherited members belong to the bases above.

above_color

above_color: str | None = None

apply_to

apply_to: str = 'cell'

below_color

below_color: str | None = None

cmap

cmap: str = 'RdYlGn'

kind

kind: ColorKind

na_color

na_color: str | None = None

negative_color

negative_color: str | None = None

positive_color

positive_color: str | None = None

text_color

text_color: str | None = None

threshold

threshold: float | None = None

vcenter

vcenter: float | None = None

vmax

vmax: float | None = None

vmin

vmin: float | None = None

zero_color

zero_color: str | None = None

ColumnFormat

__init__

def __init__(name: str, num_fmt: NumberFormat | None = None, decimals: int | None = None, scale: float = 1.0, align: Align | None = None, width: str | None = None, color: ColorRule | None = None, date_format: str = '%Y-%m-%d', null_display: str = '', formatter: Callable[[Any], str] | None = None, tones: Mapping[str, str] = _empty_map(), bar: bool = False, highlight: bool = False) -> None

Fields and properties declared here; inherited members belong to the bases above.

align

align: Align | None = None

bar

bar: bool = False

color

color: ColorRule | None = None

date_format

date_format: str = '%Y-%m-%d'

decimals

decimals: int | None = None

formatter

formatter: Callable[[Any], str] | None = None

highlight

highlight: bool = False

name

name: str

null_display

null_display: str = ''

num_fmt

num_fmt: NumberFormat | None = None

scale

scale: float = 1.0

tones

tones: Mapping[str, str] = field(default_factory=_empty_map)

width

width: str | None = None

Granularity

Bases: Enum

Fields and properties declared here; inherited members belong to the bases above.

D

D = 'D'

M

M = 'M'

W

W = 'W'

Y

Y = 'Y'

HLine

__init__

def __init__(y: float, dash: str = 'dash', color: str | None = None, secondary_y: bool = False) -> None

Fields and properties declared here; inherited members belong to the bases above.

color

color: str | None = None

dash

dash: str = 'dash'

secondary_y

secondary_y: bool = False

y

y: float

HeaderStyle

__init__

def __init__(bold: bool = True, sticky: bool = True, bg: str | None = None, text_color: str | None = None, align: Align = Align.LEFT, multiindex_render: str = 'spanned', rename: Mapping[str, str] = _empty_map()) -> None

Fields and properties declared here; inherited members belong to the bases above.

align

align: Align = Align.LEFT

bg

bg: str | None = None

bold

bold: bool = True

multiindex_render

multiindex_render: str = 'spanned'

rename

rename: Mapping[str, str] = field(default_factory=_empty_map)

sticky

sticky: bool = True

text_color

text_color: str | None = None

ImageFormat

__init__

def __init__(mode: str = 'auto', template: str = DEFAULT_IMAGE_TEMPLATE, max_width: str | None = None) -> None

Fields and properties declared here; inherited members belong to the bases above.

max_width

max_width: str | None = None

mode

mode: str = 'auto'

template

template: str = DEFAULT_IMAGE_TEMPLATE

IndexSpec

__init__

def __init__(reset: bool = True, bold: bool = True, index_label: str | None = None, multiindex: str = 'flatten', droplevel: int | tuple[int, ...] | None = None, index_num_fmt: NumberFormat | None = None) -> None

Fields and properties declared here; inherited members belong to the bases above.

bold

bold: bool = True

droplevel

droplevel: int | tuple[int, ...] | None = None

index_label

index_label: str | None = None

index_num_fmt

index_num_fmt: NumberFormat | None = None

multiindex

multiindex: str = 'flatten'

reset

reset: bool = True

LegendOrientation

Bases: Enum

Fields and properties declared here; inherited members belong to the bases above.

HORIZONTAL

HORIZONTAL = 'h'

NONE

NONE = 'none'

VERTICAL

VERTICAL = 'v'

LegendPos

Bases: Enum

[G13] the md referenced LegendPos but never defined it — pinned here.

Fields and properties declared here; inherited members belong to the bases above.

BOTTOM

BOTTOM = 'bottom'

RIGHT

RIGHT = 'right'

TOP_RIGHT

TOP_RIGHT = 'top_right'

Margins

__init__

def __init__(t: int = 80, b: int = 80, l: int | None = None, r: int | None = None) -> None

Fields and properties declared here; inherited members belong to the bases above.

b

b: int = 80

l

l: int | None = None

r

r: int | None = None

t

t: int = 80

NumberFormat

Bases: Enum

Fields and properties declared here; inherited members belong to the bases above.

DATE

DATE = 'date'

DOLLAR

DOLLAR = 'dollar'

FLOAT

FLOAT = 'float'

INT

INT = 'int'

PERCENT

PERCENT = 'percent'

RATIO

RATIO = 'ratio'

TEXT

TEXT = 'text'

Palette

Deterministic colour wheel (replaces source np.random + eval) [G20].

__init__

def __init__(strategy: tuple[str, ...], benchmark: tuple[str, ...], reference: str = '#222222', drawdown_fill: str = '#b22222', heatmap_cmap: str = 'RdYlGn') -> None

Fields and properties declared here; inherited members belong to the bases above.

benchmark

benchmark: tuple[str, ...]

drawdown_fill

drawdown_fill: str = '#b22222'

heatmap_cmap

heatmap_cmap: str = 'RdYlGn'

reference

reference: str = '#222222'

strategy

strategy: tuple[str, ...]

color_for

def color_for(name: str, role: str, used: frozenset[str] = frozenset()) -> str

Stable colour for name in role (‘strategy’|‘benchmark’).

opposite

@staticmethod
def opposite(color: str) -> str

Pure complement — requires hex, so it never no-ops on a named colour [G20].

PaletteMode

Bases: Enum

Fields and properties declared here; inherited members belong to the bases above.

FIXED

FIXED = 'fixed'

GENERATED

GENERATED = 'generated'

THEME

THEME = 'theme'

PlotFormat

Frozen plot configuration.

[G1] yranges values may be a single (min, max) shared by both axes OR a pair ((min2, max2), (min1, max1)) for the MAX button’s dual-axis ratio scaling — the md’s single 2-tuple could not express the MAX pair. [G2] period_lookbacks (calendar days) is carried alongside period_gate_thresholds (trading days). [G3] live_start_default_visible + default-visible = first filtered period. [G5] metric is a free-form str (12 rolling metrics, not an enum).

__init__

def __init__(strat_cols: tuple[str, ...] = (), bench_cols: tuple[str, ...] = (), value_cols: tuple[str, ...] = (), name_map: Mapping[str, str] = _empty_map(), composite: bool = False, metric: str | None = None, metric_kwargs: Mapping[str, Any] = _empty_map(), transform: Transform = Transform.NONE, rebase: bool = False, rebase_per_period: bool = False, period_buttons: tuple[str, ...] = (), period_gate_thresholds: Mapping[str, int] = (lambda: DEFAULT_PERIOD_GATES)(), period_lookbacks: Mapping[str, int] = (lambda: DEFAULT_PERIOD_LOOKBACKS)(), live_start_date: date | None = None, live_start_default_visible: bool = False, rolling_windows: Mapping[int, str] = (lambda: _DEFAULT_ROLLING_WINDOWS)(), period_granularity: Granularity | None = None, date_range: tuple[date | None, date | None] = (None, None), secondary_axis: bool = False, primary_axis_title: str | None = None, secondary_axis_title: str | None = None, yaxis_type: AxisType = AxisType.LINEAR, yaxis2_type: AxisType = AxisType.LINEAR, yaxis_tickformat: str = '.0%', yaxis2_tickformat: str | None = None, xaxis_tickformat: str | None = None, tickprefix: str | None = None, overlaying: str | None = None, side: str | None = None, per_period_yranges: bool = False, yranges: Mapping[str, Any] = _empty_map(), hlines: tuple[HLine, ...] = (), vlines: tuple[VLine, ...] = (), bands: tuple[Band, ...] = (), band_threshold: float | None = None, band_annotation: bool = True, hover_columns: tuple[str, ...] = (), hover_format_rules: Mapping[str, NumberFormat] = _empty_map(), hovermode: str = 'closest', active_split_col: str | None = None, legend_orientation: LegendOrientation = LegendOrientation.HORIZONTAL, legend_position: LegendPos | None = None, title: str | None = None, font_size: int = 11, button_font_size: int = 10, margins: Margins = Margins(), height: int | None = None, width: int | None = None, palette_mode: PaletteMode = PaletteMode.THEME, color_overrides: Mapping[str, str] = _empty_map(), multi: bool = False, na_fill: float | None = None, output: PlotOutput = PlotOutput.BOTH, image_template: str = DEFAULT_IMAGE_TEMPLATE, traces: tuple[dict, ...] = (), raw_layout: Mapping[str, Any] = _empty_map(), periods_per_year: int = 252, hover: bool = True, zoom: bool = True) -> None

Fields and properties declared here; inherited members belong to the bases above.

active_split_col

active_split_col: str | None = None

band_annotation

band_annotation: bool = True

band_threshold

band_threshold: float | None = None

bands

bands: tuple[Band, ...] = ()

bench_cols

bench_cols: tuple[str, ...] = ()

button_font_size

button_font_size: int = 10

color_overrides

color_overrides: Mapping[str, str] = field(default_factory=_empty_map)

composite

composite: bool = False

date_range

date_range: tuple[date | None, date | None] = (None, None)

font_size

font_size: int = 11

height

height: int | None = None

hlines

hlines: tuple[HLine, ...] = ()

hover

hover: bool = True

hover_columns

hover_columns: tuple[str, ...] = ()

hover_format_rules

hover_format_rules: Mapping[str, NumberFormat] = field(default_factory=_empty_map)

hovermode

hovermode: str = 'closest'

image_template

image_template: str = DEFAULT_IMAGE_TEMPLATE

legend_orientation

legend_orientation: LegendOrientation = LegendOrientation.HORIZONTAL

legend_position

legend_position: LegendPos | None = None

live_start_date

live_start_date: date | None = None

live_start_default_visible

live_start_default_visible: bool = False

margins

margins: Margins = Margins()

metric

metric: str | None = None

metric_kwargs

metric_kwargs: Mapping[str, Any] = field(default_factory=_empty_map)

multi

multi: bool = False

na_fill

na_fill: float | None = None

name_map

name_map: Mapping[str, str] = field(default_factory=_empty_map)

output

output: PlotOutput = PlotOutput.BOTH

overlaying

overlaying: str | None = None

palette_mode

palette_mode: PaletteMode = PaletteMode.THEME

per_period_yranges

per_period_yranges: bool = False

period_buttons

period_buttons: tuple[str, ...] = ()

period_gate_thresholds

period_gate_thresholds: Mapping[str, int] = field(default_factory=(lambda: DEFAULT_PERIOD_GATES))

period_granularity

period_granularity: Granularity | None = None

period_lookbacks

period_lookbacks: Mapping[str, int] = field(default_factory=(lambda: DEFAULT_PERIOD_LOOKBACKS))

periods_per_year

periods_per_year: int = 252

primary_axis_title

primary_axis_title: str | None = None

raw_layout

raw_layout: Mapping[str, Any] = field(default_factory=_empty_map)

rebase

rebase: bool = False

rebase_per_period

rebase_per_period: bool = False

rolling_windows

rolling_windows: Mapping[int, str] = field(default_factory=(lambda: _DEFAULT_ROLLING_WINDOWS))

secondary_axis

secondary_axis: bool = False

secondary_axis_title

secondary_axis_title: str | None = None

side

side: str | None = None

strat_cols

strat_cols: tuple[str, ...] = ()

tickprefix

tickprefix: str | None = None

title

title: str | None = None

traces

traces: tuple[dict, ...] = ()

transform

transform: Transform = Transform.NONE

value_cols

value_cols: tuple[str, ...] = ()

vlines

vlines: tuple[VLine, ...] = ()

width

width: int | None = None

xaxis_tickformat

xaxis_tickformat: str | None = None

yaxis2_tickformat

yaxis2_tickformat: str | None = None

yaxis2_type

yaxis2_type: AxisType = AxisType.LINEAR

yaxis_tickformat

yaxis_tickformat: str = '.0%'

yaxis_type

yaxis_type: AxisType = AxisType.LINEAR

yranges

yranges: Mapping[str, Any] = field(default_factory=_empty_map)

zoom

zoom: bool = True

PlotOutput

Bases: Enum

Fields and properties declared here; inherited members belong to the bases above.

BOTH

BOTH = 'both'

HTML

HTML = 'html'

PNG

PNG = 'png'

PlotType

Bases: Enum

The 10 chart families ported from AlgoReports (Processor + OriginStats), plus the finance families.

[G13] No LINE/BAR/AREA/PERIOD — those are ARCHITECTURE.md inventions, absent from the authoritative spec and the source.

Fields and properties declared here; inherited members belong to the bases above.

ATTRIBUTION

ATTRIBUTION = 'attribution'

CORRELATION

CORRELATION = 'correlation'

CUMULATIVE

CUMULATIVE = 'cumulative'

CUMULATIVE_LOG

CUMULATIVE_LOG = 'cumulative_log'

CUMULATIVE_PERIODIC

CUMULATIVE_PERIODIC = 'cumulative_periodic'

CUMULATIVE_VOLMATCHED

CUMULATIVE_VOLMATCHED = 'cumulative_volmatched'

DISTRIBUTION

DISTRIBUTION = 'distribution'

DRAWDOWN

DRAWDOWN = 'drawdown'

EXPOSURE

EXPOSURE = 'exposure'

HEATMAP

HEATMAP = 'heatmap'

PERIOD_BAR

PERIOD_BAR = 'period_bar'

PORTFOLIO

PORTFOLIO = 'portfolio'

RISK_RETURN

RISK_RETURN = 'risk_return'

ROLLING

ROLLING = 'rolling'

UNDERWATER

UNDERWATER = 'underwater'

WATERFALL

WATERFALL = 'waterfall'

WEIGHTS

WEIGHTS = 'weights'

RowFormat

How one ROW of a comparison table renders (modern): rows are metrics, columns are the things compared. Keyed by the row’s label in TableFormat.rows.

__init__

def __init__(name: str, group: str | None = None, signed: bool = False, best: str | None = None, bar: bool = False) -> None

Fields and properties declared here; inherited members belong to the bases above.

bar

bar: bool = False

best

best: str | None = None

group

group: str | None = None

name

name: str

signed

signed: bool = False

Scope

Bases: Enum

Fields and properties declared here; inherited members belong to the bases above.

BY_COLUMN

BY_COLUMN = 'by_column'

BY_ROW

BY_ROW = 'by_row'

SpacerSize

Bases: Enum

Fields and properties declared here; inherited members belong to the bases above.

LG

LG = 'lg'

MD

MD = 'md'

SM

SM = 'sm'

XL

XL = 'xl'

XS

XS = 'xs'

TableFormat

Frozen table configuration. Membership is EXACT-string [G9], never substring.

__init__

def __init__(default_num_fmt: NumberFormat = NumberFormat.FLOAT, decimals: int = 2, scope: Scope = Scope.BY_ROW, percent_labels: frozenset[str] = DEFAULT_PERCENT_LABELS, dollar_labels: frozenset[str] = DEFAULT_DOLLAR_LABELS, ratio_labels: frozenset[str] = frozenset(), int_labels: frozenset[str] = frozenset(), expand_since_live_start: bool = True, columns: Mapping[str, ColumnFormat] = _empty_map(), rows: Mapping[str, RowFormat] = _empty_map(), column_lines: bool = False, compact: bool = False, default_align: Align = Align.LEFT, index: IndexSpec = IndexSpec(), colors: tuple[ColorRule, ...] = (), header: HeaderStyle = HeaderStyle(), na_fill: float | None = None, total_row: bool = False, total_col: bool = False, css_classes: str = 'table-container', table_id: str | None = None, escape: bool = False) -> None

Fields and properties declared here; inherited members belong to the bases above.

colors

colors: tuple[ColorRule, ...] = ()

column_lines

column_lines: bool = False

columns

columns: Mapping[str, ColumnFormat] = field(default_factory=_empty_map)

compact

compact: bool = False

css_classes

css_classes: str = 'table-container'

decimals

decimals: int = 2

default_align

default_align: Align = Align.LEFT

default_num_fmt

default_num_fmt: NumberFormat = NumberFormat.FLOAT

dollar_labels

dollar_labels: frozenset[str] = DEFAULT_DOLLAR_LABELS

escape

escape: bool = False

expand_since_live_start

expand_since_live_start: bool = True
header: HeaderStyle = HeaderStyle()

index

index: IndexSpec = IndexSpec()

int_labels

int_labels: frozenset[str] = frozenset()

na_fill

na_fill: float | None = None

percent_labels

percent_labels: frozenset[str] = DEFAULT_PERCENT_LABELS

ratio_labels

ratio_labels: frozenset[str] = frozenset()

rows

rows: Mapping[str, RowFormat] = field(default_factory=_empty_map)

scope

scope: Scope = Scope.BY_ROW

table_id

table_id: str | None = None

total_col

total_col: bool = False

total_row

total_row: bool = False

TextFormat

__init__

def __init__(color: str | None = None, weight: str | None = None, size: str | None = None, align: Align = Align.LEFT, italic: bool = False, margin: str | None = None, content_fmt: str = 'prose') -> None

Fields and properties declared here; inherited members belong to the bases above.

align

align: Align = Align.LEFT

color

color: str | None = None

content_fmt

content_fmt: str = 'prose'

italic

italic: bool = False

margin

margin: str | None = None

size

size: str | None = None

weight

weight: str | None = None

TextRole

Bases: Enum

Fields and properties declared here; inherited members belong to the bases above.

BODY

BODY = 'body'

CAPTION

CAPTION = 'caption'

DISCLAIMER

DISCLAIMER = 'disclaimer'

PRESENTER

PRESENTER = 'presenter'

RAW

RAW = 'raw'

Theme

__init__

def __init__(palette: Palette, tokens: Tokens = Tokens(), base_font_size: int = 11, brand_name: str = 'Origin Edge', brand_url: str = 'https://www.originholdings.net') -> None

Fields and properties declared here; inherited members belong to the bases above.

base_font_size

base_font_size: int = 11

brand_name

brand_name: str = 'Origin Edge'

brand_url

brand_url: str = 'https://www.originholdings.net'

palette

palette: Palette

tokens

tokens: Tokens = Tokens()

Tokens

CSS custom properties — EXACT defaults from the AlgoReports templates.

__init__

def __init__(surface: str = '#ffffff', border: str = '#dddddd', row_alt: str = '#f1f1f1', header_bg: str = '#eeeeee', collapsible_bg: str = '#f9f9f9', sticky_header: str = '#F5F5F5', plot_bg: str = '#E5ECF6', text: str = '#000000', accent: str = '#1f4e79', shadow: str = 'rgba(0,0,0,0.1)', toc_border: str = '#cccccc', spacer_xs: str = '4px', spacer_sm: str = '8px', spacer_md: str = '16px', spacer_lg: str = '32px', spacer_xl: str = '64px') -> None

Fields and properties declared here; inherited members belong to the bases above.

accent

accent: str = '#1f4e79'

border

border: str = '#dddddd'

collapsible_bg

collapsible_bg: str = '#f9f9f9'

header_bg

header_bg: str = '#eeeeee'

plot_bg

plot_bg: str = '#E5ECF6'

row_alt

row_alt: str = '#f1f1f1'

shadow

shadow: str = 'rgba(0,0,0,0.1)'

spacer_lg

spacer_lg: str = '32px'

spacer_md

spacer_md: str = '16px'

spacer_sm

spacer_sm: str = '8px'

spacer_xl

spacer_xl: str = '64px'

spacer_xs

spacer_xs: str = '4px'
sticky_header: str = '#F5F5F5'

surface

surface: str = '#ffffff'

text

text: str = '#000000'

toc_border

toc_border: str = '#cccccc'

Transform

Bases: Enum

Fields and properties declared here; inherited members belong to the bases above.

CUM

CUM = 'cum'

LOG

LOG = 'log'

LOG1P_CUMSUM

LOG1P_CUMSUM = 'log1p_cumsum'

NONE

NONE = 'none'

VOL_MATCHED

VOL_MATCHED = 'vol_matched'

VAlign

Bases: Enum

Fields and properties declared here; inherited members belong to the bases above.

BOTTOM

BOTTOM = 'bottom'

MIDDLE

MIDDLE = 'middle'

TOP

TOP = 'top'

VLine

__init__

def __init__(x: Any, dash: str = 'dash', color: str | None = None) -> None

Fields and properties declared here; inherited members belong to the bases above.

color

color: str | None = None

dash

dash: str = 'dash'

x

x: Any

Types and values

DEFAULT_DOLLAR_LABELS

DEFAULT_DOLLAR_LABELS: frozenset[str] = frozenset({'Value', 'New Value', 'PnL'})

DEFAULT_IMAGE_TEMPLATE

DEFAULT_IMAGE_TEMPLATE: str = '<img src="data:image/png;base64,{encoded_image}" style="width: 100%; height: auto;">'

DEFAULT_PALETTE

DEFAULT_PALETTE: Palette = Palette(strategy=('#1f4e79', '#c9a227', '#222222'), benchmark=('#b22222', '#2e7d32', '#6a1b9a'), reference='#222222', drawdown_fill='#b22222')

DEFAULT_PERCENT_LABELS

DEFAULT_PERCENT_LABELS: frozenset[str] = frozenset({'CAGR', 'Geometric Annualized Returns', 'Cumulative Returns', 'Returns Since Live Start', 'Returns', 'Win Rate', 'YTD Returns', 'MTD Returns', 'WTD Returns', 'Volatility', 'Downside Volatility', 'Max Drawdown', 'CVAR', 'Excess Returns', 'Alpha', 'Correlation', 'Tracking Error', 'Batting Average', '5Y Returns', '3Y Returns', '6M Returns', '3M Returns', '1M Returns', '5D Returns', '1D Returns', 'Up Market Alpha', 'Down Market Alpha', 'Up Market Correlation', 'Down Market Correlation', 'Up Market Batting Average', 'Down Market Batting Average', 'Exposure', 'Yield', 'Previous Weight', 'Current Weight', 'Target Weight', 'Weight', 'New Weight'})

DEFAULT_PERIOD_GATES

DEFAULT_PERIOD_GATES: Mapping[str, int] = MappingProxyType({'1M': 21, '3M': 63, '6M': 126, 'YTD': 1, '1Y': 252, '2Y': 504, '5Y': 1260, '10Y': 2520})

DEFAULT_PERIOD_LOOKBACKS

DEFAULT_PERIOD_LOOKBACKS: Mapping[str, int] = MappingProxyType({'1M': 30, '3M': 90, '6M': 180, '1Y': 365, '2Y': 730, '5Y': 1825, '10Y': 3650})

DEFAULT_PERIOD_ORDER

DEFAULT_PERIOD_ORDER: tuple[str, ...] = ('MAX', '10Y', '5Y', '2Y', '1Y', 'YTD', '6M', '3M', '1M')

DEFAULT_THEME

DEFAULT_THEME: Theme = Theme(palette=DEFAULT_PALETTE)

ORIGIN_THEME

ORIGIN_THEME: Theme = DEFAULT_THEME