code: def __getCashToBuyStock(self):
          ''' calculate the amount of money to buy stock '''
          account=self.__strategy.getAccountCopy()
          if (account.getCash() >= account.getTotalValue() / self.buying_ratio):
              return account.getTotalValue() / self.buying_ratio
          else:
              return f __getCashToBuyStock(self):
          ''' calculate the amount of money to buy stock '''
          account=self.__strategy.getAccountCopy()
          if (account.getCash() >= account.getTotalValue() / self.buying_ratio):
              return account.getTotalValue() / self.buying_ratio
          else:
              return 0
docs: calculate the amount of money to buy stock