Created
August 6, 2019 18:01
-
-
Save marcopeix/159ef4faf83c8e93b8ca398f77b551d3 to your computer and use it in GitHub Desktop.
This file contains 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
# Make a dataframe containing actual and predicted prices | |
comparison = pd.DataFrame({'actual': [18.93, 19.23, 19.08, 19.17, 19.11, 19.12], | |
'predicted': [18.96, 18.97, 18.96, 18.92, 18.94, 18.92]}, | |
index = pd.date_range(start='2018-06-05', periods=6,)) | |
#Plot predicted vs actual price | |
plt.figure(figsize=(17, 8)) | |
plt.plot(comparison.actual) | |
plt.plot(comparison.predicted) | |
plt.title('Predicted closing price of New Germany Fund Inc (GF)') | |
plt.ylabel('Closing price ($)') | |
plt.xlabel('Trading day') | |
plt.legend(loc='best') | |
plt.grid(False) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment