qs-backtest 0.2.6

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.
#   stoploss_mode     — FromSignal, None, FixedDistance, or FixedPrice
#   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
#
# Shipped profiles state current target intent 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

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

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

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

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

[[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

[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

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

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