Ejemplo n.º 1
0
        // Constructor 4 : Keys + Data
        public Bond_Line(DateTime currentDate, DBID ticker, double CleanPriceBid_, double CleanPriceAsk_, double CleanPriceMid_,
                         double DirtyPriceBid_, double DirtyPriceAsk_, double DirtyPriceMid_,
                         double YieldToMaturityBid_, double YieldToMaturityAsk_, double YieldToMaturityMid_,
                         double AssetSwapSpreadBid_, double AssetSwapSpreadAsk_, double AssetSwapSpreadMid_)
        // double CDS1Y_, double CDS3Y_, double CDS5Y_, double CDS7Y_, double CDS10Y_,

        {
            // Keys
            Date = currentDate;
            DBID = ticker.ToInt();

            // Data
            CleanPriceBid = CleanPriceBid_;
            CleanPriceAsk = CleanPriceAsk_;
            CleanPriceMid = CleanPriceMid_;

            DirtyPriceBid = DirtyPriceBid_;
            DirtyPriceAsk = DirtyPriceAsk_;
            DirtyPriceMid = DirtyPriceMid_;

            YieldToMaturityBid = YieldToMaturityBid_;
            YieldToMaturityAsk = YieldToMaturityAsk_;
            YieldToMaturityMid = YieldToMaturityMid_;

            AssetSwapSpreadBid = AssetSwapSpreadBid_;
            AssetSwapSpreadAsk = AssetSwapSpreadAsk_;
            AssetSwapSpreadMid = AssetSwapSpreadMid_;
        }
Ejemplo n.º 2
0
        // Constructor 5 : From Dict of nullable doubles
        public InterestRate_Line(DateTime currentDate, DBID ticker, Dictionary <String, Double?> data)
        {
            // Keys
            Date = currentDate;
            DBID = ticker.ToInt();

            // Data
            Bid  = data["Bid"];
            Ask  = data["Ask"];
            Last = data["Last"];
        }
Ejemplo n.º 3
0
        // Constructor 4 : Keys + Data
        public InterestRate_Line(DateTime currentDate, DBID ticker, double Bid_, double Ask_, double Last_)
        {
            // Keys
            Date = currentDate;
            DBID = ticker.ToInt();

            // Data
            Bid = Bid_;
            Ask = Ask_;
            Ask = Last_;
        }
Ejemplo n.º 4
0
        public IDtoken Identify(DBID dbid)
        {
            // IDtoken result = TokenFactory.New(dbid);

            // Loop through the ref table in memory
            foreach (IDtoken line in referenceTable)
            {
                if ((int)line["DBID"] == dbid.ToInt())
                {
                    return(line);
                }
            }

            // Return results
            throw new System.ArgumentException("IDException", "Invalid DBID provided to reference manager.");
        }
Ejemplo n.º 5
0
        // Constructor 5 : From Dict of nullable doubles
        public Equity_Line(DateTime currentDate, DBID ticker, Dictionary <String, Double?> data)
        {
            // Keys
            Date = currentDate;
            DBID = ticker.ToInt();

            // Data
            Open          = data["Open"];
            High          = data["High"];
            Low           = data["Low"];
            Close         = data["Close"];
            Bid           = data["Bid"];
            Ask           = data["Ask"];
            Volume        = data["Volume"];
            AdjustedClose = data["AdjustedClose"];
        }
Ejemplo n.º 6
0
        // Constructor 4 : Keys + Data
        public Equity_Line(DateTime currentDate, DBID ticker, double argOpen,
                           double argHigh, double argLow, double argClose, double argBid,
                           double argAsk, double argVolume, double argAdjClose)
        {
            // Keys
            Date = currentDate;
            DBID = ticker.ToInt();

            // Data
            Open          = argOpen;
            High          = argHigh;
            Low           = argLow;
            Close         = argClose;
            Bid           = argBid;
            Ask           = argAsk;
            Volume        = argVolume;
            AdjustedClose = argAdjClose;
        }
Ejemplo n.º 7
0
        // Constructor 5 : From Dict of nullable doubles
        public Bond_Line(DateTime currentDate, DBID ticker, Dictionary <String, Double?> data)
        {
            // Keys
            Date = currentDate;
            DBID = ticker.ToInt();

            // Data
            CleanPriceBid = data["CleanPriceBid"];
            CleanPriceAsk = data["CleanPriceAsk"];
            CleanPriceMid = data["CleanPriceMid"];

            DirtyPriceBid = data["DirtyPriceBid"];
            DirtyPriceAsk = data["DirtyPriceAsk"];
            DirtyPriceMid = data["DirtyPriceMid"];

            YieldToMaturityBid = data["YieldToMaturityBid"];
            YieldToMaturityAsk = data["YieldToMaturityAsk"];
            YieldToMaturityMid = data["YieldToMaturityMid"];

            //AssetSwapSpreadBid = data["AssetSwapSpreadBid"];
            AssetSwapSpreadMid = data["AssetSwapSpreadMid"];
            //AssetSwapSpreadAsk = data["AssetSwapSpreadAsk"];
        }
Ejemplo n.º 8
0
 // Constructor 3 : Keys only
 public InterestRate_Line(DateTime currentDate, DBID ticker)
 {
     Date = currentDate;
     DBID = ticker.ToInt();
 }
Ejemplo n.º 9
0
 // Constructor 3 : Keys only
 public Bond_Line(DateTime currentDate, DBID ticker)
 {
     Date = currentDate;
     DBID = ticker.ToInt();
 }