SharpeRatio

View as Markdown

Definition

Returns the Sharpe ratio using a risk free return.

Property Value

A double value that represents the Sharpe ratio using a risk free return.

Syntax

\<tradecollection\>.TradesPerformance.SharpeRatio

Examples

1protected override void OnBarUpdate()
2{
3 // Set a 0% risk free return
4 SystemPerformance.AllTrades.TradesPerformance.RiskFreeReturn = 0;
5
6 // Print out the Sharpe ratio of all trades based on a zero risk free return
7 Print("Sharpe ratio is: " + SystemPerformance.AllTrades.TradesPerformance.SharpeRatio);
8}