Regression Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
* Refactor alpha statistics
- Refactor alpha statistics, cleaning up and simplifying no longer required calculations and scoring
- Adding new InsightEvaluator abstraction, adding C# & PY regression
algorithms
* Optimization backtest result json converter update
* Address reviews
- Remove IAlphaHandler, move insight storage responsability to IResultHandler
and centralizing insight collection on the QCAlgorithm.Insights to be
reused by the framework models
- Fix portfolio turnover single day backtests and duplicate time
sampling handling. Updating regression algorithms
* Add InsightCollection tests and minor fixes
* Adding more & improved tests
- Moving InsightCollection into base `PortfolioConstructionModel`
- Will call `InsightCollection.GetNextExpiryTime()` on each check, and
for performance `InsightCollection` will keep track of next insight
expiry time
- Removing need for PCM base classes having to call `RefreshRebalance`
- Some refactor clean up at base
PortfolioConstructionModel.IsRebalanceDue()
- Refactoring some PCM methods to be `protected` since they are not required
to be public
- Adding new `PortfolioConstructionModel.RebalanceOnInsightChanges`
flag, that will allow avoiding new insights or insight expirations to
trigger a rebalance
- Updating unit tests
- Fix for the MeanVarianceOptimizationPortfolioConstructionModel that
was skipping, in some cases, 0 magnitude insights
- Using `Aggregate(lambda)` vs `Sum(lambda)` since the later is slower
due to performing an extra `Select`
- For `QCAlgorithm.Framework.OnFrameworkData()` will avoid calling
`ToArray()` on empty `Enumerables` due to its cost * the number of
calls. If the `Enumerable` is the empty instance, which is static,
will create a new empty array and return it instead.
- Replacing `SecurityIdentifier` `SecurityType` and `GetHashCode`
implementations for `Lazy` versions, that are performed just once, since
these values do not change and are used multiple times.
- For the different `DataDictionary<T>` implementations adding `this[
Symbol] get; set` since existing overload `this [string]` produces an
extra round operations `Symbol->string->Symbol` with a significant
impact.
- Adding `PortfolioTargetCollection.AddRange()` overload using an array
to avoid unnecessary convertions.
- When there are or aren'tt new insights, the EqualWeightingPortfolioConstructionModel will creates a target to flatten delisted securities from the universe of expired insights.
- Helper methods were added to deal with removing expired insights and getting active ones and used in `EqualWeightingPortfolioConstructionModel`
- Adds unit test
- Updates framework algorithms
Provides a collection type for managing insights. Internally it uses
a dictionary Symbol->List<Insight> but does NOT implement the dictionary
interface due to potentially unexpected behavior when enumerating, i.e,
different behavior when enumerating if statically known as list vs statically
known as dictionary -- not sure how python would resposne to the ambiguity,
so best to leave well enough alone :)
This type is just used as a container for generatd insights. Renaming in
preparation for a new InsightCollection to mirror the PortfolioTargetCollection
The term 'alpha' is used to describe the entire algorithm. Therefore, 'alpha'
produces insights. From this we have things like IAlphaModel, which is the model
defining how insights are produced. We have IAlphaHandler, which defines how the
insights from a single 'alpha' (the algorithm) are managed, analyzed, and stored.
Types closer to the individual prediction level, such as InsightDirection, or
InsightScore relate directly to exactly 1 insight. The distinction between the
two became more clear as we developed the insights API, and from that effort it
was decided to harmonize alpha/insight terminology across the various QC systems.