public override void Initialize() { // Set requested data resolution UniverseSettings.Resolution = Resolution.Daily; SetStartDate(2014, 03, 24); SetEndDate(2014, 04, 07); SetCash(100000); UniverseSelection = new FineFundamentalUniverseSelectionModel(SelectCoarse, SelectFine); Alpha = new ConstantAlphaModel(InsightType.Price, InsightDirection.Up, QuantConnect.Time.OneDay); PortfolioConstruction = new EqualWeightingPortfolioConstructionModel(); RiskManagement = new MaximumSectorExposureRiskManagementModel(); }
/// <summary> /// Initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized. /// </summary> public override void Initialize() { // Set requested data resolution UniverseSettings.Resolution = Resolution.Minute; SetStartDate(2013, 10, 07); //Set Start Date SetEndDate(2013, 10, 11); //Set End Date SetCash(100000); //Set Strategy Cash // Find more symbols here: http://quantconnect.com/data // Forex, CFD, Equities Resolutions: Tick, Second, Minute, Hour, Daily. // Futures Resolution: Tick, Second, Minute // Options Resolution: Minute Only. // set algorithm framework models PortfolioSelection = new ManualPortfolioSelectionModel(QuantConnect.Symbol.Create("SPY", SecurityType.Equity, Market.USA)); Alpha = new ConstantAlphaModel(InsightType.Price, InsightDirection.Up, TimeSpan.FromMinutes(20), 0.025, null); PortfolioConstruction = new EqualWeightingPortfolioConstructionModel(); Execution = new ImmediateExecutionModel(); RiskManagement = new Algorithm.Framework.Risk.NullRiskManagementModel(); }
/// <summary> /// Initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized. /// </summary> public override void Initialize() { // Set requested data resolution UniverseSettings.Resolution = Resolution.Minute; SetStartDate(2016, 10, 7); //Set Start Date SetEndDate(2016, 10, 7); //Set End Date SetCash(100000); //Set Strategy Cash // Find more symbols here: http://quantconnect.com/data // Forex, CFD, Equities Resolutions: Tick, Second, Minute, Hour, Daily. // Futures Resolution: Tick, Second, Minute // Options Resolution: Minute Only. SetBrokerageModel(BrokerageName.GDAX, AccountType.Cash); // set algorithm framework models PortfolioSelection = new ManualPortfolioSelectionModel(QuantConnect.Symbol.Create("BTCUSD", SecurityType.Crypto, Market.GDAX)); Alpha = new ConstantAlphaModel(AlphaType.Price, AlphaDirection.Up, TimeSpan.FromMinutes(20), 0.025, null); PortfolioConstruction = new SimplePortfolioConstructionModel(); Execution = new ImmediateExecutionModel(); RiskManagement = new Algorithm.Framework.Risk.NullRiskManagementModel(); }