36 Commits

Author SHA1 Message Date
Aaron Janeiro Stone cfacc755fa Removal of depreciated module called in test, addition of __init__ (#4769)
* Removal of depreciated module called in test, addition of __init__ to module.

* Delete __init__.py

Currently unnecessary
2020-09-28 11:36:02 -03:00
Gerardo Salazar e2c75fa5fa Address review - delete python report creator
* Move PortfolioLooper classes to their own files
* Remove VisualStudioPlugin project
* Add SharedAssemblyInfo
* Add new crisis events
2019-12-18 18:02:04 -08:00
AlexCatarino 5ce7abce66 Adds Unit Tests for Compite and Backtest Requests
If any request returns `{'success': False}` or throws an exception, `Api.Execute` will not exit the execution, will log and return the result. This change will enable re-try logic.
2019-12-12 01:31:03 +00:00
AlexCatarino fe64fada3d Refactors Python Version of the API
- Refactor to simplify `quantconnect.api.Api` class. Adds `Execute` method that accepts a bolean to distinguish a `POST` from a `GET` request.

In the previous version, some methods were using the `params` argument instead of `data` in the `POST` case which threw an exception for big json objects.

- Adds option to save logs and backtest report to disk.
- Adds `Result` class to optionally convert the json objects into `pandas.DataFrame` when getting backtest or live results

- Subversion bump
2019-12-11 16:10:12 +00:00
Ethan Lee 8bda8340e2 Refactor and fix bugs in function for processing dictionary to image blocks 2019-08-13 14:58:38 -07:00
Ethan Lee 6d13aa4bd4 Merge branch 'master' of https://github.com/QuantConnect/Lean into feature-report-style 2019-07-31 17:19:06 -07:00
Ethan Lee f83f3e99df Edit font style, import Open Sans, and modify page ratio 2019-07-31 17:18:46 -07:00
Jack Simonson d152fcc474 Remove condition imposing 5% minimum on labels
This restriction is no longer necessary as we are plotting 7 slices maximum no matter what value they are.
2019-07-31 11:59:47 -07:00
Jack Simonson dacf27a329 Update LeanOutputReader.py asset allocation plots
Discrepencies were being noted between the plotted asset holdings and the actual holdings weights. Additionally, the plot was changing between HTML renderings using the same backtest data.
2019-07-31 11:40:25 -07:00
Jack Simonson ff41cf3cf0 Update LeanOutputReader plot formatting
Updated the monthly returns matrix text labeling. Force the top row of labels to align bottom and the bottom row of labels to align top. As originally done, the local report created was fine but the report in the cloud still have overlapping label/axis issues. This fixes that problem.
2019-07-31 10:05:32 -07:00
Jack Simonson f557b5128e Update LeanOutputReader.py
Add try-except controls to ensure successful report creation when backtest result is incomplete. Prevents issues popping up with None types for Total Performance and Portfolio Statistics.
2019-07-30 16:02:49 -07:00
Ethan Lee 5a03bfad6c Add page-break-avoid css to fix the page collapsing bug when exported as pdf 2019-07-30 13:49:26 -07:00
Jared acbf99a6c6 Merge pull request #3438 from goenchan/feature-report-style
Edit Report Styles
2019-07-26 13:53:54 -07:00
Ethan Lee b2bfd682c9 Edit styles and merge two report sections to be collapsed in minimum number of pages 2019-07-26 13:29:27 -07:00
Jared 6c8737e34b Merge pull request #3437 from simonsonjack/feature-LeanReportCreator-updates
Update LeanOutputReader.py
2019-07-26 10:11:53 -07:00
Jack Simonson d8039856f0 Update LeanOutputReader.py
Removed two crisis-situation charts to condense all crisis events to one page. Reduced text size in monthly returns matrix plot to ensure readability.
2019-07-26 09:46:14 -07:00
Jared 8e256e202a Merge pull request #3425 from goenchan/feature-Update-LeanReportCreator
Fix typo and set higher specificity for broken style
2019-07-25 09:08:41 -07:00
Ethan Lee 3688797e34 Fix typo and set higher specificity for broken style 2019-07-24 15:01:51 -07:00
Jared 11223c18f0 Merge pull request #3424 from simonsonjack/feature-LeanReportCreator-updates
Feature lean report creator updates
2019-07-24 14:17:10 -07:00
Jack Simonson 80604fef37 Forgot to change one font, made the fix here 2019-07-24 14:00:39 -07:00
Jack Simonson 4ca9d2f575 Further updates to LeanReportCreator plots 2019-07-24 13:43:52 -07:00
Ethan Lee e0e44f7864 Expand images and update border colors 2019-07-24 10:59:00 -07:00
Ethan Lee 92931f2a6d Implement new styles and modify/remove methods accordingly 2019-07-24 09:48:51 -07:00
Jared 37c405531e Merge pull request #3421 from simonsonjack/feature-Update-LeanReportCreator
Feature update lean report creator
2019-07-23 17:59:18 -07:00
Jack Simonson 213f9eb838 Updates to LeanReportCreator based on review by Jave 2019-07-23 17:44:12 -07:00
Tim Burke 552ceddc09 Stream downloaded data in more cases
Passing chunk_size=None to iter_content() works fine for chunk-encoded
responses, but still leaves us buffering the entire response when the
server just specifies a Content-Length.

Now, stream the response 256k at a time.

Why 256k? It's large enough that you won't be in a tight loop doing tiny
reads, but small enough that it shouldn't be any great memory concern.
If anyone finds that it's problematic, they can always monkey-patch
quantconnect.api.DOWNLOAD_CHUNK_SIZE.
2019-07-02 16:31:03 -07:00
Tim Burke 07acc2e738 Reduce memory usage in Api.download_data
Previously, the entire response would be read and buffered in memory
before any of it was written to disk.

Now, stream the response and write down data as it's received.
2019-06-27 09:54:49 -07:00
Tim Burke 80fe442e3d Fix NameError in Api.download_data
Closes #3078.
2019-06-27 09:52:26 -07:00
AlexCatarino d5c64dee54 Adds symbol decoder
Adds Lean Symbol object decoder. Given a string with ticker + security ID, returns some of the security properties (market, security type, etc)

Closes #2909

Some users have the Symbol string object but don't know what the ID means. This python class can be used to translate the ID.

Added unit test.
2019-02-14 17:35:45 +00:00
Gehad Wahgdy ae25c6fe54 Updated wrong docstrings 2019-02-01 21:22:46 +01:00
Jared 5228d196c4 Update README.rst 2018-07-20 13:42:31 -04:00
AlexCatarino d5c7afa98f Changes Lean Report Risk Control definition
Also: fixes some typoes in labels
2018-06-15 17:29:30 +01:00
AlexCatarino 23c6ef8e0f Implements ReadBacktestReport method in the API 2018-06-08 17:04:13 +01:00
AlexCatarino 05566daafc Sets height property of biography textbox 2018-06-07 16:57:55 +01:00
AlexCatarino dd1b770677 Refactors Lean Report Creator
`LeanReportCreator` is now the HTML creator and `LeanOutputReport` reads a dictionary (the Lean output) to create the images and statistics.
2018-06-06 14:50:10 +01:00
AlexCatarino 0be6e8fa1f Initial commit of LeanReportCreator
- Renames `ApiPython` project to `PythonToolbox`
- Moves `LeanReportCreator` from https://github.com/QuantConnect/LeanReportCreator to https://github.com/QuantConnect/Lean/tree/master/PythonToolbox.
- Fixes README.rst
- Add QuantConnect License header
2018-06-06 13:17:37 +01:00