performance_analytics.treynor_ratio
***********************************

spice.performance_analytics.treynor_ratio(portfolio_returns_timeseries: Series, benchmark_returns_timeseries: Series, risk_free_annual: float, periods: int = 12, start_date: datetime = datetime.datetime(2023, 3, 18, 18, 32, 15, 907641), end_date: datetime = datetime.datetime(2026, 3, 18, 18, 32, 15, 907645)) -> float | None

   Calculates Treynor ratio using daily returns. This fuction
   resamples the returns to the specified frequency (daily, monthly or
   yearly) based on the 'periods' parameter, and the calculation is
   performed within the window defined by start_date and end_date. If
   the available data covers less than 12 months, the function returns
   None.

   Parameters:
      * **portfolio_returns_timeseries** -- Daily portfolio returns
        series indexed by date(datetime format)

      * **benchmark_returns_timeseries** -- Daily benchmark returns
        series indexed by date(datetime format)

      * **risk_free_annual** -- Annual risk-free rate as decimal

      * **periods** -- Number of periods to use for annualization - 1
        for yearly - 12 for monthly - 252 for daily

      * **start_date** -- Start date (datetime format)

      * **end_date** -- End date (datetime format)

   Returns:
      Treynor ratio, or None if insufficient data.

   Return type:
      float
