diff --git a/pfhedge/stochastic/heston.py b/pfhedge/stochastic/heston.py index 639a716b..fcb00056 100644 --- a/pfhedge/stochastic/heston.py +++ b/pfhedge/stochastic/heston.py @@ -92,10 +92,10 @@ def generate_heston( dtype=dtype, device=device, ) - log_spot = torch.empty(n_paths, n_steps) - log_spot[:, 0] = torch.tensor(init_spot).log() - randn = torch.randn(n_paths, n_steps) + log_spot = torch.empty_like(variance) + log_spot[:, 0] = torch.tensor(init_spot).log() + randn = torch.randn_like(variance) for i_step in range(n_steps - 1): # Compute log S(t + 1): Eq(33) diff --git a/pyproject.toml b/pyproject.toml index 87607bb6..4dc79937 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pfhedge" -version = "0.7.0" +version = "0.7.1" description = "Deep Hedging in PyTorch" authors = ["Shota Imaki "] license = "MIT"