tarf_monte_carlo 3.17 → 3.22
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: e0c41c44926141bcfb2844cf5aeecd360c2562f6680f9d4efaeaf7a0f5081fa4
|
4
|
+
data.tar.gz: ac6e38b63727f83e65758da64ab4666261a94522bf5c2c4e1f6768c2e4e23597
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 369f864b9d16f6888a04e547e40baea1ff012cab62dfb49167e5e91545238bee800b8159eb3e91b84bbf85cf01e89faf6c6e1f14380a0b6f56df11b3f2a93160
|
7
|
+
data.tar.gz: 889ba91d7510b289de991c41d89d8dc766ac2b60c30bb0aa69aac9264e1649ed6517d3c8b123bb88c24559436edc3a3c9ce969a7e6e57ad28ace3c08a94f345e
|
@@ -98,7 +98,7 @@ VALUE method_run_monte_carlo( VALUE self, VALUE args ) {
|
|
98
98
|
int KType = NUM2INT( rb_hash_aref(MCInputs, rb_str_new2("knockout_type")) );
|
99
99
|
double S = NUM2DBL( rb_hash_aref(MCInputs, rb_str_new2("spot_rate")) );
|
100
100
|
int Ko_compare_mult = NUM2INT( rb_hash_aref(MCInputs, rb_str_new2("multiplier")) );
|
101
|
-
int
|
101
|
+
int ConvertNotional = NUM2INT( rb_hash_aref(MCInputs, rb_str_new2("convert_notional")) );
|
102
102
|
|
103
103
|
// assign leg specific attributes
|
104
104
|
double *pvs_pos = ( double* ) malloc( SCount * sizeof(double) );
|
@@ -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
|