original_docstring: 
          Calculates the round trip trade return as a fraction.
          
docstring: Calculates the round trip trade return as a fraction.
docstring_tokens: Calculates the round trip trade return as a fraction .
code: def calcTradeReturn(self):
          """
          Calculates the round trip trade return as a fraction.
          """
  
          Exit, Entry = self.exitprice, self.entryprice
          if (Exit - Entry) == 0:
              self._tradereturn = abs(self._pos) - 1
          else:
              self._tradereturn = self._pos*(Exit - Entry)/abs(Entry)
code_tokens: def calcTradeReturn ( self ) : Exit , Entry = self . exitprice , self . entryprice if ( Exit - Entry ) == 0 : self . _tradereturn = abs ( self . _pos ) - 1 else : self . _tradereturn = self . _pos * ( Exit - Entry ) / abs ( Entry )
short_docstring: Calculates the round trip trade return as a fraction.
short_docstring_tokens: Calculates the round trip trade return as a fraction .
comment: """
          Calculates the round trip trade return as a fraction.
          """