mirror of
https://github.com/BrentNeale1/fx-quant.git
synced 2026-08-01 21:07:45 +00:00
Add granularity tracking, drop intermediate columns, add SQL schema
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>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
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)
|
||||
);
|
||||
Reference in New Issue
Block a user