Example #1
0
 def u(self, _t, _x):
     mean = (self.a - 0.5 * self.b * self.b) * _t
     variance = self.b * self.b * _t
     nd = dist.NormalDistribution(mean, variance)
     strk = np.log(self.strike / _x)
     return 1 - nd.cdf(strk)
Example #2
0
 def u(self, _t, _x):
     nd = dist.NormalDistribution(_x, _t)
     return nd.excess_probability(self._strike)
Example #3
0
 def u(self, _t, _x):
     nd = dist.NormalDistribution(_x, _t)
     return nd.expected_positive_exposure()
Example #4
0
 def u(self, _t, _x):
     nd = dist.NormalDistribution(_x, _t)
     return nd.second_moment()
Example #5
0
 def u(self, _t, _x):
     nd = dist.NormalDistribution(_x, _t)
     return nd.pdf(self._start)