Preset configurations for risk modes, black swan thresholds, and DCA ladder strategies.
Provides hardcoded preset configurations for MVP usage. Future versions will load these from JSON configuration files for user customization.
API Functions
| Function | Arity | Description | Param Kinds |
|---|---|---|---|
load_dca_preset | 0 | Load the default DCA ladder preset for reserve-based position scaling. | - |
load_thresholds | 0 | Load black swan threshold percentages by asset for long and short positions. | - |
load_modes | 0 | Load risk mode configurations for portfolio allocation. | - |
Summary
Functions
Load the default DCA ladder preset for reserve-based position scaling.
Load risk mode configurations for portfolio allocation.
Load black swan threshold percentages by asset for long and short positions.
Types
Functions
@spec load_dca_preset() :: [dca_step()]
Load the default DCA ladder preset for reserve-based position scaling.
Returns
3-step list of {price_pct, allocation_pct} Decimal tuples. Covers 90% of capital across decreasing price levels; 10% held in reserve. (list)
# descripex:contract
%{
returns: %{
type: :list,
description: "3-step list of {price_pct, allocation_pct} Decimal tuples. Covers 90% of capital across decreasing price levels; 10% held in reserve."
}
}
@spec load_modes() :: %{ conservative: risk_mode(), moderate: risk_mode(), aggressive: risk_mode() }
Load risk mode configurations for portfolio allocation.
Returns
Map with :conservative, :moderate, :aggressive keys, each a map of %{pct: Decimal, cap: Decimal}. (map)
# descripex:contract
%{
returns: %{
type: :map,
description: "Map with :conservative, :moderate, :aggressive keys, each a map of %{pct: Decimal, cap: Decimal}."
}
}
@spec load_thresholds() :: %{required(String.t()) => asset_threshold()}
Load black swan threshold percentages by asset for long and short positions.
Returns
Map keyed by asset symbol (e.g. "ETH") to %{long: integer, short: integer} threshold percentages. (map)
# descripex:contract
%{
returns: %{
type: :map,
description: "Map keyed by asset symbol (e.g. \"ETH\") to %{long: integer, short: integer} threshold percentages."
}
}