-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements on price analysis (calculation) modes #194
Comments
Pluimvee
changed the title
Improvement on calculation methods
Improvement on analysis (calculation) modes
Oct 8, 2024
Pluimvee
changed the title
Improvement on analysis (calculation) modes
Improvements on price analysis (calculation) modes
Oct 8, 2024
You convinced me that this would be a good improvement. |
Code changes for this in Pull request #197 |
This was referenced Oct 8, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are currently three calculation methods for the min(), max(), avg() and percentage methods.
Publish
the publish method is performing calculations on the 72hrs of data fetched daily around 13:00. The data requested is from yesterday 0:00 till the next day 23:00. It therefore contains the prices from approx 36hrs before and approx 36hrs in the future of fetching time. While moving in time the historical data gets bigger and the future price data gets smaller.
The current code contains some strange logic to filter the dataset when its larger then 48hrs,
Rotation (better named daily)
this method does the math on the dataset of today. As such the results change at 0:00
Sliding
This method uses the dataset of the current hour (now) till the end of the dataset. As such the window used for the math is not fixed but reduces while moving in time. Also when new data is fetched the dataset is suddenly enlarged, and all results change suddenly
In my opinion these methods do not make the sensors very useful.
Proposal:
a. Sliding24 which calculates using 12hrs before and after
b. Sliding12 which calculates using 6hrs before and after
The latter method is useful to enable, disable equipment as it tells something about the current price level within the 24/12hrs surrounding hours. As such its not limited to cheap hours, but also indicates acceptable and expensive hours. (the latter I use to discharge my battery ;))
The text was updated successfully, but these errors were encountered: