marianogappa / crypto-predictions

State machine-based engine for tracking crypto-related predictions across social media posts.
https://marianogappa.github.io/software/2023/06/17/building-crypto-predictions/
2 stars 0 forks source link

This prediction was incorrect but the image shows correct! #26

Closed marianogappa closed 2 years ago

marianogappa commented 2 years ago
Screenshot 2022-05-31 at 15 01 00
marianogappa commented 2 years ago

The problem is that the candlesticks shown (in this case, daily) represent the range of an entire day, but they are horizontally located at the beginning of the day, and crucially the horizontal width of the candlestick is smaller than a day. However, the start and the goal lines are horizontally located at the exact time they happened. Thus, it is possible that the chart shows as if a value was reached before the goal, when in fact it was reached after it, like in this case.

Since candlesticks are shown correctly and are visually more pleasing than a line chart that would show more accurate values horizontally speaking, a good solution is to truncate the start & goal timestamps to right before the beginning of the candlestick in which they are placed.

marianogappa commented 2 years ago

The fix implementation in here dbc59bc adds the summary property EndedAtTruncatedDueToResultInvalidation to be used to show the vertical checkered flag line. It defaults to the same value as EndedAt, except in the case where an INCORRECT prediction becomes visually CORRECT in the last candlestick, when it will move back to the middle between the last two candlesticks.

This fix only applies to the PredictionTypeCoinOperatorFloatDeadline for now; the problem remains for other types. Further analysis should be done to the other types, as there are not many examples of them so far.

Screenshot 2022-06-12 at 16 20 08