Commit Graph

686 Commits

Author SHA1 Message Date
AlexCatarino 966eaa8e10 Adds AccordVectorMachinesAlgorithm algorithm
This algorithm is an example on how to use Accord VectorMachines Learning.
2019-07-19 20:13:13 +01:00
Gerardo Salazar 4a83793067 Address review 2019-07-09 17:46:15 -07:00
Gerardo Salazar d5e148b05c Adds Psychsignal data converter and custom data implementation 2019-07-09 17:45:31 -07:00
Gerardo Salazar 2033c7873b Update outdated DotNetZip dependency in nuspec files 2019-07-02 18:02:23 -07:00
Jared 433edaa1d4 Merge pull request #3331 from Martin-Molinero/bug-2865-on-end-of-day-not-fired
Fix OnEndOfDay not fired - Undeterministic ScheduledEvent triggering
2019-06-21 09:10:34 -07:00
AlexCatarino 7b81f1a64d Implements Estimize Equity Endpoints Alternative Data
- Release: Financial releases for the specified company
- Estimate: Financial estimates for the specified company
- Consensus: Consensus of the specified release

For each equity endpoint, we create a `BaseData`, a Downloader and add unit tests.
2019-06-21 13:14:47 +01:00
Martin Molinero a92bee5bf1 Fix OnEndOfDay not fired
- Adding `IRealTimeHandler.OnSecurityChanged()` will be used to update
the `OnEndOfDay` security related scheduled events
- Adding `BaseRealTimeHandler.cs` to reduce code duplication in the
`Backtesting` and `LiveTrading` `RealTimeHandlers`
- Adding CSharp and Python regression tests
- Deprecating `OnEndOfDay()` callback because of two reasons, mainly
because Python does not support two methods with the same name, but also
because different assets have different market close times.
- `ScheduledEvents` set at the same time will now be deterministic
2019-06-20 17:35:28 -03:00
AlexCatarino 66a0c7377d Addresses Reviews
- Changes the destination folder
- Remove Symbol converter
- Refactors Get method to return `Task<string>`
  - Since `HttpRequester` returns `Task<string>`, it makes more sense to pass this result than returning a `IEnumerable<string>`.
2019-06-20 10:35:56 +01:00
AlexCatarino 5b34e2519a Adds TradingEconomicsCalendarIndicatorAlgorithm
Adds C# and Python version of TradingEconomicsCalendarIndicatorAlgorithm to show how TradingEconomics data can be added to an algorithm.
2019-06-20 10:35:56 +01:00
Gerardo Salazar 2ad1f19f85 Implements Sec Custom Data, ToolBox Application, and Sample Algorithm 2019-06-17 16:45:53 -07:00
Martin Molinero 1c92986994 Calculate insight score 1 per time step 2019-06-11 19:06:39 -03:00
Martin Molinero 2c1cf0fa93 Address reviews
- Adding new regression test algorithm
- `SecurityPortfolioManager` will subscribe to the `CashBook.Updated`
event to invalidate the `TotalPortfolioValue
2019-06-07 17:51:30 -03:00
Martin Molinero 168fb98e20 Fix Turnover Ratio for Futures/CFDs
- `Futures` and `CFDs` sales value will use `ContractMultiplier` as the
rest of the securities.
- `FitnessScore` values will be truncated, not rounded, to 3 decimal places.
- Reducing code duplication for calculating the
`CompoundingAnnualPerformance`
2019-06-06 20:06:54 -03:00
Jared a2a63ae058 Merge pull request #3016 from QuantConnect/feature-3015-add-weight-to-insights
Add Insight optional Weight
2019-06-04 16:52:48 -07:00
Martin Molinero e7641edf25 Shift Sigmoidal Scale 2019-06-04 18:18:43 -03:00
Martin Molinero 877f59285b Update Portfolio Turnover to be average daily 2019-06-04 11:58:37 -03:00
Martin Molinero 050bbcaba1 Fix Sortino Ratio 2019-06-03 21:42:45 -03:00
Martin Molinero 9e493f16a4 Annualize downside returns 2019-06-03 19:49:23 -03:00
Martin Molinero 61db544817 Address reviews 2019-06-03 15:10:19 -03:00
Martin Molinero 61bab7439b Address reviews 2019-06-03 15:10:18 -03:00
Martin Molinero c015d4ca1f Add Fitness Score
- Adding new `FitnessScore`, score of the strategys performance, and
suitability for the Alpha Stream Market
2019-06-03 15:10:18 -03:00
Martin Molinero 0fc5bde93d Address review 2019-05-28 20:40:09 -03:00
Martin Molinero 97c2889cc2 Fix Orders Placed in OnOrderEvent
- The `BacktestingBrokerage` will also verify there are no more pending
orders when deciding if it needs to continue scanning
2019-05-28 14:38:12 -03:00
Jack Simonson 7793033c32 Changes made to CS file too 2019-05-24 16:18:08 -07:00
Jared 1d6bbb89e3 Merge pull request #3220 from simonsonjack/feature-delete-dailyfx-class
Delete DailyFx class
2019-05-22 17:39:47 -07:00
Jack Simonson 543abd77c5 Delete DailyFx class
Deleted DailyFx class and associated references in algorithms and tests
2019-05-22 09:36:19 -07:00
Jared 2f46e708a1 Merge pull request #3184 from Martin-Molinero/refactor-3183-remove-backtestingtransactionhandler-thread
Removing BacktestingTransactionHandler thread
2019-05-17 07:22:24 -07:00
Jack Simonson ec9b1170f3 Changes to start and end dates so open source project data can be used 2019-05-16 09:25:27 -07:00
Jack Simonson 4c1f147acf Changes based on review by Alex 2019-05-16 09:16:44 -07:00
Jack Simonson 21f0222fa8 Add template algorithms
Two demonstration algorithms showing how to incorporate Python into a C# algorithm and vice versa
2019-05-14 16:50:13 -07:00
Martin Molinero f976ffa099 Removing BacktestingTransactionHandler thread
- For backtesting the algorithm thread will sequentially process pending
order requests
   - Adding new non blocking `BusyCollection`
- Updating `UpdateOrderRegressionAlgorithm` that suffered of a race
condition: it supposed `OnOrderEvent` would be called after the call to
`Transactions.AddOrder()` was finished
2019-05-10 16:15:24 -03:00
Alexandre Catarino 3f00762bfd Adds Custom Data from US Energy Information Administration (eia.gov) (#3136)
New custom data class USEnergyInformation with new demonstration algorithms, the updated config file for users to set their EIA token.

Adds `CloseTime` to represent the time that the data period end. `EndTime` represents, in turn, the time the data is emitted. There is an offset between `CloseTime` and `EndTime` that is defined by the difference between the last bar as emitted and its time. 

In live mode, if the `USEnergyInformation.Reader` returns null, the `CollectionSubscriptionDataSourceReader.Read` method will pull for new data constantly. Therefore it should return an empty `BaseDataCollection` object.
2019-04-30 17:22:11 -07:00
Stefano Raggi 74fcb8da93 Fix invalid currency pairs in G10CurrencySelectionModel 2019-04-25 21:47:32 +02:00
Martin Molinero ac53e2a790 Rebase from master. Adding missing Python algo 2019-04-24 11:05:15 -03:00
Martin Molinero e21a8fec35 Address review, use inheritance
- New InsightWeightingPortfolioConstructionModel will inherit from EqualWeightingPortfolioConstructionModel
2019-04-24 11:05:15 -03:00
Martin Molinero 968adcea32 Adding InsightWeightingPortfolioConstructionModel
- Adding new `InsightWeightingPortfolioConstructionModel` that will
generate percent `Targets` based on the latest active `Insight` `Weight` per
`Symbol`.
   - Will ignore `Insights` that have no `Weight`.
   - If the sum of all the last active `Insight` per `Symbol` is bigger than 1, it
will factor down each target percent holdings proportionally so the sum is 1.
- Adding unit tests
- Adding a new regression test framework algorithm
- Note most of the code, including tests, are reused from the
`EqualWeightingPortfolioConstructionModel`
2019-04-24 11:05:14 -03:00
AlexCatarino c3de660551 Updates pythonnet to 1.0.5.20 2019-04-23 23:15:14 +01:00
Stefano Raggi e5028e087f Remove usage of DateTime.UtcNow in buying power models (#3115)
Remove usage of DateTime.UtcNow in buying power models

In PR#3013 we added support for fee models with history, so the new changes to the GDAXFeeModel exposed this bug, breaking a couple of regression tests (issue #3044)

Update regression stats for EmitInsightCryptoCashAccountType

* Fix typos

Add missing time keeper in CashBuyingPowerModelTests
2019-04-23 07:38:39 -07:00
AlexCatarino 04a529c758 Addresses Review
- Removes `UniverseSettings.DataNormalizationMode` (it will ne addressed in a dedicated issue: https://github.com/QuantConnect/Lean/issues/3082)
- Adds examples/tests for Tick resolution, Forex (QuoteBar data) and Custom data.
  - Tick resolution is not allowed: logs a message
  - Custom data example/test added in `CustomDataNiftyAlgorithm`
- Adds support for ATR and VWAP since they are, respectively, a bar and a trade bar indicator.
- Adds consolidators to handle difference between data resolution and indicator resolution.
2019-04-18 23:29:51 +01:00
AlexCatarino 3c019cdbda Adds SmaCrossUniverseSelectionAlgorithm
This algorithm is an example for WarmUpIndicator method usage
2019-04-18 23:29:51 +01:00
Jared b7de35df78 Merge pull request #3100 from Martin-Molinero/performance-3096-add-stateful-stateless-coarse-universe-selection
Adding new Coarse performance benchmarks
2019-04-18 14:31:18 -07:00
Martin Molinero b5c216f7f3 Adding new Coarse performance benchmarks
- Adding stateless and stateful coarse universe selection benchmarks.
Will be used to benchmark future performance improvement.
2019-04-18 12:47:49 -03:00
Jared 0c20ca870b Merge pull request #3088 from AlexCatarino/feauture-3082-universe-settings-data-normalization-mode
Implements UniverseSettings.DataNormalizationMode
2019-04-17 15:44:14 -07:00
AlexCatarino bd9f1c9154 Adds Regression Algorithm 2019-04-17 18:11:48 +01:00
Martin Molinero 938047de47 Will ignore flat insights
- `Flat` insights will be ignored both for scoring (`InsightManager`)
and for statistics (`StatisticsInsightManagerExtension`). Adding unit
tests
2019-04-16 20:39:55 -03:00
Jared b331fad160 Merge pull request #3043 from AlexCatarino/feature-3042-pyobject-scheduled-universe
Adds Constructor Overload with PyObject to ScheduledUniverse
2019-04-10 16:49:03 -07:00
AlexCatarino b366f5b2b5 Adds C# and Python examples 2019-04-09 17:59:46 +01:00
AlexCatarino 0202df35f4 Replaces Enum CalendarType for Static Class with the Same Name
Replaces Enum `CalendarType` for static class with the same name. This class defines two properties (`Weekly` and `Monthly`) that can be used to define the previous calendar date (Monday or 1st of current month) which will correspont to the `Time` of a `IBaseData` object.

Refactor `PeriodCountConsolidatorBase` to define use `GetRoundedBarTime` based on a period specification that depends on the constructor overload: `integer`, `TimeSpan` or `Func<DateTime, CalendarInfo>`. The last one can be set with the `CalendarType` properties.
2019-04-08 22:10:04 +01:00
AlexCatarino 5314e7426d Implements Calendar (Weekly/Monthly) Consolidator
Implements consolidators that group bars by a calendar unit (week or month).
2019-04-08 22:10:04 +01:00
Jared d32d1bc90d Merge pull request #3066 from Martin-Molinero/feature-3065-adduniverseselectionmodel
Implement AddUniverseSelectionModel
2019-04-08 14:00:11 -07:00