tarf_monte_carlo 3.70 → 4.0

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: aac96f23c9d9e9a4c66983afc7b7bc7c6d1ae2b982686dad3d76f426ff413bae
4
- data.tar.gz: e7a775cdac4703922ef797c42c9a56a3780b99004ca43747e390a2c778652dc9
3
+ metadata.gz: a84ace2095134b69a044f8b4459a0d5d55191f172c07bafeaf9c5ab6cba98700
4
+ data.tar.gz: 9ce02dbd9b0b5291f2861a26f3a617ae9dcdccd2824ed7baabfeaf362f9e80c6
5
5
  SHA512:
6
- metadata.gz: 403b211c16baa7a9645be1ab217fbbbb7c879c18e439739c9f0ccd773b8a22f8ca4fc2656381d2135af41e2cce92f56a67d23d7883127dad27bf5eb2a5715fd2
7
- data.tar.gz: fe1f4c219ab019318e3d6675a971a87c9bd7f50e4e759cfe0b48e507bf1ee247bb13c8828a00f70185483aa9d637f59c233f28c46a495739bdedf27ed4d6346d
6
+ metadata.gz: 30aec9a5b8a4c28ae9d0bb3097f83bdbb08736b1c58ed78dee7c79162f08f3e2e4853791f87cb5d43673ca192d2d8c5d577b844850b077ffa04d7f81149ed97c
7
+ data.tar.gz: fb00bbdd183633e3bbd9dfa838b9444eccb03710e92f8b1173b9706b5db3c42cd8151a20efeb4375dfd3827f502b6866155bcfa09b86ed4bb33d3395bebdeca4
@@ -12,12 +12,12 @@ NULLCMD = :
12
12
  #### Start of system configuration section. ####
13
13
 
14
14
  srcdir = .
15
- topdir = /home/user/.rvm/rubies/ruby-2.5.1/include/ruby-2.5.0
15
+ topdir = /Users/vivektripathi/.rvm/rubies/ruby-2.5.1/include/ruby-2.5.0
16
16
  hdrdir = $(topdir)
17
- arch_hdrdir = /home/user/.rvm/rubies/ruby-2.5.1/include/ruby-2.5.0/x86_64-linux
17
+ arch_hdrdir = /Users/vivektripathi/.rvm/rubies/ruby-2.5.1/include/ruby-2.5.0/x86_64-darwin18
18
18
  PATH_SEPARATOR = :
19
19
  VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
20
- prefix = $(DESTDIR)/home/user/.rvm/rubies/ruby-2.5.1
20
+ prefix = $(DESTDIR)/Users/vivektripathi/.rvm/rubies/ruby-2.5.1
21
21
  rubysitearchprefix = $(rubylibprefix)/$(sitearch)
22
22
  rubyarchprefix = $(rubylibprefix)/$(arch)
23
23
  rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
@@ -50,7 +50,7 @@ dvidir = $(docdir)
50
50
  htmldir = $(docdir)
51
51
  infodir = $(datarootdir)/info
52
52
  docdir = $(datarootdir)/doc/$(PACKAGE)
53
- oldincludedir = $(DESTDIR)/usr/include
53
+ oldincludedir = $(SDKROOT)/usr/include
54
54
  includedir = $(prefix)/include
55
55
  localstatedir = $(prefix)/var
56
56
  sharedstatedir = $(prefix)/com
@@ -67,8 +67,8 @@ CC = gcc
67
67
  CXX = g++
68
68
  LIBRUBY = $(LIBRUBY_SO)
69
69
  LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
70
- LIBRUBYARG_SHARED = -Wl,-rpath,$(libdir) -L$(libdir) -l$(RUBY_SO_NAME)
71
- LIBRUBYARG_STATIC = -Wl,-rpath,$(libdir) -L$(libdir) -l$(RUBY_SO_NAME)-static
70
+ LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
71
+ LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static -framework Foundation
72
72
  empty =
73
73
  OUTFLAG = -o $(empty)
74
74
  COUTFLAG = -o $(empty)
@@ -79,30 +79,30 @@ cflags = $(optflags) $(debugflags) $(warnflags)
79
79
  cxxflags = $(optflags) $(debugflags) $(warnflags)
80
80
  optflags = -O3
81
81
  debugflags = -ggdb3
82
- warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -Wno-maybe-uninitialized
83
- CCDLFLAGS = -fPIC
84
- CFLAGS = $(CCDLFLAGS) $(cflags) -fPIC $(ARCH_FLAG)
82
+ warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens
83
+ CCDLFLAGS = -fno-common
84
+ CFLAGS = $(CCDLFLAGS) $(cflags) -fno-common -pipe $(ARCH_FLAG)
85
85
  INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
86
86
  DEFS =
87
- CPPFLAGS = $(DEFS) $(cppflags)
87
+ CPPFLAGS = -I/usr/local/opt/libyaml/include -I/usr/local/opt/libksba/include -I/usr/local/opt/readline/include -I/usr/local/opt/zlib/include -I/usr/local/opt/openssl@1.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT $(DEFS) $(cppflags)
88
88
  CXXFLAGS = $(CCDLFLAGS) $(cxxflags) $(ARCH_FLAG)
89
- ldflags = -L. -fstack-protector -rdynamic -Wl,-export-dynamic
90
- dldflags = -Wl,--compress-debug-sections=zlib
89
+ ldflags = -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/openssl@1.1/lib
90
+ dldflags = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -L/usr/local/opt/libyaml/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/openssl@1.1/lib
91
91
  ARCH_FLAG =
92
92
  DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
93
- LDSHARED = $(CC) -shared
94
- LDSHAREDXX = $(CXX) -shared
95
- AR = ar
93
+ LDSHARED = $(CC) -dynamic -bundle
94
+ LDSHAREDXX = $(CXX) -dynamic -bundle
95
+ AR = libtool -static
96
96
  EXEEXT =
97
97
 
98
98
  RUBY_INSTALL_NAME = $(RUBY_BASE_NAME)
99
- RUBY_SO_NAME = ruby
99
+ RUBY_SO_NAME = ruby.2.5.1
100
100
  RUBYW_INSTALL_NAME =
101
101
  RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
102
102
  RUBYW_BASE_NAME = rubyw
103
103
  RUBY_BASE_NAME = ruby
104
104
 
105
- arch = x86_64-linux
105
+ arch = x86_64-darwin18
106
106
  sitearch = $(arch)
107
107
  ruby_version = 2.5.0
108
108
  ruby = $(bindir)/$(RUBY_BASE_NAME)
@@ -111,9 +111,9 @@ ruby_headers = $(hdrdir)/ruby.h $(hdrdir)/ruby/backward.h $(hdrdir)/ruby/ruby.h
111
111
 
112
112
  RM = rm -f
113
113
  RM_RF = $(RUBY) -run -e rm -- -rf
114
- RMDIRS = rmdir --ignore-fail-on-non-empty -p
115
- MAKEDIRS = /bin/mkdir -p
116
- INSTALL = /usr/bin/install -c
114
+ RMDIRS = rmdir -p
115
+ MAKEDIRS = /usr/local/opt/coreutils/bin/gmkdir -p
116
+ INSTALL = /usr/local/opt/coreutils/bin/ginstall -c
117
117
  INSTALL_PROG = $(INSTALL) -m 0755
118
118
  INSTALL_DATA = $(INSTALL) -m 644
119
119
  COPY = cp
@@ -122,8 +122,8 @@ TOUCH = exit >
122
122
  #### End of system configuration section. ####
123
123
 
124
124
  preload =
125
- libpath = . $(libdir)
126
- LIBPATH = -L. -L$(libdir) -Wl,-rpath,$(libdir)
125
+ libpath = . $(libdir) /usr/local/opt/libyaml/lib /usr/local/opt/libksba/lib /usr/local/opt/readline/lib /usr/local/opt/zlib/lib /usr/local/opt/openssl@1.1/lib
126
+ LIBPATH = -L. -L$(libdir) -L/usr/local/opt/libyaml/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/openssl@1.1/lib
127
127
  DEFFILE =
128
128
 
129
129
  CLEANFILES = mkmf.log
@@ -134,7 +134,7 @@ extout =
134
134
  extout_prefix =
135
135
  target_prefix = /tarf_monte_carlo
136
136
  LOCAL_LIBS =
137
- LIBS = $(LIBRUBYARG_SHARED) -lpthread -lgmp -ldl -lcrypt -lm -lc
137
+ LIBS = $(LIBRUBYARG_SHARED) -lpthread -ldl -lobjc
138
138
  ORIG_SRCS = tarf_monte_carlo.c
139
139
  SRCS = $(ORIG_SRCS)
140
140
  OBJS = tarf_monte_carlo.o
@@ -143,7 +143,7 @@ LOCAL_HDRS =
143
143
  TARGET = tarf_monte_carlo
144
144
  TARGET_NAME = tarf_monte_carlo
145
145
  TARGET_ENTRY = Init_$(TARGET_NAME)
146
- DLLIB = $(TARGET).so
146
+ DLLIB = $(TARGET).bundle
147
147
  EXTSTATIC =
148
148
  STATIC_LIB =
149
149
 
@@ -257,6 +257,7 @@ $(TARGET_SO): $(OBJS) Makefile
257
257
  $(ECHO) linking shared-object tarf_monte_carlo/$(DLLIB)
258
258
  -$(Q)$(RM) $(@)
259
259
  $(Q) $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
260
+ $(Q) $(POSTLINK)
260
261
 
261
262
 
262
263
 
@@ -43,8 +43,8 @@
43
43
 
44
44
  #define FX_AMERICAN_BARRIER_KNOCKIN_DISCRETE 13
45
45
  #define FX_AMERICAN_BARRIER_KNOCKOUT_DISCRETE 14
46
- #define FX_AMERICAN_BARRIER_WINDOW_KNOCKIN 15
47
- #define FX_AMERICAN_BARRIER_WINDOW_KNOCKOUT 16
46
+ #define FX_AMERICAN_BARRIER_DOUBLE_KNOCKIN 15
47
+ #define FX_AMERICAN_BARRIER_DOUBLE_KNOCKOUT 16
48
48
  #define FX_AMERICAN_BARRIER_KIKO_UNTIL_EXP 17
49
49
  #define FX_AMERICAN_BARRIER_KIKO_UNTIL_KI 18
50
50
  #define FX_AMERICAN_BARRIER_BINARY_IN_DISCRETE 19
@@ -104,11 +104,11 @@ double get_equivalent_rebate(int conversion_sign, double rebate, float rate, int
104
104
  }
105
105
 
106
106
  bool barrier_variations(int KType){
107
- return (KType == FX_AMERICAN_BARRIER_KNOCKIN_DISCRETE || KType == FX_AMERICAN_BARRIER_KNOCKOUT_DISCRETE || KType == FX_AMERICAN_BARRIER_WINDOW_KNOCKIN || KType == FX_AMERICAN_BARRIER_WINDOW_KNOCKOUT || KType == FX_AMERICAN_BARRIER_KIKO_UNTIL_EXP || KType == FX_AMERICAN_BARRIER_KIKO_UNTIL_KI || KType == FX_AMERICAN_BARRIER_BINARY_IN_DISCRETE || KType == FX_AMERICAN_BARRIER_BINARY_OUT_DISCRETE || KType == FX_AMERICAN_BARRIER_BINARY_CALLPUT_IN_DISCRETE || KType == FX_AMERICAN_BARRIER_BINARY_CALLPUT_OUT_DISCRETE);
107
+ return (KType == FX_AMERICAN_BARRIER_KNOCKIN_DISCRETE || KType == FX_AMERICAN_BARRIER_KNOCKOUT_DISCRETE || KType == FX_AMERICAN_BARRIER_DOUBLE_KNOCKIN || KType == FX_AMERICAN_BARRIER_DOUBLE_KNOCKOUT || KType == FX_AMERICAN_BARRIER_KIKO_UNTIL_EXP || KType == FX_AMERICAN_BARRIER_KIKO_UNTIL_KI || KType == FX_AMERICAN_BARRIER_BINARY_IN_DISCRETE || KType == FX_AMERICAN_BARRIER_BINARY_OUT_DISCRETE || KType == FX_AMERICAN_BARRIER_BINARY_CALLPUT_IN_DISCRETE || KType == FX_AMERICAN_BARRIER_BINARY_CALLPUT_OUT_DISCRETE);
108
108
  }
109
109
 
110
110
  bool double_barrier_variations(int KType){
111
- return (KType == FX_AMERICAN_BARRIER_WINDOW_KNOCKIN || KType == FX_AMERICAN_BARRIER_WINDOW_KNOCKOUT || KType == FX_AMERICAN_BARRIER_KIKO_UNTIL_EXP || KType == FX_AMERICAN_BARRIER_KIKO_UNTIL_KI);
111
+ return (KType == FX_AMERICAN_BARRIER_DOUBLE_KNOCKIN || KType == FX_AMERICAN_BARRIER_DOUBLE_KNOCKOUT || KType == FX_AMERICAN_BARRIER_KIKO_UNTIL_EXP || KType == FX_AMERICAN_BARRIER_KIKO_UNTIL_KI);
112
112
  }
113
113
  // main method for running monte carlo simulation from sidekiq worker/outside method
114
114
  VALUE method_run_monte_carlo( VALUE self, VALUE args ) {
@@ -313,7 +313,7 @@ VALUE method_run_monte_carlo( VALUE self, VALUE args ) {
313
313
  if ((knockedLeg_dash == -1) && ((*(Barrier_array + leg) - Spot_dash) * cp_sign >= 0)){ knockedLeg_dash = leg; }
314
314
  if ((knockedLeg2_dash == -1) && ((*(Barrier2_array + leg) - Spot_dash) * cp_sign >= 0)){ knockedLeg2_dash = leg; }
315
315
  }
316
- } else if(KType == FX_AMERICAN_BARRIER_WINDOW_KNOCKIN || KType == FX_AMERICAN_BARRIER_WINDOW_KNOCKOUT){
316
+ } else if(KType == FX_AMERICAN_BARRIER_DOUBLE_KNOCKIN || KType == FX_AMERICAN_BARRIER_DOUBLE_KNOCKOUT){
317
317
  profit_loss = Spot;
318
318
  profit_loss_dash = Spot_dash;
319
319
 
@@ -464,7 +464,7 @@ VALUE method_run_monte_carlo( VALUE self, VALUE args ) {
464
464
  // legs loop end
465
465
  // start from the Knock value
466
466
  double ko_so_far = K, ko_so_far_dash = K;
467
- if(KType == FX_AMERICAN_BARRIER_KNOCKIN_DISCRETE || KType == FX_AMERICAN_BARRIER_WINDOW_KNOCKIN){
467
+ if(KType == FX_AMERICAN_BARRIER_KNOCKIN_DISCRETE || KType == FX_AMERICAN_BARRIER_DOUBLE_KNOCKIN){
468
468
  if(knockedLeg >= 0){
469
469
  double equivalent_notional = *( Ns_array + knockedLeg );
470
470
  sim_pos[NL-1] = european_payoff(( *( Xs_array + (knockedLeg) ) ), sim[NL-1], cp_sign, dir_sign, equivalent_notional);
@@ -612,7 +612,7 @@ VALUE method_run_monte_carlo( VALUE self, VALUE args ) {
612
612
  metrics[1][point_pos+1] = (knockedLeg_dash >= 0) ? ( *( Xs_array + (knockedLeg_dash) ) ) : 0;
613
613
  metrics[3][point_pos+1] = knockedLeg_dash;
614
614
  }
615
- } else if(KType == FX_AMERICAN_BARRIER_KNOCKOUT_DISCRETE || KType == FX_AMERICAN_BARRIER_WINDOW_KNOCKOUT){
615
+ } else if(KType == FX_AMERICAN_BARRIER_KNOCKOUT_DISCRETE || KType == FX_AMERICAN_BARRIER_DOUBLE_KNOCKOUT){
616
616
  if(knockedLeg >= 0){
617
617
  sim_pos[knockedLeg] = get_equivalent_rebate(rebate_conversion_sign, ( *( Rebate_array + knockedLeg ) ), sim[knockedLeg], dir_sign);
618
618
  }
@@ -3,5 +3,5 @@
3
3
  # gem yank tarf_monte_carlo -v 2.3
4
4
 
5
5
  module TarfMonteCarlo
6
- VERSION = "3.70"
6
+ VERSION = "4.0"
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: '3.70'
4
+ version: '4.0'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vivek Routh
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  - !ruby/object:Gem::Version
141
141
  version: '0'
142
142
  requirements: []
143
- rubygems_version: 3.0.8
143
+ rubygems_version: 3.0.6
144
144
  signing_key:
145
145
  specification_version: 4
146
146
  summary: Monte Carlo Simulation.