示例#1
0
 public static void ComputeBookRisk(BookPosition pos, InstrumentPosition instruPos)
 {
     pos.Delta       += instruPos.Delta;
     pos.StickyDelta += instruPos.StickyDelta;
     pos.Gamma       += instruPos.Gamma;
     pos.Vega        += instruPos.Vega;
     pos.Theta       += instruPos.Theta;
 }
示例#2
0
 public static void ComputeBookPosition(BookPosition pos, InstrumentPosition instruPos)
 {
     pos.RealisedPnl       += instruPos.RealisedPnl;
     pos.YtdRealisedPnl    += instruPos.YtdRealisedPnl;
     pos.UnrealisedPnl     += instruPos.UnrealisedPnl;
     pos.FairUnrealisedPnl += instruPos.FairUnrealisedPnl;
     if (instruPos.InstruType == "OPTION")
     {
         pos.Cash += instruPos.RealisedPnl - instruPos.Value * instruPos.AvgPrice;
     }
     if (instruPos.InstruType == "FUTURE")
     {
         pos.Cash += instruPos.RealisedPnl;
     }
 }