CalculateOptionWriterLossesForEachStrike ->
Arg Writer_losses : &List : Float <- Float
    Records : Array : OptionRecord
+

 CalculateLoss ->
 - Writer_loss = 0 ..
 +

  WL >>
   Loss_on_Call, Loss_on_Put : Float
  ;

 +

  WL ->
  Arg WL : &_

  WL.Loss_on_Call = Record.Call.Open_interest * Distance [ CallOptionIsInMoney Record.Strike Selected_price ] | 0,
  WL.Loss_on_Put = Record.Put.Open_interest * Distance [ PutOptionIsInMoney Record.Strike Selected_price ] | 0
  ' Distance = Abs (Selected_price - Record.Strike)

  /

 +

 Do Writer_loss += (Writer_loss_on_Call + Writer_loss_on_Put)
    ' Writer_loss_on_Call, Writer_loss_on_Put - WL >Writer_loss_on_Call Writer_loss_on_Put<
 With Record from Records

 /

+

Do Writer_losses->Selected_price = CalculateLoss
   ' Selected_price = Selected.Strike
With Selected from Records

/

CallOptionIsInMoney Calculate% = OptionIsInMoney 'Call' ?(Option_strike, Price : Float)

PutOptionIsInMoney Calculate% = OptionIsInMoney 'Put' ?(Option_strike, Price : Float)
