title: Using Holt-Winters for forecasting in Python
body: <p>I've been trying to use <a href="http://adorio-research.org/wordpress/?p=1230" rel="noreferrer">this implementation of the Holt-Winters algorithm</a> for time series forecasting in Python but have run into a roadblock... basically, for some series of (positive) inputs, it sometimes forecasts negative numbers, which should clearly not be the case. Even if the forecasts are not negative, they are sometimes wildly inaccurate - orders of magnitude higher/lower than they should be. Giving the algorithm more periods of data to work with does not appear to help, and in fact often makes the forecast worse. </p>
  
  <p>The data I'm using has the following characteristics, which might be problems:  </p>
  
  <ul>
  <li><p>Very frequently sampled (one data point every 15 minutes, as opposed to monthly data as the example uses) - but from what I've read, the Holt-Winters algorithm shouldn't have a problem with that. Perhaps that indicates a problem with the implementation?</p></li>
  <li><p>Has multiple periodicities - there are daily peaks (i.e. every 96 data points) as well as a weekly cycle of weekend data being significantly lower than weekday data - for example weekdays can peak around 4000 but weekends peak at 1000 - but even when I only give it weekday data, I run into the negative-number problem. </p></li>
  </ul>
  
  <p>Is there something I'm missing with either the implementation or my usage of the Holt-Winters algorithm in general? I'm not a statistician so I'm using the 'default' values of alpha, beta, and gamma indicated in the link above - is that likely to be the problem, and is there a better way to calculate those values? </p>
  
  <p>Or ... is there a better algorithm to use here than Holt-Winters? Ultimately I just want to create sensible forecasts from historical data here. I've tried single- and double-exponential smoothing but (as far as I understand) neither support periodicity in data.</p>
  
  <p>Any help/input would be greatly appreciated!</p>