Skip to content

Virtufin Strategy DevKit

The strategy development kit: three NuGet packages that turn an IDecide coalgebra (Virtufin.Core 0.4.0+) into a WorkManager worker.

flowchart LR
    MKT[("Market stream")]
    PORT[("Portfolio state")]
    DEC["IDecide<S, M, P, A>"]
    BRIDGE["StrategyWorkerBase"]
    EXE["IExecutor"]
    MKT --> BRIDGE
    PORT --> BRIDGE
    BRIDGE --> DEC
    DEC -->|"TradeAction[]"| EXE

Packages

Package What it provides
Virtufin.Strategy.DevKit StrategyWorkerBase (the bridge), ConfigResolution, PortfolioState + PortfolioAlgebra
Virtufin.Strategy.DevKit.Events CloudEvent mappers, TradeAction enrichment, AmountJson
Virtufin.Strategy.DevKit.Indicators SimpleMovingAverage (pure decimal)

Where to start

  • Overview — the strategy model.
  • Strategy Author Guide — implement IDecide, subclass StrategyWorkerBase, wire config.
  • Bridge — the CloudEvent bridge architecture.
  • Helpers — mappers, portfolio fold, SMA, config.

Deployable strategy workers (e.g. the moving-average strategy) live in the virtufin-strategies repo, which consumes these packages via NuGet.