Exemple #1
0
        }     //Double_addRangeConstsFromCollection

        private void addDefaultRange100OrLess()
        { // Adds the default constraint of all securities sum to 100% or less
            List <String> lstAllSecs = new List <String>();

            for (int iSecs = 0; iSecs < m_objColHandler.ActiveSecs.Count; iSecs++)
            {
                lstAllSecs.Add(m_objColHandler.ActiveSecs[iSecs].Properties.PortSecurityId);
            }
            cConstraint cNewConst = new cConstraint(lstAllSecs, "", enumConstraintType.Security, 0D, 1D);

            m_colDefaultRange.Add(cNewConst);
        }//addDefaultRange100OrLess
Exemple #2
0
        }//Double_addEqualityConstsFromCollection

        private void addDefaultEqualitySumTo100(ISecurities cSecsCol)
        { // Adds the equality constraint of all weights summing up to 100%
            List <String> lstAllSecs = new List <String>();

            for (int iSecs = 0; iSecs < cSecsCol.Count; iSecs++)
            {
                lstAllSecs.Add(cSecsCol[iSecs].Properties.PortSecurityId);
            }
            cConstraint cNewConst = new cConstraint(lstAllSecs, "", enumConstraintType.Security, 1D);

            m_colDefaultEquality.Add(cNewConst);
        }//addDefaultEqualitySumTo100
Exemple #3
0
        }//refreshClassPointers

        private void setSeperatedConstraintCols()
        { // Seperates the main collection of constraints to 3 type of collections:
            // 1-Single securities, 2-Equality constraints, 3-Range constraints
            for (int iConst = 0; iConst < m_colConstraints.Count; iConst++)
            {
                if (m_colConstraints[iConst].isOneSec)
                {
                    m_colSingleSecs.Add(m_colConstraints[iConst]);
                }
                else if (m_colConstraints[iConst].isEquality)
                {
                    m_colEquality.Add(m_colConstraints[iConst]);
                }
                else
                {
                    m_colRange.Add(m_colConstraints[iConst]);
                }
            }
        }//setSeperatedConstraintCols
Exemple #4
0
        }                                                                                                 //addNewConstraint

        public void addNewConstraint(cConstraint cConst, String txtDisplay)
        {                                 // Converts item to constraint + add to grid and collections
            m_colConstraints.Add(cConst); // Add to collection
            addNewConstToTable(cConst, txtDisplay);
        }//addNewConstraint