Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. # Make a dataframe containing actual and predicted prices
  2. comparison = pd.DataFrame({'actual': [18.93, 19.23, 19.08, 19.17, 19.11, 19.12],
  3. 'predicted': [18.96, 18.97, 18.96, 18.92, 18.94, 18.92]},
  4. index = pd.date_range(start='2018-06-05', periods=6,))
  5.  
  6.  
  7. #Plot predicted vs actual price
  8.  
  9. plt.figure(figsize=(17, 8))
  10. plt.plot(comparison.actual)
  11. plt.plot(comparison.predicted)
  12. plt.title('Predicted closing price of New Germany Fund Inc (GF)')
  13. plt.ylabel('Closing price ($)')
  14. plt.xlabel('Trading day')
  15. plt.legend(loc='best')
  16. plt.grid(False)
  17. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement