LogReturn
The log return of a pair's closes over window candles (the lag, default 1): ln(close / close N candles ago).
- Indicator: lib's
Returns.LogReturnover 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": 0.000412 }, a natural log, unitless.
| Property | Value |
|---|---|
| Project | Virtufin.Worker.LogReturn |
| Base class | Virtufin.Indicator.DevKit.IndicatorWorkerBase |
| Engine | application/x-dotnet-dll |
| Input | candle events, e.g. act.exchange.binance.ohlcv.candle.1m.BTCUSDT |
| Output | sc.<scenarioid>.indicator.<indicatorname>.<PAIR>.changed |
| 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. logreturn |
window |
no | See above |
Other events on the subscribed topics are skipped. One indicator is kept per pair; deploy one worker per interval and parameter set.