RiskFreeReturn

View as Markdown

Definition

The risk free return used in calculations of Sharpe and Sortino ratios.

Property Value

A double value that represents the risk free return.

Syntax

\<tradecollection\>.TradesPerformance.RiskFreeReturn

Examples

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