Rs
Module 13Pricing EngineLesson 4 of 735 min

Capstone: Mini Pricing Engine

Price a multi-leg options book with BS.

Capstone goals

  1. OptionSpec with type, S,K,r,σ,T,qty
  1. bs_price
  1. Aggregate book PV

qty sign = long/short

Challenge

Add net delta for the book using analytic deltas.

Tips
  • qty encodes long/short
  • Traits swap models
  • Wire market data next

Try it live

Capstone: Mini Pricing EngineRust 2021
Loading editor…
Output
Press Run to compile and execute.