Adds IFutureChainProvider interface with base implementations

- Move BacktestingFutureChainProvider provider to Lean.Engine.DataFeeds along with its options equivalent.

- EmptyFutureChainProvider: provider that returns an empty list of symbols
- CachingFutureChainProvider: implements caching by date
- BacktestingFutureChainProvider: provider that gets chain from local files
- LiveFutureChainProvider: provider that gets chain from external source (empty list of symbols for now)
This commit is contained in:
AlexCatarino
2017-11-16 21:27:25 +00:00
parent f115e75daa
commit dfffbd6953
15 changed files with 262 additions and 13 deletions
@@ -362,6 +362,17 @@ namespace QuantConnect.AlgorithmFactory.Python.Wrappers
}
}
/// <summary>
/// Gets the future chain provider, used to get the list of future contracts for an underlying symbol
/// </summary>
public IFutureChainProvider FutureChainProvider
{
get
{
return _baseAlgorithm.FutureChainProvider;
}
}
/// <summary>
/// Algorithm start date for backtesting, set by the SetStartDate methods.
/// </summary>
@@ -416,6 +427,15 @@ namespace QuantConnect.AlgorithmFactory.Python.Wrappers
_baseAlgorithm.SetOptionChainProvider(optionChainProvider);
}
/// <summary>
/// Sets the future chain provider, used to get the list of future contracts for an underlying symbol
/// </summary>
/// <param name="futureChainProvider">The future chain provider</param>
public void SetFutureChainProvider(IFutureChainProvider futureChainProvider)
{
_baseAlgorithm.SetFutureChainProvider(futureChainProvider);
}
/// <summary>
/// Data subscription manager controls the information and subscriptions the algorithms recieves.
/// Subscription configurations can be added through the Subscription Manager.