/// <summary>
        /// The margin that must be held in order to increase the position by the provided quantity
        /// </summary>
        /// <param name="parameters">An object containing the security and quantity</param>
        public override InitialMargin GetInitialMarginRequirement(PositionGroupInitialMarginParameters parameters)
        {
            var initialMarginRequirement = 0m;

            foreach (var position in parameters.PositionGroup)
            {
                var security = parameters.Portfolio.Securities[position.Symbol];
                initialMarginRequirement += security.BuyingPowerModel.GetInitialMarginRequirement(
                    security, position.Quantity
                    );
            }

            return(initialMarginRequirement);
        }
예제 #2
0
 /// <summary>
 /// The margin that must be held in order to increase the position by the provided quantity
 /// </summary>
 /// <param name="parameters">An object containing the security and quantity</param>
 public abstract InitialMargin GetInitialMarginRequirement(PositionGroupInitialMarginParameters parameters);