You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
651 B

2 years ago
DROP TABLE IF EXISTS strategy;
CREATE TABLE strategy (
id SERIAL PRIMARY KEY,
2 years ago
date VARCHAR(64) NOT NULL,
2 years ago
name VARCHAR(32) NOT NULL,
username VARCHAR(32) NOT NULL,
competition VARCHAR(32) NOT NULL,
2 years ago
role VARCHAR(20) NOT NULL,
annual_ret REAL NOT NULL,
vol REAL NOT NULL,
mdd REAL NOT NULL,
annual_sr REAL NOT NULL,
beta REAL NOT NULL,
alpha REAL NOT NULL,
var10 REAL NOT NULL,
R2 REAL NOT NULL,
tw BOOLEAN DEFAULT TRUE,
2 years ago
notes VARCHAR(255),
2 years ago
assets TEXT[] NOT NULL,
2 years ago
weight JSON NOT NULL,
ret JSON NOT NULL,
comments TEXT[][]
2 years ago
);
CREATE INDEX idx_user ON strategy (username);