<a id="skfolio-measures-probabilistic-sharpe-ratio"></a>

# skfolio.measures.probabilistic_sharpe_ratio

<a id="skfolio.measures.probabilistic_sharpe_ratio"></a>

### skfolio.measures.probabilistic_sharpe_ratio(returns, benchmark_sharpe_ratio=0.0, risk_free_rate=0.0)

Compute the Probabilistic Sharpe Ratio (PSR).

The PSR estimates the probability that the true Sharpe ratio of a return series
exceeds a benchmark, given the length of the series and the non-normality of
its returns:

$$
PSR(SR^*) = Z\left[\frac{\left(\hat{SR} - SR^*\right)\sqrt{T - 1}}
{\sqrt{1 - \gamma_3 \hat{SR} + \frac{\gamma_4 - 1}{4} \hat{SR}^2}}\right]
$$

with $\hat{SR}$ the observed Sharpe ratio, $SR^*$ the benchmark,
$T$ the number of observations, $\gamma_3$ the skew,
$\gamma_4$ the kurtosis and $Z$ the standard normal CDF.

* **Parameters:**
  **returns** *ndarray of shape (n_observations,) or (n_observations, n_assets)*
  : Array of return values.

  **benchmark_sharpe_ratio** *float, default=0.0*
  : Benchmark Sharpe ratio $SR^*$.

  **risk_free_rate** *float, default=0.0*
  : Risk-free rate used to compute the excess mean of `returns`.
* **Returns:**
  **value** *float or ndarray of shape (n_assets,)*
  : Estimated probability that the true Sharpe ratio exceeds
    `benchmark_sharpe_ratio`.
    If `returns` is a 1D-array, the result is a float.
    If `returns` is a 2D-array, the result is a ndarray of shape (n_assets,).

#### SEE ALSO
[`expected_max_sharpe_ratio`](https://skfolio.org/generated/skfolio.measures.expected_max_sharpe_ratio.html.md#skfolio.measures.expected_max_sharpe_ratio)

[`deflated_sharpe_ratio`](https://skfolio.org/generated/skfolio.measures.deflated_sharpe_ratio.html.md#skfolio.measures.deflated_sharpe_ratio)

### Notes

All quantities are per-period: `returns`, `risk_free_rate` and
`benchmark_sharpe_ratio` must share the same frequency, and none of them is
annualized.

NaN handling: NaNs are ignored. A series with fewer than three observations,
with no dispersion, or with a non-positive variance adjustment yields NaN.

### References

* <a id='r3841e5ede978-1'>**[1]**</a> “The Sharpe Ratio Efficient Frontier”. Bailey, D. and Lopez de Prado, M. (2012)

