 low,
      close: close
    };
  }
  
  function generateCandlestickData(days, options = {}) {
    const {
      startingPrice = 150,
      minPrice = 120,
      maxPrice = 180,
      startDate = getRandomRecentDate()
    } = options;
    
    if (!Number.isInteger(days) || days <= 0) {
      throw new Error('Days must be a positive integer');
    }
    
    if (startingPrice < minPrice || startingPrice > maxPrice) {
      throw new Error('Starting price must be within min and max price range');
    }
    