up
Browse files
app.py
CHANGED
|
@@ -739,44 +739,22 @@ def compare_models(date, money):
|
|
| 739 |
uber_stocks = money / uber_current[-1][0]
|
| 740 |
predictions["Uber"] = (uber_prediction[-1][0] - uber_current[-1][0]) * uber_stocks
|
| 741 |
|
| 742 |
-
if "Equinix" in available and (eq_prediction[-1][0] - eq_current[-1][0]) * eq_stocks >0:
|
| 743 |
eq_stocks = money / eq_current[-1][0]
|
| 744 |
predictions["Equinix"] = (eq_prediction[-1][0] - eq_current[-1][0]) * eq_stocks
|
| 745 |
|
| 746 |
-
if "Ubiquiti" in available and (ub_prediction[-1][0] - ub_current[-1][0]) * ub_stocks >0:
|
| 747 |
ub_stocks = money / ub_current[-1][0]
|
| 748 |
predictions["Ubiquiti"] = (ub_prediction[-1][0] - ub_current[-1][0]) * ub_stocks
|
| 749 |
|
| 750 |
-
if "SFL Corporation" in available and (sfl_prediction[-1][0] - sfl_current[-1][0]) * sfl_stocks >0:
|
| 751 |
sfl_stocks = money / sfl_current[-1][0]
|
| 752 |
predictions["SFL Corporation"] = (sfl_prediction[-1][0] - sfl_current[-1][0]) * sfl_stocks
|
| 753 |
|
| 754 |
-
if "Envela Corporation" in available and (ela_prediction[-1][0] - ela_current[-1][0]) * ela_stocks >0:
|
| 755 |
ela_stocks = money / ela_current[-1][0]
|
| 756 |
predictions["Envela Corporation"] = (ela_prediction[-1][0] - ela_current[-1][0]) * ela_stocks
|
| 757 |
|
| 758 |
-
|
| 759 |
-
|
| 760 |
-
neg = {}
|
| 761 |
-
if "Uber" in available and (uber_prediction[-1][0] - uber_current[-1][0]) * uber_stocks <=0 :
|
| 762 |
-
uber_stocks = money / uber_current[-1][0]
|
| 763 |
-
neg["Uber"] = (uber_prediction[-1][0] - uber_current[-1][0]) * uber_stocks
|
| 764 |
-
|
| 765 |
-
if "Equinix" in available and (eq_prediction[-1][0] - eq_current[-1][0]) * eq_stocks <=0:
|
| 766 |
-
eq_stocks = money / eq_current[-1][0]
|
| 767 |
-
neg["Equinix"] = (eq_prediction[-1][0] - eq_current[-1][0]) * eq_stocks
|
| 768 |
-
|
| 769 |
-
if "Ubiquiti" in available and (ub_prediction[-1][0] - ub_current[-1][0]) * ub_stocks <=0:
|
| 770 |
-
ub_stocks = money / ub_current[-1][0]
|
| 771 |
-
neg["Ubiquiti"] = (ub_prediction[-1][0] - ub_current[-1][0]) * ub_stocks
|
| 772 |
-
|
| 773 |
-
if "SFL Corporation" in available and (sfl_prediction[-1][0] - sfl_current[-1][0]) * sfl_stocks <=0:
|
| 774 |
-
sfl_stocks = money / sfl_current[-1][0]
|
| 775 |
-
neg["SFL Corporation"] = (sfl_prediction[-1][0] - sfl_current[-1][0]) * sfl_stocks
|
| 776 |
-
|
| 777 |
-
if "Envela Corporation" in available and (ela_prediction[-1][0] - ela_current[-1][0]) * ela_stocks <=0:
|
| 778 |
-
ela_stocks = money / ela_current[-1][0]
|
| 779 |
-
neg["Envela Corporation"] = (ela_prediction[-1][0] - ela_current[-1][0]) * ela_stocks
|
| 780 |
|
| 781 |
pr = {
|
| 782 |
"Uber":"Industry: Transportation Technology \nHeadquarters: San Francisco, California, USA \nFounded: 2009 \nKey Products: Ride-hailing, Uber Eats (food delivery), Uber Freight, micro-mobility solutions (electric bikes and scooters), and autonomous vehicle technology. \nOverview: Uber Technologies, Inc. is a global transportation and mobility company known for revolutionizing the ride-hailing industry. It connects passengers with drivers through a mobile app, offering convenient and reliable transportation services. Uber has expanded its offerings to include food delivery, freight transportation, and micro-mobility solutions.",
|
|
@@ -800,8 +778,7 @@ def compare_models(date, money):
|
|
| 800 |
|
| 801 |
|
| 802 |
if not predictions:
|
| 803 |
-
|
| 804 |
-
return best_stock, f"Best stock company is {best_stock} but expected to lose, so we recommend you to use \"Saving\" section in current time :)."
|
| 805 |
|
| 806 |
best_prediction = f"Best stock company is {best_stock} with profit approximately {best_profit:.2f} $ and your total money is {best_profit + money:.2f} $\n{pr[best_stock]}"
|
| 807 |
return best_stock, best_prediction
|
|
|
|
| 739 |
uber_stocks = money / uber_current[-1][0]
|
| 740 |
predictions["Uber"] = (uber_prediction[-1][0] - uber_current[-1][0]) * uber_stocks
|
| 741 |
|
| 742 |
+
if "Equinix" in available and (eq_prediction[-1][0] - eq_current[-1][0]) * eq_stocks >0 :
|
| 743 |
eq_stocks = money / eq_current[-1][0]
|
| 744 |
predictions["Equinix"] = (eq_prediction[-1][0] - eq_current[-1][0]) * eq_stocks
|
| 745 |
|
| 746 |
+
if "Ubiquiti" in available and (ub_prediction[-1][0] - ub_current[-1][0]) * ub_stocks >0 :
|
| 747 |
ub_stocks = money / ub_current[-1][0]
|
| 748 |
predictions["Ubiquiti"] = (ub_prediction[-1][0] - ub_current[-1][0]) * ub_stocks
|
| 749 |
|
| 750 |
+
if "SFL Corporation" in available and (sfl_prediction[-1][0] - sfl_current[-1][0]) * sfl_stocks >0 :
|
| 751 |
sfl_stocks = money / sfl_current[-1][0]
|
| 752 |
predictions["SFL Corporation"] = (sfl_prediction[-1][0] - sfl_current[-1][0]) * sfl_stocks
|
| 753 |
|
| 754 |
+
if "Envela Corporation" in available and (ela_prediction[-1][0] - ela_current[-1][0]) * ela_stocks >0 :
|
| 755 |
ela_stocks = money / ela_current[-1][0]
|
| 756 |
predictions["Envela Corporation"] = (ela_prediction[-1][0] - ela_current[-1][0]) * ela_stocks
|
| 757 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 758 |
|
| 759 |
pr = {
|
| 760 |
"Uber":"Industry: Transportation Technology \nHeadquarters: San Francisco, California, USA \nFounded: 2009 \nKey Products: Ride-hailing, Uber Eats (food delivery), Uber Freight, micro-mobility solutions (electric bikes and scooters), and autonomous vehicle technology. \nOverview: Uber Technologies, Inc. is a global transportation and mobility company known for revolutionizing the ride-hailing industry. It connects passengers with drivers through a mobile app, offering convenient and reliable transportation services. Uber has expanded its offerings to include food delivery, freight transportation, and micro-mobility solutions.",
|
|
|
|
| 778 |
|
| 779 |
|
| 780 |
if not predictions:
|
| 781 |
+
return None, f"The current options are not ideal for investment. We recommend using the \"Saving\" section at this time."
|
|
|
|
| 782 |
|
| 783 |
best_prediction = f"Best stock company is {best_stock} with profit approximately {best_profit:.2f} $ and your total money is {best_profit + money:.2f} $\n{pr[best_stock]}"
|
| 784 |
return best_stock, best_prediction
|