original_docstring: 
          It runs the strategy to back-test
          @param prices the prices on which the back-test will be performed.
          @return tbd
          
docstring: It runs the strategy to back-test
  @param prices the prices on which the back-test will be performed.
  @return tbd
docstring_tokens: It runs the strategy to back - test @param prices the prices on which the back - test will be performed . @return tbd
code: def run(self, prices, method_investing):
          """
          It runs the strategy to back-test
          @param prices the prices on which the back-test will be performed.
          @return tbd
          """
          try:
              price_iter = self.define_entry_variables(prices)
  
              if method_investing == StrategyMethods.buy_and_old:
                  self.loop_prices_buy_hold(price_iter)
              elif method_investing == StrategyMethods.stop_loss:
                  self.loop_prices_stop_loss(price_iter)
              elif method_investing == StrategyMethods.trailing_stop_loss:
                  self.loop_prices_trailing_stop_loss(price_iter)
  
              self.defining_exit_variables()
  
              return self.results
  
          except Exception as e:
              log.error(f"There is a problem in the code!: {e}\n{getDebugInfo()}")
code_tokens: def run ( self , prices , method_investing ) : try : price_iter = self . define_entry_variables ( prices ) if method_investing == StrategyMethods . buy_and_old : self . loop_prices_buy_hold ( price_iter ) elif method_investing == StrategyMethods . stop_loss : self . loop_prices_stop_loss ( price_iter ) elif method_investing == StrategyMethods . trailing_stop_loss : self . loop_prices_trailing_stop_loss ( price_iter ) self . defining_exit_variables ( ) return self . results except Exception as e : log . error ( f"There is a problem in the code!: {e}\n{getDebugInfo()}" )
short_docstring: It runs the strategy to back-test
  @param prices the prices on which the back-test will be performed.
short_docstring_tokens: It runs the strategy to back - test @param prices the prices on which the back - test will be performed .
comment: """
          It runs the strategy to back-test
          @param prices the prices on which the back-test will be performed.
          @return tbd
          """