{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "code", "collapsed": false, "input": [ "%autosave 10" ], "language": "python", "metadata": {}, "outputs": [ { "javascript": [ "IPython.notebook.set_autosave_interval(10000)" ], "metadata": {}, "output_type": "display_data" }, { "output_type": "stream", "stream": "stdout", "text": [ "Autosaving every 10 seconds\n" ] } ], "prompt_number": 1 }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Context of financial industry\n", "\n", "### Cost, resources, regulations\n", "\n", "- Increasing regulatory requirements.\n", "- Require cost efficiency and short time to market; contradictory.\n", " - Outsourcing, cheaper in short term, has higher end-to-end long term cost.\n", " - Need better QA, more management.\n", "\n", "### Homogenous -> heterogenous tech stacks\n", "\n", "- Used to have everything (OpenVMS, COBOL) for 10-15 years.\n", "- Now very hetereogenous (LAMP).\n", "- Financial companies keep adding very niche, massive services, and interconnect with interfaces.\n", " - Unwieldy, massive, extremely proprietary.\n", "- Can Python become a universal end-to-end tool? Deutsche B\u00f6rse Group have tried." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## What is an exchange now?\n", "\n", "- Used to be large, spacious buildings full of people\n", "- Now large data centres, multiple to offer failover.\n", "- Spectacular amount of cooling. Data centre techs like talking about cooling.\n", "- Deutsche B\u00f6rse is unique, integrated vertical chain of many services, unlike LSE or NASDAQ.\n", " - Many integrated services, many direct connections to other countries.\n", " - more than 420 participants, > 8000 traders, > 30 markets\n", "- Round trip processing time from 4ms to 200 microseconds. New system Linux, distribution.\n", " - Why does it need to be fast? To ameliorate arbitrage.\n", " - If you don't execute fast enough then the fastest competitors can effectively execute arbitrage amongst exchanges." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## History of Python\n", "\n", "- SEC proposed Issuers of Asset Backed Securities, in April 2010, to document algorithms in executable Python\n", " - Caused consternation amongst big compnies; why Python, and can't do open source.\n", "- 2010-today: Python for analysis and simulation of Eurex pricing, very successful." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Current stack (T7)\n", "\n", "- RHEL with MRG (?) kernel\n", "- Boost (C++)\n", "- IBM WLLM (?)\n", "- Python\n", " - Spreadsheet-based data driven script generator (D2SG)\n", " - Specify model and data in spreadsheet\n", " - Auto-generate test cases, then execution.\n", " - Uses PyUno, macro language module.\n", " - Distributed automated performance tester (AUTOPET)\n", "- MySQL, JBOSS, Apache ActiveMQ" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##\u00a0Pricing\n", "\n", "- Very complex, unmodelable in spreadsheets\n", " - e.g. Market makers get discount for providing volume that allows exchanges to function, risky.\n", "- Use Python to run simulations to determine pricing\n", " - Can't use averages, summary statistics. Too stochastic.\n", " - pandas + HDF5 makes short work of massive data sets that serve as basis of simulations.\n", " - e.g. Monte Carlo\n", " - Can execute 10 million+ row data set simulations in seconds.\n", " - Also very concise, human-readable descriptions of contracts that govern pricing agreements that cannot be expressed in spreadsheets." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## VSTOXX tutorial\n", "\n", "- Help people new to the VSTOXX index develop their own stochastic models and conduct their own research\n", "- pandas / numpy / scipy / HDF5\n", "- [http://eurexchange.com/vstoxx](http://eurexchange.com/vstoxx)\n", "- JavaScript visualisation of example generated model.\n", "- (!!AI I think this is the same tutorial we did the first day)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## StatistiX\n", "\n", "- Currently share SQL data to customers. Interface is phone calls or email (!)\n", "- Want to move to an on-demand Python-based interface to exchange data.\n", "- Excited about IPython Notebook as primary customer interface.\n", "- Also DevOps (configuration management), to improve documentation of system architecture." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Industry trends\n", "\n", "- Python is increasingly used not to small websites but large deployments, many industries.\n", "- Java/C++ decreasing in mind-share, Python is creeping up.\n", "- Ohloh statistics: Java/C++ stagnating, Python is steadily increasing in monthy contributors and contributions.\n", "- Python is glue to extremely high performance software libraries (LLVM, Numba, Cython, pandas, HDF5, scipy, scikit)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "##\u00a0Why should \"software factory\" businesses care?\n", "\n", "- Python is multi-paradigm. Teach once, apply everywhere.\n", "- Rapid prototyping, test and fail fast. Reduce time to market.\n", "- Avoid vendor lock in, because increasingly vendors lag too far behind industry cutting edge.\n", "- Open source: \"invest in people, not in licenses\"." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## End goal\n", "\n", "- IT value chain:\n", " - Business -> IT -> IT Factory -> IT Operations\n", "- End-to-end Python development framework\n", "- Good at last two, not good at first two.\n", "- Get *everyone* in business to use Python, integrate the whole business under one active, supported framework.\n", "- But, not looking for a Holy Grail and throw away everything and start from scratch.\n", "- Python is a swiss army knife, fun, vibrant, and offers end-to-end integration." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Questions\n", "\n", "- How can you hope to convert people from spreadsheets?\n", " - No Holy Grail. Financial people are very wedded to spreadsheets and VBA.\n", " - People, when they encounter problems difficult to solve in spreadsheets/VBA, will move themselves to Python.\n", "- Do you use Python for high performance tasks?\n", " - No, not for low-latency environment. There they use C to achieve sub-millisecond round trip times.\n", " - But not all tasks are low latency.\n", " - For end-to-end IT projects, higher proportion, substantial portion, spent in prototyping / initial feasibility stages.\n", " - Python helps to reduce upfront costs on large IT proejcts.\n", " - And if there are specific latency/speed/data issues, then tweak that small fraction.\n", " - Prototyping in Python 3-4 lines can take massive amounts of time in C++, and you never shed this initial burden or share it easily.\n", "- Largest obstacles to Python are human and cultural. What are your experiences?\n", " - No, haven't encountered this.\n", " - Don't force people to use Python, just show them how much easier it is." ] }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }