Commit Graph

36 Commits

Author SHA1 Message Date
Martin Molinero 2b07b0faf4 Fix test AlgorithmRunner 2019-05-28 11:49:08 -03:00
Martin Molinero cfa08a11fb Address reviews
- Removing `using QCAlgorithmFramework = QuantConnect.Algorithm.QCAlgorithm`
- Removing `QCAlgorithmFrameworkBridge`
- Removing `IsFrameworkAlgorithm`
- Making `EmitInsightBasedOnFill` private. Adding new
`IOrderEventProvider` exposing an `event` to which `QCAlgorithm` will
subscribe.
- `AccountType.Cash` algorithms will be allowed to manually trade and
emight insights manually or with alpha model.
2019-04-03 21:55:44 -03:00
Martin Molinero 32ac3146b4 Merge Framework and Classic Algorithms
- Merging Framework and Bridge algorithms into classic QCAlgorithm
class.
- Removing Framework project, VS17 and VS15
2019-04-03 21:54:32 -03:00
Martin Molinero 75ffa300f1 Adding new IAlgorithm.AccountCurrency
- Adding new `IAlgorithm.AccountCurrency { get; }` that will point to the
`Portfolio.CashBook.AccountCurrency`. Setter will be added in a
following PR.
- Base `Brokerage` class will now have a `AccountCurrency { get }`
pointing to the `IAccountCurrencyProvider`. Will be used by the different
brokerages implementations.
2018-12-10 11:59:02 -03:00
Martin Molinero ff5e888313 Fix for delisted subscription data being sent 2018-07-18 09:45:13 -03:00
Stefano Raggi dbb6561629 Add missing try...catch with logging in AlgorithmRunner task 2018-07-03 23:13:18 +02:00
Michael Handschuh 8c011640cb Properly set algorithm id in AlgorithmRunner
Many logs were showing the name of the first algorithm on the line:
SetUp Backtesting: User: <uid> ProjectId: <pid> AlgoId: AddRemoveSecurityRegressionAlgorithm

Instead of the name of the running algorithm.
2018-04-26 13:13:50 -04:00
Michael Handschuh a443be7e6e Add QCAlgorithmFramework.DebugMode
Setting this to true enables logging of model inputs and
outputs. Be careful about your universe size, it can generate
a LOT of data
2018-04-06 16:30:26 -04:00
Jared Broad c7f2e2cf21 Tweaked alpha value to be monthly instead of accumulating for ever 2018-03-22 18:33:52 -04:00
Michael 3fb429e5f4 Merge pull request #1685 from QuantConnect/feature-update-alpha-framework-for-consistency-with-api
Finalizes implementation of alpha framework, including alpha.spanner updates, many name changes, and harmonizes insight serialization with alpha streams API
2018-03-12 16:39:33 -04:00
Stefano Raggi 58a65bee97 Fix Forex data not received when reusing an existing internal feed
Fixes #1611
2018-03-09 23:28:23 +01:00
Michael Handschuh 6b239674e2 Renames Alpha -> Insight
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.
2018-03-09 16:12:56 -05:00
Michael Handschuh 5ba44ed5ab Remove universe symbols from history requests
The engine defines securities for each universe to properly track them within
the data feed. These securities are not tradable and have no price data associated
with them, and as such, we should not be sending history requests for these symbols.
This change removes all universe symbols from history requests.
NOTE: Requests made directly to the history provider are not filtered out, as the
filtering happens within the QCAlgorithm implementation.
2018-03-05 14:18:33 -05:00
Michael Handschuh e6e4e58eb9 Log all order events to dedicate file in regression
When inspecting regression differences, the first thing that should be looked at
are the fills. Some of the regression algorithms log this data making it possible
to inspect whie others do not. In addition, for algorithms with many securities the
log can quickly become fills with noise from scheduled event logging.

This change aims to make it very easy to compare any regressions in orders/fills
against the most recent successful run of the specified regression algorithm.
2018-02-19 13:01:27 -05:00
Michael Handschuh d38323b98c Add alpha statistics regression test functionality
When the algorithm finishes, the alpha statistics are merged with the backtest
result statistics. This keeps the regression testing pattern of alpha statistics
the same as the existing regular statistics.
2018-01-12 12:08:40 -05:00
Michael Handschuh 8263d15bdd Remove deletion of regression.log
This file is no longer written as part of the regresson test suit.
Regression logs files can now be found in the ./passed and ./regression
folders from the test's executing directory.
2017-12-04 15:45:44 +01:00
Michael Handschuh 1060b55899 Write regression logs to unique files
Often when implementing new features I find myself having to switch to master
in order to get a copy of a passing regression run log file. This change aims
to simplify that process by saving regression algorithm log files to their own
unique file and if they pass the regression test, copying that file to another
location to keep it while testing a potentially failing regression run.

