tarf_monte_carlo 3.26 → 3.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/tarf_monte_carlo/tarf_monte_carlo.c +9 -9
- data/lib/tarf_monte_carlo/version.rb +1 -1
- 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: 1f6e0254581e06a76f415afe43ce3869d9225f9dbe74986cbd1d77add2042ae6
|
4
|
+
data.tar.gz: 322411f7604d3fb8c34d966aed8a579f9b309fde2c7a24f7d10306a296cfc01a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12400b4041adbc26132b0d27524e48fb37b775b544161563647ff0c6d95aad019846d1a5bac2620436e7e5dd0d7a5943fbd1153e0b82993a3478909d11150b88
|
7
|
+
data.tar.gz: 94374cdfc84f4afc0f72f384ee068cd0ff4374f628714b452e5150048f1c8298c5cd5d141f4cd0d04cdffb80ce4a6f4330b7bdfb613d50083e24d626c606a2ad
|
@@ -228,12 +228,12 @@ VALUE method_run_monte_carlo( VALUE self, VALUE args ) {
|
|
228
228
|
profit_loss = dir_sign * dir2_sign * cp_sign * ( Spot - ( *( Xs_array + leg ) ) );
|
229
229
|
}
|
230
230
|
|
231
|
-
if(knockedLeg_dash == -1 && knockin_dash > 0){
|
232
|
-
|
233
|
-
}
|
234
|
-
if(knockedLeg_dash == -1 && knockin_dash < 0 && KType == FX_AMERICAN_BARRIER_KNOCKOUT_DISCRETE){
|
235
|
-
|
236
|
-
}
|
231
|
+
// if(knockedLeg_dash == -1 && knockin_dash > 0){
|
232
|
+
// knockedLeg_dash = leg;
|
233
|
+
// }
|
234
|
+
// if(knockedLeg_dash == -1 && knockin_dash < 0 && KType == FX_AMERICAN_BARRIER_KNOCKOUT_DISCRETE){
|
235
|
+
// profit_loss = dir_sign * dir2_sign * cp_sign * ( Spot_dash - ( *( Xs_array + leg ) ) );
|
236
|
+
// }
|
237
237
|
|
238
238
|
} else if ( KType == DOUBLE_STRIKE_POINTS || KType == DOUBLE_STRIKE_ABSOLUTE || KType == DOUBLE_STRIKE_LEGS ) {
|
239
239
|
if ( Spot < *( LSts_array + leg ) ) {
|
@@ -378,9 +378,9 @@ VALUE method_run_monte_carlo( VALUE self, VALUE args ) {
|
|
378
378
|
if(knockedLeg >= 0){
|
379
379
|
sim_pos[knockedLeg] = dir_sign * dir2_sign * cp_sign * ( Spot - ( *( Xs_array + (knockedLeg) ) ) ) * ( *( Ns_array + knockedLeg ) );
|
380
380
|
}
|
381
|
-
if(knockedLeg_dash >= 0 ){
|
382
|
-
|
383
|
-
}
|
381
|
+
// if(knockedLeg_dash >= 0 ){
|
382
|
+
// sim_dash_pos[knockedLeg_dash] = dir_sign * dir2_sign * cp_sign * ( Spot_dash - ( *( Xs_array + (knockedLeg_dash) ) ) ) * ( *( Ns_array + knockedLeg_dash ) );
|
383
|
+
// }
|
384
384
|
} else if(KType == FX_AMERICAN_BARRIER_KNOCKOUT_DISCRETE){
|
385
385
|
int brk_flg = 1;
|
386
386
|
int brk_flg_dash = 1;
|