class_docstr: A reward scheme that rewards the agent for increasing its net worth,
  while penalizing more volatile strategies.
  
  Parameters
  ----------
  return_algorithm : {'sharpe', 'sortino'}, Default 'sharpe'.
      The risk-adjusted return metric to use.
  risk_free_rate : float, Default 0.
      The risk free rate of returns to use for calculating metrics.
  target_returns : float, Default 0
      The target returns per period for use in calculating the sortino ratio.
  window_size : int
      The size of the look back window for computing the reward.
class_docstr_tok: ["A","reward","scheme","that","rewards","the","agent","for","increasing","its","net","worth",",","while","penalizing","more","volatile","strategies",".","Parameters","--","--","--","--","--","return_algorithm",":","{","'sharpe","'",",","'sortino","'","}",",","Default","'sharpe","'",".","The","risk-adjusted","return","metric","to","use",".","risk_free_rate",":","float",",","Default","0",".","The","risk","free","rate","of","returns","to","use","for","calculating","metrics",".","target_returns",":","float",",","Default","0","The","target","returns","per","period","for","use","in","calculating","the","sortino","ratio",".","window_size",":","int","The","size","of","the","look","back","window","for","computing","the","reward","."]
code: def __init__(
      self,
      return_algorithm: str = "sharpe",
      risk_free_rate: float = 0.0,
      target_returns: float = 0.0,
      window_size: int = 1,
  ) -> None:
      algorithm = self.default("return_algorithm", return_algorithm)
  
      assert algorithm in ["sharpe", "sortino"]
  
      if algorithm == "sharpe":
          return_algorithm = self._sharpe_ratio
      elif algorithm == "sortino":
          return_algorithm = self._sortino_ratio
  
      self._return_algorithm = return_algorithm
      self._risk_free_rate = self.default(
          "risk_free_rate", risk_free_rate
      )
      self._target_returns = self.default(
          "target_returns", target_returns
      )
      self._window_size = self.default("window_size", window_size)
  
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 1 to create a new RiskAdjustedReturns object from inherited base classes: TensorTradeRewardScheme with example: obj = RiskAdjustedReturns(return_algorithm, risk_free_rate, target_returns, window_size)