Add market data schema, catalogue, bar storage and quality checks (refs #18 #20 #21 #23)

Migration 0002 adds the market data tables on both engines: daily and
one-minute bars, corporate actions, FX rates, the exchange calendar,
calendar events, mood indicators, spread samples, data issues, source
state and universe members, plus the trading rules on instruments.

The data layer is format-independent so the venue clients can build on
it: the instrument catalogue (rules from the venue, delisted kept), bar
upserts with ON CONFLICT, the SPEC 6.4 checks with an issue register
that blocks entries until a second reading, freshness by age of the last
datum (trap 10), research history in .csv.gz with exact decimals, and
adjusted series anchored at the decision day with level and quantity
conversion across splits and dividends.

Recorded API responses from OKX, the Alpaca docs and the free sources
are kept byte for byte as test fixtures; the secret scan now ignores
pagination cursors such as Alpaca's next_page_token.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-11-10 14:58:44 +01:00
1 parent 67350f091e
commit 3b13a4258d
54 files changed
+3067 -3

No files matched your search

@@ -0,0 +1,3 @@
Date,USD,JPY,BGN,CYP,CZK,DKK,EEK,GBP,HUF,LTL,LVL,MTL,PLN,ROL,RON,SEK,SIT,SKK,CHF,ISK,NOK,HRK,RUB,TRL,TRY,AUD,BRL,CAD,CNY,HKD,IDR,ILS,INR,KRW,MXN,MYR,NZD,PHP,SGD,THB,ZAR,
2026-11-09,1.1193,176.79,N/A,N/A,24.365,7.4753,N/A,0.8343,362.99,N/A,N/A,N/A,4.3843,N/A,5.343,10.996,N/A,N/A,0.9164,136.8,10.5325,N/A,N/A,N/A,56.1199,1.6236,6.1748,1.5785,7.4689,8.7772,20234.31,3.549,105.1435,1507.46,20.8343,4.5432,1.9941,70.712,1.4328,37.485,18.4105,
2026-11-06,1.1165,176.77,N/A,N/A,24.35,7.4752,N/A,0.83415,363.9,N/A,N/A,N/A,4.3925,N/A,5.3403,11.026,N/A,N/A,0.9143,136.8,10.526,N/A,N/A,N/A,55.9957,1.625,6.1449,1.5705,7.4485,8.7505,20208.93,3.5717,104.8645,1517.02,20.8828,4.5319,2.0141,70.358,1.4309,37.459,18.4649,
1 Date USD JPY BGN CYP CZK DKK EEK GBP HUF LTL LVL MTL PLN ROL RON SEK SIT SKK CHF ISK NOK HRK RUB TRL TRY AUD BRL CAD CNY HKD IDR ILS INR KRW MXN MYR NZD PHP SGD THB ZAR
2 2026-11-09 1.1193 176.79 N/A N/A 24.365 7.4753 N/A 0.8343 362.99 N/A N/A N/A 4.3843 N/A 5.343 10.996 N/A N/A 0.9164 136.8 10.5325 N/A N/A N/A 56.1199 1.6236 6.1748 1.5785 7.4689 8.7772 20234.31 3.549 105.1435 1507.46 20.8343 4.5432 1.9941 70.712 1.4328 37.485 18.4105
3 2026-11-06 1.1165 176.77 N/A N/A 24.35 7.4752 N/A 0.83415 363.9 N/A N/A N/A 4.3925 N/A 5.3403 11.026 N/A N/A 0.9143 136.8 10.526 N/A N/A N/A 55.9957 1.625 6.1449 1.5705 7.4485 8.7505 20208.93 3.5717 104.8645 1517.02 20.8828 4.5319 2.0141 70.358 1.4309 37.459 18.4649