the position sizing rule says we rank combined score and buy the top 5 currencies.
but on several of the days there are ties among the combined scores, which very frequently results in only 4 positions being recommended and sometimes results in 6 positions.
i don't see this mentioned anywhere in the code description and would like to know:
a) if this is expected behavoir of this algo?
b) in these cases is the model entering 4 or 6 positions, even though it is specified to enter 5?
c) if so what about the impact on capital allocation, which assumes an equal split across 5 currencies? the formula in the code is not longer correct if we hold 4 or 6 currencies.
thanks in advance for your answers.
best, russell
But on several of the days there are ties among the combined scores, which very frequently results in only 4 positions being recommended and sometimes results in 6 positions. I don't see this mentioned anywhere in the code description and would like to know:
a) if this is expected behavoir of this algo?
This is expected behaviour. As you rightly pointed out, this will happen when the combined score is same for both the cryptocurrencies. As per score, the algo is not able to uniquely identify top 5 cryptocurrencies and therefore taking a position in either 3, 4 or 6 top cryptocurrencies. If you want to change this behaviour and only trade in the top 5 then you need to define a clash resolution criteria which will be used when the final ranks are the same.
b) in these cases is the model entering 4 or 6 positions, even though it is specified to enter 5?
Yes. That's correct. The number of positions will vary. We will update the code.
c) if so what about the impact on capital allocation, which assumes an equal split across 5 currencies? the formula in the code is not longer correct if we hold 4 or 6 currencies.
Yes. The formula to calculate the daily returns needs to be updated to the below. In this, rather than dividing the daily returns by 5, the returns needs to be divided by the number of positions. This will ensure equal allocation of the capital.
daily_ret = strategy_returns.sum(axis=1) / signal.sum(axis=1)
Thanks for pointing this out. We will update the strategy code and description.