tarf_monte_carlo 3.67 → 3.68

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4eaec9a6c923daa279367d27ae6d5c7739d54a8d6581395b887429907a028792
4
- data.tar.gz: 91f799dc24f730b68afdd7977cf5dbdca20e3d0d9973d3b3eb78ce044a898d81
3
+ metadata.gz: 2fa64303581fdfd8f57be13e97367ccd9c07d64bc7e4eeac8cdaa432d9c7dd71
4
+ data.tar.gz: 4b6851b1a03af9c991ad0b9d5396c78c81c88ab94c776191fe856d87699c8a1e
5
5
  SHA512:
6
- metadata.gz: 148485ef218f78f3bcda485866fbcb65197e47d052aab4c2266fd4df2512029b79c0ba1fcedc148a0d330444644539fadbef797b2dfaf6524e8586fb580bb0e4
7
- data.tar.gz: fbdef2214f7d80d306b9ace4e007aa49787145fa9b0962d1a11fd0ae836797a231988ea454c979f13f8ed92ad1fcd1995839f4fa1ffea5f6178eb1d134cf39fb
6
+ metadata.gz: da44ef843b722f1e2b2ef1b974c0b0d2d725a9a977a8748b72633fd7b55cf5749a8ea284efcb663923384440062038b5784214a58ad6ea280d3cffc19434c58c
7
+ data.tar.gz: 21318d9c0767bd83ba36ecab123b3189bef337b95c74726beb0e2c99ccc47cd8a356bbde7e14375dc102794dc79ba570b0034fb19c9a2800cc0bc84ac59eff92
@@ -283,14 +283,14 @@ VALUE method_run_monte_carlo( VALUE self, VALUE args ) {
283
283
  profit_loss_dash = Spot_dash;
284
284
 
285
285
  // Both Until KI & Exp
286
- if ( ((*(Barrier_array + leg) - *(Xs_array + leg)) * cp_sign <= 0) && ((*(Barrier2_array + leg) - *(Xs_array + leg)) * cp_sign >= 0) ){
286
+ if ( (((*(Barrier_array + leg) - *(Xs_array + leg)) * cp_sign) <= 0) && (((*(Barrier2_array + leg) - *(Xs_array + leg)) * cp_sign) >= 0) ){
287
287
  if ((knockedLeg == -1) && ((*(Barrier_array + leg) - Spot) * cp_sign >= 0)){ knockedLeg = leg; }
288
288
  if ((knockedLeg2 == -1) && ((*(Barrier2_array + leg) - Spot) * cp_sign <= 0)){ knockedLeg2 = leg; }
289
289
 
290
290
  if ((knockedLeg_dash == -1) && ((*(Barrier_array + leg) - Spot_dash) * cp_sign >= 0)){ knockedLeg_dash = leg; }
291
291
  if ((knockedLeg2_dash == -1) && ((*(Barrier2_array + leg) - Spot_dash) * cp_sign <= 0)){ knockedLeg2_dash = leg; }
292
292
  }
293
- else if( ((*(Barrier_array + leg) - *(Xs_array + leg)) * cp_sign >= 0) && ((*(Barrier2_array + leg) - *(Xs_array + leg)) * cp_sign <= 0) ){
293
+ else if( (((*(Barrier_array + leg) - *(Xs_array + leg)) * cp_sign) >= 0) && (((*(Barrier2_array + leg) - *(Xs_array + leg)) * cp_sign) <= 0) ){
294
294
  if ((knockedLeg == -1) && ((*(Barrier_array + leg) - Spot) * cp_sign <= 0)){ knockedLeg = leg; }
295
295
  if ((knockedLeg2 == -1) && ((*(Barrier2_array + leg) - Spot) * cp_sign >= 0)){ knockedLeg2 = leg; }
296
296
 
@@ -298,7 +298,7 @@ VALUE method_run_monte_carlo( VALUE self, VALUE args ) {
298
298
  if ((knockedLeg2_dash == -1) && ((*(Barrier2_array + leg) - Spot_dash) * cp_sign >= 0)){ knockedLeg2_dash = leg; }
299
299
  }
300
300
  // Only Until Exp
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) ){
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
303
  if ((knockedLeg2 == -1) && ((*(Barrier2_array + leg) - Spot) * cp_sign <= 0)){ knockedLeg2 = leg; }
304
304
 
@@ -306,7 +306,7 @@ VALUE method_run_monte_carlo( VALUE self, VALUE args ) {
306
306
  if ((knockedLeg2_dash == -1) && ((*(Barrier2_array + leg) - Spot_dash) * cp_sign <= 0)){ knockedLeg2_dash = leg; }
307
307
  }
308
308
 
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) ){
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
311
  if ((knockedLeg2 == -1) && ((*(Barrier2_array + leg) - Spot) * cp_sign >= 0)){ knockedLeg2 = leg; }
312
312
 
@@ -3,5 +3,5 @@
3
3
  # gem yank tarf_monte_carlo -v 2.3
4
4
 
5
5
  module TarfMonteCarlo
6
- VERSION = "3.67"
6
+ VERSION = "3.68"
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tarf_monte_carlo
3
3
  version: !ruby/object:Gem::Version
4
- version: '3.67'
4
+ version: '3.68'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vivek Routh