From 404d5ef3e320400c567f2b2ac7896b77201b1e0c Mon Sep 17 00:00:00 2001 From: Jeff Gutierrez Date: Sat, 25 Jun 2022 14:17:15 -0400 Subject: [PATCH] 8 Updated the passed ticker so that the correct spot price is looked up. --- .gitignore | 5 ++++- opstrat/helpers.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 6a41db9..4bff491 100644 --- a/.gitignore +++ b/.gitignore @@ -77,4 +77,7 @@ ENV/ # Rope project settings .ropeproject *.npy -*.pkl \ No newline at end of file +*.pkl + +# Pycharm +.idea \ No newline at end of file diff --git a/opstrat/helpers.py b/opstrat/helpers.py index 2e3e305..8e0a17b 100644 --- a/opstrat/helpers.py +++ b/opstrat/helpers.py @@ -28,6 +28,6 @@ def check_ticker(ticker): Check ticker """ try: - return yf.Ticker('msft').info['currentPrice'] + return yf.Ticker(ticker).info['currentPrice'] except KeyError: raise ValueError('Ticker not recognized') \ No newline at end of file