Signal (fynance.signal)ΒΆ

The bridge from predictions to positions: mappers and a model+mapper pipeline.

sign(pred)

Long/short by the sign of the prediction (+1 / -1 / 0).

threshold(pred[, long, short])

Position with a flat dead-band.

rank(pred, top, bottom)

Cross-sectional long/short by rank.

vol_target_position(signal, prices[, ...])

Scale a directional signal by causal volatility-targeting leverage.

SignalPipeline(model, mapper[, mapper_kwargs])

A SignalModel plus a position mapper.