as you might know, I have written a bot for the Splinterlands game, and no it is no bot that is going to automate this game in any way for you, it is much more a bot for getting information about your card deck, the value, your latest games, quests, and whatnot.
Since the prices of the cards are more or less based upon what other players are trying to sell them for and sometimes the number of cards that are going to be sold is quite low spikes in prices and the graphs are something that has to be calculated with.
I will take the graph of @Louis88 as an example here.
As you can see there was such a spike event somewhen in June 2020, now since I am a very lazy guy I do not want to enter the database every time this happens and invalidate those data points to get a smoother graph that is also more realistic. Therefore I thought a lot about automatizing this by writing a piece of code that detects those spikes and invalidates the data points connected with this event.
I started out with mean values and percentages of deviation, but this did not work out well at all, either I filtered out too much or too few data points, it simply did not add up the right way.
Now, I am following the graph and try to grab the characteristics of those spikes, a steep climb followed shortly afterward with a similar steep fall.
Using a +1000 Dollar event in a single data point in comparison to its direct predecessor I am receiving the following output of my program.
Obviously, my program detects two anomalies that should be checked and one that should be invalidated.
I marked the 2 occasions in the following graph, for easier visual validation.
As one can see easily the first event should really be not invalidated because it is quite a normal move, but the second one is indeed one of those peaks that I wanted to find and invalidate.
So far so good ;)
I will try now to build this into a broader use function for all the players, which most likely means I need to rethink the value with which I am starting the detection. This needs to be more dependant on the general worth of the card deck rather than an absolute number.
ps. btw I am always open to different ideas :)