]> Piment Noir Git Repositories - freqai-strategies.git/commit
test(reforcexy): cover the strategy's signals, validation and sizing
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 2 Oct 2026 09:30:37 +0000 (11:30 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 2 Oct 2026 09:30:37 +0000 (11:30 +0200)
commitb98ac38e8e99c2541755ef2941242edfb5ac0f3e
treef33b4f3d58cb6f30a8ab841dc1f5f72c03204a3a
parentcd52260cafd29e465a5417b2e7ad9276f02ddecf
test(reforcexy): cover the strategy's signals, validation and sizing

RLAgentStrategy is the thinnest layer of the strategy and was the least
covered: 47.2%, with every symbol but `leverage` untouched. It is also
where a wrong answer costs money directly — an entry flag raised on a row
whose prediction the model has not published trades on a value that does
not exist yet.

The action literals are asserted as a cross-object equality with the enum
rather than as two independent literals, so both survive a freqtrade
renumbering only if they agree; both would still pass if each were simply
retyped.

Signal tests read the flags through a NaN-aware helper, because the
assignment creates the column and an untouched row arrives as a missing
float rather than a zero — asserting `== 0` would have encoded a shape
the strategy does not produce.

125 tests green; gate exits 0 at 59.1%, floor raised to 59 with its
measurement; green under three seeded method orderings.
ReforceXY/.coveragerc
ReforceXY/tests/test_coverage_floor.py
ReforceXY/tests/test_strategy_semantics.py [new file with mode: 0644]