Forecasting Adventures 3 - Code Review

in #programming7 years ago (edited)

c1.png


Before I can move forward, a code review is needed for the software. I have added so many things in the last week that it got a little bit complicated and that means that I could have messed up the indexes and the global/local variable value exchanges.


If you are a programmer skilled in python, please take a look at the code and look out for bugs. I have found some bugs in the 2.4 version, so the probability of bugs now is increasing so I would need some help from fellow coders to fix them.

What to look for:

  • loop indexes, range values, array indexes being correctly set
  • correct exchange of values between global and local variables
  • local variables used in a nested loop should be nulled out before the 2nd loop
  • other potential bugs
  • possibly making the code more efficient/faster/cleaner


Version 2.6

I have made some changes in the v2.6 version. Added a "forward steps" parameter, so that now we can forecast multiple steps ahead not just 1. However this complicates the range of the loops and I really hate that, so watch out for this, I have already found some problems here. Plus I found a bug with the Theil’s U calculation, it went out of range for the maximum period value, so we have to be careful with these pesky index values.

So please review my code, the latest 2.6 version can be found here:



DOWNLOAD “OLD” DATASET

DOWNLOAD CRYPTO FORECASTING TOOL 2.6



Upvote, ReSteem & bluebutton


Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.032
BTC 59123.43
ETH 2988.19
USDT 1.00
SBD 3.75