Forecasting Adventures 2 - More UpdatessteemCreated with Sketch.

in #money9 years ago

c1.png


Time to research deeper and look into some things that might be a lead. But first make sure you read the last episode to know what I am talking about:



Upgraded Error Correction

So by the last episode I have pretty much corrected the tool to the best version available for now v2.2, but there is one problem there, note I have added this line as the error correction module, since the logarithm could get negative, so we need to bypass that:

   if(last_forecast<0):
    last_forecast=float(ARRAY[limit][1])+abs(f_diff)


This error correction module is not very good in my opinion. First of all statistically, for error correction or data filtering we usually put the previous value to the current value if data is missing or it is undefined as in our case. So a better option would be this:

   if(last_forecast<=0):
    last_forecast=float(ARRAY[limit][1])


Notice that the divisor could also be zero, so we need to put a <=0 here and swap the terms so that the forecast will be the divisor, it doesn’t matter since we will take the abs value anyway.

   error=abs(math.log(float(last_real/last_forecast)))   


So with this clever trick we both avoid negative values and zero division as well. I have ran the software on the old data again, but nothing has changed, the 840 period is still the best and it still gives the same LN error. This is mostly because the problems occur on lower periods anyway, so nothing has changed, nontheless this is a more accurate correction method so this is now the new standard.



New Module: Brute Force

I have also added a new module for brute-forcing the parameters, the best period. Yes the code was there in comments, but in snippets, pretty disorganized, so I have formally added this new option which you can select by entering “2”:

BF.png

The feature is kind of experimental, I haven’t tested nor optimized it much, so please signal if you find any bugs.



Updated & Cleaned the Code

I noticed that the code was getting kind of repetitive and complicated, so I cleaned it up a little bit, any repeating part put in a function, and made it more visually appealing if you want to look into it:

code.png



An even Better Correction Mode

Last but not least, I was also thinking, if the software gives us back a negative value, we don’t even need to correct that, we can just simply ignore it. I mean if the predicted price is negative that is obviously an error and nobody would use that, so we can know that ahead of time.

So I simply just coded in a removal function that will just ignore that point from the average. It’s not cheating since we know ahead of time if the output is correct or not, that much we know.

Again no change from the previous value, it’s still the 840 period with the same error, actually the problems happen at period 1 for some reason, probably because of lack of a sample to work on. But in other datasets, especially on a decreasing initial market like STEEM/USD was, it could be worse.

So this is even more accurate actually, so I will leave this as the best standard.



DOWNLOAD “OLD” DATASET

DOWNLOAD CRYPTO FORECASTING TOOL 2.4



Disclaimer: The information provided on this page or blog post might be incorrect, inaccurate or incomplete. I am not responsible if you lose money or other valuables using the information on this page or blog post! This page or blog post is not an investment advice, just my opinion and analysis for educational or entertainment purposes.


Sources:
https://pixabay.com


Upvote, ReSteem & bluebutton


Coin Marketplace

STEEM 0.04
TRX 0.31
JST 0.073
BTC 63490.47
ETH 1676.63
USDT 1.00
SBD 0.41