Lean  $LEAN_TAG$
QuantConnect.Report.ReportElements.SharpeRatioReportElement Class Reference

Class for render the Sharpe Ratio statistic for a report More...

Inheritance diagram for QuantConnect.Report.ReportElements.SharpeRatioReportElement:
[legend]

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...
 

Detailed Description

Class for render the Sharpe Ratio statistic for a report

Definition at line 28 of file SharpeRatioReportElement.cs.

Constructor & Destructor Documentation

◆ SharpeRatioReportElement()

QuantConnect.Report.ReportElements.SharpeRatioReportElement.SharpeRatioReportElement ( string  name,
string  key,
BacktestResult  backtest,
LiveResult  live,
int  tradingDaysPerYear 
)

Estimate the sharpe ratio of the strategy.

Parameters
nameName of the widget
keyLocation of injection
backtestBacktest result object
liveLive result object
tradingDaysPerYearThe number of trading days per year to get better result of statistics

Definition at line 58 of file SharpeRatioReportElement.cs.

Member Function Documentation

◆ Render()

override string QuantConnect.Report.ReportElements.SharpeRatioReportElement.Render ( )
virtual

The generated output string to be injected

Implements QuantConnect.Report.ReportElements.ReportElement.

Definition at line 70 of file SharpeRatioReportElement.cs.

Here is the call graph for this function:

◆ GetAnnualStandardDeviation()

virtual double QuantConnect.Report.ReportElements.SharpeRatioReportElement.GetAnnualStandardDeviation ( List< double >  trailingPerformance,
double  tradingDaysPerYear 
)
virtual

Get annual standard deviation

Parameters
trailingPerformanceThe performance for the last period
tradingDaysPerYearThe number of trading days per year to get better result of statistics
Returns
Annual standard deviation.

Definition at line 108 of file SharpeRatioReportElement.cs.

Here is the caller graph for this function:

Member Data Documentation

◆ BacktestResultValue

virtual ? decimal QuantConnect.Report.ReportElements.SharpeRatioReportElement.BacktestResultValue => BacktestResult?.TotalPerformance?.PortfolioStatistics?.SharpeRatio

Sharpe Ratio from a backtest

Definition at line 48 of file SharpeRatioReportElement.cs.

Property Documentation

◆ LiveResult

LiveResult QuantConnect.Report.ReportElements.SharpeRatioReportElement.LiveResult
getprotected

Live result object

Definition at line 38 of file SharpeRatioReportElement.cs.

◆ BacktestResult

BacktestResult QuantConnect.Report.ReportElements.SharpeRatioReportElement.BacktestResult
getprotected

Backtest result object

Definition at line 43 of file SharpeRatioReportElement.cs.


The documentation for this class was generated from the following file: