Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/rkapl123/OreControl
Browse files Browse the repository at this point in the history
  • Loading branch information
rkapl123 committed Apr 22, 2024
2 parents 62c9197 + 372be56 commit cfb316d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
23 changes: 12 additions & 11 deletions OreDB/Tables/PortfolioTables.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
use ORE;

CREATE TABLE dbo.PortfolioPartiesGroupingIds (
PartiesId varchar(30) NOT NULL,
GroupingId varchar(70) NOT NULL,
CONSTRAINT PK_PortfolioPartiesGroupingIds PRIMARY KEY CLUSTERED (
PartiesId ASC,
GroupingId ASC
));
ALTER TABLE PortfolioPartiesGroupingIds ADD CONSTRAINT FK_PortfolioPartiesGroupingIds_PartiesId FOREIGN KEY(PartiesId)
REFERENCES TypesParties (value);

CREATE TABLE PortfolioTrades (
Id varchar(180) not null,
TradeType varchar(30),
Expand All @@ -16,15 +26,15 @@ REFERENCES TypesParties (value);
ALTER TABLE PortfolioTrades ADD CONSTRAINT FK_PortfolioTrades_EnvelopeNettingSetId FOREIGN KEY(EnvelopeNettingSetId)
REFERENCES NettingSet (NettingSetId);


CREATE TABLE PortfolioTradeGroupingIds (
TradeId varchar(180) not null,
GroupingId varchar(70) not null,
CONSTRAINT PK_PortfolioTradeGroupingIds PRIMARY KEY CLUSTERED (
TradeId ASC,
GroupingId ASC
));

ALTER TABLE PortfolioTradeGroupingIds ADD CONSTRAINT FK_PortfolioTradeGroupingIds_TradeId FOREIGN KEY(TradeId)
REFERENCES PortfolioTrades (Id);

CREATE TABLE PortfolioTradeActions (
Id int not null,
Expand Down Expand Up @@ -86,15 +96,6 @@ CONSTRAINT PK_PortfolioScheduleDataDates PRIMARY KEY CLUSTERED (
-- REFERENCES TypesCalendar (value);


CREATE TABLE PortfolioSwapData (
TradeId varchar(180) not null,
CONSTRAINT PK_PortfolioSwapData PRIMARY KEY CLUSTERED (
TradeId ASC
));
ALTER TABLE PortfolioSwapData ADD CONSTRAINT FK_PortfolioSwapData_TradeId FOREIGN KEY(TradeId)
REFERENCES PortfolioTrades (Id);


CREATE TABLE PortfolioCDOData (
TradeId varchar(180) not null,
ProtectionStart date,
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

# ORE Control

Tools for easier usage of Opensource Risk Engine (ORE, http://www.opensourcerisk.org/)
Tools for easier implementation of Opensource Risk Engine (ORE, http://www.opensourcerisk.org/)

* starting from Excel (OreAddin),
* easy starting from Excel (OreAddin in conjunction with OreMgr),
* loading ORE data from a Database (OreDB),

OreAddin is currently in development, details see [https://rkapl123.github.io/OreControl](https://rkapl123.github.io/OreControl)

0 comments on commit cfb316d

Please sign in to comment.