tarf_monte_carlo 3.18 → 3.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/tarf_monte_carlo/tarf_monte_carlo.c +3 -1
- data/lib/tarf_monte_carlo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e31ee8faa0b4ae02a93252953f455286d901887af6983874cb32c388842d9038
|
4
|
+
data.tar.gz: 7ea19ee7948374d024720267a5cb4aa0d532d1acfb0ed7e56fa4401b006af2d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60943ac5835b69779f2c3fc89536113b3c99a85413e4e51c6bbbc60d2d3c8266cf1d2a27798c89ae6f8e759ad8eace8825233945173f6c3c57ba06a53fdcbca8
|
7
|
+
data.tar.gz: c9ff7608e59e0d94b2c2d4d585e5b2a0e28d9064d4e28c547634d2e72da3d7196b912cf89820c594f7fffcf6c3b2f0e910788f1bd41fda1228092ae1c70f332f
|
@@ -81,7 +81,7 @@ VALUE method_box_muller( VALUE self ) {
|
|
81
81
|
VALUE method_run_monte_carlo( VALUE self, VALUE args ) {
|
82
82
|
VALUE MCInputs = rb_ary_shift(args);
|
83
83
|
// rb_p(rb_str_new2("MC Inputs:"));
|
84
|
-
|
84
|
+
rb_p(MCInputs);
|
85
85
|
|
86
86
|
// seed value for rand() function
|
87
87
|
srand( time(0) );
|
@@ -217,6 +217,7 @@ VALUE method_run_monte_carlo( VALUE self, VALUE args ) {
|
|
217
217
|
Ns_array[leg] = *(Ns_array + leg) / *( USts_array + leg );
|
218
218
|
}
|
219
219
|
}
|
220
|
+
|
220
221
|
// dash
|
221
222
|
if ( Spot_dash < *( LSts_array + leg ) ) {
|
222
223
|
profit_loss_dash = Spot_dash - (*( LSts_array + leg ));
|
@@ -364,6 +365,7 @@ VALUE method_run_monte_carlo( VALUE self, VALUE args ) {
|
|
364
365
|
} else if( KType == POINTS || KType == PIVOT_POINTS || KType == COLLAR_POINTS || KType == DOUBLE_STRIKE_POINTS ) {
|
365
366
|
for( leg = 0; leg < NL; ++leg ) {
|
366
367
|
// simulation normal
|
368
|
+
rb_p(DBL2NUM(*(Ns_array + leg )));
|
367
369
|
if ( ko_so_far > 0.0 ) {
|
368
370
|
if( sim[leg] >= 0.0 ) {
|
369
371
|
// knock out condition
|