tarf_monte_carlo 3.5 → 3.6

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: 67b1ad29c02a6eaa79c27b2bcd092d8d58736de856228479553c01275c74aa23
4
- data.tar.gz: a0f8a59cc28cec075cdaf3181aa41df49068efa7ef53613fb840d7582f91194d
3
+ metadata.gz: bb1130c50f083ee54950ca2a4d8325d462762da404fd52c8cd0a67534f1ea410
4
+ data.tar.gz: 5cfb4c9642286a14869655c2ba082add5226d076be8998c78c5df2eccbbd702f
5
5
  SHA512:
6
- metadata.gz: 71691b20d4de8c2c218280998dbd67a2c89d829001b46181186560ed15f8e644b1cc6e9c83b737c4f59e77adfe22e65bc34f2184d9e8d9f1f4d59efff8a2193e
7
- data.tar.gz: c8b637dfab5f1153e02bd61ff4e48742cd15507fd3dba45af07bad6a63224ce962ed8afbc88011d241cb82a919f94901fd76fbaa6a8e6f192beb3518c2fa8888
6
+ metadata.gz: a1bc8757d3a7945059c5784f6180e596576a828a8283bc03ffa85243425f2300136d10cf5a69e4480c79ede4be88010c2f73171f8750182bbf6da7d2b0b3716b
7
+ data.tar.gz: d7805cc57138165266e6e63b1ec062fad176ec598610c5317d21e9d756e097c060fe8b9101403df5ca91240619b316f46db2f47f433cb1aa80e4658985e0d8c7
@@ -205,7 +205,7 @@ VALUE method_run_monte_carlo( VALUE self, VALUE args ) {
205
205
  double temp_payoff_ko_ccy = temp_payoff * pow( *( Xs_array + leg ), Ko_compare_mult );
206
206
 
207
207
  if( temp_payoff_ko_ccy > ko_so_far ) {
208
- sim_pos[leg] = ko_so_far * pow( *( Xs_array + leg ), Ko_compare_mult );
208
+ sim_pos[leg] = ko_so_far * pow( *( Xs_array + leg ), (-1 * Ko_compare_mult) );
209
209
  ko_so_far = 0.0;
210
210
  } else if( temp_payoff_ko_ccy <= ko_so_far ) {
211
211
  sim_pos[leg] = temp_payoff; // take the payoff in +ve's
@@ -224,7 +224,7 @@ VALUE method_run_monte_carlo( VALUE self, VALUE args ) {
224
224
  double temp_payoff_ko_ccy = temp_payoff_dash * pow( *( Xs_array + leg ), Ko_compare_mult );
225
225
 
226
226
  if( temp_payoff_ko_ccy > ko_so_far_dash ) {
227
- sim_dash_pos[leg] = ko_so_far_dash * pow( *( Xs_array + leg ), Ko_compare_mult );
227
+ sim_dash_pos[leg] = ko_so_far_dash * pow( *( Xs_array + leg ), (-1 * Ko_compare_mult) );
228
228
  ko_so_far_dash = 0.0;
229
229
  } else if( temp_payoff_ko_ccy <= ko_so_far_dash ) {
230
230
  sim_dash_pos[leg] = temp_payoff_dash; // take the payoff in +ve's
@@ -402,4 +402,3 @@ void Init_tarf_monte_carlo() {
402
402
  rb_define_singleton_method(cTarfMonteCarlo, "box_muller", method_box_muller, 0);
403
403
  rb_define_singleton_method(cTarfMonteCarlo, "run_monte_carlo", method_run_monte_carlo, -2);
404
404
  }
405
-
@@ -3,5 +3,5 @@
3
3
  # gem yank tarf_monte_carlo -v 2.3
4
4
 
5
5
  module TarfMonteCarlo
6
- VERSION = "3.5"
6
+ VERSION = "3.6"
7
7
  end
@@ -4,11 +4,11 @@ require "tarf_monte_carlo/version"
4
4
  # my_malloc/my_malloc will be the shared object built when the gem is
5
5
  # installed then copied into lib/my_malloc/.
6
6
 
7
- begin
8
- require "tarf_monte_carlo/#{RUBY_VERSION[/\d+.\d+/]}/tarf_monte_carlo"
9
- rescue LoadError
10
- require "tarf_monte_carlo/tarf_monte_carlo"
11
- end
7
+ # begin
8
+ # require "tarf_monte_carlo/#{RUBY_VERSION[/\d+.\d+/]}/tarf_monte_carlo"
9
+ # rescue LoadError
10
+ # require "tarf_monte_carlo/tarf_monte_carlo"
11
+ # end
12
12
 
13
13
  module TarfMonteCarlo
14
14
  # Your code goes here...
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tarf_monte_carlo
3
3
  version: !ruby/object:Gem::Version
4
- version: '3.5'
4
+ version: '3.6'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vivek Routh
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-05 00:00:00.000000000 Z
11
+ date: 2020-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler