Пример #1
0
        /// <summary>
        /// Initialize cash holder for a quant fund
        /// </summary>
        /// <param name="basecurrency"></param>
        /// <param name="initialcash"></param>
        public CashPosition(CurrencyType basecurrency, decimal initialcash)
        {
            InitialCash  = initialcash;
            BaseCurrency = basecurrency;

            //Add initial cash
            _settledcash = new SettledCash(initialcash);
        }
Пример #2
0
 /// <summary>
 /// Add cash to this holder of cash
 /// </summary>
 /// <param name="cash"></param>
 public void AddCash(SettledCash cash)
 {
     //Check if this settled or unsettled cash
     if (cash is UnsettledCash unsettledfunds)
     {
         _unsettledcash.Add(unsettledfunds);
     }
     else
     {
         _settledcash.AddFunds(cash.Amount);
     }
 }