Jim Dean![]() Elite ![]() ![]() ![]() Posts: 1059 Joined: 10/11/2012 Location: L'ville, GA ![]() | Pete's suggestion is simple, and a good idea ... rather than a moving SMA type window, I'd suggest the averaging of losses and wins should be done using EMA iteration for efficiency and to assure adequate statistical basis. Doing this would mean that the "AvgR" would be a function of the time window used, even for overlapping windows ... but all the other metrics are similarly affected. The equation is very simple: Expectancy = EMA(all prof/loss of all trades) / EMA(all losses) ... of course the EMA's iterate only with each new data item, not with each new bar ========== This would be BETTER, if the risk-denominator was not comprised solely of the average of the Losses (when/if/as they occur ... could be zero or statistically insignificant). The BETTER method would be to track Max Adverse Excursion within any trade, vs Entry price (which quite often will NOT be zero). This is a bar-by-bar calc done during the Strat analysis batch run, which I hope would be reasonable to implement. =============== BEST method: the true "at Risk" value is not solely defined by what happens at Entry, or versus Entry (depending on what stops if any the Strat uses) ... rather, it's the Max Profitable Excursion (ie best price hit during the trade), minus the Max Adverse Excursion that occurs away from that price, SUBSEQUENT to that price. A little messier to calc but a lot better representation of how well the trade is "managed" and how the vagaries of different symbols' volatilities impact how "comfortable" they are to trade. I've always felt that this is the best possible evaluation of the true Risk during the trade, IF no stops are set. Of course, if stops are set, the closest active stop, vs the farthest the price gets from it on any given bar, is the proper distinction to use. I hope that I've not caused anyone's eyes to glaze over. THIS IS A SIMPLE CALCULATION ... I'll provide code for it (just a few lines) if needed. The "barrier" to doing it would really only be whether that bar-by-bar analysis can be shoehorned in to the existing Strategy processing. It would not eat a bunch of CPU time, if bar by bar is currently being done. I'm unclear, these days, if the Strat calc process even HAS a bar-by-bar Mark-to-Market granularity or not, but it certainly will have to if OVest is ever going to allow spec of Fixed Loss stops or other kinds of stops. And, please, even though this does not come with some big well known name or abbreviation or article or book attached to it, I hope that it will be given at least 15 min of careful consideration. [Edited by Jim Dean on 4/12/2014 5:39 PM] |