I am working in a Machine Learning Model for Bitcoin Price.
I am attempting to predict how much the price changes in the next day. I am approaching this as a classification problem instead of regression problem because of better results in initial tests.
So i have created a variable called classification which groups the percentage change next day into values of [-4,4]. I am currently grouping it like this:
def percentage_to_classification(x): #returns a number y [-4,4] depending on how much it went up/down y = 0 if (x > 0.2): y = 4 elif (0.1 <= x <= 0.2): y = 3 elif (0.05 <= x <= 0.1): y = 2 elif (0.03 <= x <= 0.05): y = 1 elif (-0.03 <= x <= 0.03): y = 0 elif (-0.05 <= x <= -0.03): y = -1 elif (-0.1 <= x <= -0.05): y = -2 elif (-0.2 <= x <= -0.1): y = -3 elif (x < -0.2): y = -4 return y
As it can be seen if the percentage rise is greater than 20%, the output is 4 and so on.
Now over a long time frame the price of bitcoin has increased a lot. From 200 dollars to 20k dollars.
I want to treat a 5% rise at 200 dollar differently than a 5% rise at 10k dollar. More accurately while classifying, I want to take into account the current price along with the percentage change. How can i achieve this?