tarf_monte_carlo 3.63 → 3.64
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 +4 -4
- 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: af22d9fe9fe8bc218f93bbba3664ca95e264370aaa6f56972b38ca9650034fae
|
4
|
+
data.tar.gz: 227a4f7f8c7af066183936588b512f758b0d66bf9a9889ee99f901f61efe4138
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3c41f13353e8adcc595bf19b2d9f0a4ed9325c90a6cb9f26398291ab9beb7696cdea10541055bb7b43f525312f0c567b318437371d40e95b4d16fd5da34faed
|
7
|
+
data.tar.gz: c50606f36a09b7b6e4130d1eab36e1a3a80ae5d0d02e1fb786eb55ef26c8a20c0203015dd1cf4ea04fc85f4382ce6083204e326a94e2292f6f3875485a4f4378
|
@@ -300,18 +300,18 @@ VALUE method_run_monte_carlo( VALUE self, VALUE args ) {
|
|
300
300
|
// Only Until Exp
|
301
301
|
else if( (KType == FX_AMERICAN_BARRIER_KIKO_UNTIL_EXP) && ((*(Barrier_array + leg) - *(Xs_array + leg)) * cp_sign > 0) && ((*(Barrier2_array + leg) - *(Barrier_array + leg)) * cp_sign > 0) ){
|
302
302
|
if ((knockedLeg == -1) && ((*(Barrier_array + leg) - Spot) * cp_sign <= 0)){ knockedLeg = leg; }
|
303
|
-
if ((knockedLeg2 == -1) && ((*(Barrier2_array + leg) - Spot) * cp_sign
|
303
|
+
if ((knockedLeg2 == -1) && ((*(Barrier2_array + leg) - Spot) * cp_sign <= 0)){ knockedLeg2 = leg; }
|
304
304
|
|
305
305
|
if ((knockedLeg_dash == -1) && ((*(Barrier_array + leg) - Spot_dash) * cp_sign <= 0)){ knockedLeg_dash = leg; }
|
306
|
-
if ((knockedLeg2_dash == -1) && ((*(Barrier2_array + leg) - Spot_dash) * cp_sign
|
306
|
+
if ((knockedLeg2_dash == -1) && ((*(Barrier2_array + leg) - Spot_dash) * cp_sign <= 0)){ knockedLeg2_dash = leg; }
|
307
307
|
}
|
308
308
|
|
309
309
|
else if( (KType == FX_AMERICAN_BARRIER_KIKO_UNTIL_EXP) && ((*(Barrier_array + leg) - *(Xs_array + leg)) * cp_sign < 0) && ((*(Barrier2_array + leg) - *(Barrier_array + leg)) * cp_sign < 0) ){
|
310
310
|
if ((knockedLeg == -1) && ((*(Barrier_array + leg) - Spot) * cp_sign >= 0)){ knockedLeg = leg; }
|
311
|
-
if ((knockedLeg2 == -1) && ((*(Barrier2_array + leg) - Spot) * cp_sign
|
311
|
+
if ((knockedLeg2 == -1) && ((*(Barrier2_array + leg) - Spot) * cp_sign >= 0)){ knockedLeg2 = leg; }
|
312
312
|
|
313
313
|
if ((knockedLeg_dash == -1) && ((*(Barrier_array + leg) - Spot_dash) * cp_sign >= 0)){ knockedLeg_dash = leg; }
|
314
|
-
if ((knockedLeg2_dash == -1) && ((*(Barrier2_array + leg) - Spot_dash) * cp_sign
|
314
|
+
if ((knockedLeg2_dash == -1) && ((*(Barrier2_array + leg) - Spot_dash) * cp_sign >= 0)){ knockedLeg2_dash = leg; }
|
315
315
|
}
|
316
316
|
} else if(KType == FX_AMERICAN_BARRIER_WINDOW_KNOCKIN || KType == FX_AMERICAN_BARRIER_WINDOW_KNOCKOUT){
|
317
317
|
profit_loss = Spot;
|