cde4743ca7
Regression Tests / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
* Warm up EmaCrossAlphaModel Warm Up EmaCrossAlphaModel indicators * Fix regression test bug When using the default `EmaCrossAlphaModel()` the period of both indicators to be ready is bigger than the difference between the start date and the end date of the algorithm. Then, as the algorithm didn't warm up the data both indicators of EmaCrossAlpha never were ready, but now as the model warms up the data both indicators are ready so we get different statistics * Requested change * Fix unit tests As there wasn't items in `AddedSecurities`, when trying to remove the items in ´RemovedSecurities´ there was nothing to remove because there was never a security in `_symbolDataBySymbol`. That's why, in order to test, the behavior of `EmaCrossAlphaModel` when removing a security we need to first add one to then remove it. * Requested changes in Python - Requested changes in Python - Nit changes * Nit change * Requested Changes * Add RemoveConsolidators() method in Python version
33 lines
1.2 KiB
C#
33 lines
1.2 KiB
C#
/*
|
|
* 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.
|
|
*/
|
|
|
|
using QuantConnect.Algorithm.Framework.Alphas;
|
|
using System.Collections.Generic;
|
|
|
|
namespace QuantConnect.Tests.Algorithm.Framework.Alphas
|
|
{
|
|
class TestEmaCrossAlphaModel : EmaCrossAlphaModel
|
|
{
|
|
/// <summary>
|
|
/// Get the _symbolDataBySymbol dictionary from EmaCrossAlphaModel
|
|
/// </summary>
|
|
/// <returns>_symbolDataBySymbol dictionary from EmaCrossAlphaModel</returns>
|
|
public Dictionary<Symbol, SymbolData> GetSymbolData()
|
|
{
|
|
return SymbolDataBySymbol;
|
|
}
|
|
}
|
|
}
|