code: def beta(self):
          
          try:
              res = round(
                  float(
                      self.calc_beta(
                          self.profit_pct.dropna(),
                          self.benchmark_profitpct.dropna()
                      )
                  ),
                  2
              )
          except:
              print('贝塔计算错误。。')
              res = 0
  
          return res
docs: beta比率 组合的系统性风险