Make current price work with date offsets

This commit is contained in:
2026-03-11 21:49:04 -07:00
parent d5df9d1014
commit 8df645aac5
4 changed files with 19 additions and 10 deletions
-5
View File
@@ -17,8 +17,6 @@ def Predict():
# get the number of days ago to run the simulation for
DaysBack = int(sys.argv[2])
print(f"Days back: {DaysBack}")
# calculate the time offsets
end_date = datetime.now() - timedelta(days=DaysBack)
start_date = end_date - timedelta(days=70)
@@ -26,9 +24,6 @@ def Predict():
# convert to string formats
start_str = start_date.strftime('%Y-%m-%d')
end_str = end_date.strftime('%Y-%m-%d')
print(f"Start Date: {start_str}")
print(f"End Date: {end_str}")
# Define paths (consistent with your previous script)
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))