code: def benchmark_2():
      x = np.random.randn(10000, 1000) * 0.01
      idx = pd.date_range("1990-01-01", freq="B", periods=x.shape[0])
      data = np.exp(pd.DataFrame(x, index=idx).cumsum())
      bidoffer = data * 0.01
      coupons = data * 0.0
      s = bt.FixedIncomeStrategy(
          "s",
          algos=[
              bt.algos.RunMonthly(),
              bt.algos.SelectRandomly(len(data.columns) / 2),
              bt.algos.WeighRandomly(),
              bt.algos.Rebalance(),
          ],
          children=[bt.CouponPayingSecurity(c) for c in data],
      )
  
      t = bt.Backtest(
          s,
          data,
          additional_data={"bidoffer": bidoffer, "coupons": coupons},
      )
      return bt.run(t)
  
imports: import numpy
  import pandas
  import bt
  import cProfile
label_desc: Use image node_id 2 for calling a global function with example usage: benchmark_2() and returns: bt