code: def sharpe(returns, rfr=0, expanding=0):
      
      if expanding:
          excess = excess_returns(returns, rfr)
          return pd.expanding_mean(excess) / pd.expanding_std(returns)
      else:
          return excess_returns(returns, rfr).mean() / returns.std()
docs: returns: periodic return string
      rfr: risk free rate
      expanding: bool