public static IClearingHouse GetClearingHouse(ClearingHouse clearingHouse)
        {
            switch (clearingHouse)
            {
            case ClearingHouse.Pershing:
                return(new Pershing());

            case ClearingHouse.WellsFargo:
                return(new WellsFargo());

            case ClearingHouse.Liquid:
                return(new Liquid());

            case ClearingHouse.TCW:
                return(new TCW());

            case ClearingHouse.MorganStanley:
                return(new MorganStanley());

            case ClearingHouse.BONY:
                return(new BONY());

            case ClearingHouse.Hugo:
                return(new Hugo());

            case ClearingHouse.ICBC:
                return(new ICBC());

            case ClearingHouse.IB:
                return(new IB());

            default:
                throw new ReconciliationNoClearingHouseException("Unsupported clearing house " + clearingHouse.ToString());
            }
        }
Example #2
0
        public static bool IsFuturesAccount(string fileName, ClearingHouse clearingHouse)
        {
            if (clearingHouse == ClearingHouse.WellsFargo)
            {
                int      sinkInt;
                string[] splitName = fileName.Split(new char[] { '_' });
                return(int.TryParse(splitName[0], out sinkInt));
            }

            return(false);
        }
Example #3
0
        public static bool IsFullyPaidLendingAccount(string fileName, ClearingHouse clearingHouse)
        {
            if (clearingHouse == ClearingHouse.WellsFargo)
            {
                if (fileName.ToUpper().StartsWith("GAR"))
                {
                    return(true);
                }
            }

            return(false);
        }
        public void IsFuturesAccountTest()
        {
            string        fileName      = "2MA00012_POS_05082018.xml";
            ClearingHouse clearingHouse = ClearingHouse.WellsFargo;
            bool          expected      = false;
            bool          actual;

            actual = Program.IsFuturesAccount(fileName, clearingHouse);
            Assert.AreEqual(expected, actual);

            fileName      = "47881467_POS_05082018.xml";
            clearingHouse = ClearingHouse.WellsFargo;
            expected      = true;
            actual        = Program.IsFuturesAccount(fileName, clearingHouse);
            Assert.AreEqual(expected, actual);
        }
        public void IsFullyPaidLendingAccountTest()
        {
            string        fileName      = "GARG_DIVRECON_06-31016.xml";
            ClearingHouse clearingHouse = ClearingHouse.WellsFargo;
            bool          expected      = true;
            bool          actual;

            actual = Program.IsFullyPaidLendingAccount(fileName, clearingHouse);
            Assert.AreEqual(expected, actual);

            fileName      = "47881029_DIVRECON_06-31016.xml";
            clearingHouse = ClearingHouse.WellsFargo;
            expected      = false;
            actual        = Program.IsFullyPaidLendingAccount(fileName, clearingHouse);
            Assert.AreEqual(expected, actual);

            fileName      = "GARG_DIVRECON_06-31016.xml";
            clearingHouse = ClearingHouse.BONY;
            expected      = false;
            actual        = Program.IsFullyPaidLendingAccount(fileName, clearingHouse);
            Assert.AreEqual(expected, actual);
        }
Example #6
0
    // Use this for initialization
    void Start()
    {
        if (useRandomSeed)
        {
            seed = System.DateTime.Now.ToString();
        }

        System.Random pseudoRandom = new System.Random(seed.GetHashCode());

        //Create Agents
        if (randomizeAgents)
        {
            RandomlyAssignRoles(pseudoRandom); //Allow AssignRoles as an option
        }
        else
        {
            AssignRoles();
        }
        DisplayAgentCount();

        //Create Clearing House
        clearingHouse = new ClearingHouse();
    }
Example #7
0
 protected ClearingHouseBase(ClearingHouse clearingHouse)
 {
     m_clearingHouse = clearingHouse;
 }