Login Sign up

Monday Oct. 12, 2020, 4:45 p.m.–Oct. 12, 2020, 5:15 p.m. in Data Science Applications

A shared Python, R and Q (kdb+) Jupyter Notebook - A Quant Sandbox Dream

Rebecca Kelly

Audience level:
Novice

Brief Summary

Leveraging the fusion interfaces in kdb+/q, Python and R are loaded into shared memory which allows free choice between Python, R and q code cells in your notebook. Libraries from any can be imported and applied directly to the data, providing the perfect Quant Sandbox environment. For polyglots interested in finance, big data or time series analysis, this is a valuable tool to add to the box.

Outline

Talk outline:

  1. Introduction - 2 minutes

  2. Supply Context - Set the context of typical Quant work cycles and introduce the concept of a Quant Sandbox for those unfamiliar - approx 3 minutes

  3. Introduce the languages in question - a brief overview of the languages Python, R and kdb+/q and provide context on their typical usage in Finance with time series data. - approx 7 minutes

  4. Introduce the concept of shared environment - a brief note on why a shared environment would be beneficial - approx 3 minutes

  5. Worked demonstration - a walk through a typical financial quant notebook, using the three languages to show the syntax and functionality. - approx 10 minutes

  6. Closing statements - quick pros and cons, notes on supportability, SDLC and additional tools e.g. jupytext and github integration etc. - approx 5 minutes.

The central thesis of the talk is empowering developers with ready availability of the tools they need (or just prefer) to work with. Reducing the friction between languages (and even more conceptually, between data and code) allows developers to maintain their focus on solving the problem at hand, using the appropriate tool for each portion of the problem. The worked problem being demonstrated will be finance focused but the concepts are more universally applicable. This would also be the first public presentation of the shared three language environment outside of industry usage.

Attendees will come away with a concrete understanding of:

Required knowledge:

Some understanding of programming in one of Python, R or Q would be beneficial but is not required. The only requirement is a curiosity to see something unusual!

Relevant source code, articles, videos, or other information:

As this is the first public presentation of the shared three language environment outside of industry usage, I don’t have any public example notebooks to point you towards (these would be available at the time of the presentation). Code - The most relevant code would be similar example notebooks using just Python and q - available here. The required interfaces to share memory with Python and R are EmbedPy and EmbedR respectively. Videos - Installation of EmbedPy, overview of EmbedPy