MCPcopy Create free account
hub / github.com/Open-Quant/openquant / register

Function register

crates/pyopenquant/src/labeling.rs:320–332  ·  view source on GitHub ↗
(py: Python<'_>, parent: &Bound<'_, PyModule>)

Source from the content-addressed store, hash-verified

318/// `(timestamp, side)` pairs from the primary model (`+1` long, `-1` short).
319/// pt : float, default 1.0
320/// Profit-taking multiple of the target; 0 disables the barrier.
321/// sl : float, default 1.0
322/// Stop-loss multiple of the target; 0 disables the barrier.
323/// min_ret : float, default 0.0
324/// Events whose target is not above this (or is NaN) are dropped.
325/// vertical_barrier_times : list[tuple[str, str]] | None, default None
326/// `(event, barrier)` pairs, e.g. from `add_vertical_barrier`; events without one have no
327/// time limit.
328///
329/// Returns
330/// -------
331/// list[tuple[str, float, float, int, float | None]]
332/// One `(t0, ret, trgt, bin, side)` row per resolved event; `ret` is the side-signed
333/// return and `bin` is 0 or 1.
334///
335/// Raises

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected