Commit Graph

24 Commits

Author SHA1 Message Date
Gerardo Salazar 40c3062348 Improves Report Generator stability and fixes various bugs (#4759)
* Improves stability and fixes various bugs

  * Adds unit tests covering changes
  * Adds COVID-19 crisis plots
  * Adjusts styling of crisis plots for more pleasant viewing
  * Fixes bug where null BacktestResult caused application to crash
  * Order JSON bug fixes and stability improvements
  * MaxDrawdownReportElement now produces results for Live
  * Replaced Estimated Capacity w/ Days Live
  * Added Live marker to sharpe ratio
  * Added support for MOO and MOC orders in PortfolioLooper

* Address review: adds new unit tests and cleans up code

  * Bug fix: use LastFillTime instead of Order.Time for MOO and MOC

* Address review: Fixes tests and cleans up code
2020-09-29 10:03:26 -03:00
Gerardo Salazar bd62a76a35 Fixes calculation of Cumulative Returns
* Updates outdated documentation
2020-04-06 10:45:52 -07:00
Gerardo Salazar 208e6eb03e Address review - revert change to backtest sharpe if live not found 2020-03-26 12:17:03 -07:00
Gerardo Salazar e5ed489e0b Fixes issue where PortfolioLooper would crash generating certain reports
* Updates SharpeRatioReportElement calculation
2020-03-26 11:50:08 -07:00
Gerardo Salazar 5d663e8944 Fixes various issues
* Fixes issue with how cumulative percent change was calculated
* Reworks PercentChange extension method
* Fixes PortfolioLooper leverage calculation
* Disable page 2 of reports
* Fix issue where missing values produced misaligned shape in
AnnualReturnsReportElement.cs
2019-12-31 17:37:19 -08:00
Gerardo Salazar 1c4935fc60 Address review - increase performance and refactor
* Deletes NullAlphaHandler, NullLeanManager, NullSynchronizer
* Calculate the backtest and live PointInTimePortfolios only once now
* Refactor Metrics calculations
* Add missing license headers to some files
* Reverts accessibility of AddToUserDefinedAlgorithm to private
* Other misc. fixes and cleanup
2019-12-23 14:13:28 -08:00
Gerardo Salazar 53653fe6ed Address review - Revert version changes to sln file
* Fixes comments on a few report elements
* Fixes wrong name of a report element "psr kpi" -> "ir kpi"
2019-12-19 11:14:24 -08:00
Gerardo Salazar eb6e13d91f Fixes many issues and refactors some of the report creator
* Can handle null Result packets
* Created utility files
* Added various helper methods to PortfolioLooper
* Fixes build issue by removing System.Collections.Immutable
* Updates plots to show "Insufficient data" when it can't be created
* Hides empty crisis page
* Fixes wkhtmltopdf display bug
* Removes Calculations.cs
* Modifies accessibility of AddToUserDefinedUniverse in QCAlgorithm
* Add null value handling in OrderJsonConverter
* Various bug fixes
* Fixes broken ReportChartTests.py
* Adds leverage to PointInTimePortfolio
2019-12-18 16:10:56 -08:00
Gerardo Salazar 98680be625 Revert PSR report to use backtest result PSR statistic instead 2019-12-18 16:08:41 -08:00
Gerardo Salazar d3528c2ea2 Polish asset allocation and exposure charts 2019-12-18 16:08:41 -08:00
Gerardo Salazar 55d802a3b6 Implements support for FX pairs that require currency conversion
* Fixes bugs in various plots
2019-12-18 16:08:40 -08:00
Gerardo Salazar 9a2f20493a Finish implementing all graphs, fix bugs in various graphs
* Adds Asset allocation chart
* Fixes issue in monthly returns
* Fixes issue with matplotlib tick lines not being consistent
* Style plots correctly
2019-12-18 16:08:40 -08:00
Gerardo Salazar a94077f05a Implements exposure chart.
* Fixes bugs with the following plots:
  - Leverage
  - Drawdown
2019-12-18 16:08:40 -08:00
Gerardo Salazar ef3a688da5 Implements leverage chart 2019-12-18 16:08:40 -08:00
Gerardo Salazar 62714aabf6 Add license to source code files files missing it under Reports project 2019-12-18 16:08:40 -08:00
Gerardo Salazar 7cc4dec6b7 Reworks structure of project
We now will calculate all of the metrics needed to directly plot the
data in C# instead of doing calculations in Python.

This has added benefits in that the code can be easily reused to generate
plots from Result packets and makes the underlying plotting library we
use more extensible and replaceable.

* Adds Calculations.cs
* Refactors some of ReportCharts.py
* Adds Drawdown classes
* Adds Deedle and MathNet.Numerics packages
* Completes calcuations in C# side instead of Python

Side note: I think it's a little funny that we were previously
calculating the plots via Pandas, which uses a C backend. Effectively, we
were transferring data between at least 2 separate FFI
boundaries: C# -> Py -> C -> ? (whatever BLAS is written in)
2019-12-18 16:08:40 -08:00
Gerardo Salazar e156b6d5ab Implement Rolling Sharpe ratio plot 2019-12-18 16:08:40 -08:00
Gerardo Salazar 3e81cdd07b Implement Rolling Beta (6 month and 12 month) chart 2019-12-18 16:08:40 -08:00
Gerardo Salazar 82429318d8 Implements Daily Returns chart and some styling fixes 2019-12-18 16:08:40 -08:00
Gerardo Salazar fa54cd9652 Implements Drawdown chart w/ drawdown periods 2019-12-18 16:08:40 -08:00
Gerardo Salazar a8574d437a Implements Returns Per Trade chart
* Fixes typo in function name in ReportCharts.py
2019-12-18 16:08:40 -08:00
Gerardo Salazar 261f07adef Implement Annual Returns plot section 2019-12-18 16:08:40 -08:00
Gerardo Salazar d7c7082543 Fixes bug preventing successful execution of the program
* Restyles and reworks some of the cumulative percentage gain graph
2019-12-18 16:08:40 -08:00
Jared Broad f66a682f63 Debug commit 2019-12-18 16:08:40 -08:00