aboutsummaryrefslogtreecommitdiffstats
path: root/sql/dawn.sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql/dawn.sql')
-rw-r--r--sql/dawn.sql61
1 files changed, 61 insertions, 0 deletions
diff --git a/sql/dawn.sql b/sql/dawn.sql
index fa80f8cf..ec0d6ad9 100644
--- a/sql/dawn.sql
+++ b/sql/dawn.sql
@@ -21,6 +21,7 @@ CREATE TYPE bbg_type AS ENUM('Mtge', 'Corp');
CREATE type day_count AS ENUM('ACT/360', 'ACT/ACT', '30/360', 'ACT/365');
CREATE type bus_day_convention AS ENUM('Modified Following', 'Following', 'Modified Preceding', 'Preceding',
'Second-Day-After', 'End-of-Month');
+CREATE type last_period_convention AS ENUM('Adjusted', 'Unadjusted');
CREATE type index_type AS ENUM('IG', 'HY', 'EU', 'LCDX', 'XO');
CREATE TYPE tenor AS ENUM('6mo', '1yr', '2yr', '3yr', '4yr', '5yr', '7yr', '10yr');
@@ -970,6 +971,66 @@ CREATE TABLE pnl_reports(
CREATE INDEX on pnl_reports (date);
+CREATE TYPE clearing_cp AS ENUM('ICE-CREDIT');
+CREATE TYPE trade_type AS ENUM('CREDIT_DEFAULT_SWAP', 'SWAPTION');
+CREATE TYPE transaction_status AS ENUM('Bilateral', 'Cleared');
+CREATE TYPE calendar AS ENUM('Payment-GB,US', 'Payment-US,GB');
+CREATE TYPE clearing_broker AS ENUM('ML', 'SGFCM');
+CREATE TYpe frequency AS ENUM('Monthly', 'Quarterly');
+
+CREATE TABLE cds_reports(
+ date date NOT NULL,
+ row integer NOT NULL,
+ attachment_point float,
+ exhaustion_point float,
+ basis day_count,
+ "buy/sell" protection,
+ ccp clearing_cp,
+ calendar calendar,
+ cash_account text,
+ ccy currency,
+ client_ref_id text,
+ comments text,
+ commission float,
+ contractual_definition isda,
+ counterparty text REFERENCES counterparties(code),
+ cpty_ref_id text,
+ created_date timestamp,
+ description text,
+ effective_date date,
+ external_trade_id text,
+ factor float,
+ fixed_rate float,
+ frequency frequency,
+ fund fund,
+ gtid text,
+ geneva_id text,
+ "independent_%" float,
+ independent_amount float,
+ maturity_date date,
+ notional float,
+ original_gtid text,
+ original_notional float,
+ period_end_date last_period_convention,
+ price float,
+ prime_broker clearing_broker,
+ product_sub_type swap_type,
+ red_code text,
+ recovery_rate float,
+ remaining_notional float,
+ roll_convention bus_day_convention,
+ strategy strategy,
+ strike float,
+ swapswire_id text,
+ trade_date date,
+ trade_type trade_type,
+ transaction_status transaction_status,
+ underlying_id text,
+ underlying_name text,
+ upfront_fee float,
+ upfront_fee_date date,
+ PRIMARY KEY(date, row));
+
CREATE TYPE mark_list AS (date date,
identifier text,
"BROKER" float,