Ready for first real test
This commit is contained in:
1 parent
acddf9135f
commit
b91c81ebdf
46 files changed
+34903
-26
No files matched your search
@@ -0,0 +1,6 @@
|
||||
|
||||
import yfinance as yf, matplotlib.pyplot as plt
|
||||
df = yf.download("AAPL", period="3mo", progress=False)
|
||||
df["SMA20"] = df["Close"].rolling(20).mean()
|
||||
print("rows", len(df), "last close", round(float(df["Close"].iloc[-1]),2))
|
||||
df[["Close","SMA20"]].plot(title="AAPL"); plt.savefig("aapl.png")
|
||||
Reference in new issue
Block a user