Risk-Reward Ratio

Hi everyone! I am trying to understand how the Risk-Reward Ratio is calculated in the backtest result. According to here, it is the "Measure of the relation between the risk inherent in a trading the system compared to its potential gain. Higher is better. Calculated as slope of equity line (expected annual return) divided by its standard error."

Below is an example backtest result:

backtest

The standard error is 65208.96. What is the expected annual return? Is it CAR? If [risk reward ratio = expected annual return / standard error] then expected annual return is 65208.96 x 1.62 = 105638.52
So it is not CAR as CAR is 1.83%. How is this expected annual return calculated?

1 Like

Risk Reward Ratio is calculated as follows:

( 365.0 * iTotalBars / iTotalDays ) * (Linear Regression Slope of Equity Line) / (Standard Error of Equity Line);

2 Likes

@Tomasz Thank you so much for the full formula. If the backtest is run on DAILY data and it covered 200 days, then 365.0 * iTotalBars / iTotalDays => 365.0 * 200 / 200 = 365

For daily data the result is multiplied by 365 meaning the formula is as following?
365 * (Linear Regression Slope of Equity Line) / (Standard Error of Equity Line);

Try this Sharpe Ratio calculation method.

SR=Annualized return / annualized standard deviation of daily return.

252 trading days

SetCustomBacktestProc("");        
    
if( Status("action") == actionPortfolio )    
{    
    bo = GetBacktesterObject();    
    
    bo.Backtest(); // run default backtest procedure    
    
    st = bo.GetPerformanceStats(0); // get stats for all trades    
	    
	eq = bo.EquityArray;    
	    
	NewSharpeRatio = (st.GetValue("CAR")/(sqrt(252)*StDev(((eq-Ref(eq,-1))/Ref(eq,-1))*100, BarCount -2  )));
	    
	// Here we add custom metric to backtest report    
    bo.AddCustomMetric( "NewSharpeRatio", LastValue(NewSharpeRatio) );    
}

No, because daily data are not 365 bars per year. Usually there is about 260 trading days (bars) in a year.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.