![](https://crypto4nerd.com/wp-content/uploads/2024/04/0cAmgwsW0FUebOoI9-1024x576.jpg)
Does the weather actually have an impact on the price?
The first thought I had when I started to do this analysis was that climate would be a very insightful variable where I would be able to obtain a lot of information about how the price fluctuates over the years, but is that an accurate analysis?
Trying to find a correlation between price and climate, I found this:
I only kept the most important variables.
The correlation is around 0, which means that there is no correlation between price and climate.
So, what is happening here?
I thought the climate would be a major player, but that’s not the case.
Mmm, let’s check the data again; probably I missed something.
I tried to filter during isolated periods in the year.
No correlation!
Considering this, I made the decision to focus only on the cost because there is not any other option.
I started to think that the price could give me more information than I had imagined about him.
Maybe I can gain some insight by doing an autoregressive model; maybe the price always moves in a similar way.
So, that’s what i did.
I tried different models over the same data to see what had better performance:
- Simple model
- Random Forest Model
- Prophet
- LSTM
All four of the models I chose are typically good at analysing time-series data.
To save the suspense, I’ll show you the comparison of the errors of the 4 models:
Every model is predicting 15 days ahead.
It is quite well studied that for forecasting and tabulating data, networks still do not work well; that’s why LSTM has the highest error.
HERE, you can check out the models.
The Random Forest model is a multivariate model that uses weather data as well, but it does not seem to have a lower error rate than other models that use price as their only training set.
With a median error of less than 0.20€, Prophet is our best model in this situation.
Now… What can we do with this information? How can it help us improve our performance during the season?
Is it possible for our model to generate supply distributions based on prices to be paid by our customers so that we reach a daily target? We’ll see that in Part III.
But I’ll leave a preview here:
Part III is coming soon.