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

Function get_w

crates/openquant/src/bet_sizing.rs:229–231  ·  view source on GitHub ↗
(price_div: f64, m_bet_size: f64, func: &str)

Source from the content-addressed store, hash-verified

227/// `signal` is `(start, size)` pairs and `t1` the matching end times (zipped, so extra
228/// entries in the longer slice are ignored). The evaluation points are the sorted, unique
229/// union of all starts and ends; at each, the result is the mean of the signals with
230/// `start <= t < end`, or 0 if none is live.
231pub fn avg_active_signals(
232 signal: &[(NaiveDateTime, f64)],
233 t1: &[NaiveDateTime],
234) -> Vec<(NaiveDateTime, f64)> {

Callers 2

bet_size_dynamic_checkedFunction · 0.85
test_get_w_key_errorFunction · 0.85

Calls 1

get_w_checkedFunction · 0.85

Tested by 1

test_get_w_key_errorFunction · 0.68