tarf_monte_carlo 2.3.5 → 2.3.6

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: c2adfd31244ff802358d6142962880cec568f2bc43b32e522b55e222f37c0204
4
- data.tar.gz: 5e4d70308d246534cc0771056d45284b1e22f8a615b4e45bba72246a9ae55287
3
+ metadata.gz: 0aa559f1331081293c450d366e52847a785f5d1625184f88dbd5777c37ed12ff
4
+ data.tar.gz: 63f65cb9067dcde1ef52e1bce61dc381fbabab56212a5362f37cb3c47d20aa73
5
5
  SHA512:
6
- metadata.gz: 737fdb32197c5faab7a101bc8787a4e0ebfcc3662f1109b5d45a0b2d0e4f6d323e1154bfe77162ad147816934cc884fca30ecd6fdf91843e1c323d62afc71bb0
7
- data.tar.gz: b346dd215120270ffae8d7d2115f7002187b758fe452c790f6e39e16875ac76ad2cce676e1d016107c7ce782cf5a6e6f2299e790018b33b86f5ffea62b2b585d
6
+ metadata.gz: 0103ea38bf72f8f7da7b5bcf0a269ee060d37ae7ddd4198bfaa62a66b86f7ec3688c4d101e61eb070f7a67324ee81a6185044adf6048be1f4ef1d86fe5c6ab98
7
+ data.tar.gz: 6c32222f236d0e69d7934ddb471714d43a8eb42dfcda740940c51b837bde746b4d184c8fb94b94799aab0c84e47332a852737af338cc6fb2c1f2474d62da1d4e
@@ -29,6 +29,7 @@
29
29
  #define POINTS 2 // knockout by points
30
30
  #define LEGS 3 // knockout by legs
31
31
  #define DATAPOINTS 200 // data for plotting
32
+ #define INTERVAL 50
32
33
 
33
34
  // Defining a space for information and references
34
35
  // about the module to be stored internally
@@ -178,7 +179,8 @@ VALUE method_run_monte_carlo( VALUE self, VALUE args ) {
178
179
  //
179
180
  // Store spot and spot dash
180
181
  //
181
- if( (sim_count + 1) % 50 == 0 ) {
182
+ if( (sim_count + 1) % INTERVAL == 0 ) {
183
+ rb_p(rb_str_new2("True condition"));
182
184
  metrics[ point_pos ][ leg ] = Spot;
183
185
  metrics[ point_pos + 2 ][ leg ] = Spot_dash;
184
186
  }
@@ -188,8 +190,6 @@ VALUE method_run_monte_carlo( VALUE self, VALUE args ) {
188
190
  if ( MCType == UNCHAINED ) {
189
191
  Spot = S;
190
192
  Spot_dash = S;
191
- // VALUE sk = DBL2NUM( Spot );
192
- // rb_p(sk)
193
193
  }
194
194
  }
195
195
  // legs loop end
@@ -300,7 +300,7 @@ VALUE method_run_monte_carlo( VALUE self, VALUE args ) {
300
300
  //
301
301
  // store and send whichever payoff you want
302
302
  //
303
- if( (sim_count + 1) % 50 == 0 ) {
303
+ if( (sim_count + 1) % INTERVAL == 0 ) {
304
304
  metrics[ point_pos + 1 ][ leg ] = sim_pos[leg];
305
305
  metrics[ point_pos + 3 ][ leg ] = sim_dash_pos[leg];
306
306
  }
@@ -320,10 +320,11 @@ VALUE method_run_monte_carlo( VALUE self, VALUE args ) {
320
320
  //
321
321
  // increment metric storing point by 4
322
322
  //
323
- if( (sim_count + 1) % 50 == 0 ) {
323
+ if( (sim_count + 1) % INTERVAL == 0 ) {
324
324
  point_pos += 4;
325
325
  }
326
326
  }
327
+ // run simulations loop
327
328
 
328
329
  //
329
330
  // sum all final +ve and -ve payoffs
@@ -3,5 +3,5 @@
3
3
  # gem yank tarf_monte_carlo -v 2.3
4
4
 
5
5
  module TarfMonteCarlo
6
- VERSION = "2.3.5"
6
+ VERSION = "2.3.6"
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: 2.3.5
4
+ version: 2.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vivek Routh