Run more projections from various start dates.
This commit is contained in:
@@ -1157,10 +1157,10 @@ def create_backtest_plot(
|
||||
return historical_projections
|
||||
|
||||
|
||||
def run_projection(df):
|
||||
projections = create_plots(df, start="2016-07-09", project_days=365 * 4)
|
||||
print("\nProjected Prices at Key Points:")
|
||||
print(projections.iloc[[29, 89, 179, 364]].round(2)) # 30, 90, 180, 365 days
|
||||
def run_projection(df, start):
|
||||
projections = create_plots(df, start=start, project_days=365 * 4)
|
||||
#print("\nProjected Prices at Key Points:")
|
||||
#print(projections.iloc[[29, 89, 179, 364]].round(2)) # 30, 90, 180, 365 days
|
||||
|
||||
|
||||
def run_backtest(params, df):
|
||||
@@ -1195,7 +1195,14 @@ if __name__ == "__main__":
|
||||
procs = []
|
||||
|
||||
# Create main projection
|
||||
proc = Process(target=run_projection, args=(df,))
|
||||
projection_starts = [
|
||||
"2013-01-01",
|
||||
"2014-01-01",
|
||||
"2015-01-01",
|
||||
"2016-07-09",
|
||||
]
|
||||
for start in projection_starts:
|
||||
proc = Process(target=run_projection, args=(df, start))
|
||||
proc.start()
|
||||
procs.append(proc)
|
||||
|
||||
@@ -1239,5 +1246,6 @@ if __name__ == "__main__":
|
||||
)
|
||||
procs.append(proc)
|
||||
proc.start()
|
||||
|
||||
for proc in procs:
|
||||
proc.join()
|
||||
|
||||
Reference in New Issue
Block a user