(py: Python<'_>, parent: &Bound<'_, PyModule>)
| 21 | #[pyfunction(name = "get_weights")] |
| 22 | fn fracdiff_get_weights(diff_amt: f64, size: usize) -> Vec<f64> { |
| 23 | openquant::fracdiff::get_weights(diff_amt, size) |
| 24 | } |
| 25 | |
| 26 | /// Fixed-width-window fractional-differencing weights of order `diff_amt`. |
| 27 | /// |
| 28 | /// Uses the recursion of `get_weights` and stops before the first weight whose absolute |
| 29 | /// value is below `thresh`, or once `lim` weights exist, whichever comes first (AFML |
| 30 | /// Snippet 5.3). A `thresh` of 0 or less (or NaN) never satisfies the strict stopping |
| 31 | /// comparison, even for zero weights: it means "cap only" and yields exactly `lim` weights. |
| 32 | /// `thresh` is a floor on a single weight's magnitude, not a share of cumulative weight as |
| 33 | /// in `frac_diff`. |
| 34 | /// |
| 35 | /// Parameters |
nothing calls this directly
no outgoing calls
no test coverage detected