示例#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)
示例#2
0
 def u(self, _t, _x):
     nd = dist.NormalDistribution(_x, _t)
     return nd.excess_probability(self._strike)
示例#3
0
 def u(self, _t, _x):
     nd = dist.NormalDistribution(_x, _t)
     return nd.expected_positive_exposure()
示例#4
0
 def u(self, _t, _x):
     nd = dist.NormalDistribution(_x, _t)
     return nd.second_moment()
示例#5
0
 def u(self, _t, _x):
     nd = dist.NormalDistribution(_x, _t)
     return nd.pdf(self._start)