def test_merton_jump_log_st_mgf_1(self):
     v, S, t, r, q, sigma, jp_lamda, norm_mean, norm_sd = 4, 20.2, 1.5, 0.02, 0.01, 0.2, 0, 0, 0
     res = merton_jump_log_st_mgf(v, t, r, q, S, sigma, jp_lamda, norm_mean,
                                  norm_sd)
     exp_res = merton_jump_log_st_chf(-1j * v, t, r, q, S, sigma, jp_lamda,
                                      norm_mean, norm_sd)
     self.assertAlmostEqual(res, exp_res)
Example #2
0
 def test_merton_jump_log_st_chf_1(self):
     v, S, t, r, q, sigma, jp_lamda, norm_mean, norm_sd = 4, 20.2, 1.5, 0.02, 0.01, 0.2, 0, 0, 0
     res = merton_jump_log_st_chf(v, t, r, q, S, sigma, jp_lamda, norm_mean, norm_sd)
     exp_res = 0.5094287369306635 - 0.3512481287698781j
     self.assertAlmostEqual(res, exp_res)