Skip to content

Commit

Permalink
fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthqs committed Dec 29, 2023
1 parent f837623 commit 88bf784
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/equity/finite_difference.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ fn fd(s0:f64,k:f64,risk_free_rate:f64,dividend_yield:f64,sigma:f64,time_to_mat:f
price_grid[[(M-i) as usize,j as usize]] = (i as f64)*ds as f64;
}
}
let mm = M as usize - ii as usize;
println!("price_ {:?}",price_grid[[mm as usize as usize,0]]);


let mut v_grid:Array2<f64> = Array2::zeros((M as usize +1,time_steps as usize+1));
// Boundary condition
// for j in 0..time_steps+1 {
Expand Down

0 comments on commit 88bf784

Please sign in to comment.