Created
June 18, 2021 16:28
-
-
Save selva86/44a0a6554cb355f26afbaed5c1fff758 to your computer and use it in GitHub Desktop.
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
# Calc Profit | |
def calc_profit(open, high, low, close): | |
buy = open * 0.999 | |
# daily range | |
if low < buy < high: | |
return (close - buy)/buy | |
else: | |
return 0 | |
# Read Data | |
arr = np.genfromtxt("Datasets/apple_stock_price.csv", delimiter=",", skip_header=1) | |
arr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment