Closed pearu closed 3 years ago
For future reference, I am using data from this website rather than live data from Yahoo Finance!. One of the columns from this site contains the approximated value for the black-scholes model.
Pull Request has been submitted with implementing both the UDF and UDTF black-scholes model. https://github.com/xnd-project/rbc/pull/166
The Black–Scholes formula calculates the price of European put and call options.
The example of the BS formula application can be formulated both as a UDF as well as UDTF.
Goal: show a simple self-contained compute example that uses numpy functions under the hood
References:
Notes:
erf
function. RBC supports callingerf
from UDFs, however, this will not work when executing the SQL queries on CUDA-enabled omniscidb server (https://github.com/xnd-project/rbc/issues/159). As a workaround, see the numba example where the rational approximation of CFN is used.Tasks:
rbc.examples.retrieve_black_scholes_data(...)
Here is an initial implementation of BS as a UDF: