mirror of
https://github.com/BrentNeale1/fx-quant.git
synced 2026-07-28 10:57:43 +00:00
da64544d3a
Track granularity (M1/M5) through the pipeline so rows are distinguishable after upload. Drop helper columns (tr, typical_price, pv) from the feature DataFrame. Add SQL schema with composite PK on (time, instrument, granularity). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
21 lines
681 B
SQL
21 lines
681 B
SQL
CREATE TABLE fx_candles (
|
|
time TIMESTAMPTZ NOT NULL,
|
|
instrument TEXT NOT NULL,
|
|
granularity TEXT NOT NULL,
|
|
open DOUBLE PRECISION,
|
|
high DOUBLE PRECISION,
|
|
low DOUBLE PRECISION,
|
|
close DOUBLE PRECISION,
|
|
volume INTEGER,
|
|
ret DOUBLE PRECISION,
|
|
logret DOUBLE PRECISION,
|
|
sma_3 DOUBLE PRECISION,
|
|
sma_20 DOUBLE PRECISION,
|
|
ema_20 DOUBLE PRECISION,
|
|
rsi_14 DOUBLE PRECISION,
|
|
vol_20 DOUBLE PRECISION,
|
|
atr_14 DOUBLE PRECISION,
|
|
vwap_20 DOUBLE PRECISION,
|
|
PRIMARY KEY (time, instrument, granularity)
|
|
);
|