Created
February 21, 2020 06:51
-
-
Save quantra-go-algo/5bcf5fffbf1f145e005c05707c098697 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Computes the forecasted values | |
stock['forecast'] = intercept + slope*stock['t'] | |
#Computes the error | |
stock['error'] = stock['Adj Close'] - stock['forecast'] | |
mean_error=stock['error'].mean() | |
print ('The mean error is: ', mean_error) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment