From 72aa37391b801128613a675375ec08a383ee998c Mon Sep 17 00:00:00 2001 From: SeanChenTaipei Date: Wed, 15 Mar 2023 22:57:12 +0800 Subject: [PATCH] f --- main.py | 4 ++-- sql_script/create_strategy.sql | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index d01545d..9b44e87 100644 --- a/main.py +++ b/main.py @@ -344,8 +344,8 @@ def buildPort(): (date, name, username,\ competition, role, annual_ret,\ vol, mdd, annual_sr, beta, alpha,\ - var10, R2, tw, notes, assets, weight, ret)\ - values (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) RETURNING id;' + var10, R2, gamma, tw, notes, assets, weight, ret)\ + values (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) RETURNING id;' with conn: with conn.cursor() as curs: curs.execute(sql, data) diff --git a/sql_script/create_strategy.sql b/sql_script/create_strategy.sql index 98c938c..21efd7c 100644 --- a/sql_script/create_strategy.sql +++ b/sql_script/create_strategy.sql @@ -14,6 +14,7 @@ CREATE TABLE strategy ( alpha REAL NOT NULL, var10 REAL NOT NULL, R2 REAL NOT NULL, + gamma REAL NOT NULL, tw BOOLEAN DEFAULT TRUE, notes VARCHAR(255), assets TEXT[] NOT NULL,