Best regression model to use for sales prediction I have the following variables along with sales data going back a few years:


date # simple date, can be split in year, month etc 
shipping_time  (0-6 weeks) # 0 weeks means in stock, more weeks means the product is out of stock but a shipment is on the way to the warehouse. Longer shipping times have a siginificant impact on sales. 
sales # amount of products sold


I need to predict the sales (which vary seasonally) while taking into account the shipping time. What would be a simple regression model that would produce reasonable results? I tried linear regression with only date and sales, but this does not account for seasonality, so the prediction is rather weak.

Edit: As a measure of accuracy, I will withold a random sample of data from the input and compare against the result.

Extra points if it can be easily done in python/scipy

Data can look like this

--------------------------------------------------
| date           | delivery_time| sales          |
--------------------------------------------------
| 2015-01-01     | 0            |10              |
--------------------------------------------------
| 2015-01-01     | 7            |2               |
--------------------------------------------------
| 2015-01-02     | 7            |3               |
...
This is a pretty classic ARIMA dataset. ARIMA is implemented in the StatsModels package for Python, the documentation for which is available here.

An ARIMA model with seasonal adjustment may be the simplest reasonably successful forecast for a complex time series such as sales forecasting. It may (probably will) be that you need to combine the method with an additional model layer to detect additional fluctuation beyond the auto-regressive function of your sales trend.

Unfortunately, simple linear regression models tend to fare quite poorly on time series data.