Created
October 7, 2022 11:00
-
-
Save JustinGuese/08add43a61947016e164ecb996566c67 to your computer and use it in GitHub Desktop.
Getting a baseline of data. See "getdata.py" on how to get data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
startMoney = 10000 | |
COMMISSION = 0.00025 # interactive brokers commission | |
howmany = startMoney / msft.iloc[0]["Adj Close"] | |
win = howmany * msft.iloc[-1]["Adj Close"] - startMoney | |
days = (msft.index[-1] - msft.index[0]).days | |
print("with just holding you would have made %.2f$" % win) | |
winPerMonth = win / (days / 30) | |
winPctPerYear = winPerMonth * 12 / startMoney * 100 | |
print("or %.2f%% per year" % winPctPerYear) | |
print("or %.2f$ per month" % winPerMonth) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment