I have created a graph in timelion that generates daily returns using data from an index that keeps the daily balance of an account. The code is the following:
.es(index=daily_account,q="account:1794",metric=sum:daily_pnl,timefield=date_closed).derivative().precision(8).divide(.es(index=daily_account,q="account:1794",metric=sum:equity,timefield=date_closed).precision(8).subtract(.es(index=daily_account,q="account:1794",metric=sum:daily_pnl,timefield=date_closed).derivative())).plus(.static(1)).precision(8).log(2.71828)
The code works fine and returns a line with returns on a daily basis. When I try to get a cumulative sum though of the above by adding .cusum(), nothing is returned. I was wondering if there is an issue with using log and cusum together but I could not find anything. Any ideas will be greatly appreciated.
Kibana version: 6.8.10