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

Function register

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

Source from the content-addressed store, hash-verified

101/// Bets per year `n`; finite and > 0.
102/// pi_plus : float
103/// Return of a winning bet.
104/// pi_minus : float
105/// Return of a losing bet (typically negative); must be below `pi_plus`.
106///
107/// Returns
108/// -------
109/// float
110/// The annualised Sharpe ratio.
111///
112/// Raises
113/// ------
114/// ValueError
115/// If `precision` is not strictly inside `(0, 1)`, `annual_bet_frequency` is not finite
116/// and positive, or the payouts are not finite with `pi_plus > pi_minus`.
117#[pyfunction(name = "sharpe_asymmetric")]
118fn sr_sharpe_asymmetric(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected