Commit Graph

24 Commits

Author SHA1 Message Date
Michael Handschuh d8db9f9fce Update Algorithm 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:44 -04:00
Martin Molinero e294b3c3e2 Fix overflow exception
- Adding new `AlgorithmSettings` Min and Max absolute portfolio target
percentage
- Adding new `PortfolioConstructionModel.FilterInvalidInsightMagnitude()`
helper method that will be used by the `BlackLitterman` and
`MeanVariance` optiomization portfolio construction models to skip
insights with extreme magnitudes that will cause exceptions
- `PortfolioTarget.Percentage()` will now verify requested percent is
withing the settings values
2019-05-23 20:30:44 -03:00
Martin Molinero b7930aff67 Performance improvements
- 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.
2019-04-11 19:01:27 -03:00
Martin Molinero 17995f4c86 Adding a configuration for maximum data points per chart series. Limit will only apply for backtesting result handler 2018-08-17 18:14:33 -03:00
Stefano Raggi 3fecc1b585 Remove ContainsKey checks before TryAdd in QCAlgorithm.Plotting
ConcurrentDictionary.TryAdd will return false and do nothing if the key already exists.
2018-03-07 16:45:11 +01:00
Stefano Raggi 7460d4f9c7 Fix concurrency issue in QCAlgorithm charts
Fixes #1640
2018-03-07 15:09:48 +01:00
Stefano Raggi 1db28b8358 Fix reserved chart names error in AddPlot
Fixes #1435
2018-01-04 23:59:43 +01:00
Michael Handschuh 2bc7905ea2 Add signal count and signal asset breakdown charts
Modifies the way we sample charts to be more like the equity sampling that we do.
In this case, we compute a sampling period based off of 1000 samples for the entire
backtest. In live mode, we'll just sample each minute.
2017-12-15 16:01:09 -05:00
Michael Handschuh 205b1cde3c Add QCAlgorithm.AddSeries method
Adding a scatter plot is an involved process because there's not
direct and easy way to just define a series object. This change
allows an algorithm to simply define the series without pumping
any data into it. This allows the user to set the series type and
the unit for the series
2017-10-27 00:04:03 -04:00
AlexCatarino c01470e1db Fixes PlotIndicator for python algorithms
Available PlotIndicator method overloads did not cover all the possibilities, so we now use PyObject as a pseudo-generic.
2017-10-24 20:24:52 +01:00
Stefano Raggi e7172a6841 Update QCAlgorithm.RuntimeStatistics to be a ConcurrentDictionary
This change enables SetRuntimeStatistics to be called from event handlers fired by other threads (for example in the OnOrderEvent with IB)
2017-07-20 20:39:51 +02:00
jaredbroad a2d822ea95 Set default plotting time to UTC 2017-02-15 13:03:33 -05:00
Michael Handschuh 591f6b2127 Use IBaseData in type constraints
Refactors existing consolidators, indicators, and helper methods to depend on
IBaseData instead of BaseData. These updates also defines an IBaseDataBar to
act as an abstraction point between TradeBar and QuoteBar.
2016-11-09 09:20:16 -05:00
QuantConnect 2d9f8cb9e3 Updated charting lib to use series indexes instead of chart types. Obsolete ChartType enum 2015-12-10 13:03:50 -05:00
snugs e1938baafe Clean up using directives 2015-09-01 22:17:35 -04:00
snugs 82b2b7c2d7 Optionally wait for indicator to be ready before plotting 2015-06-22 17:28:18 -04:00
snugs 1cc048e481 Make PlotIndicator more generic 2015-06-22 15:02:41 -04:00
QuantConnect fde0cbed3a Strip out block quote section header comments 2015-06-13 16:04:27 -04:00
snugs 89b6e98af8 Fixes warnings mostly relating to xml comments
Also cleans up some block comments

Via PR#72 - thanks @ammachado!
2015-05-13 10:56:47 -04:00
snugs ffd7d99aa3 Adds Field.cs static class for indicator selectors
Adds PlotIndicator which wires up event to plot on new values
2015-05-11 21:33:30 -04:00
snugs e346eaad76 Add purge method to Series 2015-05-04 21:33:29 -04:00
snugs d80b1733a9 Pre ib launch review 2015-04-24 19:12:16 -04:00
Jared Broad ad9e153bb7 Added meta to list of reserved chart names 2015-02-11 21:22:13 -03:00
Jared Broad b3de520915 Initial commit 2015-01-12 12:03:33 -03:00