SeanChenTaipei 2 years ago
parent e6d4ea10c6
commit 72aa37391b
  1. 4
      main.py
  2. 1
      sql_script/create_strategy.sql

@ -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)

@ -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,

Loading…
Cancel
Save