Skip to content

Commit

Permalink
Fix #140 (#141) (#142)
Browse files Browse the repository at this point in the history
* Fix #140 (#141)
  • Loading branch information
simaki committed Jul 9, 2021
1 parent 8471dd2 commit 9d6f4eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pfhedge/stochastic/heston.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pfhedge"
version = "0.7.0"
version = "0.7.1"
description = "Deep Hedging in PyTorch"
authors = ["Shota Imaki <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 9d6f4eb

Please sign in to comment.