Skip to content

Commit

Permalink
Substituted investpy for yahoo finance
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronTheNerd committed Apr 26, 2021
1 parent cfb989e commit d79233b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions prediction/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
#import numpy as np
#import keras
import random
import investpy as iv
#import investpy as iv
import yfinance as yf


SAMPLE_P = 50
Expand Down Expand Up @@ -156,7 +157,9 @@ def get_rsi(percents, train=True):
def get_prediction(ticker):
upper = random.random()
lower = random.random()
data = iv.get_stock_recent_data(stock=ticker, country='United States')
data = yf.Ticker(ticker).history(period="max")
#data = iv.get_stock_recent_data(stock=ticker, country='United States')
print(data)
prediction = data['Open'][-1]
upper_value = prediction * (1 + upper)
lower_value = prediction * lower
Expand Down

0 comments on commit d79233b

Please sign in to comment.