diff options
Diffstat (limited to 'sql')
| -rw-r--r-- | sql/serenitasdb.sql | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/sql/serenitasdb.sql b/sql/serenitasdb.sql index 7afa1e54..25ce6006 100644 --- a/sql/serenitasdb.sql +++ b/sql/serenitasdb.sql @@ -140,6 +140,33 @@ CREATE TABLE tranche_quotes ( UNIQUE (QuoteDate, Index, Series, Version, Tenor, Attach, Detach, QuoteSource, trancherunningmid, markit_id)
);
+CREATE TABLE tranche_quotes_csv(
+ id serial PRIMARY KEY,
+ QuoteDate timestamptz,
+ Index index_type,
+ Series smallint,
+ Version smallint,
+ Tenor tenor,
+ Attach smallint,
+ Detach smallint,
+ TrancheUpfrontBid float,
+ TrancheUpfrontMid float,
+ TrancheUpfrontAsk float,
+ TrancheRunningBid float,
+ TrancheRunningMid float,
+ TrancheRunningAsk float,
+ IndexRefPrice real,
+ IndexRefSpread smallint,
+ IndexDuration real,
+ TrancheDuration real,
+ TrancheDelta real,
+ CorrAtDetachment real,
+ Basis real,
+ QuoteSource varchar(4),
+ markit_id integer UNIQUE,
+ UNIQUE (QuoteDate, Index, Series, Version, Tenor, Attach, Detach, QuoteSource, trancherunningmid, markit_id)
+);
+
CREATE INDEX tranche_quotes_idx ON
tranche_quotes(index, series, DATE(quotedate AT TIME ZONE 'localtime'), tenor, attach ASC)
|
