Skip to content

Instantly share code, notes, and snippets.

@shashankvemuri
Created July 6, 2020 03:27
Show Gist options
  • Select an option

  • Save shashankvemuri/d4e9d45ae3059f1e56682d0e1f220ded to your computer and use it in GitHub Desktop.

Select an option

Save shashankvemuri/d4e9d45ae3059f1e56682d0e1f220ded to your computer and use it in GitHub Desktop.
imports and parameters
#import the libraries
import math
import warnings
import datetime
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from tensorflow.keras import Sequential
from pandas_datareader import DataReader
from sklearn.preprocessing import MinMaxScaler
from sklearn.metrics import mean_squared_error
from tensorflow.keras.layers import Dense, LSTM
warnings.filterwarnings("ignore")
#get the stock quote for the past 10 years
stock = input("Enter a stock ticker: ")
num_of_years = 10
start_date = datetime.datetime.now() - datetime.timedelta(days=int(365.25*num_of_years))
end_date = datetime.date.today()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment