Example #1
0
        public override void Initialize()
        {
            SetStartDate(2016, 01, 28);
            SetEndDate(2016, 02, 29);
            SetCash(1000000);

            // setting up Microsoft Equity
            _equitySymbol = AddEquity("MSFT").Symbol;

            // setting up EUR/USD FX spot pair
            _forexSymbol = AddForex("EURUSD").Symbol;

            // setting up S&P 500 EMini futures
            var futureSP500 = AddFuture(Futures.Indices.SP500EMini);

            _futureSymbol = futureSP500.Symbol;

            // set our expiry filter for this futures chain
            futureSP500.SetFilter(TimeSpan.FromDays(10), TimeSpan.FromDays(182));

            // setting up Dow Jones ETF Options
            var option = AddOption("DIA");

            _optionSymbol = option.Symbol;

            option.PriceModel = OptionPriceModels.BinomialCoxRossRubinstein();
            // option.EnableGreekApproximation = true;
            // set our expiry filter for this option chain
            option.SetFilter(-2, +2, TimeSpan.Zero, TimeSpan.FromDays(180));

            // specifying zero benchmark
            SetBenchmark(date => 0m);
        }
        public override void Initialize()
        {
            SetStartDate(2016, 01, 28);
            SetEndDate(2016, 02, 29);
            SetCash(1000000);

            // setting futures
            var futureSP500 = AddFuture(TickerSP500, Resolution.Minute);

            // set our expiry filter for this futures chain
            futureSP500.SetFilter(TimeSpan.FromDays(10), TimeSpan.FromDays(182));

            // setting up options
            var equity = AddEquity(UnderlyingTicker);
            var option = AddOption(UnderlyingTicker);

            equity.SetDataNormalizationMode(DataNormalizationMode.Raw);
            option.PriceModel = OptionPriceModels.BinomialCoxRossRubinstein();
            // option.EnableGreekApproximation = true;
            // set our expiry filter for this option chain
            option.SetFilter(-2, +2, TimeSpan.Zero, TimeSpan.FromDays(180));

            // setting up stock
            AddEquity(TickerMSFT);

            // setting up FX
            AddForex(TickerEURUSD);

            // specifying zero benchmark
            SetBenchmark(date => 0m);
        }