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 +4 -4
- data/ext/tarf_monte_carlo/tarf_monte_carlo.c +5 -6
- data/lib/tarf_monte_carlo/version.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc23d4cbeb2b027663b1e8f6a2a3bcb559f4c63874bb2751358ce2e11e76412c
|
4
|
+
data.tar.gz: 102bee43e62b5bff5e30e478b5bf030d5b5530c1bea05f49376bc2511d6c5716
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 ))
|
197
|
+
profit_loss = Spot - (*( LSts_array + leg ));
|
198
198
|
} else {
|
199
|
-
profit_loss =
|
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 ))
|
207
|
+
profit_loss_dash = Spot_dash - (*( LSts_array + leg ));
|
208
208
|
} else {
|
209
|
-
profit_loss_dash =
|
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;
|