The current run and most recent passed log files are placed in separate
directories to enable easy directory diffing to quickly find regression issues.

Current run:
  ./regression/<algorithm-name>.<language>.log

Most recent pass:
  ./passed/<algorithm-name>.<language>.log
2017-11-28 13:19:42 -05:00
AlexCatarino e7d08c1122 Fixes AlgorithmRunner to enable regression tests for python algos 2017-10-06 13:33:24 +01:00
Andrew 143e779bb8 Add Dispose method to ILeanManagement 2017-07-14 12:40:53 -04:00
Andrew e4ebcf6cf3 Created ILeanManagement
ILeanManagement is meant to be a wrapper on the entire Lean engine and allow
command to be sent from ILeanManagement to the rest of Lean.  In addition,
ILeanManagement can act as a hosting environment specific implementation for hosting Leaninstances.
2017-07-14 12:40:52 -04:00
Michael Handschuh 70b170358e Turn debug logging on for regression
Also removes some redundant/duplicate logging
2016-04-07 04:11:53 -04:00
Michael Handschuh 899ff7407e FileLogHandler: Add option to remove timestamp 2016-04-05 15:52:24 -04:00
Michael Handschuh 2689e6a976 Adds RegressionLogHandler to write log file w/out timestamps
This makes for cleaner diffs between runs in regression.log
2016-03-31 16:06:21 -04:00
AlexCatarino cc32d30c96 AlgorithmRunner admits language choice
AlgorithmRunner.RunLocalBacktest admits algorithm language choice
2016-02-22 20:10:09 -03:00
Michael Handschuh cf6b4aa57d Use BacktestingResultHandler instead of ConsoleResultHandler 2016-01-20 14:05:41 -05:00
Dmitri Pavlenkov 78d21b0d75 Fixes running multiple regression test algorithms
Properly dispose of all handlers
Reset Composer instance
2015-07-03 16:14:27 -04:00
snugs 941b0c5e51 Update test to be more config agnostic 2015-06-25 15:54:43 -04:00
snugs 9327ef09a2 Remove Engine as IDisposable, manage resources externally from the engine 2015-06-23 19:28:24 -04:00
snugs c8b4e6bdba Remove config 'local' value
This change includes addition of the 'tradier-save-tokens' config value used to write tradier access/refresh tokens to disk
2015-06-22 19:05:04 -04:00
snugs 470d51a6d0 Extract sourcing of job from Engine.Run
The engine itself shouldn't concern itself with where jobs come from, so we pull the next job and acknowledge job logic out of Engine.Run
Add RamAllocation to AlgorithmNodePacket
2015-06-22 18:28:23 -04:00
snugs 3636124c5e Misc edits from code review
Removed unused BaseDataFeed and IQFeedDataFeed
Add catch for NullReferenceException in stream store
ConsoleSetupHandler now throws on live jobs, use BrokerageSetupHandler
Renamed/moved FixedSizedQueue to Util\FixedSizeQueue
2015-06-18 17:19:36 -04:00
snugs 4de2ec4070 Make Engine an instance
Updated all interfaces to accept dependencies via Initialize methods
2015-06-18 13:50:11 -04:00
snugs 887faa24e7 Adds support for hourly/daily data to LEAN engine 2015-06-02 21:44:44 -04:00
snugs 49b398f8ff DataStream sync by end of bar
Adds EndTime to BaseData
Adds Period to TradeBar
Now filling data forward on days missing files/data
Some performance enhancements
Removed sorted dictonary in DataStream/AlgorithmManager

We round down fill forward data in the data stream since if we were to perform this in the data feed we would continually produce data at the same time and it would all go into the algorithm at once.
2015-05-01 19:23:57 -04:00
snugs 556bcb160d Add console write to algo runner 2015-04-24 19:47:10 -04:00
snugs c908b72cd9 Adds algorithm test runner
Includes RegressionTests.BasicTemplateAlgorithm
Also includes some lines to help produce the dictionary needed for asserting algorithm statistics in ConsoleResultHandler
2015-04-24 15:58:31 -04:00