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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dfddf29d3a8c0d3029234c9acba98d0579c2cd035395594b730b74dadd9353ff
4
- data.tar.gz: ee157914ed8faedc35096514802b25bd89eebdb6485300ad9e6762563ee65a1f
3
+ metadata.gz: e0c41c44926141bcfb2844cf5aeecd360c2562f6680f9d4efaeaf7a0f5081fa4
4
+ data.tar.gz: ac6e38b63727f83e65758da64ab4666261a94522bf5c2c4e1f6768c2e4e23597
5
5
  SHA512:
6
- metadata.gz: f1645aef91181a04b99a91bf8ae9bfb983b82b0cfd27b2932914042481642ca1f77a096f65def64ab94f71f7c6876a5d89fc03f8125a9115e952c3058125f62a
7
- data.tar.gz: 341783f3006b2c2d81181b3a1f7ca15c70550233e28991da9561f85dd60716a9190f6f126d6b2cf811841f15e2992f78b9c26d72383255c0b2a2c39c8bfcc066
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 convertNotional = NUM2INT( rb_hash_aref(MCInputs, rb_str_new2("convert_notional")) );
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
@@ -3,5 +3,5 @@
3
3
  # gem yank tarf_monte_carlo -v 2.3
4
4
 
5
5
  module TarfMonteCarlo
6
- VERSION = "3.17"
6
+ VERSION = "3.22"
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.17'
4
+ version: '3.22'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vivek Routh