Module Import alias identifier Import alias Import alias ImportFrom alias ImportFrom alias Assign NameStore Num Assign NameStore Num FunctionDef arguments args NameParam defaults body Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore BinOpDiv Num BinOpAdd Num BinOpMult Num Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpMult BinOpMult NameLoad Call AttributeLoad NameLoad attr BinOpMult BinOpMult Num NameLoad NameLoad BinOpMult NameLoad BinOpAdd NameLoad BinOpMult NameLoad BinOpAdd NameLoad BinOpMult NameLoad BinOpAdd NameLoad BinOpMult NameLoad BinOpAdd NameLoad BinOpMult NameLoad NameLoad If CompareGt NameLoad Num body Assign NameStore BinOpSub Num NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad For NameStore Call NameLoad Call NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad Assign NameStore BinOpDiv BinOpAdd Call AttributeLoad NameLoad attr BinOpDiv SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad BinOpMult BinOpAdd NameLoad BinOpMult BinOpMult Num NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad BinOpMult NameLoad NameLoad Assign NameStore BinOpSub NameLoad BinOpMult NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpMult BinOpMult Num NameLoad SubscriptLoad NameLoad Index NameLoad Assign SubscriptStore NameLoad Index NameLoad BinOpSub BinOpMult SubscriptLoad NameLoad Index NameLoad NameLoad BinOpMult BinOpMult SubscriptLoad NameLoad Index NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad BinOpSub BinOpMult BinOpMult SubscriptLoad NameLoad Index NameLoad NameLoad BinOpSub Num NameLoad BinOpMult SubscriptLoad NameLoad Index NameLoad BinOpSub Num NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Return BinOpAdd BinOpMult BinOpSub Num NameLoad NameLoad BinOpMult NameLoad NameLoad decorator_list FunctionDef arguments args defaults vararg body Assign NameStore Num Assign NameStore Num If CompareGtE Call NameLoad NameLoad Num body Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore UnaryOpUSub Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Num Num Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Num Num Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore UnaryOpUSub Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr For NameStore Call NameLoad NameLoad body Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Print BinOpMod Str BinOpDiv BinOpMult Num BinOpSub NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr For NameStore Call NameLoad NameLoad body Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Print BinOpMod Str BinOpDiv BinOpMult Num BinOpSub NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpSub NameLoad NameLoad Assign NameStore BinOpDiv Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Print BinOpMod Str NameLoad Print BinOpMod Str Call AttributeLoad NameLoad attr decorator_list If CompareEq NameLoad Str body Import alias Expr Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Slice Num
N/A N/A numpy np N/A math N/A time numba * blackscholes black_scholes N/A RISKFREE 0.02 N/A VOLATILITY 0.3 cnd_numba N/A N/A d N/A N/A N/A A1 0.31938153 N/A A2 -0.356563782 N/A A3 1.781477937 N/A A4 -1.821255978 N/A A5 1.330274429 N/A RSQRT2PI 0.398942280401 N/A K N/A 1.0 N/A 1.0 N/A 0.2316419 N/A N/A math fabs d N/A ret_val N/A N/A RSQRT2PI N/A N/A math exp N/A N/A -0.5 d d N/A K N/A A1 N/A K N/A A2 N/A K N/A A3 N/A K N/A A4 N/A K A5 N/A N/A d 0 N/A N/A ret_val N/A 1.0 ret_val N/A ret_val N/A autojit black_scholes_numba N/A N/A callResult putResult stockPrice optionStrike optionYears Riskfree Volatility N/A N/A N/A S stockPrice N/A X optionStrike N/A T optionYears N/A R Riskfree N/A V Volatility N/A i N/A range N/A len S N/A N/A sqrtT N/A N/A math sqrt N/A T N/A i N/A d1 N/A N/A N/A N/A math log N/A N/A S N/A i N/A X N/A i N/A N/A R N/A N/A 0.5 V V N/A T N/A i N/A V sqrtT N/A d2 N/A d1 N/A V sqrtT N/A cndd1 N/A cnd_numba d1 N/A cndd2 N/A cnd_numba d2 N/A expRT N/A N/A math exp N/A N/A -1.0 R N/A T N/A i N/A N/A callResult N/A i N/A N/A N/A S N/A i cndd1 N/A N/A N/A X N/A i expRT cndd2 N/A N/A putResult N/A i N/A N/A N/A N/A X N/A i expRT N/A 1.0 cndd2 N/A N/A S N/A i N/A 1.0 cndd1 N/A autojit randfloat N/A N/A rand_var low high N/A N/A N/A N/A N/A N/A 1.0 rand_var low N/A rand_var high N/A main N/A N/A N/A args N/A N/A OPT_N 4000000 N/A iterations 10 N/A N/A N/A len args 2 N/A N/A iterations N/A int N/A args N/A 0 N/A callResultNumpy N/A N/A np zeros OPT_N N/A putResultNumpy N/A N/A N/A np ones OPT_N N/A stockPrice N/A randfloat N/A N/A N/A np random random OPT_N 5.0 30.0 N/A optionStrike N/A randfloat N/A N/A N/A np random random OPT_N 1.0 100.0 N/A optionYears N/A randfloat N/A N/A N/A np random random OPT_N 0.25 10.0 N/A callResultNumba N/A N/A np zeros OPT_N N/A putResultNumba N/A N/A N/A np ones OPT_N N/A time0 N/A N/A time time N/A i N/A range iterations N/A N/A N/A black_scholes callResultNumpy putResultNumpy stockPrice optionStrike optionYears RISKFREE VOLATILITY N/A time1 N/A N/A time time N/A N/A Numpy Time: %f msec N/A N/A 1000 N/A time1 time0 iterations N/A time0 N/A N/A time time N/A i N/A range iterations N/A N/A N/A black_scholes_numba callResultNumba putResultNumba stockPrice optionStrike optionYears RISKFREE VOLATILITY N/A time1 N/A N/A time time N/A N/A Numba Time: %f msec N/A N/A 1000 N/A time1 time0 iterations N/A delta N/A N/A np abs N/A callResultNumpy callResultNumba N/A L1norm N/A N/A N/A delta sum N/A N/A N/A N/A np abs callResultNumpy sum N/A N/A L1 norm: %E L1norm N/A N/A Max absolute error: %E N/A N/A delta max N/A N/A N/A __name__ __main__ N/A N/A sys N/A N/A main N/A N/A sys argv N/A 1