AbsoluteReturn
The absolute return of a pair's closes over lagcandles candles (the lag, default 1): close − close N candles ago, i.e. the price difference in the pair's quote currency.
- Indicator: lib's
Returns.AbsoluteReturnover the closes (asdouble), wrapped inWarmUp. - Warm-up: until N + 1 candles are seen there is no return. The changed event carries
{ "value": null }, and the same is saved, instead of an error. - Value:
{ "value": 1.25 }— a price difference in quote currency (USDT for a_USDTpair);1.25means the close rose by 1.25. - Not the relative return:
RelativeReturnpublishes(close − close N candles ago) / close N candles ago(a unitless fraction);LogReturnpublishesln(close / close N candles ago).
| Property | Value |
|---|---|
| Project | Virtufin.Worker.AbsoluteReturn |
| Base class | Virtufin.Indicator.DevKit.IndicatorWorkerBase |
| Engine | application/x-dotnet-dll |
| Input | candle events, e.g. act.exchange.binance.candle.closed.BTC_USDT.1m |
| Output | sc.<scenarioid>.indicator.<indicatorname>.changed.<PAIR> |
| State | sc.<scenarioid>.indicator.<indicatorname>.<PAIR> |
Config (CreateWorker config)
| Key | Required | Meaning |
|---|---|---|
scenarioid |
yes | The scenario the indicator belongs to (topic and state key) |
indicatorname |
yes | Topic and state-key segment, e.g. absolutereturn |
lagcandles |
no | Lag in candles: how many candles back to compare against. Default: 1. |
Other events on the subscribed topics are skipped. One indicator is kept per pair; deploy one worker per interval and parameter set.