Forums ProRealTime English forum ProOrder support Machine Learning in ProOrder ProRealTime Reply To: Machine Learning in ProOrder ProRealTime

#127452

I was thinking about how to improve this great ML code of Juanj’s. He mentioned using better criteria to measure performance: https://www.prorealcode.com/topic/machine-learning-in-proorder/page/3/#post-121130

Risk adjusted Returns are a way to have a better metric than just pure profits. Who wants to make double their money and make £1k if the drawdown associated with that gain was 80% before it hits £2k?

I would like to revive my comment on Sortino Ratios in the hope that someone can code this into the ML code: https://www.prorealcode.com/topic/machine-learning-in-proorder/page/8/#post-125922

The Sortino Ratio
 is calculated by dividing the difference between the minimally acceptable return and the portfolio’s actual return by the standard deviation of the negative asset returns or the downside deviation. One problem with the Sharpe Ratio: (system rate of return – risk-free rate of return) / standard deviation of system returns, is that it penalises a system for a big up month or “good volatility.” The Sortino Ratio attempts to overcome this issue by dividing the same risk-adjusted rate of return used in the Sharpe Ratio by only the negative deviation or “bad volatility” (the downside semi-variance).

At the moment we have:

PRT define POSITIONPERF(n) returns as: The performance (ratio gain/cost of the position) of the n-th last position closed if n>0 (not including brokerage fees) The performance (ratio gains/cost of the position) of the currently open position if n=0 (not including brokerage fees)
If n is not specified, we suppose that n=0. PositionPerf=PositionPerf(0).

Vonasi posted this money management code a while back:

We need something like a PositionPerf divided by some historic (eg 20 day or longer) measure of the realised MaxDrawDownPercentage perhaps? Could anyone have a go at looking into Risk/Reward coding or think of a better metric that measures our risk better?
Cheers.