move the math functions to a separate file; remove dependency on GSL due to license

This commit is contained in:
Kevin Keogh
2017-04-02 21:11:51 -04:00
parent d793ecb2fe
commit a8a96ba17a
6 changed files with 76 additions and 26 deletions

View File

@@ -1,15 +1,11 @@
#define _XOPEN_SOURCE
#include "black_scholes.h"
#include "utils.h"
#include <cblas.h>
#include <math.h>
#include <time.h>
double normalcdf(double value)
{
return 0.5 * erfc(-value * M_SQRT1_2);
}
double bsm(double spot, double rfr, double vol, double strike,
struct tm expiry, struct tm value, int type)
{