Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, 7th_zorro, dr_panther), 1,297 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Sharp and Kelly calculations #477181
05/28/19 12:01
05/28/19 12:01
Joined: Jul 2017
Posts: 785
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 785
JCL,

The manual refers to "per-bar" profit mean and std for both calculations.

AFAIK, the common approach is to use "per-trade" results for Kelly, and "time-period"-based results for Sharp.

Please shed some light on Zorro's "per-bar" formula and its benefits.

Thank you!

Re: Sharp and Kelly calculations [Re: Zheka] #477182
05/28/19 12:20
05/28/19 12:20
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Mean profit per bar = Profit / number of bars. The benefit of a mean is that it's very beneficial for mean calculations.

Re: Sharp and Kelly calculations [Re: jcl] #477183
05/28/19 14:30
05/28/19 14:30
Joined: Jul 2017
Posts: 785
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 785
Meanness aside, I understand that weighting results by the inverse of trade duration is probably beneficial if such Sharp calculation is used as the training objective.
However, it can also produce negative numbers on a good, profit-positive system which "stops losses short and lets profits run".

What was your thinking when you preferred "per-bar" vs "per-trade" calculation?

Does Zorro use "per-bar" results also in its OptimalF calcs?
If yes, did this prove to produce better results than with "per-trade" results?

Why not also report "conventional" measures (for the unsuspecting users)?

Re: Sharp and Kelly calculations [Re: Zheka] #477184
05/28/19 16:01
05/28/19 16:01
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
I'm not sure what a Sharp is, but suppose you mean the Sharpe ratio. It is no training objective and not "per-trade". You can look up the Sharpe formula in Wikipedia and the OptimalF formula in Ralph Vince's paper. It's there better explained than I could do it. Both are absolutely "conventional" and used in many trading platforms. Read their descriptions and if then still something is unclear, just ask.

Re: Sharp and Kelly calculations [Re: jcl] #477185
05/28/19 18:21
05/28/19 18:21
Joined: Jul 2017
Posts: 785
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 785
I did not know about Wikipedia, thanks for the advice.

There are different ways to calculate "returns" in the formula. Industry norm is to take monthly returns,but some take daily returns, and some argue that for an active on/off strategy (rather than a "near 100% in the market" portfolio of stocks- which was the original basis for Sharp's work)- it makes more sense to calculate it off trade results.

Does Zorro use a "bar" as a unit of time and "bar returns" in SR calculations? Does it take all bars or only those with non-zero returns/i.e.during trades?

Does Zorro calculate OptimalF off trade results as per Vince?

Re: Sharp and Kelly calculations [Re: Zheka] #477189
05/29/19 07:40
05/29/19 07:40
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Zorro uses just the published algorithms. I know no other ways to calculate Sharpe ratio and OptimalF, so I can't comment on that.

I don't think that a "industry norm to take monthly returns" exists. For the Sharpe ratio you simply use the returns that you have. Trading systems use the bar returns when the system is in the market. Other bars do not contribute. OptimalF is trade result based.

Re: Sharp and Kelly calculations [Re: jcl] #477197
05/29/19 20:20
05/29/19 20:20
Joined: Jul 2017
Posts: 785
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 785

Clear. Thank you.

Re: Sharp and Kelly calculations [Re: Zheka] #477210
05/31/19 15:24
05/31/19 15:24
Joined: Oct 2012
Posts: 13
CO
G
gfx Offline
Newbie
gfx  Offline
Newbie
G

Joined: Oct 2012
Posts: 13
CO
All Sharpe calculations I have seen calculate it over time, not based on trades. They have all considered ALL bars, not just in-the-market bars. You could certainly do per-trade or in-the-market only, but that would give you a somewhat skewed indication. E.g. a system that traded once every 5 years with a 100% win rate would have a very high (infinite?) Sharpe with per-trade/ITM calculations, but significantly lower with all-bar calculations. The per-trade/ITM model would have zero Stdev, while the all-bar calc would have higher Stdev and lower per-period returns.

Basic Sharpe uses annual returns, but you can use any timeframe. You simply scale the value so the result is comparable to the standard annual Sharpe: multiply the Return / Stdev calculation times sqrt(barsperyear). So for monthly returns, multiply times sqrt(12); for daily returns, multiply times sqrt(252).


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1