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 = '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') -> NoneFields and properties declared here; inherited members belong to the bases above.
annotation_position
annotation_position: str = 'top left'annotation_text
annotation_text: str | None = Nonefillcolor
fillcolor: str | None = Noneopacity
opacity: float = 0.3x0
x0: Anyx1
x1: Anyxref
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) -> NoneFields and properties declared here; inherited members belong to the bases above.
bar
bar: float | None = Nonelabel
label: strsigned
signed: bool = Falsetag
tag: str | None = Nonetext
text: str | None = Nonetone
tone: str = 'info'value
value: float | None = NoneColorKind
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) -> NoneFields and properties declared here; inherited members belong to the bases above.
above_color
above_color: str | None = Noneapply_to
apply_to: str = 'cell'below_color
below_color: str | None = Nonecmap
cmap: str = 'RdYlGn'kind
kind: ColorKindna_color
na_color: str | None = Nonenegative_color
negative_color: str | None = Nonepositive_color
positive_color: str | None = Nonetext_color
text_color: str | None = Nonethreshold
threshold: float | None = Nonevcenter
vcenter: float | None = Nonevmax
vmax: float | None = Nonevmin
vmin: float | None = Nonezero_color
zero_color: str | None = NoneColumnFormat
__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) -> NoneFields and properties declared here; inherited members belong to the bases above.
align
align: Align | None = Nonebar
bar: bool = Falsecolor
color: ColorRule | None = Nonedate_format
date_format: str = '%Y-%m-%d'decimals
decimals: int | None = Noneformatter
formatter: Callable[[Any], str] | None = Nonehighlight
highlight: bool = Falsename
name: strnull_display
null_display: str = ''num_fmt
num_fmt: NumberFormat | None = Nonescale
scale: float = 1.0tones
tones: Mapping[str, str] = field(default_factory=_empty_map)width
width: str | None = NoneGranularity
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) -> NoneFields and properties declared here; inherited members belong to the bases above.
color
color: str | None = Nonedash
dash: str = 'dash'secondary_y
secondary_y: bool = Falsey
y: floatHeaderStyle
__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()) -> NoneFields and properties declared here; inherited members belong to the bases above.
align
align: Align = Align.LEFTbg
bg: str | None = Nonebold
bold: bool = Truemultiindex_render
multiindex_render: str = 'spanned'rename
rename: Mapping[str, str] = field(default_factory=_empty_map)sticky
sticky: bool = Truetext_color
text_color: str | None = NoneImageFormat
__init__
def __init__(mode: str = 'auto', template: str = DEFAULT_IMAGE_TEMPLATE, max_width: str | None = None) -> NoneFields and properties declared here; inherited members belong to the bases above.
max_width
max_width: str | None = Nonemode
mode: str = 'auto'template
template: str = DEFAULT_IMAGE_TEMPLATEIndexSpec
__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) -> NoneFields and properties declared here; inherited members belong to the bases above.
bold
bold: bool = Truedroplevel
droplevel: int | tuple[int, ...] | None = Noneindex_label
index_label: str | None = Noneindex_num_fmt
index_num_fmt: NumberFormat | None = Nonemultiindex
multiindex: str = 'flatten'reset
reset: bool = TrueLegendOrientation
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) -> NoneFields and properties declared here; inherited members belong to the bases above.
b
b: int = 80l
l: int | None = Noner
r: int | None = Nonet
t: int = 80NumberFormat
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') -> NoneFields 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()) -> strStable colour for name in role (‘strategy’|‘benchmark’).
opposite
@staticmethoddef opposite(color: str) -> strPure 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) -> NoneFields and properties declared here; inherited members belong to the bases above.
active_split_col
active_split_col: str | None = Noneband_annotation
band_annotation: bool = Trueband_threshold
band_threshold: float | None = Nonebands
bands: tuple[Band, ...] = ()bench_cols
bench_cols: tuple[str, ...] = ()button_font_size
button_font_size: int = 10color_overrides
color_overrides: Mapping[str, str] = field(default_factory=_empty_map)composite
composite: bool = Falsedate_range
date_range: tuple[date | None, date | None] = (None, None)font_size
font_size: int = 11height
height: int | None = Nonehlines
hlines: tuple[HLine, ...] = ()hover
hover: bool = Truehover_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_TEMPLATElegend_orientation
legend_orientation: LegendOrientation = LegendOrientation.HORIZONTALlegend_position
legend_position: LegendPos | None = Nonelive_start_date
live_start_date: date | None = Nonelive_start_default_visible
live_start_default_visible: bool = Falsemargins
margins: Margins = Margins()metric
metric: str | None = Nonemetric_kwargs
metric_kwargs: Mapping[str, Any] = field(default_factory=_empty_map)multi
multi: bool = Falsena_fill
na_fill: float | None = Nonename_map
name_map: Mapping[str, str] = field(default_factory=_empty_map)output
output: PlotOutput = PlotOutput.BOTHoverlaying
overlaying: str | None = Nonepalette_mode
palette_mode: PaletteMode = PaletteMode.THEMEper_period_yranges
per_period_yranges: bool = Falseperiod_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 = Noneperiod_lookbacks
period_lookbacks: Mapping[str, int] = field(default_factory=(lambda: DEFAULT_PERIOD_LOOKBACKS))periods_per_year
periods_per_year: int = 252primary_axis_title
primary_axis_title: str | None = Noneraw_layout
raw_layout: Mapping[str, Any] = field(default_factory=_empty_map)rebase
rebase: bool = Falserebase_per_period
rebase_per_period: bool = Falserolling_windows
rolling_windows: Mapping[int, str] = field(default_factory=(lambda: _DEFAULT_ROLLING_WINDOWS))secondary_axis
secondary_axis: bool = Falsesecondary_axis_title
secondary_axis_title: str | None = Noneside
side: str | None = Nonestrat_cols
strat_cols: tuple[str, ...] = ()tickprefix
tickprefix: str | None = Nonetitle
title: str | None = Nonetraces
traces: tuple[dict, ...] = ()transform
transform: Transform = Transform.NONEvalue_cols
value_cols: tuple[str, ...] = ()vlines
vlines: tuple[VLine, ...] = ()width
width: int | None = Nonexaxis_tickformat
xaxis_tickformat: str | None = Noneyaxis2_tickformat
yaxis2_tickformat: str | None = Noneyaxis2_type
yaxis2_type: AxisType = AxisType.LINEARyaxis_tickformat
yaxis_tickformat: str = '.0%'yaxis_type
yaxis_type: AxisType = AxisType.LINEARyranges
yranges: Mapping[str, Any] = field(default_factory=_empty_map)zoom
zoom: bool = TruePlotOutput
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) -> NoneFields and properties declared here; inherited members belong to the bases above.
bar
bar: bool = Falsebest
best: str | None = Nonegroup
group: str | None = Nonename
name: strsigned
signed: bool = FalseScope
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) -> NoneFields and properties declared here; inherited members belong to the bases above.
colors
colors: tuple[ColorRule, ...] = ()column_lines
column_lines: bool = Falsecolumns
columns: Mapping[str, ColumnFormat] = field(default_factory=_empty_map)compact
compact: bool = Falsecss_classes
css_classes: str = 'table-container'decimals
decimals: int = 2default_align
default_align: Align = Align.LEFTdefault_num_fmt
default_num_fmt: NumberFormat = NumberFormat.FLOATdollar_labels
dollar_labels: frozenset[str] = DEFAULT_DOLLAR_LABELSescape
escape: bool = Falseexpand_since_live_start
expand_since_live_start: bool = Trueheader
header: HeaderStyle = HeaderStyle()index
index: IndexSpec = IndexSpec()int_labels
int_labels: frozenset[str] = frozenset()na_fill
na_fill: float | None = Nonepercent_labels
percent_labels: frozenset[str] = DEFAULT_PERCENT_LABELSratio_labels
ratio_labels: frozenset[str] = frozenset()rows
rows: Mapping[str, RowFormat] = field(default_factory=_empty_map)scope
scope: Scope = Scope.BY_ROWtable_id
table_id: str | None = Nonetotal_col
total_col: bool = Falsetotal_row
total_row: bool = FalseTextFormat
__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') -> NoneFields and properties declared here; inherited members belong to the bases above.
align
align: Align = Align.LEFTcolor
color: str | None = Nonecontent_fmt
content_fmt: str = 'prose'italic
italic: bool = Falsemargin
margin: str | None = Nonesize
size: str | None = Noneweight
weight: str | None = NoneTextRole
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') -> NoneFields and properties declared here; inherited members belong to the bases above.
base_font_size
base_font_size: int = 11brand_name
brand_name: str = 'Origin Edge'brand_url
brand_url: str = 'https://www.originholdings.net'palette
palette: Palettetokens
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') -> NoneFields 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
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) -> NoneFields and properties declared here; inherited members belong to the bases above.
color
color: str | None = Nonedash
dash: str = 'dash'x
x: AnyTypes 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