code: def set_riskfree_rate(self, rf):
  
          
          self.rf = rf
  
          # Note, that we recalculate everything.
          self._update(self.prices)
docs: Set annual risk-free rate property and calculate properly annualized
          monthly and daily rates. Then performance stats are recalculated.
          Affects only this instance of the PerformanceStats.
  
          Args:
              * rf (float): Annual `risk-free rate <https://www.investopedia.com/terms/r/risk-freerate.asp>`_