tarf_monte_carlo 3.15.1 → 3.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c46dcadc23792b6ddc2ecf64ddd7c9fd3ff8f2d0e63ff724980d9b4e035ef7ba
4
- data.tar.gz: 4c9758d8596cb11ccb4d341b74eae1d89e8f375b4bde8d37f2307fa919d1bac2
3
+ metadata.gz: bc23d4cbeb2b027663b1e8f6a2a3bcb559f4c63874bb2751358ce2e11e76412c
4
+ data.tar.gz: 102bee43e62b5bff5e30e478b5bf030d5b5530c1bea05f49376bc2511d6c5716
5
5
  SHA512:
6
- metadata.gz: 52b46220de4844bcacaeca2be8828123e62c55c2f0a8209ea7e30558f31be31a996ecda344548b81a7a8861e08b5ece70de3dbf59564ee62d5af4ae509d72d24
7
- data.tar.gz: 7bdb222b49e64f948b28277ddb45782f8023f1b9ac6afc235f2802f24e4c268bb67ec75ffadfc366f779e3cdc6bafb9cd0a19f03af71136e2386a0b40259e339
6
+ metadata.gz: c635e944069ef99ea9f7b3cb1d5d18c07b0427288c91bd7d94a221dc1ec47eaed356aada77b8e51a73a3ef18ee20b9573717269702426f73f6efdb58e8e85fee
7
+ data.tar.gz: ad0c9836a15abc620d10070c08f5cdce970543a58aad47b311151915d39d3f540e7968b02ad63c85eeace9d5bcce17af8b6a1bf7d48d81dd1d927b1ba8476eeb
@@ -194,9 +194,9 @@ VALUE method_run_monte_carlo( VALUE self, VALUE args ) {
194
194
  } else if(Spot > *( USts_array + leg )){
195
195
  profit_loss = (*( USts_array + leg ) - Spot);
196
196
  } else if(Spot >= *( LSts_array + leg ) && (Spot < *(Ps_array + leg))) {
197
- profit_loss = (*( LSts_array + leg )) - Spot;
197
+ profit_loss = Spot - (*( LSts_array + leg ));
198
198
  } else {
199
- profit_loss = Spot - (*( USts_array + leg ));
199
+ profit_loss = (*( USts_array + leg )) - Spot;
200
200
  }
201
201
  // dash
202
202
  if ( Spot_dash < *( LSts_array + leg ) ) {
@@ -204,12 +204,11 @@ VALUE method_run_monte_carlo( VALUE self, VALUE args ) {
204
204
  } else if(Spot_dash > *( USts_array + leg )){
205
205
  profit_loss_dash = (*( USts_array + leg ) - Spot_dash);
206
206
  } else if(Spot_dash >= *( LSts_array + leg ) && (Spot_dash < *(Ps_array + leg))) {
207
- profit_loss_dash = (*( LSts_array + leg )) - Spot_dash;
207
+ profit_loss_dash = Spot_dash - (*( LSts_array + leg ));
208
208
  } else {
209
- profit_loss_dash = Spot_dash - (*( USts_array + leg ));
209
+ profit_loss_dash = (*( USts_array + leg )) - Spot_dash;
210
210
  }
211
- }
212
- else if ( BS == BUY ) {
211
+ } else if ( BS == BUY ) {
213
212
  if ( KType == PIVOT_POINTS ) {
214
213
  if ( *( Xs_array + leg ) > Spot && Spot > *( Ps_array + leg ) ) {
215
214
  profit_loss = 0.0;
@@ -1,7 +1,7 @@
1
1
  # gem build tarf_monte_carlo.gemspec
2
- # gem push -v tarf_monte_carlo-3.15.1.gem
2
+ # gem push -v tarf_monte_carlo-3.15.2.gem
3
3
  # gem yank tarf_monte_carlo -v 2.3
4
4
 
5
5
  module TarfMonteCarlo
6
- VERSION = "3.15.1"
6
+ VERSION = "3.15.2"
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.15.1
4
+ version: 3.15.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vivek Routh