Lean
$LEAN_TAG$
|
Class for render the Sharpe Ratio statistic for a report More...
Public Member Functions | |
SharpeRatioReportElement (string name, string key, BacktestResult backtest, LiveResult live, int tradingDaysPerYear) | |
Estimate the sharpe ratio of the strategy. More... | |
override string | Render () |
The generated output string to be injected More... | |
virtual double | GetAnnualStandardDeviation (List< double > trailingPerformance, double tradingDaysPerYear) |
Get annual standard deviation More... | |
Public Attributes | |
virtual ? decimal | BacktestResultValue => BacktestResult?.TotalPerformance?.PortfolioStatistics?.SharpeRatio |
Sharpe Ratio from a backtest More... | |
Public Attributes inherited from QuantConnect.Report.ReportElements.ReportElement | |
string | JsonKey => Key.Replace("KPI-", "").Replace("$", "").Replace("{", "").Replace("}", "") .ToLowerInvariant() |
Normalizes the key into a JSON-friendly key More... | |
Properties | |
LiveResult | LiveResult [get] |
Live result object More... | |
BacktestResult | BacktestResult [get] |
Backtest result object More... | |
Properties inherited from QuantConnect.Report.ReportElements.ReportElement | |
virtual string | Name [get, protected set] |
Name of this report element More... | |
virtual string | Key [get, protected set] |
Template key code. More... | |
virtual object | Result [get, protected set] |
Result of the render as an object for serialization to JSON More... | |
Class for render the Sharpe Ratio statistic for a report
Definition at line 28 of file SharpeRatioReportElement.cs.
QuantConnect.Report.ReportElements.SharpeRatioReportElement.SharpeRatioReportElement | ( | string | name, |
string | key, | ||
BacktestResult | backtest, | ||
LiveResult | live, | ||
int | tradingDaysPerYear | ||
) |
Estimate the sharpe ratio of the strategy.
name | Name of the widget |
key | Location of injection |
backtest | Backtest result object |
live | Live result object |
tradingDaysPerYear | The number of trading days per year to get better result of statistics |
Definition at line 58 of file SharpeRatioReportElement.cs.
|
virtual |
The generated output string to be injected
Implements QuantConnect.Report.ReportElements.ReportElement.
Definition at line 70 of file SharpeRatioReportElement.cs.
|
virtual |
Get annual standard deviation
trailingPerformance | The performance for the last period |
tradingDaysPerYear | The number of trading days per year to get better result of statistics |
Definition at line 108 of file SharpeRatioReportElement.cs.
virtual ? decimal QuantConnect.Report.ReportElements.SharpeRatioReportElement.BacktestResultValue => BacktestResult?.TotalPerformance?.PortfolioStatistics?.SharpeRatio |
Sharpe Ratio from a backtest
Definition at line 48 of file SharpeRatioReportElement.cs.
|
getprotected |
Live result object
Definition at line 38 of file SharpeRatioReportElement.cs.
|
getprotected |
Backtest result object
Definition at line 43 of file SharpeRatioReportElement.cs.