Skip to content

Instantly share code, notes, and snippets.

View hhsm95's full-sized avatar

Hugo Sandoval hhsm95

View GitHub Profile
@hhsm95
hhsm95 / stonks.py
Last active March 24, 2021 16:01
Check anual increment of stocks
import yfinance as yf
import pandas as pd
def calculate(symbol: str) -> dict:
stocks = yf.Ticker(symbol)
data = stocks.history(period="5y")
data = data[["Close"]]