code: def test_Market():
      pf = build_portfolio(
          names=names_yf,
          pf_allocation=pf_allocation,
          start_date=start_date,
          end_date=end_date,
          data_api="yfinance",
          market_index="^GSPC",
      )
      assert isinstance(pf.market_index, Market)
      assert pf.market_index.name == "^GSPC"
      assert pf.beta is not None
      assert pf.rsquared is not None
      assert pf.treynor is not None
  
imports: import numpy
  import pandas
  import pytest
  import yfinance
  from finquant.market import Market
  from finquant.portfolio import build_portfolio
label_desc: Use image node_id 1 for calling a global function with example usage: test_Market() without return types