Skip to content

Instantly share code, notes, and snippets.

@juanino
Last active November 10, 2019 17:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juanino/61c29f80841b7ace0a00252ace6d4fe3 to your computer and use it in GitHub Desktop.
Save juanino/61c29f80841b7ace0a00252ace6d4fe3 to your computer and use it in GitHub Desktop.
check yahoo stock for price change for the day, return true if postive
from yahoo_fin.stock_info import get_live_price
from yahoo_fin.stock_info import get_quote_table
def check_stock(stock):
price = get_live_price(stock)
prev_price = get_quote_table(stock)['Previous Close']
if price > prev_price:
return(True)
else:
return(False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment