tarf_monte_carlo 3.33 → 3.34
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 +4 -2
- 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: 6ba6dd94cb23ba87cba4dfe1247ff41902d8644efacbbbf1b712ea7d61cc8341
|
4
|
+
data.tar.gz: da934c46905408ad6bc80694e4b2644535078437fd347c8f986aa9eb71c777b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b08cf5f89f3776766cb26d99fdad66b67f2783312ce9489f9ae934ffc359601261b80f9f0f9a2bbb19fd346f8230a3934ce6080ea0b4d755b3bbba34bbc7f1e2
|
7
|
+
data.tar.gz: b016ab0298d3041ab725d37a3a7aa74be2f8fbe33d510c2f6ef1dd55298d1d1209694234a227b028ed01d50009c112a15ebeaf5a07b2edce43e3e098bc01e23f
|
@@ -90,11 +90,13 @@ double european_payoff(double strike, double spot, int cp_sign, int dir_sign, do
|
|
90
90
|
}
|
91
91
|
|
92
92
|
double get_equivalent_notional(int conversion_sign, double notional, float rate){
|
93
|
-
|
93
|
+
double eq = (conversion_sign == 1) ? (notional / rate) : notional;
|
94
|
+
return eq;
|
94
95
|
}
|
95
96
|
|
96
97
|
double get_equivalent_rebate(int conversion_sign, double rebate, float rate){
|
97
|
-
|
98
|
+
double eq = (conversion_sign == 1) ? (rebate * rate) : rebate;
|
99
|
+
return eq;
|
98
100
|
}
|
99
101
|
|
100
102
|
// main method for running monte carlo simulation from sidekiq worker/outside method
|