code: def testNoTrades(self):
      barFeed = yahoofeed.Feed()
      barFeed.addBarsFromCSV(
          "ige", common.get_data_file_path("sharpe-ratio-test-ige.csv")
      )
      strat = strategy_test.TestStrategy(barFeed, 1000)
      stratAnalyzer = sharpe.SharpeRatio()
      strat.attachAnalyzer(stratAnalyzer)
  
      strat.run()
      self.assertTrue(strat.getBroker().getCash() == 1000)
      self.assertTrue(stratAnalyzer.getSharpeRatio(0.04, True) == 0)
      self.assertTrue(stratAnalyzer.getSharpeRatio(0) == 0)
      self.assertTrue(stratAnalyzer.getSharpeRatio(0, True) == 0)
  
file_path: pyalgotrade/testcases/sharpe_analyzer_test.py
imports: import datetime
  from .None import common
  from .None import strategy_test
  from pyalgotrade.barfeed import yahoofeed
  from pyalgotrade.barfeed import ninjatraderfeed
  from pyalgotrade.barfeed import csvfeed
  from pyalgotrade.stratanalyzer import sharpe
  from pyalgotrade.broker import backtesting
  from pyalgotrade import broker
  from pyalgotrade import marketsession
label_desc: Use image node_id 2 for calling the SharpeRatioTestCase obj's underlying member method code with example usage: obj.testNoTrades() without return types