Hi!

I'm from Poland so sorry for my English. I want to code some metrics like: RAR%, R-cubed and R-Sharpe. But I don't really know how to do it. I was readin some guides but I still don't understand it. Is there anyone who can help me with coding these metrics? Or maybe someone have code something like this yet? If someone don't know what these metrics are, I'm explaining:

1. RAR% - also known as regressed annual return. It is something like CAR but it is more resistant to changing the range of optimization or backtesting.

2. R-cubed - also known as RRRR or Robust Risk/Reward Ratio - it is RAR% / average max. drawdown * factor which includes lenght of drawdowns; average max drawdown is sum of 5 five biggest drawdowns divided on 5; factor which includes lenght is (sum of lenghts of 5 biggest drawdowns / 5)/365

3. R-Sharpe - it is RAR% divided on standard deviation of the monthly rate of return expressed per year

Thanks in advance for any help