Commit Graph

748 Commits

Author SHA1 Message Date
Jared 38fef12717 Merge branch 'master' into feature-add-smartinsider-demonstration-algorithm 2019-10-07 13:39:30 -07:00
Gerardo Salazar 77ea64bf97 Adds demonstration algorithms for USTreasuryYieldCurveRate (C# and Py) 2019-10-04 17:28:52 -07:00
Gerardo Salazar 7f267ed55b Adds Smart Insider demonstration algorithms (C# and Python) 2019-10-04 17:10:01 -07:00
Jared def14b9a1f Merge pull request #3669 from QuantConnect/feature-3650-etf-basket-modules
Improves ETF Basket Universe Selection Models
2019-10-03 16:06:18 -07:00
AlexCatarino ff00e9e776 Adds Regression Algorithms for InceptionDateUniverseSelectionModel
Adds Regression Algorithms to show `CustomUniverseSelectionModel` and `InceptionDateUniverseSelectionModel` in action.
2019-10-03 23:32:16 +01:00
Jared f7c97d66d8 Removed unused variable 2019-10-03 15:22:43 -07:00
Gerardo Salazar 48f6372a6a Adds PsychSignal demonstration algorithms 2019-10-03 14:59:14 -07:00
Jared d5050ff6d5 Merge branch 'master' into feature-add-tradingeconomics-data-demo-algorithms 2019-10-03 13:22:14 -07:00
Jared ddabbdf47a Merge pull request #3665 from gsalaz98/feature-add-tiingo-news-data-demo-algorithms
Adds Demonstration Tiingo NLP Algorithms
2019-10-03 13:21:24 -07:00
Gerardo Salazar ba21d1e1bb Adds Trading Economics demonstration algorithms 2019-10-03 13:20:07 -07:00
Gerardo Salazar db3f0df01b Self review: Rename Tiingo algorithms from TiingoNLPDemonstrationAlgorithm to
TiingoNewsAlgorithm
2019-10-03 12:06:04 -07:00
Gerardo Salazar b61377cd37 Adds demonstration Tiingo NLP Algorithms
* Adds `AltData` folder to Algorithm.CSharp|Python
2019-10-03 11:35:56 -07:00
Gerardo Salazar c608514aea Renames PsychSignalSentimentData to PsychSignalSentiment
Fixes Python PsychSignal algorithm

Fixes regression algorithm statistics
2019-10-03 09:47:25 -07:00
Jared baeb8741fc Merge pull request #3654 from Martin-Molinero/bug-3652-tiingo-news-backtesting-time
Add TiingoNews.HistoricalCrawlOffset
2019-10-02 09:50:14 -07:00
Martin Molinero d1abefc1fe Add TiingoNews.HistoricalCrawlOffset - Rename
- Add `TiingoNews.HistoricalCrawlOffset`, timespan to add for
backtesting
- Rename:  remove `Data` from `TiingoNewsData` and rename `TiingoDailyData` to `TiingoPrice`
2019-10-02 13:11:31 -03:00
Martin Molinero 73eaa60785 SetBenchmark will check SymbolCache for ticker 2019-10-01 14:15:58 -03:00
Michael Handschuh 362826988f Improve DynamicSecurityData usability
Adds IRegisteredSecurityDataTypesProvider to track all the data types
registered in the algorithm. Using this data, we can detect if it's
possible that we'll eventually have a property of a certain type name.
For example, consider I wish to use security.Data.TradeBar but we haven't
received any trade bars yet. Before this change a KeyNotFoundException
would be raised, but since we can determine that we expect to have trade
bars, we can detect this and return an empty list when we haven't received
any data yet. This also removes the need to constantly do a HasData<T>()
check before accessing the dynamic members.

Closes #3620
2019-09-30 19:06:21 -04:00
Michael Handschuh 8c1867193b Add Security.Data => DynamicSecurityData
Provides dynamic access to cached security data keyed by the type's name.
For example, `security.Data.GetAll<Tick>()` would yield a list of ticks.
Likewise, using the dynamic accessors, `((dynamic)security.Data).Tick`
would return the same list. In C# you'll need to cast security.Data to
a dynamic. In python, all C# objects are viewed as dynamic, so python can
simply access `security.Data.Tick` directly.

See #3620
2019-09-30 13:31:56 -04:00
Martin Molinero 2f4929e685 Update regression algorithms 2019-09-29 21:50:44 -03:00
Michael Handschuh 757c37f6db Add equity AAPL underlying to EstimizeDataAlgorithm
See #3618
2019-09-27 14:28:47 -04:00
Gerardo Salazar 7e2b69db98 Update regression tests statistics and trades placed 2019-09-24 10:34:35 -03:00
Gerardo Salazar ba424cd5b6 Fix failing regression algorithm tests - associated issue is #3597 2019-09-24 10:34:35 -03:00
Gerardo Salazar 56462f0283 Address reviews from Mike and Martin
* Added better documentation for AddData methods
* Added new regression algorithms for adding in OnSecuritiesChanged
* Changed regression algorithms to add data that exists
* Styling and logging fixes
2019-09-24 10:34:35 -03:00
Gerardo Salazar 4b0ed03b4f Added new regression algorithms
* Deleted regression algorithms because they tested behavior similar to
other existing regression algorithms
* Fixed new bug in regression algorithm due to AddData changes
* Added unit tests for wrapt version and package existence

* Fix issue where data would be set to raw normalization mode
2019-09-24 10:34:35 -03:00
Gerardo Salazar 9d052afcf3 Work in progress commit
* Added new method for Symbol to allow creation with underlying
* Added new unit tests
* Alter SecurityIdentifier method signature for BaseData
* AddData changes to accept underlying Symbol
* Added AddDataImpl
2019-09-24 10:34:35 -03:00
Gerardo Salazar 48e4d3660a Add unit tests for AddData for changes 2019-09-24 10:34:35 -03:00
Martin Molinero 787c8bd149 Revert collission work around 2019-09-24 10:34:35 -03:00
Michael Handschuh 6362d101c1 Append type to custom data symbol
This is being done in an effort to prevent symbol collisions within the
custom data (SecurityType.Base) namespace. The custom data type's name,
is used for disambiguation. As written, this change will break several
user algorithms that still rely on using the implicit string -> Symbol
lift. Providing this type information is optional an currently only being
used by AddData<T> methods. Other consumers of SecurityType.Base symbols
arn't at risk for collision, such as the UserDefinedUniverse, ScheduledUniverse
and others that are LEAN controlled. In order to maintain backwards compatibility,
the SymbolCache was updated to do a hard search when the requested ticker was
not found, looking for the prefix ('ticker.').

Fixes #3332
2019-09-24 10:34:35 -03:00
Martin Molinero e7ca829a0d PythonNet bump 1.0.5.25 2019-09-23 19:45:46 -03:00
Michael Handschuh 49af364055 Update Algorithm.CSharp to respect CA1304 and CA1305
Updates all occurrences of parsing/ToString-ing to go through the new
StringExtensions methods that use CultureInfo.InvariantCulture

See #3045
2019-09-12 15:30:45 -04:00
Martin Molinero f96cb2a0cf Bump PythonNet to 1.0.5.24 2019-09-10 12:11:42 -03:00
Martin Molinero e396c3ef10 Bump PythonNet to 1.0.5.23 2019-09-05 23:55:30 -03:00
Martin Molinero f00049f709 Bump PythonNet to 1.0.5.22 2019-09-03 16:05:12 -03:00
Jared 5accca2197 Merge pull request #3521 from QuantConnect/feature-3296-add-support-for-custom-data-mapping-v2
Add support for custom data mapping v2
2019-08-21 14:01:04 -07:00
Martin Molinero 24527e0cc2 Address reviews - Renaming 2019-08-21 16:30:03 -03:00
Jared e2883f72c5 Merge pull request #3523 from Martin-Molinero/bug-2381-2260-benchmark-symbol-not-added-to-cache
Benchmark Symbol will not be added to cache
2019-08-21 12:11:15 -07:00
Xin Wei baf2062667 Remove Hard-Coded Token from QuandlImporterAlgorithm
Remove Hard-Coded Token from QuandlImporterAlgorithm
2019-08-20 16:21:35 -07:00
Martin Molinero 6b00a97b0d Address review 2019-08-20 19:22:18 -03:00
Martin Molinero 7cd1c18887 Benchmark Symbol will not be added to cache 2019-08-20 18:42:31 -03:00
Martin Molinero 73d780daae Moving UsesMapFiles to DataType
- Custom data types will know whether or not Lean should use map files
- Updating regression test with sample custom data using map files,
which can run locally
- Adding unit tests for the `SubscriptionDataReaderHistoryProvider`,
checking it mappes equities and options correctly
2019-08-20 17:33:41 -03:00
Gerardo Salazar c25bdc6a07 Address self review and mchandschuh's review 2019-08-20 16:56:02 -03:00
Gerardo Salazar e6a510d803 Add Mapfile support for custom data sources 2019-08-20 16:56:02 -03:00
Jared 62b6659481 Merge pull request #3485 from mchandschuh/bug-3045-add-fxcop-analyzers-and-invariant-culture-helpers
Add FxCop analyzers and invariant culture helpers
2019-08-16 15:05:34 -07:00
Jared cd59e4082a Merge pull request #3448 from Martin-Molinero/bug-3444-subscriptionfrontiertimeprovider-skips-time-step
SubscriptionFrontierTimeProvider will advance new subscriptions
2019-08-16 14:23:23 -07:00
Michael Handschuh c7df4e9fb3 Add StringExtensions and Parse utilizing CultureInfo.InvariantCulture
Adds static methods of the form Parse.<TypeName>(string str) that use
CultureInfo.InvariantCulture. These are to be used when parsing strings.
It's still safe (from the CA1304/CA1305 perspective) to use the ToDecimal
extension method for decimals.

Adds string extension methods for common operations that will now require
CultureInfo.InvariantCulture. These are to be used when converting values
to strings, such as ToStringInvariant()/ToStringInvariant(format), but also
useful for searching within strings, StartsWithInvariant, EndsWithInvariant
 and IndexOfInvariant.
2019-08-16 18:08:28 -03:00
Michael Handschuh 703f915182 Configure QuantConnect.ruleset in all projects
The initial ruleset is specifically aimed at addressing #3045. When we'd like
to start addressing other issues available via the FxCopAnalyzers, we can update
the action in QuantConnect.ruleset. A nice way to do it is to first set it to
warning, then go through the solution, project-by-project, fixing each warning.
At the end you can flip it to error and ensure it still builds. Moving forward,
any changes will fail if they violate the rule.

In support of #3045, we'll be configuring the following rules:
> CA1304: https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1304-specify-cultureinfo?view=vs-2017
> CA1305: https://docs.microsoft.com/en-us/visualstudio/code-quality/ca1305-specify-iformatprovider?view=vs-2017
2019-08-16 18:08:18 -03:00
Michael Handschuh c42057809d Add Microsoft.CodeAnalysis.FxCopAnalyzers to all projects
FxCop has various rulesets for enforcing things within our codebase.
For this particular issue, we'll be enforcing CA1304 and CA1305 to
ensure we're always using an IFormatProvider or a CultureInfo where
applicable.

Linked Issue: #3045
2019-08-16 18:08:05 -03:00
Jared 48fab43550 Merge pull request #3491 from AlexCatarino/bug-3462-auto-filter-hasfundamental
Do Not Include Securities Without Fundamental Data When Performing Fine Fundamental Selection
2019-08-15 12:00:08 -07:00
Martin Molinero 4b1cb2c283 SubscriptionFrontierTimeProvider will advance new subscriptions
- `SubscriptionFrontierTimeProvider` will advance new subscriptions to find the current emit time of the enumerator. This will make enumeration more deterministic, since we will not skip any time step of the new enumerators.
- Adding a just in case flag to the backtesting `Synchronizer` to retry creating a new time slice when the time has not advanced but there is data in the slice, this could happen with subscriptions added after initialize using algorithm.AddSecurity() API, where the subscription start time is the current time loop (but should just happen once)
2019-08-15 15:46:07 -03:00
Jared 2227cf3da0 Merge pull request #3481 from gsalaz98/feature-3480-add-smartinsider-custom-data
Implements Smart Insider Alternative Data Source
2019-08-12 09:14:53 -07:00