Profile Picture

Controlling the instruments included in SystemData.BuyAndHoldStatistics

Posted By ErkSubasi 6 Years Ago
Posted Thursday October 24 2013
I think BarStatistic calculations for Buy&Hold portfolio (in the form of an equally weighted full universe) is a nice attempt to have some default benchmark but often times I found it completely useless. Since most of the time one has completely different benchmarks either in the form of a single index or a weighted combination of some instruments. Having the ability to define your desired benchmark in a natural way in RE would have been really nice and very usefull for any serious user I believe.

The natural candidate is having some control in the Buy&Hold portfolio, I gave a look to that class if I can modify it to the extent where I will have some control in included instruments or alternatively setting daily returns but so far failed to find anything useful. I don't know where/when the code which calculates the daily bar statistics runs therefore trying to manipulate this class at that moment seems like a no go. First of all, maybe you can give me a hand here for my immediate needs.

Secondly, the most rigorous solution would have been to include full control on the benchmark portfolio as if it is another trading system but that would probably be an overkill in terms of calculation cost introduced.
An easy and user friendly solution instead would have been to have a simple weight factor in every SymbolScript (which ideally can also be modified in every bar). This weight factor can be set to 1/n by default to accomplish current existing Buy&Hold statistics. But if the user wants some other bechmark it can freely change it to get the desired output and bar statistics are being calculated behind the curtains as usual but only taking into account also this weight factor.
i.e. If I want S&P Index to be my benchmark, I simply set the BenchmarkWeight of that SymbolScript instance to 1 and all the others to 0 and voila profit.

What dou you think?
Posted Wednesday October 30 2013
I've added this for the next build. You will be able to set the allocation weight for the buy and hold statistics can be set separately for each symbol., via the SystemData.BuyAndHoldWeights or SystemData.SetBuyAndHoldSymbolWeight() APIs.

Posted Thursday October 31 2013
That's great Daniel! I am looking forward for it.

Similar Topics

Reading This Topic

2005-2019 © RightEdge Systems