* Refactors AlgorithmManager loop
* Refactors StatisticsBuilder methods and strategy for series alignment
* Move sampling logic to the corresponding IResultHandler
* Changes benchmark resolution to Resolution.Hour
* Modifies IResultHandler to enable external sampling
* Adds BacktestResultHandler unit tests
* Adds ResolutionSwitchingAlgorithm to test misalignment
* Adds support to AlgorithmRunner to store algorithm IResultHandler
Warning: this commit breaks accurate calculations for algorithms that
only make use of `Daily` resolution data. Previously, because
the benchmark was added in Daily resolution in backtesting, any
algorithm that only made use of daily data would have an accurate
calculation for beta and various other statistics.
These changes serve to fix the statistics calculations of non-daily
resolution algorithms, with daily resolution to be revisited at a later
time.
Adds `MarketCap` member to `FineFundamental` class that represents the aggregate market value of a company represented in dollar amount.
Changes `CoarseFineFundamentalRegressionAlgorithm` (C# and Python) to select securities based in its market capitalization. Same result as selecting by P/E ratio.
- When BacktestNodePacket has the inital `CashAmount` set we will clear
all existing cash amounts and set the account currency
- Adding more unit tests
Shows how to read/save object store entires. In this case, it shows a
use case where a potentially time intensive operation's result is saved
in the object store and on subsequent runs the result is pulled directly
from the object store to enable faster run times
- `UserDefinedUniverse` will no longer be removed as a data subscription.
- When `algorithm.AddData()` is called a universe selection data point
will be added to the `UserDefinedUniverse` subscription to trigger
selection and add the requested data.
- `DataManager` will make sure an active subscriptions
`SubscriptionDataConfig` will be present in the configuration collection
- Adding unit and regression tests
* Write files by `UpdatedAt` date instead of the `CreatedAt` date
* Added ability to append to compressed files if file does not exist
* Cleaned up code as per review
* misc. documentation changes
* RSS converter now lives at: https://gist.github.com/gsalaz98/b87992cd5a5a214d01c63dbbefbbf12c
* Removed BenzingaNewsFactory as it is no longer needed
* Cleaned up code as per review to make this more maintainable
* Included new documentation
* Filter articles with no Symbols from being written
* General code improvements (duplication reduction, etc.)
- Renaming `PreSelected` to `Constituents`
- Adding base `ConstituentsUniverse`
- Adding Py and C# regression algorithm
- Fixing bug in `UniverseSelection`, it wasn't removing pending to be
removed securities unless the universe selection changed
- Adding test data
* Make Benzinga News Converter more efficient (and cleaner!)
* Implement JSON converter for serialization/deserialization process
* Fix bug where duplicate symbols would be added to news.Symbols
* Modify algorithm strategies
* Cleaned up code inside BenzingaDataConverter
* Added more documentation to potentially confusing bits around the code
Previously, we would be storing Benzinga time in local time (i.e. with
about a 7hr offset from UTC since I'm in Pacific Time). But now, we
instruct Json.NET to serialize and deserialize dates as UTC.
Additionally, because the data resolution was not set to `Second`,
EndTime would be rounded down with `Time` to the closest minute. We
fixed that by specifying that the data is in `Second` resolution.
- EventProvider will receive start date during initialization, this will
be used by the `MappingEventProvider` to correctly set current mapped
symbol
- Adding unit test, updating existing regression test
- `SetHoldings` will take `OnMarketOpen` ordes into account when
determining order quantity
- Adding new regression test. Updating existing algorithms which
suffered of the issue
- Adding a performance improvement, will avoid margin and portfolio
calculations for MarketOnOpen orders that wont be able to fill
- Replacing `BaseData.AdjustResolution` for `DefaultResolution` and
`SupportedResolutions`
- Making `Resolution` nullable for `Algorithm.AddData` methods
- The `ISubscriptionDataConfigService` will set the default resolution
if none was provided and assert it is supported
- Fix bug with `PythonData` `IsSparseData` and `RequiresMapping`
resolution
- Adding `BaseData.AdjustResolution()` that should return a valid
resolution for the given data and security type.
This allows us to set a limitation which is useful to avoid invalid data
requests or unnecessary fill forward situations. The user will be
notified through a console message.
- Adding unit and regression test
- Updating example algorithms custom data resolution
- Some performance improvements. Wont change console color if
`SelectedOptimization` is defined
- `ITimeRules` are expected to yield time date in UTC, fixing `Noon`,
`Midnight` and `Every`
- `ScheduledUniverseSelectionModel` will use UTC time zone by default
since that is the default expected time zone `ITimeRule` provides
- Adding regression test
- Adding `Security.NullLeverage` value to determine when the
`SecurityInitializer` leverage should be used or not
- Adding regression algorithm which reproduces the issue
- Adds Python version of `TrainingInitializeRegressionAlgorithm`;
- Adds C# version of `TrainingExampleAlgorithm`;
- Removes `TrainingScheduledRegressionAlgorithm`.