Added QC header and set fees to $0

This commit is contained in:
Jack Simonson
2019-02-27 16:42:16 -08:00
parent 699ff5978f
commit c86e561b02
@@ -1,3 +1,16 @@
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
'''
Energy prices, especially Oil and Natural Gas, are in general fairly correlated,
meaning they typically move in the same direction as an overall trend. This Alpha
@@ -53,6 +66,9 @@ class EnergyETFPairsTradingAlgorithm(QCAlgorithmFramework):
## Manual Universe Selection
self.SetUniverseSelection( ManualUniverseSelectionModel(symbols) )
## Set Fees to $0
self.SetSecurityInitializer(lambda security: security.SetFeeModel(ConstantFeeModel(0)))
## Custom Alpha Model
self.SetAlpha(PairsAlphaModel(pairs_tickers = self.tickers, tickers = tickers, history_days = 90, resolution = Resolution.Minute))