def descriptive_mode(dataset,start_date,end_date,company_name,company): print("\n"+"*" *100) print(f"Thanks for Choosing Descriptive Stock Analysis Option. You can choose \n1.Basic Statistics Analysis for {company_name}\n2.Advanced Statistics Analysis for {company_name} \n3.Compare Stockes between different companies \n4.Main Menu\n") print("\n"+"*" *100) option = input("Choose from the above option\nEnter your Option:") try: if option == "1": basic_stats(dataset,start_date,end_date,company_name,company) elif option == "2": advanced_stats(dataset,start_date,end_date,company_name,company) elif option == "3": comparestocks(dataset,start_date,end_date,company_name,company) elif option == "4": hm.mainmenu(dataset,start_date,end_date,company_name,company) else: print(f"Guess, You have entered the wrong option, Please try again !!! You can choose \n1.For Stock Analysis for {company}\n 2.Stock Prediction for {company} \n3.Main Menu\n") print("\n") descriptive_mode(dataset,start_date,end_date,company_name,company) except ValueError: print("Enter the correct option from below menu") descriptive_mode(dataset,start_date,end_date,company_name,company)
def predictive_mode(dataset, start_date, end_date, company_name, company): print("*" * 100) print( f"Thanks for Choosing Predictive Stock Analysis Option. You can choose \n1.Prediction using Linear Regression for {company_name} \n2.Prediction using ARIMA Model for {company_name} \n3.Main Menu\n" ) print("*" * 100) option = input("Choose from the above option\nEnter your Option:\n") try: if option == "1": linear_mode(dataset, start_date, end_date, company_name, company) predictive_mode(dataset, start_date, end_date, company_name, company) elif option == "2": arima_model(dataset, start_date, end_date, company_name, company) predictive_mode(dataset, start_date, end_date, company_name, company) elif option == "3": hm.mainmenu(dataset, start_date, end_date, company_name, company) else: print( f"Guess, You have entered the wrong option, Please try again !!! You can choose \n1.Prediction using Linear Regression for {company_name} \n2.Prediction using ARIMA Model for {company_name} \n3.Main Menu\n" ) print("\n") predictive_mode(dataset, start_date, end_date, company_name, company) except ValueError: print("Please select from given below options") predictive_mode(dataset, start_date, end_date, company_name, company)
def plotData(dataset, start_date, end_date, company_name, company): print("*" * 100) print( f"Thanks for Choosing Descriptive Stock Analysis Option. You can choose \n1.Time Series \n2.Trend Lines for {company_name} \n3.Candle Stick View of Close price for {company_name}\n4.Histograms for High and Low \n5.Main Menu\n" ) option = input("Choose from the above option?\nEnter your Option:") print("*" * 100) try: if option == "1": timeSeries(dataset, start_date, end_date, company_name, company) plotData(dataset, start_date, end_date, company_name, company) elif option == "2": trendlines(dataset, start_date, end_date, company_name, company) plotData(dataset, start_date, end_date, company_name, company) elif option == "3": candle_stick_ohlc(dataset, start_date, end_date, company_name, company) plotData(dataset, start_date, end_date, company_name, company) elif option == "4": graph(dataset) plotData(dataset, start_date, end_date, company_name, company) elif option == "5": hm.mainmenu(dataset, start_date, end_date, company_name, company) else: print( f"Guess, You have entered the wrong option, Please try again !!! You can choose \n1.Time Series and Trend Lines for {company_name} \n2.Candle Stick View of Close price for {company_name}\n3.Main Menu\n" ) print("\n") plotData(dataset, start_date, end_date, company_name, company) except ValueError: print("***Wrong choice, Please try again....***\n\n") plotData(dataset, start_date, end_date, company_name, company)