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