performance_analytics.beta
**************************

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

   Calculate beta relative to a single benchmark 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)

      * **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:
      Beta coefficient, or None if insufficient data.

   Return type:
      float
