Added tags to python algorithms

This commit is contained in:
Jared Broad
2017-09-21 08:27:41 -04:00
parent 98d77fab45
commit dc27c4e3d6
37 changed files with 590 additions and 429 deletions
+10 -8
View File
@@ -1,10 +1,10 @@
# 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");
#
# 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.
@@ -22,13 +22,15 @@ from QuantConnect.Algorithm import *
from QuantConnect.Data.Market import *
from datetime import datetime, timedelta
### <summary>
### Algorithm used for regression tests purposes
### </summary>
### <meta name="tag" content="regression test" />
class RegressionAlgorithm(QCAlgorithm):
'''Algorithm used for regression tests purposes'''
def Initialize(self):
'''Initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized.'''
self.SetStartDate(2013,10,07) #Set Start Date
self.SetEndDate(2013,10,11) #Set End Date
self.SetCash(10000000) #Set Strategy Cash
@@ -41,7 +43,7 @@ class RegressionAlgorithm(QCAlgorithm):
self.__lastTradeTicks = self.StartDate
self.__lastTradeTradeBars = self.__lastTradeTicks
self.__tradeEvery = timedelta(minutes=1)
def OnData(self, data):
'''OnData event is the primary entry point for your algorithm. Each new data point will be pumped in here.'''
@@ -51,7 +53,7 @@ class RegressionAlgorithm(QCAlgorithm):
for kvp in data.Bars:
period = kvp.Value.Period.total_seconds()
if self.roundTime(self.Time, period) != self.Time:
pass