cashflow_analytics.pv01
***********************

spice.cashflow_analytics.pv01(cashflows: Series, yield_rate: float = 0.08, valuation_date: date | None = None, day_count_convention: str = 'ACT_365', compounding_frequency: Literal['annual', 'semi_annual'] = 'annual') -> float

   Calculate PV01 - price value of a 01 basis point.

   PV01 = Modified Duration * 1 basis point * Current Price

   This measures the absolute price change in price for a 1 basis
   point (0.01%) change in yield.

   Parameters:
      * **cashflows** -- Series with date index and cashflow amounts
        as values

      * **yield_rate** -- Yield rate to consider (usually estimated
        yield as of the valuation date)

      * **valuation_date** -- Date to value cashflows from (defaults
        to today)

      * **day_count_convention** -- Day counting method

      * **compounding_frequency** -- Frequency of discount rate
        compounding ("annual" or "semi_annual")

   Returns:
      PV01 - absolute price change for 1bp yield change

   -[ Example ]-

   >>> # Bond with face value 1000
   >>> cashflows = pd.Series([50, 50, 1050],
   ...                      index=pd.DatetimeIndex(['2024-06-01', '2024-12-01', '2025-06-01']))
   >>> pv01_value = pv01(cashflows, 0.05)
   >>> # For semi-annual rate
   >>> pv01_semi = pv01(cashflows, 0.025, compounding_frequency="semi_annual")
