class_docstr: A simple reward scheme that rewards the agent for incremental increases
  in net worth.
  
  Parameters
  ----------
  window_size : int
      The size of the look back window for computing the reward.
  
  Attributes
  ----------
  window_size : int
      The size of the look back window for computing the reward.
class_docstr_tok: ["A","simple","reward","scheme","that","rewards","the","agent","for","incremental","increases","in","net","worth",".","Parameters","--","--","--","--","--","window_size",":","int","The","size","of","the","look","back","window","for","computing","the","reward",".","Attributes","--","--","--","--","--","window_size",":","int","The","size","of","the","look","back","window","for","computing","the","reward","."]
docstr: Rewards the agent for incremental increases in net worth over a
  sliding window.
  
  Parameters
  ----------
  portfolio : `Portfolio`
      The portfolio being used by the environment.
  
  Returns
  -------
  float
      The cumulative percentage change in net worth over the previous
      `window_size` time steps.
docstr_tok: ["Rewards","the","agent","for","incremental","increases","in","net","worth","over","a","sliding","window",".","Parameters","--","--","--","--","--","portfolio",":","`","Portfolio","`","The","portfolio","being","used","by","the","environment",".","Returns","--","--","--","-","float","The","cumulative","percentage","change","in","net","worth","over","the","previous","`","window_size","`","time","steps","."]
code: def get_reward(self, portfolio: "Portfolio") -> float:
      """Rewards the agent for incremental increases in net worth over a
      sliding window.
  
      Parameters
      ----------
      portfolio : `Portfolio`
          The portfolio being used by the environment.
  
      Returns
      -------
      float
          The cumulative percentage change in net worth over the previous
          `window_size` time steps.
      """
      net_worths = [
          nw["net_worth"] for nw in portfolio.performance.values()
      ]
      if len(net_worths) > 1:
          return (
              net_worths[-1]
              / net_worths[-min(len(net_worths), self._window_size + 1)]
              - 1.0
          )
      else:
          return 0.0
  
imports: from abc import abstractmethod
  import numpy
  import pandas
  from tensortrade.env.generic import RewardScheme, TradingEnv
  from tensortrade.feed.core import Stream, DataFeed
  import math
label_desc: Use image node_id 2 for calling the SimpleProfit obj's underlying member method code with example usage: obj.get_reward(portfolio) and returns: unknown, int