Esempio n. 1
0
        /// <summary>
        /// Creates a new <see cref="BacktestingBrokerage"/> instance
        /// </summary>
        /// <param name="algorithmNodePacket">Job packet</param>
        /// <param name="uninitializedAlgorithm">The algorithm instance before Initialize has been called</param>
        /// <param name="factory">The brokerage factory</param>
        /// <returns>The brokerage instance, or throws if error creating instance</returns>
        public IBrokerage CreateBrokerage(AlgorithmNodePacket algorithmNodePacket, IAlgorithm uninitializedAlgorithm, out IBrokerageFactory factory)
        {
            factory = new BacktestingBrokerageFactory();
            var optionMarketSimulation = new BasicOptionAssignmentSimulation();

            return(new BacktestingBrokerage(uninitializedAlgorithm, optionMarketSimulation));
        }
Esempio n. 2
0
 /// <summary>
 /// Creates a new <see cref="BacktestingBrokerage"/> instance
 /// </summary>
 /// <param name="algorithmNodePacket">Job packet</param>
 /// <param name="uninitializedAlgorithm">The algorithm instance before Initialize has been called</param>
 /// <returns>The brokerage instance, or throws if error creating instance</returns>
 public IBrokerage CreateBrokerage(AlgorithmNodePacket algorithmNodePacket, IAlgorithm uninitializedAlgorithm, out IBrokerageFactory factory)
 {
     factory = new BacktestingBrokerageFactory();
     return(new BacktestingBrokerage(uninitializedAlgorithm));
 }