@@ -65,7 +65,7 @@ pub(crate) fn diff(f: &(dyn Fn(f64) -> f64 + Send + Sync), t: f64) -> f64 {
6565#[ cfg( test) ]
6666mod tests_black_derman_toy {
6767 use super :: * ;
68- use crate :: StochasticProcessConfig ;
68+ use crate :: { StochasticProcessConfig , StochasticScheme } ;
6969 use RustQuant_math :: * ;
7070
7171 // fn theta_t(_t: f64) -> f64 {
@@ -82,8 +82,10 @@ mod tests_black_derman_toy {
8282
8383 let hw = BlackDermanToy :: new ( sigma, theta) ;
8484
85- let config = StochasticProcessConfig :: new ( 0.13 , 0.0 , 1.0 , 100 , 1000 , false ) ;
86- let output = hw. euler_maruyama ( & config) ;
85+ let config = StochasticProcessConfig :: new (
86+ 0.13 , 0.0 , 1.0 , 100 , StochasticScheme :: EulerMaruyama , 1000 , false , None
87+ ) ;
88+ let output = hw. generate ( & config) ;
8789
8890 // Test the distribution of the final values.
8991 let X_T : Vec < f64 > = output
@@ -103,8 +105,10 @@ mod tests_black_derman_toy {
103105 let theta = 1.5 ;
104106
105107 let hw = BlackDermanToy :: new ( sigma, theta) ;
106- let config = StochasticProcessConfig :: new ( 0.13 , 0.0 , 1.0 , 100 , 1000 , false ) ;
107- let output = hw. euler_maruyama ( & config) ;
108+ let config = StochasticProcessConfig :: new (
109+ 0.13 , 0.0 , 1.0 , 100 , crate :: StochasticScheme :: EulerMaruyama , 1000 , false , None
110+ ) ;
111+ let output = hw. generate ( & config) ;
108112
109113 // Test the distribution of the final values.
110114 let X_T : Vec < f64 > = output
0 commit comments