Hi!
Didnt find Hurst ratios and Dennis Yang and Qiang Zhang volatility.
Do You have it as plans?
I tried to develop code of Hurst ratio. But seems it really increases calculation time of my strategies by 40-60%%. Im talking about computing this serie ones by call in execute method.
1. Could you watch and may be there will be some ideas to improve speed.
2. I tried to calculate 2 ratios in one pass - basic Hurst and Hm (at the end in commas).
Certainly i could create 2 different metods but i think it will take more time in summary.
Could you help me with creating 2 DataSeries by one pass? Just asking this question because still dont feel very friendly with code but i hope it is possible to merge these dataseries in one metod or class.
//
CODE:
Please log in to see this code.
Size:
Color:
QUOTE:
1. Could you watch and may be there will be some ideas to improve speed.
Try replacing:
CODE:
Please log in to see this code.
With this block:
CODE:
Please log in to see this code.
Since it's not cached, the
.Value method incurs a considerable processing overhead when calculating indicator values for every bar. This is why using the .Series method insures that Wealth-Lab will return a DataSeries from cache.
P.S. Also, you might want to implement caching in your DataSeries like suggested in this API document:
Create an Indicator Library | Download PDF
Size:
Color:
CODE:
Please log in to see this code.
and
CODE:
Please log in to see this code.
give same result?.
I mean cached serie.
Size:
Color:
Of course, they do give the same result.
Size:
Color:
Thanks.
I ve tried to replace all Value. calculations by Series. ()[bar].
But i ve got another problem: 12 strategies load full memory and wealth-lab is working slowly.
So i decided to replace by Series. ()[bar] only mathmetical calculations. And others like Highest, Lowest to leave with Value.(bar,...) calls.
In this case i have 3% of free memory and 8 cores fully loaded! That what i was looking for a long time.
Result seems little bit improved - i mean speed of strategy loading and computing.
But i think there are some ways to improve speed of math functions.
The main load of cores i see with using StdDev, Log functions.
Is it possible to improve their speed by using other libraries?
Or for example is there difference in speed between StdDev call with calculation type sample or population?
If there is 20-30% difference i will replace with more quick call.
Size:
Color:
There's nothing to optimize in Log.Series - it's a wrapper for built-in Math.Log function. Likewise, there is virtually no difference between the two StdDev calculation types. There's really pretty simple math behind it.
Size:
Color:
Thanks.
Now i know i did all i could with your help.
Size:
Color: