qs-backtest 0.3.2

Backtesting engine — strategy and signal replay over historical market data
Documentation
# Management Profile Definitions
#
# Each [[profile]] entry defines a named trade management strategy that
# transforms raw signals into fully-specified Action::Open calls.
#
# Fields:
#   name              — unique profile identifier
#   target_selection  — current selector: All, None, or Selected(1-based indices)
#   use_targets       — compatibility mirror for older serialized profiles
#   close_ratios      — target weights. An empty list means equal 1/N weights; explicit weights must match
#                       the effective selection and sum to <= 1.0.
#   target_source     — omitted/FromSignal selects signal targets; StopDistanceMultiples generates targets
#                       from the final grid-adjusted protective-stop distance
#   stoploss_mode     — FromSignal, None, FixedDistance, FixedPrice, or FromSignalDistance
#   rules             — additional management rules to attach
#   group_override    — if set, overrides the signal's group tag
#   let_remainder_run — required in strict resolution when explicit weights sum below 1.0;
#                       the unallocated remainder rides with SL/rules only
#   entry_geometry    — strict (default) rejects crossed signal stoploss/targets during profile resolution;
#                       permissive retains them there, but current engine Open validation remains strict
#
# Shipped profiles state current target intent and entry geometry policy explicitly. `use_targets` is
# retained as a compatibility mirror while older serialized profile payloads remain readable.

[[profile]]
name = "conservative"
target_selection = { Selected = [1] }
use_targets = [1]
close_ratios = [1.0]
stoploss_mode = { type = "FromSignal" }
let_remainder_run = false
entry_geometry = "permissive"

[[profile]]
name = "aggressive"
target_selection = "All"
use_targets = [1, 2]
close_ratios = []
stoploss_mode = { type = "FromSignal" }
let_remainder_run = false
entry_geometry = "permissive"

[[profile]]
name = "runner"
target_selection = { Selected = [1] }
use_targets = [1]
close_ratios = [0.3]
stoploss_mode = { type = "FromSignal" }
let_remainder_run = true
entry_geometry = "strict"

[[profile.rules]]
type = "BreakevenAfterTargets"
after_n = 1

[[profile.rules]]
type = "TrailingStop"
distance = 0.0030

[[profile]]
name = "scalp_tight"
target_selection = { Selected = [1] }
use_targets = [1]
close_ratios = [1.0]
let_remainder_run = false
entry_geometry = "strict"

[profile.stoploss_mode]
type = "FixedDistance"
distance = 0.0010

[[profile]]
name = "time_limited"
target_selection = { Selected = [1, 2] }
use_targets = [1, 2]
close_ratios = [0.5, 0.5]
stoploss_mode = { type = "FromSignal" }
let_remainder_run = false
entry_geometry = "strict"

[[profile.rules]]
type = "TimeExit"
max_seconds = 3600

[[profile.rules]]
type = "BreakevenWhenOffset"
trigger_price_offset = 0.0020